- From: Kay, Michael <Michael.Kay@softwareag.com>
- Date: Tue, 24 Jun 2003 18:46:17 +0200
- To: Oliver Becker <obecker@informatik.hu-berlin.de>, public-qt-comments@w3.org
I agree with you, I think the text is wrong. There should never be a namespace node whose string value (namespace URI) is zero-length, as namespace nodes always represent the declaration of a namespace and not the undeclaration. I think that it is now possible in XSLT to create a parentless namespace node: viz <xsl:variable name="ns" as="node()"> <xsl:namespace name="my">namespace.uri</xsl:namespace> </xsl:variable> Though this probably isn't what was envisaged when the DM spec was written - at one time there was an idea that namespace nodes would be "shared" between elements in some way. Michael Kay > -----Original Message----- > From: Oliver Becker [mailto:obecker@informatik.hu-berlin.de] > Sent: 24 June 2003 17:00 > To: public-qt-comments@w3.org > Subject: [DM] namespace nodes > > > > Hello, > > I would appreciate if the XQuery 1.0 and XPath 2.0 Data Model > defines whether a default null namespace is represented by a > namespace node or not. > > Section 4.5 Namespaces says in 4.5.1 > > 2 The namespace prefix may be the empty sequence. If the > URI is the > zero-length string, the prefix must be the empty sequence. > > Hmm, there might exist namespace nodes without prefix and > without URI. Such a node would be created by an xmlns="". > OTOH, I would interpret this as an undeclaration of the > default namespace, > thus it removes an existing namespace node (that would be > present otherwise). > > The specification should unambiguously state, under which > circumstances such namespace nodes come into live. > > I prefer not to introduce such "null" namespace nodes. There > shouldn't be a > difference between <foo /> and <foo xmlns="" /> > > One more question: > Are situations imaginable that a namespace node doesn't have > a parent? Since the specification thinks so I would like to > see a comment just as for attribute nodes. > > Regards, > Oliver Becker > > > /-------------------------------------------------------------------\ > | ob|do Dipl.Inf. Oliver Becker | > | --+-- E-Mail: obecker@informatik.hu-berlin.de | > | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | > \-------------------------------------------------------------------/ >
Received on Tuesday, 24 June 2003 12:46:24 UTC