W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2011

Re: looking for a tool that will split an xsd file containing several complexTypes into separate files

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Fri, 27 May 2011 12:41:50 +0530
Message-ID: <BANLkTin2NhumYjaUYZFA1jVtP3V6QFseRg@mail.gmail.com>
To: Andy Davidson <andy_davidson@apple.com>
Cc: xmlschema-dev@w3.org
Hi Andy,

On Fri, May 27, 2011 at 3:43 AM, Andy Davidson <andy_davidson@apple.com> wrote:
>  Anyway for our build process to run correctly each rootElement, simpleType, and complexType needs to be defined in a separate file.

Can't your build process be modified to handle a single XSD file, than
to split the XSD document in strange ways?

> It is not possible for us to change our build environment

Then my previous suggestion may not apply.

> our core IDE can not figure out how to compile the generated ObjC models if their is not a 1:1 correspondence with a XSD file.

Isn't your IDE pluggable in some way? i.e may be you can write an IDE
plugin to modify the default IDE behavior.

> The easiest and obvious thing to do would be to re-factor the XSD files manually how ever this solution is not politically acceptable

I would suggest to go for [this] easy and obvious solution :) You may
try to convince the stakeholders. May be you can have a copy of the
configuration, to accomplish this splitting and use the existing
configuration for other things.

> Does anyone know of a tool that will split the XSD types into separate files?
> I think doing this would be tricky, I am not sure how you would correctly generated the required include and import elements

You may use XSLT (not sure, why you cannot use XSLT) for splitting the
XSD document. Or could use an XML API like DOM for splitting (which
may require some kind of serialization as a post step).

Another option may be to use, something like Xerces's XML Schema API
which loads the whole of schema chain into an expanded XSModel object,
which you may query to do certain things.

Mukul Gandhi
Received on Friday, 27 May 2011 07:12:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:59 UTC