[Home] [By Thread] [By Date] [Recent Entries]
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
|

Cart



