A third party agency (who shall remain nameless) has a series of
schemas that we are attempting to load into xerces.
They do not have a physical address or url, but some of them have
cyclic dependancies.
For instance (names have been changed to protect the 'innocent')
<s:schema xmlns:s="http://www.w3.org/2001/XMLSchema"
targetNamespace="A" xmlns:a="A" xmlns:b="B" >
<s:import namespace="B" />
<s:element name="Alpha" >
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AlphaList"
type="b:ArrayOfAlpha" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
<s:schema xmlns:s="http://www.w3.org/2001/XMLSchema"
targetNamespace="B" xmlns:a="A" >
<s:import namespace="A" />
<s:complexType name="ArrayOfAlpha">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded"
ref="a:Alpha" />
</s:sequence>
</s:complexType>
</s:schema>
We are not in a position to change their schemas, regardless of how
unbelievably weird we may consider them to be.
Assuming that we have these grammars in memory (they actually form a
part of a WSDL document, from which we are constructing SOAP client
services - and we are extracting them as a serialisation of the
DOMNode of each one)
Our need is to be able to validate documents (our SOAP requests and
the client's responses) against those grammars,
How can we use xercesc to load them as grammars, bearing in mind that
there are forward referencing dependancies?