xsl-list
[Top] [All Lists]

[xsl] text nodes not merged

2006-09-14 08:13:40
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

--~------------------------------------------------------------------
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>