Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Reusing a unique constraint

From: "Todd Moon" <tmrfcm@-----.--->
To: xmlschema-dev@--.---
Date: 6/29/2007 10:39:00 AM
I have a complexType, "Transaction", which ideally would be reused in
multiple schemas. This may not be possible, though. The Transaction
type has a child sequence of type "PartList". Sometimes the PartList
needs a unique constrain, and sometimes it does not. Since I am
ignorant of any advance feature of XSD that helps me, it seems I have
to define the Transaction type in each of my schemas, and sometimes
it's PartList will have a constraint and sometimes not.

I have a master XSD which defines some basic types and I'm reusing
them in my individual schemas. If I could define two elements of type
PartList in my master schema include, one which is constrained and one
which is not, and reference ("ref") them in my schemas as needed.

I don't mind defining the Transaction or PartList elements in each
schema as long as I can reuse the unique constraint if I need to. In
fact, I think I might always define the Transaction type in each
schema because I want to make certain attributes only appear in
certain transactions. That's basically the same issue as my PartList
issue. Sometimes I want something required, and sometimes I don't, but
it's the same basic Transaction element structure each time

Is there any way to reuse a unique constraint? Is there some other XSD
feature which might help me out?

Is there a way to use a complexType, but then override whether an
attribute is required in specific usages?

Thanks for any info you can provide!

- Todd



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent