Hello, new member here. I've searched the forum for questions related to this but haven't found much of use.
I have the unfortunate task of attempting to translate a large collection of XML Schema's to templates for further application processing. These schema's have several includes to other schema's (which in turn might include yet other schema's, with the unfortunate case of there being cyclic dependencies) and a sample primary schema might include up to 70 other schema's after all includes have been handled.
Since XML Schema's are themselves XML I figured XSLT's would be the natural way to go, especially since the template outputs are also pseudo-XML Schema's themselves, and certainly are XML-based. But it seems as though this might not be the case. The templates need to be one resulting document that contains transformed elements referenced by elements in the primary schema to secondary schema's.
<xs:include schemaLocation="datatypes.xsd" />
<xs:element name="foo" type="barDataType" />
with the result hopefully being something like:
<element name="foo" type="barDataType" />
...(transformed barDataType in-lined)
Is this possible (with one level of dependancy? with multiple? with cyclic dependancies?) If so, do I need a schema-aware processor (if so, what would I need to do to accomplish this) or can I somehow store some list of all possible includes to look through when I encounter a non-local/non-base datatype (or xsl:copy-of, or some other method I haven't considered)? Namespace awareness isn't an issue, as all schema's don't use a namespace. Or should I forget XSLT's for this and write some program to create a temporary (and massively large) schema that contains all necessary types locally and translate that with my other transformations?
Thanks in advance for any assistance.