Subject: RE: [xsl] Namespace incompatibility b/n XPath 2.0 Data Model and XPath 1.0 (Was Re: XML schema general convert with XSLT (namespaces..)) From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Mon, 24 Sep 2001 18:51:27 +0100 |
> I was just thinking that when the XPath Data Model is > implemented in XPath 2.0 the > above solution will have to be rewritten. > > This is because according to the model namespace nodes will > no longer be copied to > all descendent nodes. Another (minor) potential trap is that > in XPath 2.0 a namespace node has no parent. This is a misunderstanding of the proposed change to the model. Under the proposed change, an element node will still have (on its namespace axis) a namespace node for every namespace that is in scope for that element. The difference in the model is that it will be possible for a single namespace node to be on the namespace axis of more than one element: the namespace nodes of one element will no longer be guaranteed to be distinct from the namespace nodes of other elements in the same document. > > There are two consequences of this decision: > > 1) ../namespace::* will no longer find all namespace nodes in > whose scope is the > element, whose attribute is the current node. No: this will continue to work after the proposed change. > > 2) more generally, this is an example, showing that the > promise will not be > fulfilled that existing XSLT 1.0 transformations will work in > XSLT 2.0 as in XSLT 1.0 It's certainly likely that there will be a few backwards incompatibilities; introducing support for schema is a major discontinuity. Feedback and comment on the draft specs as they are published will help the WGs decide how far the changes are acceptable. In the area of namespace nodes, under the changes proposed in the model, the things that will break are stylesheets that rely on the identity, document ordering, or parentage of namespace nodes. For example: count(//namespace::*) will give a different answer count(namespace::* | ../namespace::*) will give a different answer namespace::*/.. will give a different answer. The WG felt it was unlikely any users were relying on such constructs, except in artificial test programs. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Namespace incompatibility, cutlass | Thread | [xsl] Re: XPath Question (correctio, Dimitre Novatchev |
RE: [xsl] MSXML3: Processing Instru, Chris Bayes | Date | [xsl] accessing previous and next e, Guillaume Rousse |
Month |