[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Referencing an attribute which is an entity

Subject: Re: Referencing an attribute which is an entity
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 17 Nov 2000 15:09:11 GMT
Re: Referencing an attribute which is an entity

> the parser (IE5) just complains.
If you are using the default MSXML2 parser that comes with IE5, the
"XSL" system that comes with that is not at all like XSL as discussed on
this list. You can get the MSXML3 upgrade then you will have th exSLT
transformation language available.

However assuming you are using XSLT, 

If you mean that your source looks like this, with the entity declared
in the DTD and the attribute on your source element  declared to be of
type ENTITY :

<!NOTATION GIF		SYSTEM "GIF">
<!ENTITY mypic SYSTEM "a/b/c.gif" NDATA GIF>

<!ATTLIST xxx src ENTITY #IMPLIED>

...

<xxx src="mypic"/>

then you can reference the entity value as follows:

<xsl:template match="xxx">
 <img src="{unparsed-entity-uri(@src)}"/>
</xsl:template>

which would produce the output

<img src="a/b/c.gif"/>

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.