You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Arie Golos <ag...@emc.com> on 2000/06/14 22:18:27 UTC
Another SAX problem.
Even with just one namespace non-validating
SAX parser calls handler with namespace URI's properly.
With validating parser all internal elements have
namespace URI's set to "" (all except root element).
The XML I was parsing:
<?xml version="1.0" encoding="UTF-8"?>
<Packet xmlns="http://www.emc.com/celerra/xsd_v1.0"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:schemaLocation="http://www.emc.com/celerra/xsd_v1.0
http://127.0.0.1/test/cell_mgr.xsd" >
<User un="arie" pw="golos"/>
<Request handle="10">
<MonitorReq begin="262837893" step="3600" window="72000">
<Symm sn="1200000158">
<FrontEnd/>
</Symm>
</MonitorReq>
</Request>
</Packet>
Trace of the handler calls:
Non-validating:
SXHandler: startDocument
SXhandler: startPrefixMapping: prefix=""
uri=http://www.emc.com/celerra/xsd_v1.0
SXhandler: startPrefixMapping: prefix="xsi"
uri=http://www.w3.org/1999/XMLSchema-instance
SXhandler: startElement:
namespaceURI=http://www.emc.com/celerra/xsd_v1.0 localName=Packet
SXhandler: startElement:
namespaceURI=http://www.emc.com/celerra/xsd_v1.0 localName=User
SXhandler: endElement: namespaceURI=http://www.emc.com/celerra/xsd_v1.0
localName=User
SXhandler: startElement:
namespaceURI=http://www.emc.com/celerra/xsd_v1.0 localName=Request
SXhandler: startElement:
namespaceURI=http://www.emc.com/celerra/xsd_v1.0 localName=MonitorReq
SXhandler: startElement:
namespaceURI=http://www.emc.com/celerra/xsd_v1.0 localName=Symm
SXhandler: startElement:
namespaceURI=http://www.emc.com/celerra/xsd_v1.0 localName=FrontEnd
SXhandler: endElement: namespaceURI=http://www.emc.com/celerra/xsd_v1.0
localName=FrontEnd
SXhandler: endElement: namespaceURI=http://www.emc.com/celerra/xsd_v1.0
localName=Symm
SXhandler: endElement: namespaceURI=http://www.emc.com/celerra/xsd_v1.0
localName=MonitorReq
SXhandler: endElement: namespaceURI=http://www.emc.com/celerra/xsd_v1.0
localName=Request
SXhandler: endElement: namespaceURI=http://www.emc.com/celerra/xsd_v1.0
localName=Packet
SXhandler: endPrefixMapping: prefix="xsi"
SXhandler: endPrefixMapping: prefix=""
Validating:
SXHandler: startDocument
SXhandler: startPrefixMapping: prefix=""
uri=http://www.emc.com/celerra/xsd_v1.0
SXhandler: startPrefixMapping: prefix="xsi"
uri=http://www.w3.org/1999/XMLSchema-instance
Location: http://127.0.0.1/test/cell_mgr.xsd
SXhandler: startElement:
namespaceURI=http://www.emc.com/celerra/xsd_v1.0 localName=Packet
SXhandler: startElement: namespaceURI= localName=User
SXhandler: endElement: namespaceURI= localName=User
SXhandler: startElement: namespaceURI= localName=Request
SXhandler: startElement: namespaceURI= localName=MonitorReq
SXhandler: startElement: namespaceURI= localName=Symm
SXhandler: startElement: namespaceURI= localName=FrontEnd
SXhandler: endElement: namespaceURI= localName=FrontEnd
SXhandler: endElement: namespaceURI= localName=Symm
SXhandler: endElement: namespaceURI= localName=MonitorReq
SXhandler: endElement: namespaceURI= localName=Request
SXhandler: endElement: namespaceURI= localName=Packet
SXhandler: endPrefixMapping: prefix="xsi"
SXhandler: endPrefixMapping: prefix=""
-arie
Re: Another SAX problem.
Posted by Arie Golos <ag...@emc.com>.
Here is a zip file which has complete environment.
Please read README.txt included in this zip for directions.
Good luck,
-arie
Andy Clark wrote:
> Arie Golos wrote:
> > Even with just one namespace non-validating
> > SAX parser calls handler with namespace URI's properly.
> > With validating parser all internal elements have
> > namespace URI's set to "" (all except root element).
>
> I'm unable to reproduce your problem. All of the elements
> have the appropriate namespace bindings (URI) set. Can I
> get more information about your problem with the SAX
> parser?
>
> --
> Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
Re: Another SAX problem.
Posted by Andy Clark <an...@apache.org>.
Arie Golos wrote:
> Even with just one namespace non-validating
> SAX parser calls handler with namespace URI's properly.
> With validating parser all internal elements have
> namespace URI's set to "" (all except root element).
I'm unable to reproduce your problem. All of the elements
have the appropriate namespace bindings (URI) set. Can I
get more information about your problem with the SAX
parser?
--
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org
Re: Another SAX problem.
Posted by Andy Clark <an...@apache.org>.
Arie Golos wrote:
> Even with just one namespace non-validating
> SAX parser calls handler with namespace URI's properly.
> With validating parser all internal elements have
> namespace URI's set to "" (all except root element).
Fixed. Change is in CVS.
--
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org