This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: use of ID and IDREF pb
- To: xsl-list at mulberrytech dot com
- Subject: Re: use of ID and IDREF pb
- From: Philippe Delrieu <phdelrie at ifatec dot fr>
- Date: Thu, 10 Feb 2000 09:12:55 +0100
- References: <93CB64052F94D211BC5D0010A800133101FDE979@wwmess3.bra01.icl.co.uk>
- Reply-To: xsl-list at mulberrytech dot com
I made some test an the problem occure when the element with ID attribut has
other atttribut.
exemple :
<IDELEMENT titre="toto" id="l1">data</IDELEMENT>
<IDREFELEMENT attrib="titi" idref="l1"/>
does not work (id() return toto) but
<IDELEMENT id="l1">data</IDELEMENT>
<IDREFELEMENT attrib="titi" idref="l1"/>
works (id() return data).
I don't if it's a bug of my parser (xalan) or in the spec of XML, XSL.
Has anybody an idear ?
Thanks
Philippe Delrieu
Kay Michael wrote:
> > 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.
>
> The most likely explanation is that the attribute named "id" is not of type
> ID. Check that it is declared as an ID attribute in the DTD, and then try it
> with a different parser, just in case (some older parsers, e.g. early
> versions of xp, don't report the attribute type).
>
> Mike Kay
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list