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

Re: serialized form of XML using xslt 1.0

Subject: Re: serialized form of XML using xslt 1.0
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 07 Dec 2012 16:02:55 +0000
Re:  serialized form of XML using xslt 1.0
On 07/12/2012 15:39, Andrew Welch wrote:
On 7 December 2012 15:31, Michael Kay <mike@xxxxxxxxxxxx> wrote:
<foo>
    <bar/>
    <bar xmlns=''/>
</foo>

with

<xsl:template match="bar">
    <xsl:value-of select="boolean(namespace::*[name() = '']"/>

Saxon 6.5.5 returns true true

Xalan returns false true

I would have expected false false. But it's Friday afternoon.
....and the day after the christmas party :-( my head hurts.

You are right - false false for Saxon, false true for Xalan.

Any thoughts on a Xalan alternative approach?

Well, I imagine if they create a namespace node for xmlns="" then it will have name(.)="" and string(.)="", so you could test for that combination. A namespace node should never have string(.)="" so you could just filter out any such nodes.


Michael Kay
Saxonica

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.