Hi Justin, I'm not sure I understand what you're trying to do, but keep the following in mind:
1) In SAX2 any namespaces declared on an element should be reported with the startPrefixMapping event. startPrefixMapping is called before the startElement event of the element which has the namespace declaration. Similarly, endPrefixMapping is called after endElement. 2) The scope of a namespace ranges from the start of the element in which it is declared to the end of this element. 3) Outside the scope of the default namespace, unprefixed names are in no namespace. Even in the scope of the default namespace, unprefixed names of attributes are in no namespace. Hope that helps. On Tue, 28 Oct 2003, Justin Kirby wrote: > I have a problem using SAX2 with the following xml: > > <foo:bar xmlns:foo="foo:uri" xmlns="default:uri" attr="value"/> > > When startElement is called it has the following values: > uri="foo:uri" > localname="stream" > qname="stream:stream" > > The problem is that I need access to the default namespace before an > element is declared in that namespace. Is there anyway to obtain this > information? > > Justin > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------- Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
