M
mflll
I want to derive or substitute an Item element containing just
text by another element with regular contents.
The context is that I have a contract which has Block's that represent
clause's.
Each Blcok has one or more
units called Items. Consider these as paragraphs or sentences within
the clause. This works fine. The Item contains simple
text and has no child elements.
I want to define a substitution or extension type that allows an Item
to be replaced by other specified elements, e. g. a specified
Payment clause or DeliverGood's clause. Unlike the Item element,
these do not allow text and they do have child elements.
Whenever I try this, I get an error that one cannot define a
PaymentClause
with complexContent with a base which is a simpleType.
I also have had problems when I tried declaring the Item as mixed
content
and the PaymentClause as fixed.
I also tried defining ItemType as
<xsd:complexContent mixed="true"></xsd:complexContent>
but I get an error message telling me that complexContent must have
elements.
Is there anyway in XML Schema to declare some kind of
inheritance or substitution from a text-only clause in the base to a
structured-type element in a derived schema.
Laurence L. Leff, Ph.D. Associate Professor of Computer Science
Western Illinois University, 1 University Circle, Macomb IL 61455
Fax 309 298 2302 Pager 309 367 0787
text by another element with regular contents.
The context is that I have a contract which has Block's that represent
clause's.
Each Blcok has one or more
units called Items. Consider these as paragraphs or sentences within
the clause. This works fine. The Item contains simple
text and has no child elements.
I want to define a substitution or extension type that allows an Item
to be replaced by other specified elements, e. g. a specified
Payment clause or DeliverGood's clause. Unlike the Item element,
these do not allow text and they do have child elements.
Whenever I try this, I get an error that one cannot define a
PaymentClause
with complexContent with a base which is a simpleType.
I also have had problems when I tried declaring the Item as mixed
content
and the PaymentClause as fixed.
I also tried defining ItemType as
<xsd:complexContent mixed="true"></xsd:complexContent>
but I get an error message telling me that complexContent must have
elements.
Is there anyway in XML Schema to declare some kind of
inheritance or substitution from a text-only clause in the base to a
structured-type element in a derived schema.
Laurence L. Leff, Ph.D. Associate Professor of Computer Science
Western Illinois University, 1 University Circle, Macomb IL 61455
Fax 309 298 2302 Pager 309 367 0787