Hi Michael, I thought this would solve my problem. But I run into an order issue.
What I want is to be able to match from a uri to its prefix while parsing through an xml. It seems startPrefixMapping() is paired with startElement(). So if there is a xsi:type attribute of the element pointing to a new type yet been parsed, I won't be able to find the prefix in the uri -> prefix hashtable I have been keep tracking. It seems to me that a SAX parser may not work for what I want. Is there a sample using a DOM parser to traverse a DOM tree and still be able to use JAXP to get TypeInfo and ElementPSVI? thanks a lot, David On Mon, Jun 29, 2009 at 10:40 PM, Michael Glavassevich <mrgla...@ca.ibm.com>wrote: > Namespace declarations are normally reported in SAX through the > startPrefixMapping() [1] and endPrefixMapping() [2] callbacks. > > [1] > http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ContentHandler.html#startPrefixMapping(java.lang.String,%20java.lang.String) > [2] > http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ContentHandler.html#endPrefixMapping(java.lang.String) > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: mrgla...@ca.ibm.com > E-mail: mrgla...@apache.org > > govelogo <govel...@gmail.com> wrote on 06/29/2009 01:39:29 PM: > > > > I used the sample handler in jaxp.TypeInfoWriter. Looks like it > > should be straight forward; I must have overlooked sth ... Can you > > just quickly point out which object I should use? > > > > > thanks a lot, > > David > > > On Mon, Jun 29, 2009 at 2:07 PM, <kesh...@us.ibm.com> wrote: > > Those are all namespace declarations. If you register the right SAX > > handler, you should have no trouble seeing them. > > > > ______________________________________ > > "... Three things see no end: A loop with exit code done wrong, > > A semaphore untested, And the change that comes along. ..." > > -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish ( > > http://www.ovff.org/pegasus/songs/threes-rev-11.html) > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > > For additional commands, e-mail: j-users-h...@xerces.apache.org > >