Subject: RE: [xsl] extracting HTML elements from document created by saxon:parse From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Tue, 19 Sep 2006 16:06:16 +0100 |
(a) to get <br/> rather than <br> in the output, don't use the HTML output method. (b) whereas your embedded document has the < characters correctly escaped as &_lt;, it appears to contain & unescaped - that is, it contains &_#160; where it should contain &_amp;#160; (Underscores added to prevent mailer corruption). Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Dharshana S Van Der Bona [mailto:dharshanav@xxxxxxxxx] > Sent: 19 September 2006 15:26 > 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 -> |
---|---|---|
[xsl] extracting HTML elements from, Dharshana S Van Der | Thread | [xsl] Transforming XML that contain, António Mota |
RE: [xsl] extracting HTML elements , cknell | Date | [xsl] XSLT engines and terminal new, Michael(tm) Smith |
Month |