- From: Marko Smiljanic <m.smiljanic@utwente.nl>
- Date: Wed, 15 Oct 2003 19:05:09 +0200
- To: <xmlschema-dev@w3.org>
Hi,
This is a question concerned with the property of "validation equality"
between the schemas using "substitutionGroup"s and schemas using a
"choice" compositor as a replacement for a substitutionGroup.
The term "validation equality" between different schemas means that the
sets of XML documents that can be validated by those different schemas
are equal.
Now, a short intro and then a question.
*** The Short Intro (written in XSD-like language)...
Lets have Schema 1 defined as:
element A (abstract=true)
element B (substitutionGroup="A")
element C (substitutionGroup="A")
element D () - sequence - element (ref="A")
Now I convert Schema 1 to a "validation equal" Schema 2, presented
below:
element B ()
element C ()
element D () - sequence - choice -- element (ref="B")
\_ element (ref="C")
What I did is, replaced a reference to an abstract element "A" with a
choice compositor, and then nest all the possible substitutions for "A"
within this choice. I also removed element A as it is defined as
abstract, otherwise, I would add it under the choice too.
*** The question
Do you think/know that it is possible to transform every XML schema
having substitutionGroups using the "choice" trick above, and get the
"validation equal" schema?
Thanks,
Marko Smiljanic
ps. FYI I'm defining a graph-like model for XML schema needed in my
research. The trick above would be a nice workaround to represent
substitution groups in the model using "choice" that is already
supported by the model.
*************************
Research assistant, Database Technology
Department of Computer Science, University of Twente
P.O. Box 217, 7500 AE Enschede, The Netherlands
Phone +31 (053) 489 4520, Fax ~ 2927
E-mail: m.smiljanic@utwente.nl
WWW: www.cs.utwente.nl/~markosm
Received on Wednesday, 15 October 2003 13:06:48 UTC