Lists Home |
Date Index |
- To: email@example.com
- Subject: Re: [xml-dev] Tools for transforming a multiple schema document intoa single document?
- From: David Carver <firstname.lastname@example.org>
- Date: Fri, 13 Jan 2006 15:11:21 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Message-ID:Date:From:Reply-To:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding; b=gzJEcqdv6YsTCGXb7Sy7GCsMPEe/FCsagoQYywLJTSaAZ815cwkn1HyP/rYkmwIKM7DtNmm7yvn/HjpSc9vvwvGfq2Em4W4V6y2TQlqyeEdks8jpiXdPiZKcPhC+WH4lHMUwkGfLH1rhe/hRdBvi2gJGm+/JIfdjmrgCB+92dbo= ;
- Reply-to: email@example.com
- User-agent: Thunderbird 1.5 (Windows/20051201)
Michael Kay wrote:
> It's not possible, in general: if two schema documents have different
> target namespaces, they can't be merged.
> If the target namespace is the same, and other document-level
> attributes such as elementFormDefault are compatible, then I should
> think the merge can be done with a very simple stylesheet (or in most
> cases, by copy-and-paste).
> Michael Kay
Michael is correct it can be done with a XSLT stylesheet if the schema
instances are all in the same namespace. I wrote such a stylesheet for
work, but needed to use a SAXON extension to keep track of what had
already been added to the output document. Unfortunately, I currently
can't share this stylesheet, unless work gives me permission.
If you search the XSLT mailing list, you should find some sample code
that I had written that should point you in the general direction.