OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   What about the scope of the XML nodes ?

[ Lists Home | Date Index | Thread Index ]
  • From: Eric van der Vlist <vdv@dyomedea.com>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Tue, 28 Nov 2000 00:27:30 +0100

When I think about it, I wonder if it wouldn't have been very helpful to
have defined a mechanism to give a proper scope to XML nodes.

All our tools rely on attaching the nodes to their parents without
acknowledging that in many cases their logical scope is also including
their descendants. 

Take the xml namespace attributes or the namespace definition, for
instance. 

xml:lang, xml:space and xml:base are all three following this rule and
applying to all the descendants (until the next definition) of the
containing element.

xmlns and xmlns:* attributes are following the same rule.

It's also the case of other attributes. Consider a XHTML link for
instance. Isn't the href attribute impacting the descendants of the "a"
node as well since they are all "covered" by the link ?

If we look at W3C vocabularies, we can also find examples of scoped
elements in XSLT, XML Schema, RDF, XLink to name few.

By contrast, to solve this generic issue, our parsers are pretty
helpless and XPath is rather verbose even though one can use
"ancestor-or-self::*[@xml:lang][1]/@xml:lang" to find the language of a
node.

My 0,02 Euros.

Eric
-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS