See http://www.w3.org/TR/xslt#built-in-rule

Gary
-----Original Message-----
From: David Frankson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 14, 2001 3:22 PM
To: [EMAIL PROTECTED]
Subject: Odd text node behavior


    I'm getting strange XSLT behavior, and I'm wondering if you guys
could explain it...

XML source:

<?xml version="1.0" encoding="UTF-8"?>
<XMLRoot><test1>Why is this text displayed?</test1><test2/></XMLRoot>


XSL source:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
 <xsl:template match="//test2">
     <here/>
   </xsl:template>
</xsl:stylesheet>


Output:

<?xml version="1.0" encoding="UTF-8"?>
Why is this text displayed?<here/>


This should be re-producible in Xalan 2.2D10 and in Saxon 6.4.3.  Can
anyone explain to me why the text node gets written out when the XSL
does not even reference that section on the input XML?

Dave Frankson

Reply via email to