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

RE: Using fn:idref() with Saxon

Subject: RE: Using fn:idref() with Saxon
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 19 Jun 2005 00:04:26 +0100
fn idref
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:  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

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.