This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Embedding html in xml problem
- To: <xsl-list at mulberrytech dot com>
- Subject: RE: Embedding html in xml problem
- From: "Kerry Nice" <knice at stshotelnet dot com>
- Date: Wed, 30 Aug 2000 14:20:29 -0600
- Reply-To: xsl-list at mulberrytech dot com
Ok, never mind, I finally figured it out.
Here is what I found out.
XML doc:
<?xml version="1.0" standalone="no"?>
<portal>
<top> <![CDATA[ <p>some top stuff here</p> ]]> </top>
<left> <![CDATA[ <p>some left stuff here</p> ]]> </left>
<content> <![CDATA[ <p>some content here</p> ]]> </content>
<right> <![CDATA[ <p>some right stuff here</p> ]]> </right>
<bottom> <![CDATA[ <p>some bottom stuff here</p> ]]> </bottom>
</portal>
Part of XSL doc
<xsl:template match="top">
<table width="100%" border="0" height="30">
<tr>
<td>
<xsl:value-of disable-output-escaping="yes" select='.'/>
</td>
</tr>
</table>
<xsl:call-template name="left"/>
<xsl:call-template name="bottom"/>
</xsl:template>
This fixed the problem with < and >.
Thanks anyways,
Kerry.
-----Original Message-----
From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Kerry Nice
Sent: Wednesday, August 30, 2000 11:37 AM
To: XSL-List@mulberrytech.com
Subject: Embedding html in xml problem
Hi,
I am trying to embed pregenerated html content into xml tags but I am
running into problems.
Basically, I want to have a top level xml document like:
<?xml version="1.0" standalone="no"?>
<portal>
<top> <html tags>some html stuff here</html tags> </top>
<left></left>
<content></content>
<right></right>
<bottom></bottom>
</portal>
Where I can put lots of html code between <top> and </top> (and all the rest
too). So in my xsl I can have something like:
<xsl:template match="top">
<table width="100%" border="0" height="30">
<tr>
<td>
<!-- whatever it takes to grab the values between the top tags,
value-of or whatever -->
</td>
</tr>
</table>
<xsl:call-template name="left"/>
<xsl:call-template name="bottom"/>
</xsl:template>
I can almost make it work if I enclose the stuff between the top tags in a
<![CDATA[ ]]>, but then
I run into problems. It ends up converting all the special characters, i.e.
< to < which doesn't help me at all. I tried using <xsl:text
disable-output-escaping="yes"> but I can't get it to process right.
Am I missing something here, or is there a better way to do this?
Thanks,
Kerry.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list