[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Embedding html in xml problem

Subject: RE: Embedding html in xml problem
From: "Kerry Nice" <knice@xxxxxxxxxxxxxxx>
Date: Wed, 30 Aug 2000 14:20:29 -0600
html in xml cdata
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@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Kerry Nice
Sent: Wednesday, August 30, 2000 11:37 AM
To: XSL-List@xxxxxxxxxxxxxxxx
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 &lt; 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.