Hi,

I've been trying to use the perl frontend for Sablotron and have 
experienced an odd problem. When I combine a stylesheet with some XML using 
the command line version of Sab. I get the expected output. However, using 
the same stylesheet an XML withing perl, I get trailing data at the end of 
the output:

<xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns="http://www.w3.org/TR/xhtml1/strict">

<xsl:template match="CGIVars">
   <html>
   <head>
     <title>Test</title>
   </head>
   <body>
   <table>
     <tr>
       <th>Var</th><th>Val</th>
     </tr>
     <xsl:for-each select="/blob/CGIVars//*">
       <xsl:call-template name="print"/>
     </xsl:for-each>
   </table>
   </body>
   </html>
</xsl:template>

<xsl:template name="print">
  <TR>
  <TD>
  <xsl:value-of select="name()"/>
  </TD><TD>
  <xsl:value-of select="text()"/>
  </TD>
  </TR>
</xsl:template>
</xsl:stylesheet>

<?xml version="1.0" ?>
<blob>
   <CGIVars>
     <username>254916b</username>
     <email>[EMAIL PROTECTED]</email>
     <action>add</action>
   </CGIVars>
   <UserInfo>
     <Searches>
       <one>plumbers</one>
       <three>pheasant pluckers son</three>
       <two>pheasant pluckers</two>
     </Searches>
   </UserInfo>
   <TestVars>
     <one>2</one>
     <three>4</three>
     <two>3</two>
   </TestVars>
</blob>

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/TR/xhtml1/strict">
<head>
   <title>Test</title>
</head>
<body>
   <table>
     <tr>
       <th>Var</th>
       <th>Val</th>
     </tr>
     <TR>
       <TD>username</TD>
       <TD>254916b</TD>
     </TR>
     <TR>
       <TD>email</TD>
       <TD>[EMAIL PROTECTED]</TD>
     </TR>
     <TR>
       <TD>action</TD>
       <TD>add</TD>
     </TR>
   </table>
</body>
</html>plumberspheasant pluckers sonpheasant pluckers243

This test is a bit of a hybrid of previous tests (hence the bizarre 
content), but it is common throughout the tests that I've done. Any 
thoughts? Am I doing something totally stupid?

TIA

Steve


Reply via email to