| Subject: RE: [xsl] extracting HTML elements from document created by   saxon:parse From: cknell@xxxxxxxxxx Date: Tue, 19 Sep 2006 10:37:53 -0400 | 
The problem is not with the template. In HTML, <br> is the correct form. If you want <br/>, then you want your output to be XHTML. You'll have to change the output method from HTML to XHTML:
e.g.,
<xsl:output method="XHTML" />
-- 
Charles Knell
cknell@xxxxxxxxxx - email
-----Original Message-----
From:     Dharshana S Van Der Bona <dharshanav@xxxxxxxxx>
Sent:     Tue, 19 Sep 2006 07:25:32 -0700 (PDT)
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  [xsl] extracting HTML elements from document created by saxon:parse
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('<!DOCTYPE tag [<!ENTITY nbsp '' ''>]>',concat(concat('<tag>',text()),'</tag>')))"/>
  <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   not declared exception?
Thanks,
Dharshana
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] Transforming XML that con, Joe Fawcett | Thread | [xsl] XSLT engines and terminal new, Michael(tm) Smith | 
| [xsl] extracting HTML elements from, Dharshana S Van Der | Date | RE: [xsl] extracting HTML elements , Michael Kay | 
| Month |