[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

text nodes not merged

Subject: text nodes not merged
From: Wolfgang Jeltsch <wolfgang@xxxxxxxxxxx>
Date: Thu, 14 Sep 2006 17:13:22 +0200
 text nodes not merged
Hello,

please consider this stylesheet:

	<?xml version="1.0"?>
	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:example="http://www.example.com/"
		version="2.0">
	  <xsl:function name="example:double-text">
	    <xsl:param name="node"/>
	    <xsl:value-of select="$node"/>
	    <xsl:text>#</xsl:text>
	  </xsl:function>
	  <xsl:template match="/">
	    <hello>
	      <xsl:for-each select="example:double-text(/)">
	        <hi>
	          <xsl:value-of select="."/>
	        </hi>
	      </xsl:for-each>
	    </hello>
	  </xsl:template>
	</xsl:stylesheet>

According to http://www.w3.org/TR/xslt20/#constructing-complex-content
(point 6 in the list there), the two text nodes created by the function's 
sequence constructor should be merged, as far as I can see.  However, they 
aren't which is shown by the fact that the stylesheet outputs two hi elements 
instead of one.  What's wrong here?

By the way, I use the open-source edition of Saxon 8.7.3J on Debian GNU/Linux 
3.1.

Best wishes,
Wolfgang

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.