Subject: Re: text() From: Miloslav Nic <nicmila@xxxxxxxxx> Date: Tue, 07 Nov 2000 16:05:48 +0100 |
You are not using xhtml namespace in the stylesheet: This one works: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" > <xsl:template match="/"> <xsl:apply-templates select="xhtml:html/xhtml:body/text()"/> </xsl:template> <xsl:template match="xhtml:html/xhtml:body/text()"> <xsl:if test="string(.)"> <wrap-it> <xsl:value-of select="."/> </wrap-it> </xsl:if> </xsl:template> <xsl:template match="*"/> </xsl:stylesheet> DPawson@xxxxxxxxxxx wrote: > > I'm trying to locate content which is #PCDATA which is a child > of body (html after tidy). > > I have a source file > > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta name="generator" content="HTML Tidy, see www.w3.org" /> > <title>DAISY Specification draft 2.02.04</title> > <link rel="STYLESHEET" href="d202.css" type="text/css" /> > <meta /> > </head> > <body> > > <h1>DAISY 2.02 Specification</h1> > > <p>DRAFT 2.02.05, November 6, 2000</p> > > <h2 id="abstract">Abstract</h2> > > This document defines version 2.02 of the DAISY Digital Talking > Book format. > > My stylesheet reads > > <xsl:template match="/"> > <xsl:apply-templates select="html/body/child::text()"/> > </xsl:template> > > <xsl:template match="html/body/text()"> > <xsl:if test="string(.)"> > <wrap-it> > <xsl:value-of select="."/> > </wrap-it> > </xsl:if> > > > </xsl:template> > > <xsl:template match="*"/> > > any suggestions why it doesn't work please? > I expected it to find "This document defines.... > > TIA, DaveP > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list -- ****************************************** <firstName> Miloslav </firstName> <surname> Nic </surname> <mail> nicmila@xxxxxxxxx </mail> <support> http://www.zvon.org </support> <zvonMailingList> http://www.zvon.org/index.php?nav_id=4 </zvonMailingList> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
text(), DPawson | Thread | RE: text(), DPawson |
RE: how do I generate a reference t, Patrick, Curtis W | Date | RE: AW: Encoded question, Kay Michael |
Month |