forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael Sitruk" <>
Subject RE: Question: adding formatting for 'xml' conent of source element
Date Mon, 09 Jun 2003 06:19:52 GMT
David hi

The <source><![CDATA[ - is not working, since the element inside are not
interpreted as element!
For example:
<function name="AA">

In XSL: 
<xsl:template match="source">
<xsl:value-of select="function"/>

This will return nothing since the XML processor doesn't understand the
CDATA content as XML but as string.

If I do the formatting prior e.g. in external document, then run an XSL
to get to a document that validate the document-v11.dtd, using the CDATA
then the processor will send the content of the XML to the HTML but the
formatting will not be interpreted as HTML tag:
<source><![CDATA[<font color="blue">&lt;</font>function name="AA"

In XSL: 
<xsl:template match="source">
>xsl:value-of select="."/>

will show in the browser:
<font color="blue">&lt;</font>function name="AA" &gt; .....
and not <function name="AA"> where the "<" is in blue.
I've also tried the disable-output-escaping, it doesn't seems to work.

If there is a function to translate the xml string to xml node it may
help, but I don't know such one, exept if the xml is stored in a
separate file, and that what I will try...


-----Original Message-----
From: David Crossley [] 
Sent: Monday, June 09, 2003 04:30
Subject: RE: Question: adding formatting for 'xml' conent of source

Mikael Sitruk wrote:
> Jeff hi 
> I've already tried this, but the ANY declaration tells the XML
> that ANY of the declared element in the DTD is legal. I can't override
> the DTD for each of the xml samples I want to add, it will be a
> nightmare.

Can we go back to discussing using <source><![CDATA[ ... in the xml
Why does that cause you a problem with later processing? Perhaps we are
to solve the wrong issue.


View raw message