Added namespaces; now nothing works!

Thomas Weholt thomas at cintra.no
Thu Mar 8 12:18:23 CET 2001


Hi,

I have a xml-document I've decided to add namespaces to. Tried to convert my
old stylesheet to reflect the changes and parse it to HTML with XT, but now
nothing but the stylesheet ends up in the resulting document. What am I
doing wrong?

The xml-document :

<?xml version="1.0" encoding="iso-8859-1"?>
<container xmlns="http://www.w3c.org/TR/REC-html40"
 xmlns:jcd="http://www.weholt.no/jeezez/jcd/1.0"
 xmlns:jeezez="http://www.weholt.no/jeezez/">
  <jeezez:header>
   <jcd:test>TestValue</jcd:test>
  </jeezez:header>
 <jeezez:items>
  <jcd:item>
          <jcd:ID>1</jcd:ID>
          <jcd:filename>alice.txt</jcd:filename>
  </jcd:item>
 </jeezez:items>
</container>

The stylesheet, just a simple thing to get something into the browser or
result document :
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3c.org/1999/XSL/Transform"
  xmlns="http://www.w3c.org/TR/REC-html40"
 xmlns:jcd="http://www.weholt.no/jeezez/jcd/1.0"
 xmlns:jeezez="http://www.weholt.no/jeezez/">

<xsl:output method="html"/>

<xsl:template match="/">
    <HTML>
      <BODY>
         <xsl:apply-templates/>
     </BODY>
   </HTML>
</xsl:template>

<xsl:template match="jeezez:header">
 <b><xsl:value-of select="jcd:test"/></b>
</xsl:template>
</xsl:stylesheet>

I only get the entire stylesheet as result. No formatting done whatsoever.
If somebody could provide a dead-simple stylesheet that just enters the
value of the jcd:test-tag in the result document I'd be happy.

Just started using namespaces so I just need a kick to get going. Thanks!!

Best regards,
Thomas Weholt





More information about the Python-list mailing list