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

document-uri gives empty sequence

Subject: document-uri gives empty sequence
From: Manfred Staudinger <manfred.staudinger@xxxxxxxxx>
Date: Mon, 7 Nov 2005 05:05:10 -0800
xsl document uri
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

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.