no, the child element is not in the MyNamespace namespace, it would
need to be prefixed with X (or someother prefix mapped to
MyNamespace), e.g.

<X:parent xmlns:X="MyNamespace">
   <X:child>data</X:child>
</X:parent>

But given a default namespace at a larger scope, child could be part
of the MyNamespace, but not through the NS declaration on parent. e.g.
<family xmlns="MyNamespace">
<X:parent xmlns:X="MyNamespace">
   <child>data</child>
</X:parent>
</family>

would put child in the MyNamespace by virtue of the default namespace
declared on the family element.

Cheers
Simon

On Sun, 22 Jul 2001 21:59:27 -0400, in soap you wrote:

>
>OK.  I think I understand this to mean that the
>namespace declaration can be used to qualify sub
>elements of the element where the declaration appears,
>because the identifier is still in scope.
>
>My question relates more to namespace qualified elements.
>Consider this example:
>
><X:parent xmlns:X="MyNamespace">
>   <child>data</child>
></X:parent>
>
>Is element "child" considered to be implicitly
>qualified by namespace X(MyNamespace)?  
>
>or is it considered to
>have no namespace qualification?
>
>That's where my confusion lies.
>
>Thanks again.
>
>-----Original Message-----
>From: Richard Bourland <[EMAIL PROTECTED]>
>Date: Sun, 22 Jul 2001 16:19:42 -0700 (PDT)
>Subject: Re: XML namespace question
>
>> Robert,
>> 
>> A namespace declaration applies to the element where
>> the element appears and the children of that element. 
>> Even if the namespace is not explicitly specified. 
>> Think of a namespace declaration as having scope in
>> the same way programming language variables have
>> scope.
>> 
>> 
>> Hope this helps.
>> --- Robert Englander <[EMAIL PROTECTED]> wrote:
>> > 
>> > Actually, I guess my question applies to attributes
>> > as well.  For instance, clearly once you specify
>> > the encodingStyle attribute, all sub-elements
>> > implicitly
>> > use that encodingStyle as well unless otherwise
>> > specified, correct?
>> > 
>> > So is this the general case for attributes and
>> > element
>> > namespaces?
>> > 
>> > Sorry if this is obvious stuff.  For some reason
>> > I've chosen
>> > to confuse myself today.
>> > 
>> > 
>> > -----Original Message-----
>> > From: Robert Englander <[EMAIL PROTECTED]>
>> > Date: Sun, 22 Jul 2001 13:35:32 -0400
>> > Subject: XML namespace question
>> > 
>> > > 
>> > > I have a quick XML namespace question:
>> > > 
>> > > Does a sub element of a namespace qualified
>> > element inherit
>> > > the namespace from its parent?
>> > > 
>> > > e.g.
>> > > 
>> > > <X:parent xmlns:X="MyNamespace">
>> > >    <child>data</child>
>> > > </X:parent>
>> > > 
>> > > Is element child considered to be implicitly
>> > qualified by
>> > > namespace X(MyNamespace)?  or is it considered to
>> > have
>> > > no namespace qualification?
>> > > 
>> > > Thanks in advance.
>> > > 
>> > > 
>> > > 
>> > 
>> > 
>> 
>> 
>> =====
>> ------------------------------
>> email - [EMAIL PROTECTED]
>> Home  - 972.869.9878
>> Cell  - 972.567.7536   
>> ------------------------------
>> 
>> __________________________________________________
>> Do You Yahoo!?
>> Make international calls for as low as $.04/minute with Yahoo!
>> Messenger
>> http://phonecard.yahoo.com/
>> 
>

Reply via email to