Re: [xsl] Merging XSD's using XSLT

Subject: Re: [xsl] Merging XSD's using XSLT
From: "Anthony B. Coates" <abcoates@xxxxxxxxxx>
Date: Tue, 8 Jul 2003 23:19:12 +0100
** Reply to message from "Venkat Gyambavantha" <vgyambav@xxxxxxxxx> on Tue, 8
Jul 2003 14:47:40 -0700

> I have 3 XSD's. Third XSD is imported into the second, and the second into
> the first schema file. If i start with the first schema file, is there a way
> i can merge all the imported schema's recursively if applies) into a single
> schema file?

I have done this successfully, but in stages.  In the first stage, I parse the
includes (using 'document()') and annotate the top schema with a list of what
is imported, and from which Schema.  That list of imports is hierarchical, so
in stage 2 I flatten it.  In stage 3, I remove duplicates.  Finally, in stage
4, I actually process the annotated includes to produce the inlined Schema.

It may be possible to reduce the number of passes, but it complicates the
scripts too much (in my opinion) to do so.  Better to have more stages and
simpler scripts.

	Cheers,
		Tony.
====
Anthony B. Coates, Director
Information Design, Messaging and Management
mailto:abcoates@xxxxxxxxxx
Mobile/Cell: +44 (79) 0543 9026
====
MDDL Editor (Market Data Definition Language)
http://www.mddl.org/
FpML AWG Member (Financial Products Markup Language)
http://www.fpml.org/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread