You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Boisvert, Eric" <eb...@nrcan.gc.ca> on 2007/03/30 14:56:45 UTC

Different behavior in XSLT for match="text()"

I have different behaviors when I use the same stylesheet with the same document in XMLSpy vs cocoon.

In XMLSpy (with the internal XSLT engine and MS engine)

<xsl:template match="text()"> 
Only matches the text (the part between the tag, if any, and ignores the other nodes -- I don't have mixed content documents)

While the same thing in cocoon 2.1.10 (I tried both Xalan and saxon), the same template matches ALL nodes (and the <xsl:value-of select="."/> returns all text in all child nodes)

What I want is the XMLSpy behavior (only the text).

Anybody knows why the behavior is different ? (and which is the correct behavior ?) 

Thanks


================================================================
Eric Boisvert
Spécialiste TI-GI / IT-IM specialist
Eric.Boisvert@rncan.gc.ca, 418-654-3705, facsimile/télécopieur 
418-654-2615
490, rue de la Couronne, Québec (Québec), G1K 9A9
490, rue de la Couronne, Quebec, Quebec, G1K 9A9

Laboratoire de cartographie numérique et de photogrammétrie (LCNP)
Digital Cartography and Photogrammetry Laboratory (DCPL)
Commission géologique du Canada (Québec) / Geological Survey of Canada (Quebec)
Ressources naturelles Canada / Natural Resources Canada
Gouvernement du Canada / Government of Canada
http://cgc.rncan.gc.ca/org/quebec
http://cgc.rncan.gc.ca/dir/index_f.php?id=4186 / http://cgc.rncan.gc.ca/dir/index_e.php?id=4186





Re: Different behavior in XSLT for match="text()"

Posted by Tobia <to...@linux.it>.
Boisvert, Eric wrote:
> I have different behaviors when I use the same stylesheet with the
> same document in XMLSpy vs cocoon.

Can you please provide a minimal XSLT + minimal XML document that
displays the difference?


Tobia

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org