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

extracting HTML elements from document created by sax

Subject: extracting HTML elements from document created by saxon:parse
From: Dharshana S Van Der Bona <dharshanav@xxxxxxxxx>
Date: Tue, 19 Sep 2006 07:25:32 -0700 (PDT)
sax entity nbsp not declared
Hi All,

I'm suing the following template to extract all the html tags  that is not <a> in to the xsl output.

 <xsl:variable name="htmlContent" select="saxon:parse(concat('&lt;!DOCTYPE tag [&lt;!ENTITY nbsp ''&#160;''&gt;]&gt;',concat(concat('&lt;tag&gt;',text()),'&lt;/tag&gt;')))"/>
  <xsl:apply-templates select="$htmlContent"  />


    <xsl:template match="tag/*[name() != 'a']" >
        <xsl:element name="{name()}">
        <xsl:copy-of select="@*|text()|node()"/>
        </xsl:element>
    </xsl:template>

But it is not properly extracting tags such as <br/> and only outputs <br>
Is there a way to fix this?

Also is there a way to get around the parser complaints of &nbsp; not declared exception?


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.