|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] What about the scope of the XML nodes ?
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 ------------------------------------------------------------------------
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








