[XML-SIG] 2 identical namespaces and getElementByTagNameNS

Jean-Francois.Doyon at CCRS.NRCan.gc.ca Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Mon Sep 8 12:28:50 EDT 2003


I'm trying to build an client for a web service based on a standard spec
(The OpenGIS Consortium's Web Feature Server).

I've now come accross a bit of a problem. One of the common servers for this
web service does the following:

   elementFormDefault="qualified" version="0.1" >

Note the fact that there are 2 identical namespaces, the default one, and
the "xsd" one.

Now if I use getElementByTagNameNS with "http://www.w3.org/2001/XMLSchema"
as the namespace on a document where the elements are named into the default
namespace, I don't get the expected results, presumably because PyXML
expects that name space to have the "xsd:" prefix ...

Is there any easy/standard way around this ? According to the XML spec, so
far as I can tell, this is legal.

Am I going to have to somehow trap this situation and manually work around
it ? Shouldn't PyXML, test for BOTH situations if the namespace is defined
twice ?

Having to do it manually would considerably complicate the code :(

Any help would be much appreciated !


Jean-François Doyon
Internet Service Development and Systems Support
GeoAccess Division
Canadian Center for Remote Sensing
Natural Resources Canada
Phone: (613) 992-4902
Fax: (613) 947-2410

More information about the XML-SIG mailing list