Re: [xsl] Strict sequential identity rule?

Subject: Re: [xsl] Strict sequential identity rule?
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Wed, 21 Sep 2005 15:05:13 +0200
Tempore 14:47:37, die 09/21/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Dimitre Novatchev <dnovatchev@xxxxxxxxx>:

Is the following statement true or false:

"The transformation below is an identity transformation":

 <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
	<xsl:output omit-xml-declaration="yes"/>
	<xsl:template match="@* | node()">
		<xsl:copy>
			<xsl:apply-templates select="@*"/>
			<xsl:apply-templates select="node()[1]"/>
		</xsl:copy>
		<xsl:apply-templates select="following-sibling::node()[1]"/>
	</xsl:template>
</xsl:stylesheet>

I'd say FALSE, because it cannot handle this XML document properly:


<!-- foo -->
<bar>baz</bar>


regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Don't send spam. I don't like it and it is illegal.

Current Thread