[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Quiz: how many namespaces are in scope?

  • From: Amelia A Lewis <amyzing@talsever.com>
  • To: Evan Lenz <evan@evanlenz.net>
  • Date: Mon, 30 Aug 2010 15:20:41 -0400

Re:  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]


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.