Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Import directives
Import directives [message #58928] Thu, 31 March 2005 16:07 Go to next message
Eclipse UserFriend
Originally posted by: none.nonet.com

Hi,

Is there a simple method of determining whether a schema imports other
schemas from an XSDSchema object?

i.e. if i load a schema with this directive into an XSDSchema object:

<xs:schema xmlns="http://tempuri.org/MySchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://tempuri.org/MySchema.xsd"
xmlns:id="http://tempuri.org/Identifiers.xsd"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:import namespace="http://tempuri.org/Identifiers.xsd"
schemaLocation="Identifiers.xsd"/>
......
.....
</xs:schema>

The only difference i've found is that the qNamePrefixToNamespaceMap there
would be more entries in the qNamePrefixToNamespaceMap....is using this fact
fair play?

Many thanks for your help,

Ray
Re: Import directives [message #58953 is a reply to message #58928] Thu, 31 March 2005 16:46 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Ray,

It's best to look through XSDSchema.getContents() to see if there are
things of type XSDImport. There might be additional prefixes for other
reasons, e.g., within annotations or for non-schema namespace attributes.


Ray wrote:

>Hi,
>
>Is there a simple method of determining whether a schema imports other
>schemas from an XSDSchema object?
>
>i.e. if i load a schema with this directive into an XSDSchema object:
>
><xs:schema xmlns="http://tempuri.org/MySchema.xsd"
>xmlns:xs="http://www.w3.org/2001/XMLSchema"
>targetNamespace="http://tempuri.org/MySchema.xsd"
>xmlns:id="http://tempuri.org/Identifiers.xsd"
>elementFormDefault="unqualified" attributeFormDefault="unqualified">
> <xs:import namespace="http://tempuri.org/Identifiers.xsd"
>schemaLocation="Identifiers.xsd"/>
>.....
>....
></xs:schema>
>
>The only difference i've found is that the qNamePrefixToNamespaceMap there
>would be more entries in the qNamePrefixToNamespaceMap....is using this fact
>fair play?
>
>Many thanks for your help,
>
>Ray
>
>
>
>
Re: Import directives [message #594647 is a reply to message #58928] Thu, 31 March 2005 16:46 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33255
Registered: July 2009
Senior Member
Ray,

It's best to look through XSDSchema.getContents() to see if there are
things of type XSDImport. There might be additional prefixes for other
reasons, e.g., within annotations or for non-schema namespace attributes.


Ray wrote:

>Hi,
>
>Is there a simple method of determining whether a schema imports other
>schemas from an XSDSchema object?
>
>i.e. if i load a schema with this directive into an XSDSchema object:
>
><xs:schema xmlns="http://tempuri.org/MySchema.xsd"
>xmlns:xs="http://www.w3.org/2001/XMLSchema"
>targetNamespace="http://tempuri.org/MySchema.xsd"
>xmlns:id="http://tempuri.org/Identifiers.xsd"
>elementFormDefault="unqualified" attributeFormDefault="unqualified">
> <xs:import namespace="http://tempuri.org/Identifiers.xsd"
>schemaLocation="Identifiers.xsd"/>
>.....
>....
></xs:schema>
>
>The only difference i've found is that the qNamePrefixToNamespaceMap there
>would be more entries in the qNamePrefixToNamespaceMap....is using this fact
>fair play?
>
>Many thanks for your help,
>
>Ray
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Import directives
Next Topic:How to get the XSDAttributeUse from a DOM-Node?
Goto Forum:
  


Current Time: Thu Nov 21 11:38:09 GMT 2024

Powered by FUDForum. Page generated in 0.05428 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top