xsl-list
[Top] [All Lists]

[xsl] Different results with different processors

2007-06-07 15:06:20
I'm comparing the processing the same stylesheet using Xalan and
libxslt (xsltproc)

Xalan produces expected output. xsltproc has some issues. Xalan
interprets this expression correctly (at least /I/ think it does... :)
libxslt does not...

<xsl:apply-templates select="node()[name() != 'bar']" />

I find it hard to articulate what I am seeing. I'll do my best... What
is getting subsequently selected by libxslt isn't the same thing as
what xalan selects. If I rewrite the expression to pick a specific set
of nodes
<xsl:apply-templates select="foo" /> I get the expected result. If I
re-write it to use a for-each ...

<xsl:for-each select="node()[name() != 'bar']">
 <xsl:apply-templates select="." />
</xsl:for-each>

It behaves as expected.

I don't understand the difference between xalan and libxslt's
interpretation of the statement, and why re-writing it makes all the
difference. Am I doing something wrong? Am I hitting on a
incompatibility I am unaware of?

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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