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

RE: apply template to XSL text contents?

Subject: RE: apply template to XSL text contents?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 19 Sep 2006 09:17:54 +0100
xsl apply template cdata
There are no HTML tags inside the CDATA. They look like HTML tags, but
that's an illusion: the CDATA tag tells us (its only purpose is to tell us)
that this is ordinary character data, not to be treated as if it were
markup.

If you can't change the XML design, your only option is to extract the text
and put it through a parser, which you could do for example using the
saxon:parse extension.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Dharshana S Van Der Bona [mailto:dharshanav@xxxxxxxxx] 
> Sent: 19 September 2006 09:09
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  apply template to XSL text contents?
> 
>  Hi All,
> I have a document which has the following structure
> 
> <doc>
> <navigation version="1.0" >
>     <nav-element page="Home Page" fileName="default" 
> displayOrder="0"/> </navigation> <page version="1.0"  
> displayOrder="0" id="1" name="Home Page" pageType="DEFAULT"> <![CDATA[
>     <h2>The Company</h2>
>     <p>This is some default text to show you what your site 
> may look like</p>
>     <p>
>             You can customise the contents of your site in 
> the next few steps<a href="test1">one</a> <a href='test2' >two</a>
>     </p>
>     <p>
>         <a href="three" >three</a>
>     </p>
>     ]]>
> </page>
> </doc>
> 
> 
> Will it be possible to apply a template to the text contents 
> of <page></page> node, to  manipulate the HTML tags inside it?
> 
> Thanks,
> Dharshana

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.