| /* | ||
| 1=1 | This Schematron schema tests most structural constraints of the December 1999 Working Draft for XML Schema Structures and Datatypes, including the relationships between attribute values and allowed content. The deficiencies are: 1) not fully tested yet, 2) not namespace-aware (you will have to remove xmlns="..." from all schema files, the main and any that are included or imported, otherwise it will not work), 3) only subtyping the builtin types is checked thoroughly. If you use this, please report errors or improvements or more helpful asserts to ricko@gate.sinica.edu.tw. | |
| 1=1 | If you are using this over a slow modem connection and the schema user include or import over http, then comment out the reports or asserts which include tests of document() in them. | |
| /* | ||
| /schema | This may not be an error, but typically the top level element will be 'schema'. | |
| schema | ||
| count(*) = count(datatype | type | element | group | notation | attributeGroup | include | import | annotation | unique | key | keyref) | A schema element can contain the following elements: first any mix and number of include, import and annotation; then any mix and number of datatype, type, element, group, notation, attributeGroup, unique, key and keyref. | |
| count(@targetNamespace | @version | @xmlns | @extendableDefault | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attributes: targetNamespace, version, xmlns, finalDefault or exactDefault. | |
| not(@extendableDefault) or (@extendableDefault='true') or (@extendableDefault='false') | The extendableDefault attribute on a <name path=""/> element can only be 'true' or 'false'. (Hint: check the spelling and case.) | |
| info | appinfo | ||
| parent::annotation | An <name path=""/> element may only appear in an annotation element. | |
| not(attribute::*) or attribute::source or attribute::xml:lang | An <name path=""/> element may only have a source attribute. | |
| annotation | ||
| parent::minExclusive | parent::maxExclusive | parent::minInclusive | parent::maxInclusive | parent::precision | parent::scale | parent::pattern | parent::enumeration | parent::length | parent::maxLength | parent::minLength | parent::encoding | parent::period | parent::language | parent::schema | parent::datatype | parent::restrictions | parent::element | parent::group | parent::attribute | parent::attributeGroup | parent::type | An annotation is only expected inside any of the following elements: schema, type, restrictions, element, attribute, group, attributeGroup, datatype or the facets of datatypes: minExclusive or maxExclusive or minInclusive or maxInclusive or precision or scale or pattern or enumeration or length or maxLength or minLength or encoding or period or language | |
| any | ||
| parent::type | parent::restrictions | parent::group | The <name path=""/> element must be a child of type or restrictions or group | |
| not(*) | The class element cannot contain subelements. | |
| count( @minOccurs | @maxOccurs | @namespace | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attributes: maxOccurs, minOccurs, namespace. | |
| anyAttribute | ||
| parent::type | parent::restrictions | parent::attributeGroup | The <name path=""/> element must be a child of type or restrictions or attributeGroup. | |
| not(*) | The <name path=""/> element cannot contain subelements. | |
| not(attribute::*) or @namespace | The <name path=""/> element can have a namespace attribute. | |
| attribute | ||
| parent::attributeGroup | parent::type | parent::restrictions | The <name path=""/> element must be a child of asttrGroup or type or restrictions. | |
| count(*) = count( annotation | datatype) | The <name path=""/> element can contain and optional annotation element followed by an optional datatype element. | |
| count(@name | @type | @minOccurs | @maxOccurs | @default | @fixed | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attributes: name, type minOccurs, maxOccurs, default, fixed. | |
| @default and @fixed | In the <name path=""/> element, the attribute default should not be used if the attribute fixed is used. | |
| @type='attr' and datatype | In the <name path=""/> element, the datatype subelement cannot be specified if the value of the attribute type is 'attr'. | |
| attributeGroup | ||
| parent::schema | parent::type | parent::restrictions | parent::attributeGroup | The <name path=""/> element must be a child of schema or type or restrictions or attributeGroup. | |
| count(*) = count( annotation | attribute | attributeGroup | anyAttribute) | The <name path=""/> element can contain an optional 'annotation' elemment; then 'attribute' or 'attributeGroup' in any mix and number; and then an optional final 'anyAttribute' element. | |
| count(anyAttribute) < 2 | The <name path=""/> element cannot have more than one subelement anyAttribute. | |
| count(annotation) < 2 | The <name path=""/> element cannot have more than one subelement annotation. | |
| count(@name | @ref | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attributes: name, ref. | |
| @ref and (* | @name) | >In the <name path=""/> element, the ref attribute should not be used if the name subelement is used or if the <name path=""/> element has content. | |
| datatype | ||
| count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | precision | scale | pattern | enumeration | length | maxLength | minLength | encoding | period | language ) = count (*) | A datatype element can only have annotation or facet children. | |
| annotation and not(*[position()=1] =annotation) | In a <name path=""/> element, an annotation element must come before any facets. | |
| @source and string-length(@source > 0) | The <name path=""/> element must have a source attribute. | |
| minExclusive | maxExclusive | minInclusive | maxInclusive | precision | scale | pattern | enumeration | length | maxLength | minLength | encoding | period | language | ||
| parent::datatype | parent::restrictions | The <name path=""/> facet element can only appear in a datatype or restrictions element. | |
| count( annotation ) = count (*) | The <name path=""/> element can only contain an annotation element. | |
| @value and string-length(@value > 0) | The <name path=""/> element must have a value attribute. | |
| not(@abstract) or (@abstract='true') or (@abstract='false') | The abstract attribute on a <name path=""/> element can only be 'true' or 'false'. (Hint: check the spelling and case.) | |
| not(@final) or (@final='restriction') or (@final='extension') or (@final='#all') | The final attribute on a <name path=""/> element can only be 'restriction' or 'extension' or '#all'. (Hint: check the spelling and case.) | |
| count(@value | @abstract | @final | @source | @name) = count(attribute::*) | The <name path=""/> element can only have the following attributes: abstract, final, name, source and value. | |
| self::enumeration or self::pattern or count( parent::*/*[name()= name()]) = 1 | The <name path=""/> element cannot be repeated within a single datatype. | |
| @value | The <name path=""/> element must have a 'value' attribute. | |
| not(@name) or count( datatype[@name = @name ]) = 1 | In the element <name path=""/>, the name of a datatype must be unique among the datatypes defined in the surrounding schema. | |
| not(@name) or count( datatype[@name = @source]) = 1 | In the element <name path=""/>, the name specified must be the name of a datatype in the schema in which the user-generated datatype is defined. | |
| datatype[@source='string'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | pattern ) | A datatype element with a source value of string can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | pattern. | |
| datatype[@source='boolean'] | ||
| count(*)=count( annotation ) | A datatype element with a source value of boolean can only have the following contents: annotation. | |
| datatype[@source='float'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of float can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='double'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of double can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='decimal'] | ||
| count(*)= count( annotation | precision | scale | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of decimal can only have the following contents: annotation | precision | scale | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='timeInstant'] | ||
| count(*)= count( annotation | pattern | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of timeInstant can only have the following contents: annotation | pattern | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='timeDuration'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of timeDuration can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='recurringInstant'] | ||
| count(*)= count( annotation | period | pattern | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of recurringInstant can only have the following contents: annotation |period | pattern | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='binary'] | ||
| count(*)= count( annotation | encoding | length | maxLength |minLength ) | A datatype element with a source value of can only have the following contents: annotation | encoding | length | maxLength |minLength. | |
| datatype[@source='uri'] | ||
| count(*)=count( annotation | enumeration ) | A datatype element with a source value of uri can only have the following contents: annotation | enumeration. | |
| datatype[@source='language'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of language can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='NMTOKEN'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of NMTOKEN can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='Name'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of Name can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='NMTOKENS'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of NMTOKENS can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='QName'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of QName can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='NCName'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of NCName can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='ID'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of ID can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='ENTITY'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of ENTITY can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='NOTATION'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of NOTATION can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='IDREF'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of IDREF can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='IDREFS'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of IDREFS can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='ENTITIES'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language ) | A datatype element with a source value of ENTITIES can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | length | maxLength | minLength | enumeration | pattern | language . | |
| datatype[@source='integer'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of integer can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='non-negative-integer'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of non-negative-integer can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='non-positive-integer'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of non-positive-integer can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='positive-integer'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of positive-integer can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='negative-integer'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of negative-integer can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='date'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of date can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| datatype[@source='time'] | ||
| count(*)=count( annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration ) | A datatype element with a source value of time can only have the following contents: annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | enumeration . | |
| element | ||
| parent::schema | parent::type | parent::restrictions | parent::group | The <name path=""/> element can only be a child of schema or type or restrictions or group. | |
| count(*) = count( type | datatype | annotation | unique | key | keyref) | The <name path=""/> element can contain an optional annotation element; then the type and datatype elements, in any mix and number; then the key, unique and keyref elements, in any mix and number. | |
| count(@name | @ref | @type | @nullable | @equivClass | @abstract | @final | @exact | @minOccurs | @maxOccurs | @default | @fixed | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attributes: name, ref, type, minOccurs, maxOccurs, equivClass, default, fixed, abstract, final, nullable, exact. | |
| @type and @ref | The <name path=""/> element cannot have both the ref attribute and the type attribute specified at the same time. | |
| @default and @fixed | The <name path=""/> element cannot have both the default attribute and the fixed attribute specified at the same time. | |
| @name and @ref | The <name path=""/> element cannot have both the ref attribute and the name attribute specified at the same time. | |
| field | ||
| parent::unique | parent::key | parent::keyref | The <name path=""/> element must be a child of unique or key or keyref. | |
| not(*) | The <name path=""/> element cannot contain subelements. | |
| string-length(text()) > 0 | The <name path=""/> element must contain a value. | |
| attribute::* | The <name path=""/> element cannot have an attribute. | |
| group | ||
| parent::schema | parent::type | parent::restrictions | parent::group | The <name path=""/> element can only be a child of schema or type or restrictions or group. | |
| count(*) = count( annotation | element | group | any) | The <name path=""/> element can contain an optional 'annotation' element, followed by the 'element', 'group' and 'any' elements, in any mix and number. | |
| count(@name | @ref | @minOccurs | @maxOccurs | @order | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attributes: name, ref, minOccurs, maxOccurs, order. | |
| not(@order) or (@order='choice') or (@order='seq') or (@order='all') | The order attribute on a <name path=""/> element can only be 'choice', 'seq', or 'all'. (Hint: check the spelling and case.) | |
| group and @order='all' | In the <name path=""/> element, if the attribute order has the value all, the group sub-element is not allowed. | |
| @order='all' and not(parent::type) | In the <name path=""/> element, if the attribute order has the value 'all', then the <name path=""/> element must be at the top level of the content model. | |
| import | ||
| parent::schema | The <name path=""/> element must be a child of schema. | |
| (normalize-space(.)='') and (count(*) = 0) | The <name path=""/> element cannot contain subelements. | |
| count(attribute::*) = count(@schemaLocation | @namespace ) | The <name path=""/> element can only have schemaLocation and namespace attributes. | |
| @namespace | The <name path=""/> element must have a namespace attribute. | |
| (string-length(@schemaLocation) > 0) and document(@schemaLocation)/schema | On the element <name path=""/> the schemaLocation attribute should give the URI of an XML schema. | |
| include | ||
| parent::schema | The <name path=""/> element must be a child of schema. | |
| (normalize-space(.)='') and (count(*) = 0) | The <name path=""/> element cannot contain subelements. | |
| count(attribute::*) = count(@schemaLocation) | The <name path=""/> element can only have a schemaLocation attribute. | |
| @schemaLocation | The <name path=""/> element must have a schemaLocation attribute. | |
| (string-length(@schemaLocation) > 0) and document(@schemaLocation)/schema | On the element <name path=""/> the schemaLocation attribute should give the URI of an XML schema. | |
| unique | key | ||
| parent::schema | parent::element | The <name path=""/> element must be a child of schema or element. | |
| count(*) = count (selector | field) | The <name path=""/> element cannot contain a selector element followed by one or more field elements. | |
| count(selector) = 1 | The <name path=""/> element must contain one 'selector' element. | |
| field | The <name path=""/> element must contain at least one 'field' element. | |
| count(@name | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attribute: name. | |
| not(@name) or ( string-length(@name) > 0) | The <name path=""/> element should have a name attribute. | |
| keyref | ||
| parent::schema | parent::element | The <name path=""/> element must be a child of schema or element. | |
| count(*) = count (selector | field) | The <name path=""/> element cannot contain a selector element followed by one or more field elements. | |
| count(selector) = 1 | The <name path=""/> element must contain one 'selector' element. | |
| field | The <name path=""/> element must contain at least one 'field' element. | |
| count(@name | @refer |@xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attribute: name, refer. | |
| not(@name) or ( string-length(@name) > 0) | The <name path=""/> element should have a name attribute. | |
| not(@refer) or ( string-length(@refer) > 0) | The <name path=""/> element should have a refer attribute. | |
| notation | ||
| parent::schema | The <name path=""/> element must be a child of schema | |
| not(*) | The <name path=""/> element cannot contain subelements. | |
| count(@name | @public | @system | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attributes: name, public, system. | |
| @name and ( string-length(@name) > 0) | The <name path=""/> element should have a name attribute. | |
| @public and ( string-length(@public) > 0) | The <name path=""/> element should have a public attribute. | |
| restrictions | ||
| parent::type | The <name path=""/> element must be a child of type. | |
| count(*) = count(annotation | minExclusive | maxExclusive | minInclusive | maxInclusive | precision | scale | pattern | enumeration | length | maxLength | minLength | encoding | period | language | restrictions | element | group | any | sic | attribute | attributeGroup | anyAttribute) | The restrictions element can contain the following elements: ; then any mix of element, group and any (if the content attribute has the value 'mixed' or 'elemOnly'); then any mix of attribute and attributeGroup; and lastly an optional anyAttribute. | |
| selector | ||
| parent::unique | parent::key | parent::keyref | The <name path=""/> element must be a child of unique or key or keyref. | |
| not(*) | The <name path=""/> element cannot contain subelements. | |
| string-length(text()) > 0 | The <name path=""/> element must contain a value. | |
| attribute::* | The <name path=""/> element cannot have an attribute. | |
| sic | ||
| parent::restrictions | The <name path=""/> element must be a child of restrictions. | |
| count(*) = 0 | The <name path=""/> element cannot contain subelements. | |
| attribute::* | The <name path=""/> element should have no attributes. | |
| type | ||
| parent::schema | parent::element | The <name path=""/> element must be a child of schema or element. | |
| count(*) = count(annotation | restrictions | element | group | any |attribute | attributeGroup | anyAttribute) | The type element can contain the following elements: an optional annotation element; then either restriction or any mix of element, group and any (if the content attribute has the value 'mixed' or 'elemOnly'); then any mix of attribute and attributeGroup; and lastly an optional anyAttribute. | |
| count(@name | @content | @abstract | @final | @exact | @source | @derivedBy | @xml:lang ) = count(attribute::*) | The <name path=""/> element can only have the following attributes: name, content, abstract, final, exact, source, derivedBy. | |
| not(@content) or (@content='textOnly') or (@content='mixed') or (@content='elemOnly') or (@content='empty') | >The content attribute on a <name path=""/> element can only be 'textOnly', 'mixed', 'elemOnly' or 'empty'. (Hint: check the spelling and case.) | |
| not(@abstract) or (@abstract='true') or (@abstract='false') | The abstract attribute on a <name path=""/> element can only be 'true' or 'false'. (Hint: check the spelling and case.) | |
| not(restrictions) or (restrictions and @derivedBy='restriction') | The <name path=""/> element can only have a restrictions subelement if the attribute derivedBy has the value 'restriction'. | |
| not(@name) or (count(//type[@name= current()/@name]) = 1) | The same NCName must not appear in two definitions or declarations of the same type. | |
| type[@content='textOnly'] | ||
| element | group | any | If the attribute content on the <name path=""/> element has the value 'textOnly', the following elements cannot be used: element, group, any. | |
| type[@content='empty'] | ||
| element | group | any | If the attribute content on the <name path=""/> element has the value 'empty', the following elements cannot be used: element, group, any. | |
| attributeGroup/@ref | ||
| count(parent::*/attributeGroup[@ref= @ref])=1 | An attribute group should not be referenced by name more than once per element. | |
| //attributeGroup[@name= @ref] | An attribute group reference should refer to an attribute group that has been defined elsewhere in the in schema. | |
| @name=@ref | An attribute group should not refer to itself. | |
| attribute/@name | ||
| count(parent::*/attribute[@name= current()]/@name) = 1 | An attribute should not be defined twice. | |
| element/@name | ||
| count(//element[@name= @name]) = 1 | An element cannot be declared more than once. | |
| group[@order='alt']/element/@name | ||
| count(parent::*/element[@ref= @name]) = 1 | A choice group should not have choices between the same element. | |
| group[@order='alt']/element/@ref | ||
| count(parent::*/element[@ref= @ref]) = 1 | A choice group should not have choices between the same element. (If this seems strange in context, please ignore this message: ambiguity is ambiguous in the XML Schema draft.> | |
| length | ||
| ../maxLength | It is an error for both length and maxLength to be specified for the same datatype. | |
| ../minLength | It is an error for both length and minLength to be specified for the same datatype. | |
| minExclusive | ||
| ../minInclusive | It is an error for both minExclusive and minInclusive to the specified for the same datatype. | |
| maxExclusive | ||
| ../maxInclusive | It is an error for both minExclusive and maxInclusive to the specified for the same datatype. | |
| */@maxOccurs/@minOccurs | ||
| @minOccurs <= @maxOccurs | In the <name path=""/> element, the value of maxOccurs must be greater or equal to the value of minOccurs. | |
| */@maxOccurs | ||
| @maxOccurs > 0 | In the <name path=""/> element, the value of maxOccurs must be greater or equal to 1 (which is the default value of maxOccurs.) | |
| */@minOccurs | ||
| @minOccurs < 1 | In the <name path=""/> element, the value of minOccurs must be greater or equal to 1 (which is the default value of maxOccurs. | |
| scale | ||
| (../precision) and (text() > ../precision/text()) | It is an error for scale to be greater-than precision. | |
Schematron Pretty by Rick Jelliffe. The Schematron by Rick Jelliffe, Academia Sinica Computing Centre.