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

Re: outputting CDATA section

Subject: Re: outputting CDATA section
From: "Mike Haarman" <mhaarman@xxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Apr 2003 12:19:28 -0500
xsl outputting cdata
From: "Nathan Shaw" <n8_shaw@xxxxxxxxx>

> I am trying to transform xml to xml and the end schema
> dictates that I have to put all of my actual content
> (HTML page) into an element like this:
>
> <property name="body"><[[CDATA[ potentially nasty,
> ill-formed HTML ]]></property>
>

  <xsl:template match="content">
    <xsl:element name="property">
      <xsl:attribute name="name">
        <xsl:value-of select="'body'"/>
      </xsl:attribute>
      <xsl:text
disable-output-escaping="yes">&lt;![CDATA[<![CDATA[<html><body><p>Mal-formed
content.</body></html>]]>]]&gt;</xsl:text>
    </xsl:element>
  </xsl:template>


But I don't think it will be possible to get your mal-formed HTML in there
without writing it out just as I have done.  Any construct you might use to
substitute it, a passed parameter or variable assignment, is going to verify
well-formedness of its argument when declared.


hth,

Mike


 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-2013 All Rights Reserved.