[xsl] value-of confusion

Subject: [xsl] value-of confusion
From: Sony Antony <santony@xxxxxxxxxxxxx>
Date: 28 Nov 2003 20:58:13 -0500
I m only a couple of days old with XSLT. So pardon me if this is too

I have the following XML and XSL
<?xml version="1.0"?>

some text0
some text2

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
<xsl:output method="html"/>
<xsl:template match="onne">
        <xsl:value-of select="."/>
If I run xalan directly I get the expected result - the string value of
the node, which is the concatenated texts of all the children nodes of
element onne.

java org.apache.xalan.xslt.Process  -XSL b.xsl -IN a.xml
some text0
some text2

But if I give the -TS (Trace each selection event.) switch, I do not get
the text at all.

java org.apache.xalan.xslt.Process -L  -TS -XSL b.xsl -IN a.xml
Selected source node '#document', at file
'file:///home/sony/xslt/a.xml', line #1, column #-1
(default root rule) apply-templates, select='null':
     10001: #comment
     10002: onne
Selected source node 'onne', at file 'file:///home/sony/xslt/a.xml',
line #3, column #-1
file:/home/sony/xslt/b.xsl Line #8, Column #-1: value-of, select='.':
     10002: onne

I only see the prefix and postfix.

Why the differences in behavior.


Sony Antony <santony@xxxxxxxxxxxxx>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread