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

Using fn:idref() with Saxon

Subject: Using fn:idref() with Saxon
From: Michel Charpentier <charpov@xxxxxxx>
Date: Sat, 18 Jun 2005 15:12:49 -0400
fn idref
Hi,

I'm trying to use fn:idref for the first time. I'm starting from an example posted on this list last year, but I'm not getting the same result as in the original post. The original post was using Saxon 7.9 and I'm using Saxon8B. No matter what I do, idref() keeps returning an empty sequence.

Here are my files:

1) XML
<?xml version="1.0" encoding="utf-8"?>
   <!DOCTYPE data [
   <!ATTLIST event
   id   ID #REQUIRED
   name CDATA #REQUIRED >
   <!ATTLIST participant
   name CDATA #REQUIRED
   events IDREFS #REQUIRED >
   ]>
   <data>
       <events>
           <event id="e01" name="Amsterdam"/>
           <event id="e02" name="Baltimore"/>
           <event id="e03" name="Casablanca"/>
       </events>
       <participants>
           <participant events="e01 e03" name="Alpha"/>
           <participant events="e02" name="Bravo"/>
           <participant events="e02 e03" name="Charlie"/>
       </participants>
   </data>

2) XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/">
Using id():
<xsl:apply-templates select="id('e02')"/>
Using idref():
<xsl:apply-templates select="idref('e02')/.."/>
End
</xsl:template>
<xsl:template match="*[@name]">
<xsl:value-of select="@name"/>
</xsl:template>
</xsl:stylesheet>


What am I missing?

Thanks,

MC
--
2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x

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.