xsl-list
[Top] [All Lists]

document-uri gives empty sequence

2005-11-07 06:05:10
Hi list,
I've troubles to get document-uri function working in Saxon 8.6,
even though I had it working in Saxon 8.5.1. The example in Michael
Kay's book "XPath 2.0" is very similar to the test case here
(p.333, 3rd line should read '<p><a href="{document-uri(.)}">' ):

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<doc>
        <xsl:for-each select="collection('Namen?select=*.xml')">
                <reg>
                        <h1><xsl:value-of select="body/h3"/></h1>
                        <uri><xsl:value-of select="document-uri(.)"/></uri>
                </reg>
        </xsl:for-each>
</doc>
</xsl:template>
</xsl:stylesheet>

With only 1 file in the input folder
<?xml version="1.0" encoding="UTF-8"?>
<body>
   <h3>Dr. Johann Ruprecht Hegenmüller</h3>
</body>

I get this output - but no uri:
<?xml version="1.0" encoding="UTF-8"?>
<doc>
   <reg>
      <h1>Dr. Johann Ruprecht Hegenmüller</h1>
      <uri/>
   </reg>
</doc>
What I'm missing?

Regards, Manfred Staudinger, Vienna

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