[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: use of ID and IDREF pb
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|