Subject: RE: [xsl] Using fn:idref() with Saxon From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Sun, 19 Jun 2005 00:04:26 +0100 |
This seems to be a bug. At some stage the spec was changed so that a DTD type of IDREFS no longer causes the attribute to have the type annotation xs:IDREFS, and implementing this change in Saxon apparently caused the idref() function to stop working on attributes defined as IDREF[s] in a DTD (as distinct from a schema). Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Michel Charpentier [mailto:charpov@xxxxxxx] > Sent: 18 June 2005 20:13 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Using fn:idref() with Saxon > > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Using fn:idref() with Saxon, Michel Charpentier | Thread | [xsl] Accessing <xsl:param> from a , Van Henreich Rontal |
RE: [xsl] A tricky problem, Aron Bock | Date | RE: [xsl] Can not convert number to, Carlos M. S. Bento N |
Month |