This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: refrencing unparsed entities within an attribute


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]