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 ri...@esri.com on 2009/05/30 19:24:36 UTC

Accessing schemaLocation attribute from XsModel

Hello,

I had a couple questions:

1. What is the best way to obtain a list of "include"s from a particular
XSModel. I basically want to get a list of xsd's included in the present
xsd.

2. Or the converse. Given a XSTypeDefinition, is there a way to find which
.xsd it was defined in? It is possible that the XsModel encapsulates an xsd
and all other xsds that were "include"d within the first one. I want to be
able to tell which xsd a particular type is coming from.

Thanks,
Ranjit

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


Re: Accessing schemaLocation attribute from XsModel

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

riyer@esri.com wrote on 05/30/2009 01:24:36 PM:

> Hello,
>
> I had a couple questions:
>
> 1. What is the best way to obtain a list of "include"s from a particular
> XSModel. I basically want to get a list of xsd's included in the present
> xsd.

You can get a list of URIs for the schema documents which composed each
XSNamespaceItem [1]. It makes no distinction between includes, imports,
etc... They're all in the same list.

> 2. Or the converse. Given a XSTypeDefinition, is there a way to find
which
> .xsd it was defined in? It is possible that the XsModel encapsulates an
xsd
> and all other xsds that were "include"d within the first one. I want to
be
> able to tell which xsd a particular type is coming from.

No, this isn't part of the API or stored anywhere in the implementation.

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

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