[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

value-of confusion

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

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

<onne>
some text0
some text2
</onne>
============================================


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
<xsl:output method="html"/>
 
<xsl:template match="onne">
        <prefix/>
        <xsl:value-of select="."/>
        <postfix/>
</xsl:template>
 
</xsl:stylesheet>
====================================
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
<prefix></prefix>
some text0
some text2
<postfix></postfix>


============================================
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
<prefix></prefix>
<postfix></postfix>


I only see the prefix and postfix.

Why the differences in behavior.

Thanks
--sony
























-- 
Sony Antony <santony@xxxxxxxxxxxxx>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.