You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Kakoli <ka...@india.hp.com> on 2002/05/28 15:39:42 UTC

Query on namespace

Hi all,

I am not able to get different namespaces for a parent element and a child
element even though I have defined different namespaces for both.

 My xml request looks like :

<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
        <Body>
                <EL1 generic="2.0" xmlns="urn:uddi-org:api_v2">
                        <EL2 xmlns="urn:uddi-org:repl">abcd</EL2>
                </EL1>
        </Body>
</Envelope>

This is parsed by SAXParser(xerces 1.4.3)

In my code of startElement method  where namespace is passed as a parameter,
for both EL1 and EL2, the namespace obtained is the same as EL1(i.e., the
root element), even though for EL2, different namespace is used. How do I
get the EL2 namespace?

Thanking all in anticipation,
 Regards,
Kakoli