I have encountered two problems, possible bugs, using Sablotron
0.50 with command line parameters.

I am running this simple stylesheet

--- test.xslt ---
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0"
>

<xsl:output method="html" encoding="iso-8859-1" indent="yes"/>

<xsl:template match="/">
 <xsl:param name="p"/>

 <xsl:element name="{$p}"/><xsl:text>

</xsl:text>
</xsl:template>

</xsl:stylesheet>
--- test.xslt END ---

using this command line

--- cmd ---
sabcmd test.xslt test.xml '$p=test'
--- cmd END ---

and I get this output:

--- output ---
<></>

--- output END ---

I believe that <></> is illegal XML and should be flagged as an
error by Sablotron.

Also, I do not understand why my command line parameter $p=test
is not being seen by sabcmd. Further testing shows:

--- debug ---
$ sabcmd --debug test.xslt test.xml '$p=test'

Command line parse results:
Names (2)
        test.xslt
        test.xml
Parameters (1)
        p = test
Named buffers (0)
Settings
        Times           0
        Mode            8
        Base            [null]
        Log             [null]                                  
--- debug END ---

so sabcmd does see a parameter, but does not seem to use it. I
believe that this is a bug, too.

I am using

--- version ---
sabcmd --version

sabcmd 0.50 (December 19, 2000)
copyright (C) 2000 Ginger Alliance (www.gingerall.com)

The Sablotron XSLT Processor comes with NO WARRANTY.
It is subject to the Mozilla Public License Version 1.1.
Alternatively, you may use Sablotron under the GNU General
Public License.
--- version END ---

Kristian
                                                                      

Reply via email to