xsl-list
[Top] [All Lists]

Re: [xsl] Writing an Entity Reference

2006-06-19 08:51:34
On 6/19/06, Woods, Christopher <cwoods(_at_)eo(_dot_)kollmorgen(_dot_)com> 
wrote:
Hi Folks,

I want to build a DTD hold entity references for image files used in my
document.  It should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY someIMAGE SYSTEM "images/someIMAGE.png">
<!ENTITY anotherIMAGE SYSTEM "images/anotherIMAGE.png">

And so on...

I tried something like this:

<!ENTITY ]]><xsl:value-of select="$myEntityRef"/><![CDATA[ SYSTEM
"]]><xsl:value-of select="$myimgRef"/><![CDATA[">]]>

But it yields:

&lt;!ENTITY myEntityRef SYSTEM myImgRef &gt;

So how can I get:

<!ENTITY anotherIMAGE SYSTEM "images/anotherIMAGE.png">

Have a read of:

http://www.dpawson.co.uk/xsl/sect2/N2281.html#d3564e220

...however I would argue why bother?  Unless you plan on hand-editing
the file later on, why  the need for entities?

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>