RE: refrencing unparsed entities within an attribute

Subject: RE: refrencing unparsed entities within an attribute
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 16 Jun 2000 10:32:09 +0100
> In the XML, if I have an unparsed entity value:
> <!ENTITY e1 "ValOfE1" NDATA TEXT>
> can I refrence it within the value of an attribute?
> something like: <tag attr="&e1;"/>

attr needs to be declared as an attribute of type ENTITY, and it can then
reference the entity simply by writing <tag attr="e1"/>

XSLT processors won't do anything special with attributes of type ENTITY,
but you can get the unparsed entity URI by writing
"unparsed-entity-uri(@attr)".

Note that some XML parsers expand the unparsed entity URI to an absolute
URI, others return it to the application as written. Neither SAX nor XSLT
says which is correct.

Mike Kay


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


Current Thread