xsl-list
[Top] [All Lists]

Re: How to simplify this?

2004-09-23 02:56:31
Hi!


can you post a small example?


Yes, following code:

<?xml version="1.0" standalone="yes"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; >
        <xsl:output method="html" encoding="UTF-8" />
        <xsl:template match="/">
        <xsl:variable name="thead_id" select="1" />
        <xsl:variable name="tbody_id" select="2" />
                <html>
                        <head>
                                <title>test</title>
                        </head>
                </html>
                <body>
                <a href="" onclick="setArrow(
{position()-1}),'{$thead_id}' ); return sortTable(
'{$tbody_id}',{position()-1} );" > test </a>
                </body>
                </html>
        </xsl:template>
</xsl:stylesheet>

produce this in XML-SPY from Altova:

<html>
<head><META http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>test</title></head></html><body>
<a href="" onclick="setArrow( 0),'{$thead_id}' ); return sortTable(
'{$tbody_id}',0 );"> test </a>
</body>
</html>

But if i run this short example on command line with vbscript (MSXML
4), so the output is correct. 
When i run my big xsl-file, so i get vb-script error on the line. I
don't know why. Can i send you my xsl and xml direct, so you can see
the problem?


Best regards
A. Metz


<Prev in Thread] Current Thread [Next in Thread>