Hi
I have an xml file describing a document. The body of the document contains html. I then have an xsl page which transforms the xml. My problem is that I want to the html to be interpreted, not displayed or ignored.
XML File
XSL File
What happens here is that the bold tags within the body xml tag is seen as another xml tag and not as html, and therefore the output ignores the bold tags altogether and just writes the text.
So I tried putting CData tags around the html so that the xml file looked like:
But this just displays the html on the page instead of interpreting it.
I have tried using disable-output-escaping in the xsl file, but this does the same thing - either ignores the html or displays it, never actually interprets it.
Am I trying to do the impossible?
Beck
I have an xml file describing a document. The body of the document contains html. I then have an xsl page which transforms the xml. My problem is that I want to the html to be interpreted, not displayed or ignored.
XML File
Code:
<page>
<document>
<date>09 September 2002</date>
<title>Editor Test</title>
<body><b>Test</b></body>
<category>Testing</category>
<image />
<file />
<internal />
</document>
</page>
XSL File
Code:
<p><xsl:value-of select="page/document/body" /></p>
What happens here is that the bold tags within the body xml tag is seen as another xml tag and not as html, and therefore the output ignores the bold tags altogether and just writes the text.
So I tried putting CData tags around the html so that the xml file looked like:
Code:
<body><![CDATA[ <b>Test</b>]]></body>
But this just displays the html on the page instead of interpreting it.
I have tried using disable-output-escaping in the xsl file, but this does the same thing - either ignores the html or displays it, never actually interprets it.
Am I trying to do the impossible?
Beck