Jim,

What you've said sounds wrong to me; <action/> and <http/> are in the
"default namespace" (a declared namespace that has no prefix), whatever
that has been defined to be.

This could be the same as n1 if the URI for n1 is also associated with
the default namespace, but that seems unlikely.

Phil :n.

On Mon, 2005-09-12 at 06:09 -0400, [EMAIL PROTECTED] wrote:
> Steve Loughran <[EMAIL PROTECTED]> wrote ..
> > 
> > 
> > 
> > I know separate namespace work is optional, but once you start on it it,
> > it is more manageable. For this reason, the next edition of 
> > java-dev-with-ant will use namespaces everywhere too, except for the 
> > bits where I dont understand what is going on. Actually, I am slowly 
> > building up model. Nested stuff is the troublespot
> > 
> > -declare task <mytask> in namespace n1:
> > -declare type <mytest> extends Condition in namespace n1:
> > 
> > If mytask has a nested element <action>, and it also supports multiple
> > nested conditions, is this how it looks
> > 
> > <n1:mytask>
> >     <action>this action is a direct element; default NS or local 
> > ns?</action>
> >     <http url="this-is-a-condition-from-Ant; default NS" />
> >          <n1:mytest>this is my new test, in the new ns</n1:mytest>
> > </n1:mytask>
> > 
> > What confuses me here is that the ns of a nested element (not a type, an
> > element) is what? local? or Ant's main ns?
> 
> this is an old XML NS chestnut.
> 
> http://www.rpbourret.com/xml/NamespacesFAQ.htm
> 
> is the authoratative place to go to understand the permathreads.
> 
> specifically 
> 
> http://www.rpbourret.com/xml/NamespacesFAQ.htm#s6
> 
> discusses scope.
> 
> 'An XML namespace declaration remains in scope for the element on which it is 
> declared and all of its descendants, unless it is overridden or undeclared on 
> one of those descendants'
> 
> so <action/> and <http/> are in the n1: namespace.
> 
> hth, Jim Fuller
>  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to