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

Re: use of ID and IDREF pb

Subject: Re: use of ID and IDREF pb
From: Philippe Delrieu <phdelrie@xxxxxxxxx>
Date: Thu, 27 Jan 2000 18:18:47 +0100
how to use idref
Thanks for your replies.
My attribute was declared as ID or IDREF in my DTD. Perhaps it's a problem of the
parser. I will make some test with an other parser and give you the result. I have
to do a simpler example too because I use several DTD.

Best regards

Philippe Delrieu

Jeremy Quinn wrote:

> On 24/1/00 at 8:06 pm, owner-xsl-list-digest@xxxxxxxxxxxxxxxx (The XSL-List
> Digest) wrote:
>
> >Date: Mon, 24 Jan 2000 17:30:55 +0100
> >From: Philippe Delrieu <phdelrie@xxxxxxxxx>
> >Subject: use of ID and IDREF pb
> >
> >I use Java Xalan XSL parser.
> >
> >I divide my XML document in two sections :
> >   - resource declaration
> >   - document description that use IDREF to reference resource.
> >
> >In my output HTML page I want to replace the ResourceRef element with
> >the content of the Resource element. I use the id(@refid) function to
> >apply the Resource template, but it didn't work correctly. The Resource
> >template is not call.
>
> I believe that in order to get id() working, you have to declare your attributes
> as being of type "ID" in the XML file's DTD.
>
> Try putting something like this in your XML file: (this is from my DTD, it won't
> work with yours, until you edit it ...)
>
> <!DOCTYPE
>  noise [
>   <!ATTLIST noise id ID  #IMPLIED>
>   <!ATTLIST text idref IDREF #IMPLIED>
>   ]>
>
> This states that in the document whose root node is called "noise", the "noise"
> element has an attribute called "id" which is of type "ID" and has it's value
> implied. Also that there is an attribute of the element "text" called "idref"
> whose type is "IDREF".
>
> This worked for me.
>
> regards Jeremy
>
>    ___________________________________________________________________
>
>    Jeremy Quinn                                           Karma Divers
>                                                        webSpace Design
>                                             HyperMedia Research Centre
>
>    <mailto:sharkbait@xxxxxxx>                    <http://www.media.demon.co.uk>
>     <phone:+44.[0].207.737.6831>        <pager:jermq@xxxxxxxxxxxxxxx>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


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.