xsl-list
[Top] [All Lists]

RE: [xsl] Searching XSLT scripts to split and merge XSD schema files?

2009-06-19 18:06:24

Generally, manipulation of XSD documents using XSLT is very difficult unless
they have been written to a consistent house-style which your stylesheets
understand. That's because there are so many different ways of expressing
the same underlying schema.

One approach that a few people have now used successfully is to start not
from the XSD documents, but from the schema component model (SCM) exported
by the Saxon schema processor. This is a normalized representation of the
schema (in XML of course), using a model that relates directly to the schema
components described in the XSD specification, where the superficial
differences in surface XSD syntax are lost.

This doesn't of course solve your whole problem, but I would suggest that it
will make it easier to solve.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

 

-----Original Message-----
From: Ben Stover [mailto:bxstover(_at_)yahoo(_dot_)co(_dot_)uk] 
Sent: 19 June 2009 22:20
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Searching XSLT scripts to split and merge XSD 
schema files?

Assume I have one XSD Schema file with multiple ComplexTypes inside.
Now I want to cut one (or some) of these ComplexTypes and put 
it into a new/existing other, second XSD schema file below a 
different namespace.

Of cause this should not be done simply textually but the 
references/associations should be kept.

In the original XSD schema file the new XSD schema file must 
be imported (if not already).
If the type is used in another ComplexType or Element spec 
then it should become the prefix of the new namespace.

Is there such a XSLT script for this purpose?

Is there a XSLT script for the opposite direction: When 
MERGING a ComplexType or Element from a second XSD schema 
file into the current first XSD Schema file?




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>