xsl-list
[Top] [All Lists]

[xsl] extracting HTML elements from document created by saxon:parse

2006-09-19 07:26:00
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






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>