OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'Templates' in XML Schema?

8/6/01 11:19:08 AM, "Zehavi, Gil" <Gil_Zehavi@icomverse.com> wrote:

>I have in my instance document many elements that have an attribute that
>recieves an integer value. This integer value should be validated to be in a
>certain range (different range for each element). I know I can define in the
>XML schema a validation element for each element (and the attribute) using
>the minInclusive and maxInclusive. What I want to know is whether I can
>define in the schema some kind of a template that can get the minInclusive
>and maxInclusive as parameters (so for each element I can only specify the
>min and max values instead of writing the whole definition of complexType
>that contains attribute that is a simpleType with min and max values, and so

Since XSD is XML, you could define your own "template" element and then use XSLT to expand it into 
proper XSD (you'd only need to apply the XSLT transformation each time you change the schema, not 
each time you validate a document).