Title: Problem getting namespaceURI from SAX endElement event

Hi there,

I've just upgrade to Xerces 2.2.0 from 1.4.4 and found that the SAX parser isn't behaving in the same way.


I have a sample document that I parse using the DocumentTracer sample included with Xerces 2.2.0.  For some reason the namespaceURI on all endElements are missing.


Here's my sample document:


<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
        <SOAP-ENV:Header>
                <prop:properties SOAP-ENV:mustUnderstand="1" xmlns:prop="urn:schemas-company-com:Test:Properties:2.0">
                        <prop:id>01</prop:id>
                </prop:properties>
        </SOAP-ENV:Header>
        <SOAP-ENV:Body/>
</SOAP-ENV:Envelope>



Here's my command line from DocumentTracer:

java -classpath xercesImpl.jar;xercesSamples.jar;xmlParserAPIs.jar sax.DocumentTracer file:/c:/test/test.xml



Here's the output from DocumentTracer:

setDocumentLocator([EMAIL PROTECTED])
startDocument()
 startPrefixMapping(prefix="SOAP-ENV",uri="http://schemas.xmlsoap.org/soap/envelope/")
 startElement(uri="http://schemas.xmlsoap.org/soap/envelope/",localName="Envelope",qname="SOAP-ENV:Envelope",attributes={})

  characters(text="\n\t")
  startElement(uri="http://schemas.xmlsoap.org/soap/envelope/",localName="Header",qname="SOAP-ENV:Header",attributes={})

   characters(text="\n\t\t")
   startPrefixMapping(prefix="prop",uri="urn:schemas-company-com:Test:Properties:2.0")
   startElement(uri="urn:schemas-company-com:Test:Properties:2.0",localName="properties",qname="prop:properties",attributes={{uri="http://schemas.xmlsoap.org/soap/envelope/",localName="mustUnderstand",qname="SOAP-ENV:mustUnderstand",type="CDATA",value="1"}})

    characters(text="\n\t\t\t")
    startElement(uri="urn:schemas-company-com:Test:Properties:2.0",localName="id",qname="prop:id",attributes={})
     characters(text="01")
    endElement(uri="",localName="id",qname="prop:id")
    characters(text="\n\t\t")
   endElement(uri="",localName="properties",qname="prop:properties")
   endPrefixMapping(prefix="prop")
   characters(text="\n\t")
  endElement(uri="",localName="Header",qname="SOAP-ENV:Header")
  characters(text="\n\t")
  startElement(uri="http://schemas.xmlsoap.org/soap/envelope/",localName="Body",qname="SOAP-ENV:Body",attributes={})
  endElement(uri="http://schemas.xmlsoap.org/soap/envelope/",localName="Body",qname="SOAP-ENV:Body")
  characters(text="\n")
 endElement(uri="",localName="Envelope",qname="SOAP-ENV:Envelope")
 endPrefixMapping(prefix="SOAP-ENV")
endDocument()



Does anyone know why I'm not getting any uri values for my endElements?


Hope someone can point me in the right direction!


Rida

Reply via email to