I will rephrase my question then (still, a little off topic):

On Orion at least, it seems transformation only works for element values NOT
for attribute values. If I have

<!DOCTYPE doc [
        <!ENTITY & "&amp;">
]>

Then <doc:p>&</doc:p> will get transformed to <p>&amp;</p>

But <p x="&"/> will just get transformed into <p x = "&"/> because the '&'
is inside an attribute.

How can one accomplish transformation of such attributes?


Yours
Randahl

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of orionEJB
Sent: 28. februar 2001 15:37
To: Orion-Interest
Subject: Re: EJB values into xml attributes (a little off topic, I know)


You can use title as element not as attribut in your XML document.
Then you can to use CDATA. Everything inside a CDATA section is ignored
by the parser.
<poem>
 <title>
<![CDATA[
   everything you want..
]]>

 </title>
</poem>
--------
BaV

RFI> PROBLEM

RFI> I have a question regarding taking properties from an EJB and
generating XML
RFI> output. To explain, here is an example of my problem:

RFI> <poem title = "<%= myPoem.getTitle()">   <%= myPoem.getContents() %>
RFI> </poem>

RFI> Because title is an XML attribute I think special characters like '&'
needs
RFI> to be escaped with &amp; and the like. How does one handle this in a
nice
RFI> way?


-------------------R--E--K--L--A--M--A---------------------
Szukasz wiedzy? 85 tysiecy uaktualnianych ciagle hasel.
Encyklopedia Internautica: http://encyklopedia.interia.pl/



Reply via email to