Subject: Re: I don't understand... text is always output? From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sun, 26 Sep 1999 17:12:02 -0400 |
An empty stylesheet returns the text of all elements:
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> </xsl:stylesheet>
This also happens when the stylesheet is not empty.. for example, when it contains templates.
This is not intuitive to me. What was the thinking behind this?
<xsl:template match="text()|@*"> <xsl:value-of select="."/> </xsl:template>
I only want text in particular elements to be output.
Are there other things that get output by default?
Is there a way to filter out text besides adding the following template?
<xsl:template match="text()"/>
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Website: XSL/XML/DSSSL/SGML services, training, libraries, products. Practical Transformation Using XSLT and XPath ISBN 1-894049-01-2 Next instructor-led training: 1999-11-08, 1999-11-09, 1999-12-05/06, 1999-12-07, 2000-02-27/28, 2000-05-11/12
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
I don't understand... text is alwa, Terris | Thread | External Processing, Stefano POGLIANI |
I don't understand... text is alwa, Terris | Date | Re: XML from html out of XSL, Bill Martschenko |
Month |