[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: refrencing unparsed entities within an attribute


Subject: Re: refrencing unparsed entities within an attribute
From: "Rick Geimer" <Rick.Geimer@xxxxxxx>
Date: Wed, 14 Jun 2000 16:58:51 -0700

Yasser,

The entity declaration you posted unfortunately is not valid XML. You
could use something like the following though:

<?xml version="1.0"?>
<!DOCTYPE tag [
<!ELEMENT tag   EMPTY  >
<!ATTLIST tag 	attr  ENTITY    #IMPLIED  >
<!NOTATION TEXT SYSTEM "" >
<!ENTITY e1 SYSTEM "e1.txt" NDATA TEXT>
]>
<tag attr="e1"/>

Then have "ValOfE1" in the e1.txt file. I suppose you could also have
"ValOfE1" as the system identifier and retrieve it with
unparsed-entity-uri(), but that would be poor practice I suppose, since
you probably do not intend "ValOfE1" to be a real URI. 

Also, be aware that if you cannot recreate unparsed entity declarations
in your output with XSLT, since it doesn't support writing to the
declaration subset. 

Rick Geimer
National Semiconductor
rick.geimer@xxxxxxx

Yasser El-Zein wrote:
> 
> 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;"/>
> Knowing that this value can be referenced within the value of an attribute
> in the XSL using: {unparsed-entity-uri('e1')}.
> 
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> 
>  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
Keywords