Namespaces (Was: Re: [Xpath-ng] Thoughts on work products)
Uche Ogbuji
uche.ogbuji at fourthought.com
Fri Nov 22 13:59:22 MST 2002
> Hi Jeni,
>
> > I thought that holding something as a node was quite a large overhead
> > because of retaining node identity. But that's just a vague feeling
> > and I can't remember where I picked it up from.
>
> Umm, after doing a bit of homework, I'd say that namespace nodes
> should go away (together with the namespace axis). I think the
> query-datamodel is doing the right thing here, but I think we
> should go one step further and remove them completely,
> not offering them even for compatibility reasons. The incompatibility
> isn't so bad in this case since it's reflected in the syntax by removing the
> axis. I think the equivalent of xf:get-in-scope-namespaces and
> xf:get-namespace-uri-for-prefix would cover all feasible use cases for
> namespace processing.
> And as you suggest, the interface might even get simpler using a list of lists.
My gut feeling is that you're right. There is too much voodoo for words in
namespace nodes and the namespace axis. And it does seem to me that namespace
data is more a matter of properties on nodes, or functions than anything else.
But do I think the matter deserves very close analysis to be sure.
> > That solution would work if you weren't embedding XPath in XML, but
> > currently, you're not allowed to do:
> >
> > Certainly that isn't an impossible thing to get around, whether by
> > declaring namespaces within XPath or by introducing an extension
> > attribute that declares namespaces in XSLT, but I'd be wary of
> > solutions that *rely* on being able to do it.
>
> I agree that we shouldn't be dependent on any host language,
> hence my suggestion of adding namespace declaration primitives
> to XPath NG, but still keep the ability to inherit declarations
> from the host language if present.
I do think that such facilities should not be part of the XPath NG core, but
as we discussed earlier, I think a module with such capabilities would be
handy.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Tour of 4Suite - http://www.xml.com/pub/a/2002/10/16/py-xml.html
Proper XML Output in Python - http://www.xml.com/pub/a/2002/11/13/py-xml.html
RSS for Python - http://www-106.ibm.com/developerworks/webservices/library/ws-p
yth11.html
Debug XSLT on the fly - http://www-106.ibm.com/developerworks/xml/library/x-deb
ugxs.html
More information about the Xpath-ng
mailing list