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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Quiz: how many namespaces are in scope?

On Mon, 30 Aug 2010 11:39:46 -0700, Evan Lenz wrote:
> In my XPath/XSLT training classes, I like to ask this quiz question: 
> How many namespace nodes are in this document? People are usually 
> surprised when they hear the answer is (for this case) 21.

You mean for the document that Roger posted?

>> <?xml version="1.0"?>
>> <N1:NumberList xmlns:N1="http://www.example1.org";
>>                xmlns:N2=" http://www.example2.org ">
>>         <Number>23</Number>
>>         <Number>41</Number>
>>         <Number>70</Number>
>>         <Number>103</Number>
>>         <Number>99</Number>
>>         <Number>6</Number>
>> </N1:NumberList>

That's an odd definition of "namespace node," to my mind.  You're 
asserting that each element node has three namespace "nodes" associated 
with it?  I would have thought that the only "nodes" were the 
declarations.  So I could see arguments for two, three, or nine such 
nodes (variation depending upon how one handled the implicit xml 
namespace declaration).

If namespaces-in-scope manifest as "nodes," do other scoped 
abstractions (like xml:lang) do the same?

Amelia A. Lewis                    amyzing {at} talsever.com
The one thing you can't trade for your heart's desire is your heart.
		-- Miles Vorkosigan
xerom:~/Projects amyzing$ 

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

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

Copyright 1993-2007 XML.org. This site is hosted by OASIS