[oXygen-user] Automatically generating XML schemas using XSLT
Mark Baker
mbaker at analecta.com
Thu Nov 22 10:44:41 CST 2012
That's precisely why I don't use <redefine>. Using the group method does
allow you to redefine the nested element while importing a top-level
element.
Imported schema:
element "foo"
complex-content
group ref="foo-content"
Importing schema B:
include "imported.xsd"
element "bar"
complex-content
sequence
element ref="foo"
group "foo-content"
sequence
element "baz"
Importing schema A:
include "imported.xsd"
element "gruznatz"
complex-content
sequence
element ref="foo"
group "foo-content"
sequence
element "bonk"
Now the valid content model for documents using schema A is /bar/foo/baz,
and the valid content model for documents using schema B is
/gruznats/foo/bonk.
Thus element foo is reused in both schemas, but with a different content
model. (Obviously this does not make sense if you change the entire content
model, as this example does, but it makes perfect sense if you want to
redefine part of the content model of foo depending on where you import it.)
Mark
> -----Original Message-----
> From: Olumide [mailto:videohead at mail.com]
> Sent: November 22, 2012 10:30 AM
> To: Mark Baker; oxygen-user at oxygenxml.com
> Subject: Re: [oXygen-user] Automatically generating XML schemas using
> XSLT
>
> On 21/11/2012 20:35, Mark Baker wrote:
> > Briefly (I can supply more detail later if you want).
>
> Thanks Mark. Unfortunately I'm still getting lost in the details. I have
> however googled chameleon schema (never heard of it) and found this
> article <http://www.xfront.com/ZeroOneOrManyNamespaces.html>
http://www.xfront.com/ZeroOneOrManyNamespaces.html, which
> also
> introduced the <redefine> element. Now if only there was a way to
> redefine an inner (nested) element while importing a top level element.
>
> - Olumide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20121122/4f71298e/attachment-0001.html
More information about the oXygen-user
mailing list