[XML-SIG] cannot change xmlns:xsi

Daniel Isenegger disen at geo.unizh.ch
Wed Dec 1 19:06:15 CET 2004


Hi there,
i try to generate GML3-files from GML2-files (GML: Geography Markup 
Language) using  PyXML(minidom). I do the validation in XMLSPY.
My problem is that there seem to be some default values that i cannot 
override:

the schema:
<?xml version='1.0' encoding='UTF-8'?><xs:schema 
xmlns:gml='http://www.opengis.net/gml' 
xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:ogr='http://gdal.velocet.ca/ogr'
targetNamespace='http://gdal.velocet.ca/ogr'
elementFormDefault='qualified' version='1.0'>
.....


the instance file:
<?xml version='1.0' encoding='UTF-8'?>
<ogr:FeatureCollection xmlns:gml='http://www.opengis.net/gml' 
xmlns:xsi='http://www.w3c.org/2001/XMLSchema-instance'
xmlns:ogr='http://ogr.maptools.org/'
xmlns='http://gdal.velocet.ca/ogr'
xsi:schemaLocation='http://gdal.velocet.ca/ogr defol50.xsd'>

here in the instance file i cannot set the attribute
xmlns:xsi to 'http://www.w3.org/2001/XMLSchema-instance'
(note: the urn is ...w3... and not ...w3c...)


using minidom
    nodelist = self.dom.getElementsByTagName("ogr:FeatureCollection")
    if nodelist:
    
node.setAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance")


the attribute is temporally set to ...w3... and then reset to ..w3c...

Is there a default-value i cannot override?
Or did i get the whole thing wrong??

Thanks Dani









More information about the XML-SIG mailing list