xsl-list
[Top] [All Lists]

root node template - unmatching pattern?

2004-11-23 10:09:50
Hi all

I'm struggling with the following (ridiculous) piece of style:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:o="http://www.xyz.it/be";
 xmlns="http://www.xyz.it/pdflib/tfl";
 exclude-result-prefixes="o"
 version="1.0"

 <xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/>
 <xsl:template match="/">
  <test>Correctly matched!</test>
 </xsl:template>
</xsl:stylesheet>

Using it to transform the following xml content, I get no output from my
processor (MSXML4):

<?xml version="1.0" encoding="ISO-8859-1"?>
<documents
 xmlns="http://www.xyz.it/consulta/xdmModel";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

 <document id="000190OFFCLI2004">
  <header>
   <caption>Offerta</caption>
  </header>
  <body xmlns:d="http://www.xyz.it/be";>
   <d:offerta>
    <d:intestazione>
     <d:documento>
      <d:titolo>OFFERTA A CLIENTE</d:titolo>
      <d:protocollo>190</d:protocollo>
     </d:documento>
    </d:intestazione>
   </d:offerta>
  </body>
 </document>
</documents>

The awful ;-) pattern "/" (that should match the template with the content
root node) seems definitely correct (couldn't it be?).
Maybe the wrong result is due to a namespace issue?

Thanks

Stefano

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--