xsl-list
[Top] [All Lists]

Re: alphabetic counters

2004-05-10 13:01:23
Passin, Tom wrote this message on Mon, May 10, 2004 at 15:18 -0400:
But outputting nodes within an xml:if and closing them within another 
causes parse errors in Libxslt and Sablotron.

You want something like this:
<xsl:template select="/">
<rows>
        <xsl:if test="boolean(1)">
                <xsl:attribute name="ifattr">the value</xsl:attribute>
        </xsl:if>
</rows>
</xsl:tempalte>

That will output:
<rows ifattr="the value"/>
Notice how you use the attribute to set an attribute on the enclosing
rows element?  And this maintains well formed XML along with letting
you handle if statements to manipulate the output nodes.

-- 
John-Mark Gurney
nCircle Network Security, Inc.


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