Hi Mark, Mark Brucks <bru...@charter.net> wrote on 10/21/2010 03:17:47 PM:
> Here is the beginning of my schema file: > > <xs:schema targetNamespace="http://www.foo.com/SchemaOne" > xmlns:s1="http://www.foo.com/SchemaOne" > xmlns:s2="http://www.foo.com/SchemaTwo" > xmlns:s3="http://www.foo.com/SchemaThree" > ...> > > Using the XML Schema API, I parse the schema and have access to the > resulting XSModel instance. Using the method getNamespaceItems() I > can get a list of XSNamespaceItem and using the getSchemaNamespace() > method I can get all the namespaces. You're getting the list of all the target namespaces for the schema components in the XSModel. This has nothing to do with the namespace declarations which may have been in the schema documents. > How do I get the associated prefix for each prefix? You can't and not sure what it would mean to return such a list. The XSModel is a schema component view. There is no way to access the schema documents which composed it. > Thanks - Mark Thanks. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org