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

Re: [xsl] How to View Entity Reference


Subject: Re: [xsl] How to View Entity Reference
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 14 Sep 2006 13:15:56 +0200

vanaja selvaraj wrote:

<!DOCTYPE TEST SYSTEM "1.dtd" [<!ENTITY E0001 SYSTEM ".\Equations\008x0001.jpg" NDATA jpg>]>
.....
<IMAGE>
<FIGUREIMAGE ID="E0001"/>
</IMAGE>
</TEST>

This looks to me like a mix of an entity reference (the word ENTITY), a DTD declaration (the words E00001 and SYSTEM and the way the rest of the text is layed out) and a ELEMENT declaration (NDATA).

I don't know much of DTD, finding it an awkward thing to work with (so perhaps my statement above is wrong). But if you want an entity and you want it referenced, you better declare it as such and use it as such.

-- ENTITY declaration should look like:
<!ENTITY entName "entity Value">

-- Entity reference should look like:
&entName;

If your document would look something like this (parts left out for clarity):
<!ENTITY E0001 ".\Equations\008x0001.jpg">
<IMAGE>
<FIGUREIMAGE ID="&E0001;" />
</IMAGE>


you would stand a good chance of seeing it both in an XML viewer (try IE or FF, your current document will raise errors) and from the output of your XSLT stylesheet, of course depending on how you architected it.

Cheers,
Abel Braaksma
http://abelleba.metacarpus.com


Current Thread
Keywords