Re: [xsl] id function doesn't work in conjonction with a XML schema

Subject: Re: [xsl] id function doesn't work in conjonction with a XML schema
From: Trevor Nash <tcn@xxxxxxxxxxxxx>
Date: Fri, 25 Jan 2002 12:05:41 +0000
Hi Giro,
>
>The id() function works only in conjonction with a
>DTD. Instead a DTD I have a XML schema. I tried with
>xalan and xt and the result is the same. It doesn't
>work. What's the problem?
>
You said it yourself: id() needs the information in the DTD to work
out which attributes to index on.  In the absence of a DTD you can use
xsl:key and key() to do the same job.

If you do not like replicating information in the schema in a
hand-written xsl:key, then you could write a stylesheet which takes
the schema as input and produces a stylesheet containing just some
xsl:key definitions: import this into the main stylesheet.  Maybe
someone has already done this?

Regards,
Trevor Nash


--
Traditional training & distance learning,
Consultancy by email

Melvaig Software Engineering Limited
voice:     +44 (0) 1445 771 271 
email:     tcn@xxxxxxxxxxxxx

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread