You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by vinitha <pr...@yahoo.com> on 2008/06/25 23:12:00 UTC

How to retrieve targetNamespace of XSModel for a given schema file?

Hi, 

I created a XSModel using XSLoader.loadURI(), but Iam not able to retrieve
the value of the targetNamespace as defined in the schema document.  I was
able to retrieve the getNamespaceItemList() which is referring all the
namespaces being loaded in the schema document. But how do I identify which
is the targetNamespace for the schema document loaded into the XSModel. Any
help will be appreciated. 

Thanks,
vinitha



-- 
View this message in context: http://www.nabble.com/How-to-retrieve-targetNamespace-of--XSModel-for-a-given-schema-file--tp18121873p18121873.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: How to retrieve targetNamespace of XSModel for a given schema file?

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Vinitha,

Each XSNamespaceItem carries a list [1] of the URIs that contributed to the
components of that target namespace. So you need to walk through the list
of each XSNamespaceItem until you find the schema location you're looking
for.

Thanks.

[1]
http://xerces.apache.org/xerces2-j/javadocs/xs/org/apache/xerces/xs/XSNamespaceItem.html#getDocumentLocations()

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

vinitha <pr...@yahoo.com> wrote on 06/25/2008 05:12:00 PM:

> Hi,
>
> I created a XSModel using XSLoader.loadURI(), but Iam not able to
retrieve
> the value of the targetNamespace as defined in the schema document.  I
was
> able to retrieve the getNamespaceItemList() which is referring all the
> namespaces being loaded in the schema document. But how do I identify
which
> is the targetNamespace for the schema document loaded into the XSModel.
Any
> help will be appreciated.
>
> Thanks,
> vinitha
>
>
>
> --
> View this message in context: http://www.nabble.com/How-to-retrieve-
>
targetNamespace-of--XSModel-for-a-given-schema-file--tp18121873p18121873.html

> Sent from the Xerces - J - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org