[DAS2] XML namespaces

Andrew Dalke dalke at dalkescientific.com
Wed Mar 15 16:04:38 UTC 2006


Linconl:
> BTW, if a namespace tag is reused in an inner scope with a
> different
>
> 	<das:name xmlns:das="http://foo.bar/das" />
> 		<das:first>Andrew</das:first>
> 		<das:middle 
> xmlns:das="http://addresses.com/address/2.0">K.</das:middle>
>                 <das:last>Dalke</das:last>
>           </das:name>
>
> I put middle into namespace http://addresses.com/address/2.0 and put 
> first and
> last into namespace http://foo.bar.das.
>
> This is the correct scoping behavior, right?

Yes.  I tested it with an XML process and it says the following is
equivalent (after fixing a typo).

<ns0:name xmlns:ns0="http://foo.bar/das">
   <ns0:first>Andrew</ns0:first>
   <ns1:middle 
xmlns:ns1="http://addresses.com/address/2.0">K.</ns1:middle>
   <ns0:last>Dalke</ns0:last>
</ns0:name>

BTW, it should be "P." :)

					Andrew
					dalke at dalkescientific.com




More information about the DAS2 mailing list