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

Re: XSLT/XML and HTML Tags in the XML Data

Subject: Re: XSLT/XML and HTML Tags in the XML Data
From: "Steve Muench" <smuench@xxxxxxxxxxxxx>
Date: Mon, 11 Sep 2000 08:23:04 -0700
html tags in xml data
| I am using Oracle's Parser for XML/XSLT to display search results.  We have
| some fields in our database that has HTML tags in the data to emphasize the
| text in the browser.  A good example of this is to have parts of data being
| bold using <STRONG> tag, or displaying information using bullets with <UL>
| tags.  I create XML using this data, and when I send the XML to the XSLT
| processor, I don't get any results back if there are any HTML tags in the
| data.

Would need to see your templates that are selecting the data to format
to help explain this symptom.

| Is there any way I can have the XSLT processor to ignore the HTML Tags?

The typical FAQ in this area is that if you are generating
query results that contain HTML fragments like:

<ROWSET>
  <ROW>
    <SKU>12345</SKU>
    <DESC>Big Red Apple</DESC>
    <BLURB>
      &lt;ul>
        &lt;li>&lt;b>Delicious&lt;/b>&lt;/li>
        &lt;li>&lt;b>Nutritious&lt;/b>&lt;/li>
      &lt;/ul>
    </BLURB>
  </ROW>
</ROWSET>

And you want the HTML "blurb" to showup "verbatim"
in the output:

for this you'd use (assuming the current node is "ROWSET/ROW"):

   <xsl:value-of disable-output-escaping="yes"
                           select="BLURB"/>

This will produce:

 <ul>
   <li><b>Delicious</b></li>
   <li><b>Nutritious</b></li>
 </ul>


______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/



 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.