1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/xmlschema-for-jaxb.rng Wed Apr 27 01:27:09 2016 +0800 1.3 @@ -0,0 +1,1579 @@ 1.4 +<?xml version="1.0"?> 1.5 +<!-- 1.6 + Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 + 1.9 + This code is free software; you can redistribute it and/or modify it 1.10 + under the terms of the GNU General Public License version 2 only, as 1.11 + published by the Free Software Foundation. Oracle designates this 1.12 + particular file as subject to the "Classpath" exception as provided 1.13 + by Oracle in the LICENSE file that accompanied this code. 1.14 + 1.15 + This code is distributed in the hope that it will be useful, but WITHOUT 1.16 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.17 + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.18 + version 2 for more details (a copy is included in the LICENSE file that 1.19 + accompanied this code). 1.20 + 1.21 + You should have received a copy of the GNU General Public License version 1.22 + 2 along with this work; if not, write to the Free Software Foundation, 1.23 + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.24 + 1.25 + Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.26 + or visit www.oracle.com if you need additional information or have any 1.27 + questions. 1.28 +--> 1.29 + 1.30 +<grammar xmlns="http://relaxng.org/ns/structure/1.0" 1.31 + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" 1.32 + ns="http://www.w3.org/2001/XMLSchema" 1.33 + xmlns:xs="http://www.w3.org/2001/XMLSchema" 1.34 + xmlns:doc="http://www.jenitennison.com/doc" 1.35 + xmlns:txw="http://java.sun.com/txw"> 1.36 + 1.37 +<doc:p> 1.38 + RELAX NG schema for XML Schema by <doc:link 1.39 + href="mailto:mail@jenitennison.com">Jeni Tennison</doc:link>. Based on 1.40 + <doc:link href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML 1.41 + Schema Part I: Structures Recommendation</doc:link> and <doc:link 1.42 + href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">XML Schema Part 1.43 + II: Datatypes</doc:link>. 1.44 +</doc:p> 1.45 +<doc:changes date="2001-11-24"> 1.46 + <doc:p> 1.47 + Amended to comply with 10 August 2001 Tutorial. 1.48 + </doc:p> 1.49 + <doc:change>Removed key attributes.</doc:change> 1.50 + <doc:change>Replaced not element with except elements.</doc:change> 1.51 + <doc:change> 1.52 + Replaced multiple consecutive optional attributes to use the 1.53 + zeroOrMore/choice pattern. 1.54 + </doc:change> 1.55 + <doc:change> 1.56 + Removed interleave elements inside list elements (which are no longer 1.57 + permitted). 1.58 + </doc:change> 1.59 +</doc:changes> 1.60 + 1.61 +<define name="openAttrs" txw:mode="inherit"> 1.62 + <doc:p> 1.63 + This allows any number of attributes that are not in the XML Schema 1.64 + namespace or are in no namespace. This is somewhat more complicated than 1.65 + the XML Schema anyAttribute equivalent. 1.66 + </doc:p> 1.67 + <!-- KK don't care --> 1.68 + <empty/> 1.69 + <!--zeroOrMore> 1.70 + <attribute> 1.71 + <anyName> 1.72 + <except> 1.73 + <nsName /> 1.74 + <nsName ns="" /> 1.75 + <name>xml:lang</name> 1.76 + </except> 1.77 + </anyName> 1.78 + <text /> 1.79 + </attribute> 1.80 + </zeroOrMore--> 1.81 +</define> 1.82 + 1.83 +<define name="annotated" txw:mode="inherit"> 1.84 + <doc:p> 1.85 + This allows any number of attributes that are not in the XML Schema 1.86 + namespace or are in no namespace, an optional id attribute of type ID, 1.87 + and an optional annotation element. This is used as the basis for many 1.88 + element content models. 1.89 + </doc:p> 1.90 + <ref name="openAttrs" /> 1.91 + <optional> 1.92 + <attribute name="id"> 1.93 + <data type="ID" /> 1.94 + </attribute> 1.95 + </optional> 1.96 + <optional> 1.97 + <ref name="annotation" /> 1.98 + </optional> 1.99 +</define> 1.100 + 1.101 +<define name="schemaTop" txw:mode="inline"> 1.102 + <doc:p> 1.103 + This gives the content model of the top level of the schema. 1.104 + </doc:p> 1.105 + <choice> 1.106 + <ref name="redefinable" /> 1.107 + <ref name="topLevelElement" /> 1.108 + <ref name="topLevelAttribute" /> 1.109 + <!--ref name="notation" /--> 1.110 + </choice> 1.111 +</define> 1.112 + 1.113 +<define name="redefinable" txw:mode="inline"> 1.114 + <doc:p> 1.115 + This gives the components that can be redefined within the redefine 1.116 + element. They also occur at the top level of the schema. 1.117 + </doc:p> 1.118 + <choice> 1.119 + <ref name="simpleTypeHost" /> 1.120 + <ref name="complexTypeHost" /> 1.121 + <!--ref name="namedGroup" /> 1.122 + <ref name="namedAttributeGroup" /--> 1.123 + </choice> 1.124 +</define> 1.125 + 1.126 +<define name="formChoice"> 1.127 + <doc:p> 1.128 + This gives the values for the various form attributes: 1.129 + elementFormDefault and attributeFormDefault on the schema element, and 1.130 + the form attributes on the element and attribute elements. 1.131 + </doc:p> 1.132 + <choice> 1.133 + <value>qualified</value> 1.134 + <value>unqualified</value> 1.135 + </choice> 1.136 +</define> 1.137 + 1.138 +<!-- KK: merge the two --> 1.139 +<define name="reducedDerivationControl"> 1.140 + <doc:p> 1.141 + This gives the values that can be taken in the lists used to control 1.142 + derivation by extension or restriction (this is 'reduced' derivation 1.143 + because some derivation can involve substitution). This RELAX NG schema, 1.144 + like the XML Schema Recommendation here, allows the keywords 'extension' and 1.145 + 'restriction' to be repeated any number of times. 1.146 + </doc:p> 1.147 + <list> 1.148 + <oneOrMore> 1.149 + <choice> 1.150 + <value>extension</value> 1.151 + <value>restriction</value> 1.152 + </choice> 1.153 + </oneOrMore> 1.154 + </list> 1.155 +</define> 1.156 + 1.157 +<define name="derivationSet"> 1.158 + <doc:p> 1.159 + This specifies the possible values for attributes that control derivation. 1.160 + </doc:p> 1.161 + <choice> 1.162 + <value>#all</value> 1.163 + <ref name="reducedDerivationControl" /> 1.164 + </choice> 1.165 +</define> 1.166 + 1.167 +<start> 1.168 + <doc:p> 1.169 + This is the beginning point for the schema, and defines the schema 1.170 + element. 1.171 + </doc:p> 1.172 + <element name="schema" 1.173 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-schema"> 1.174 + <ref name="openAttrs" /> 1.175 + <zeroOrMore> 1.176 + <choice> 1.177 + <attribute name="version"> 1.178 + <data type="token" /> 1.179 + </attribute> 1.180 + <attribute name="finalDefault"> 1.181 + <ref name="derivationSet" /> 1.182 + </attribute> 1.183 + <attribute name="blockDefault"> 1.184 + <ref name="blockSet" /> 1.185 + </attribute> 1.186 + <attribute name="attributeFormDefault"> 1.187 + <ref name="formChoice" /> 1.188 + </attribute> 1.189 + <attribute name="elementFormDefault"> 1.190 + <ref name="formChoice" /> 1.191 + </attribute> 1.192 + <attribute name="id"> 1.193 + <data type="ID" /> 1.194 + </attribute> 1.195 + <attribute name="xml:lang"> 1.196 + <data type="language" /> 1.197 + </attribute> 1.198 + <attribute name="targetNamespace"> 1.199 + <data type="anyURI" /> 1.200 + </attribute> 1.201 + </choice> 1.202 + </zeroOrMore> 1.203 + <zeroOrMore> 1.204 + <choice> 1.205 + <!--ref name="include" /--> 1.206 + <ref name="import" /> 1.207 + <!--ref name="redefine" /--> 1.208 + <ref name="annotation" /> 1.209 + </choice> 1.210 + </zeroOrMore> 1.211 + <zeroOrMore> 1.212 + <choice> 1.213 + <ref name="schemaTop" /> 1.214 + <ref name="annotation" /> 1.215 + </choice> 1.216 + </zeroOrMore> 1.217 + </element> 1.218 +</start> 1.219 + 1.220 +<define name="allNNI"> 1.221 + <doc:p> 1.222 + This gives the value type for the maxOccurs attribute, which may be a 1.223 + non-negative number or the keyword 'unbounded'. 1.224 + </doc:p> 1.225 + <choice> 1.226 + <data type="nonNegativeInteger" /> 1.227 + <value type="token">unbounded</value> 1.228 + </choice> 1.229 +</define> 1.230 + 1.231 +<define name="occurs" txw:mode="inherit"> 1.232 + <doc:p> 1.233 + This specifies the occurs attributes, minOccurs and maxOccurs, as they 1.234 + are normally used. 1.235 + </doc:p> 1.236 + <zeroOrMore> 1.237 + <choice> 1.238 + <attribute name="minOccurs"> 1.239 + <data type="nonNegativeInteger" /> 1.240 + </attribute> 1.241 + <attribute name="maxOccurs"> 1.242 + <ref name="allNNI" /> 1.243 + </attribute> 1.244 + </choice> 1.245 + </zeroOrMore> 1.246 +</define> 1.247 + 1.248 +<define name="typeDefParticle" txw:mode="inline"> 1.249 + <doc:p> 1.250 + This gives the possible content of complex types. 1.251 + </doc:p> 1.252 + <choice> 1.253 + <!--ref name="groupRef" /--> 1.254 + <ref name="all" /> 1.255 + <ref name="choice" /> 1.256 + <ref name="sequence" /> 1.257 + </choice> 1.258 +</define> 1.259 + 1.260 +<define name="nestedParticle" txw:mode="inline"> 1.261 + <doc:p> 1.262 + This gives the particles that can make up a model group. 1.263 + </doc:p> 1.264 + <choice> 1.265 + <ref name="localElement" /> 1.266 + <!--ref name="groupRef" /--> 1.267 + <ref name="choice" /> 1.268 + <ref name="sequence" /> 1.269 + <ref name="any" /> 1.270 + </choice> 1.271 +</define> 1.272 + 1.273 +<define name="fixedOrDefault" txw:mode="inline"> 1.274 + <doc:p> 1.275 + This specifies the relationship between fixed and default attributes on 1.276 + element and attribute elements - if one is present, then the other cannot 1.277 + be. This is a constraint that cannot be specified using XML Schema. 1.278 + </doc:p> 1.279 + <choice> 1.280 + <empty /> 1.281 + <attribute name="fixed" /> 1.282 + <attribute name="default" /> 1.283 + </choice> 1.284 +</define> 1.285 + 1.286 +<define name="attributeType" txw:mode="inherit"> 1.287 + <doc:p> 1.288 + This specifies the relationship between the type attribute and the 1.289 + simpleType element child of attribute elements - if one is present, then 1.290 + the other cannot be, although it is possible for neither to be allowed. 1.291 + </doc:p> 1.292 + <choice> 1.293 + <empty /> 1.294 + <attribute name="type"> 1.295 + <data type="QName" /> 1.296 + </attribute> 1.297 + <ref name="simpleTypeHost" /> 1.298 + </choice> 1.299 +</define> 1.300 + 1.301 +<define name="localAttribute"> 1.302 + <doc:p> 1.303 + This describes attribute elements when used in a local context. They 1.304 + have an optional use attribute, possibly a fixed or default attribute, 1.305 + and then can either have a ref attribute (referring to a top-level 1.306 + attribute) or a name attribute with an optional form attribute and 1.307 + specifying an attribute type. 1.308 + </doc:p> 1.309 + <element name="attribute" 1.310 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-attribute"> 1.311 + <ref name="annotated" /> 1.312 + <optional> 1.313 + <attribute name="use"> 1.314 + <choice> 1.315 + <value type="token">optional</value> 1.316 + <value type="token">prohibited</value> 1.317 + <value type="token">required</value> 1.318 + </choice> 1.319 + </attribute> 1.320 + </optional> 1.321 + <ref name="fixedOrDefault" /> 1.322 + <choice> 1.323 + <attribute name="ref"> 1.324 + <data type="QName" /> 1.325 + </attribute> 1.326 + <group> 1.327 + <attribute name="name"> 1.328 + <data type="NCName" /> 1.329 + </attribute> 1.330 + <optional> 1.331 + <attribute name="form"> 1.332 + <ref name="formChoice" /> 1.333 + </attribute> 1.334 + </optional> 1.335 + <ref name="attributeType" /> 1.336 + </group> 1.337 + </choice> 1.338 + </element> 1.339 +</define> 1.340 + 1.341 +<define name="topLevelAttribute"> 1.342 + <doc:p> 1.343 + This describes attribute elements when used at the top level of the 1.344 + schema. They must have a name, may have a fixed or default attribute, 1.345 + and specify their type through a type attribute or child simpleType 1.346 + element. The name attribute of each attribute element that appears at 1.347 + the top level of the schema is unique. 1.348 + </doc:p> 1.349 + <element name="attribute" 1.350 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-attribute"> 1.351 + <ref name="annotated" /> 1.352 + <attribute name="name"> 1.353 + <data type="NCName" /> 1.354 + </attribute> 1.355 + <ref name="fixedOrDefault" /> 1.356 + <ref name="attributeType" /> 1.357 + </element> 1.358 +</define> 1.359 + 1.360 +<define name="attrDecls" txw:mode="inherit"> 1.361 + <doc:p> 1.362 + This gives the model group for specifying the attributes in a complex 1.363 + type, an extension or restriction. 1.364 + </doc:p> 1.365 + <zeroOrMore> 1.366 + <choice> 1.367 + <ref name="localAttribute" /> 1.368 + <!--ref name="attributeGroupRef" /--> 1.369 + </choice> 1.370 + </zeroOrMore> 1.371 + <optional> 1.372 + <ref name="anyAttribute" /> 1.373 + </optional> 1.374 +</define> 1.375 + 1.376 +<define name="anyAttribute"> 1.377 + <doc:p> 1.378 + This specifies the anyAttribute wildcard. 1.379 + </doc:p> 1.380 + <element name="anyAttribute" 1.381 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"> 1.382 + <ref name="wildcard" /> 1.383 + </element> 1.384 +</define> 1.385 + 1.386 +<define name="complexTypeModel" txw:mode="inherit"> 1.387 + <doc:p> 1.388 + This specifies the content of a complexType element. As children, it can 1.389 + have a simpleContent, a complexContent or a model group. Only if it has 1.390 + one of the latter two, may it have a mixed attribute. This latter 1.391 + constraint is something that cannot be specified in XML Schema. 1.392 + </doc:p> 1.393 + <choice> 1.394 + <ref name="simpleContent" /> 1.395 + <group> 1.396 + <optional> 1.397 + <attribute name="mixed"> 1.398 + <data type="boolean" /> 1.399 + </attribute> 1.400 + </optional> 1.401 + <choice> 1.402 + <ref name="complexContent" /> 1.403 + <group> 1.404 + <optional> 1.405 + <ref name="typeDefParticle" /> 1.406 + </optional> 1.407 + <ref name="attrDecls" /> 1.408 + </group> 1.409 + </choice> 1.410 + </group> 1.411 + </choice> 1.412 +</define> 1.413 + 1.414 +<define name="complexTypeHost" txw:mode="inherit"> 1.415 + <ref name="typeHost" /> 1.416 + <ref name="complexType" /> 1.417 +</define> 1.418 + 1.419 +<define name="typeHost" txw:mode="inherit"><empty/><empty/></define> 1.420 + 1.421 +<define name="complexType" txw:mode="inherit"> 1.422 + <element name="complexType" 1.423 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexType"> 1.424 + <doc:p> 1.425 + This specifies the basic content of a complexType element. 1.426 + </doc:p> 1.427 + <ref name="annotated" /> 1.428 + <ref name="complexTypeModel" /> 1.429 + <optional> 1.430 + <attribute name="name"> 1.431 + <data type="NCName" /> 1.432 + </attribute> 1.433 + </optional> 1.434 + <zeroOrMore> 1.435 + <choice> 1.436 + <attribute name="abstract"> 1.437 + <data type="boolean" /> 1.438 + </attribute> 1.439 + <attribute name="block"> 1.440 + <ref name="derivationSet" /> 1.441 + </attribute> 1.442 + <attribute name="final"> 1.443 + <ref name="derivationSet" /> 1.444 + </attribute> 1.445 + </choice> 1.446 + </zeroOrMore> 1.447 + </element> 1.448 +</define> 1.449 + 1.450 +<define name="complexRestriction"> 1.451 + <doc:p> 1.452 + This describes a restriction element within a complexContent element 1.453 + (i.e. one that restricts a complex type). It has a base attribute, may 1.454 + contain a model group and may contain attribute declarations of various 1.455 + sorts. 1.456 + </doc:p> 1.457 + <element name="restriction" 1.458 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent::restriction"> 1.459 + <ref name="annotated" /> 1.460 + <attribute name="base"> 1.461 + <data type="QName" /> 1.462 + </attribute> 1.463 + <optional> 1.464 + <ref name="typeDefParticle" /> 1.465 + </optional> 1.466 + <ref name="attrDecls" /> 1.467 + </element> 1.468 +</define> 1.469 + 1.470 +<define name="extensionType"> 1.471 + <doc:p> 1.472 + This specifies the basic model for an extension element: adding a 1.473 + required base attribute to the model used for most components. 1.474 + </doc:p> 1.475 + <ref name="annotated" /> 1.476 + <attribute name="base"> 1.477 + <data type="QName" /> 1.478 + </attribute> 1.479 +</define> 1.480 + 1.481 +<define name="complexExtension"> 1.482 + <doc:p> 1.483 + This describes an extension element within a complexContent element 1.484 + (i.e. one that restricts a complex type). It may contain a model group 1.485 + and may contain attribute declarations of various sorts. 1.486 + </doc:p> 1.487 + <element name="extension" 1.488 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent::extension"> 1.489 + <ref name="extensionType" /> 1.490 + <optional> 1.491 + <ref name="typeDefParticle" /> 1.492 + </optional> 1.493 + <ref name="attrDecls" /> 1.494 + </element> 1.495 +</define> 1.496 + 1.497 +<define name="complexContent"> 1.498 + <doc:p> 1.499 + This describes a complexContent element. It may have a mixed attribute, 1.500 + and either a restriction or extension element as content. 1.501 + </doc:p> 1.502 + <element name="complexContent" 1.503 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent"> 1.504 + <ref name="annotated" /> 1.505 + <optional> 1.506 + <attribute name="mixed"> 1.507 + <data type="boolean" /> 1.508 + </attribute> 1.509 + </optional> 1.510 + <choice> 1.511 + <ref name="complexRestriction" /> 1.512 + <ref name="complexExtension" /> 1.513 + </choice> 1.514 + </element> 1.515 +</define> 1.516 + 1.517 +<define name="simpleRestriction"> 1.518 + <doc:p> 1.519 + This describes a restriction element that appears within a simpleContent 1.520 + or simpleType element (i.e. one that restricts a simple type). Its 1.521 + content follows the simple restriction model that is detailed below, and 1.522 + may include attribute declarations. 1.523 + </doc:p> 1.524 + <element name="restriction" 1.525 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent::restriction"> 1.526 + <ref name="annotated" /> 1.527 + <ref name="simpleRestrictionModel" /> 1.528 + <ref name="attrDecls" /> 1.529 + </element> 1.530 +</define> 1.531 + 1.532 +<define name="simpleExtension"> 1.533 + <doc:p> 1.534 + This describes an extension element that appears within a simpleContent 1.535 + element (i.e. one that extends a simple type). Like other extensions, it 1.536 + has a base type, but it can only be used to add attributes. 1.537 + </doc:p> 1.538 + <element name="extension" 1.539 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent::extension"> 1.540 + <ref name="extensionType" /> 1.541 + <ref name="attrDecls" /> 1.542 + </element> 1.543 +</define> 1.544 + 1.545 +<define name="simpleContent"> 1.546 + <doc:p> 1.547 + This describes a simpleContent element, whose content can either hold a 1.548 + restriction or extension element. 1.549 + </doc:p> 1.550 + <element name="simpleContent" 1.551 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"> 1.552 + <ref name="annotated" /> 1.553 + <choice> 1.554 + <ref name="simpleRestriction" /> 1.555 + <ref name="simpleExtension" /> 1.556 + </choice> 1.557 + </element> 1.558 +</define> 1.559 + 1.560 +<define name="blockSet"> 1.561 + <doc:p> 1.562 + This gives the possible values for block attributes on element elements, 1.563 + which includes substitution amongst the list of possible values. This 1.564 + RELAX NG schema, like the XML Schema Recommendation, allows each of the 1.565 + keywords 'extension', 'restriction' and 'substitution' to occur more than 1.566 + once within the list. 1.567 + </doc:p> 1.568 + <choice> 1.569 + <value type="token">#all</value> 1.570 + <list> 1.571 + <oneOrMore> 1.572 + <choice> 1.573 + <value>extension</value> 1.574 + <value>restriction</value> 1.575 + <value>substitution</value> 1.576 + </choice> 1.577 + </oneOrMore> 1.578 + </list> 1.579 + </choice> 1.580 +</define> 1.581 + 1.582 +<define name="element" txw:mode="inherit"> 1.583 + <doc:p> 1.584 + This describes the basic content model of an element element. It is 1.585 + annotated, may have a fixed or default attribute, and may have nillable 1.586 + and/or block attributes. Its type may be specified through a type 1.587 + attribute, a local simple type or a local complex type - the choice 1.588 + between these methods is something that cannot be indicated with XML 1.589 + Schema. This content is optionally followed by some identify constraints. 1.590 + </doc:p> 1.591 + <ref name="annotated" /> 1.592 + <ref name="fixedOrDefault" /> 1.593 + <zeroOrMore> 1.594 + <choice> 1.595 + <attribute name="nillable"> 1.596 + <data type="boolean" /> 1.597 + </attribute> 1.598 + <attribute name="block"> 1.599 + <ref name="blockSet" /> 1.600 + </attribute> 1.601 + </choice> 1.602 + </zeroOrMore> 1.603 + <choice> 1.604 + <empty /> 1.605 + <attribute name="type"> 1.606 + <data type="QName" /> 1.607 + </attribute> 1.608 + <ref name="simpleTypeHost" /> 1.609 + <ref name="complexTypeHost" /> 1.610 + </choice> 1.611 + <!--zeroOrMore> 1.612 + <ref name="identityConstraint" /> 1.613 + </zeroOrMore--> 1.614 +</define> 1.615 + 1.616 +<define name="topLevelElement"> 1.617 + <doc:p> 1.618 + This describes an element element that appears at the top level of the 1.619 + schema. On top of the basic content for an element element, it has to 1.620 + have a name, which is a unique identifier in the element symbol space. It 1.621 + may have substitutionGroup, abstract and/or final attributes. 1.622 + </doc:p> 1.623 + <element name="element" 1.624 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-element"> 1.625 + <ref name="element" /> 1.626 + <attribute name="name"> 1.627 + <data type="NCName" /> 1.628 + </attribute> 1.629 + <zeroOrMore> 1.630 + <choice> 1.631 + <attribute name="substitutionGroup"> 1.632 + <data type="QName" /> 1.633 + </attribute> 1.634 + <attribute name="abstract"> 1.635 + <data type="boolean" /> 1.636 + </attribute> 1.637 + <attribute name="final"> 1.638 + <ref name="derivationSet" /> 1.639 + </attribute> 1.640 + </choice> 1.641 + </zeroOrMore> 1.642 + </element> 1.643 +</define> 1.644 + 1.645 +<define name="localElement"> 1.646 + <doc:p> 1.647 + This describes an element element that appears locally, within a 1.648 + complexType or group element. It may have minOccurs and/or maxOccurs 1.649 + attributes. If it has a ref attribute, then that's all it can 1.650 + have. Otherwise, it must have a name and specifies its type in the same 1.651 + way as the basic element content model described above. It may in this 1.652 + case also have a form element. These constraints on local elements 1.653 + cannot be described within XML Schema. 1.654 + </doc:p> 1.655 + <element name="element" 1.656 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-element"> 1.657 + <ref name="occurs" /> 1.658 + <choice> 1.659 + <attribute name="ref"> 1.660 + <data type="QName" /> 1.661 + </attribute> 1.662 + <group> 1.663 + <ref name="element" /> 1.664 + <attribute name="name"> 1.665 + <data type="NCName" /> 1.666 + </attribute> 1.667 + <optional> 1.668 + <attribute name="form"> 1.669 + <ref name="formChoice" /> 1.670 + </attribute> 1.671 + </optional> 1.672 + </group> 1.673 + </choice> 1.674 + </element> 1.675 +</define> 1.676 + 1.677 +<!--define name="namedGroup"> 1.678 + <doc:p> 1.679 + This describes an group element that appears at the top level of the 1.680 + schema. It must have a name attribute, and must have one of an all, 1.681 + choice or sequence element child. 1.682 + </doc:p> 1.683 + <element name="group" 1.684 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-group"> 1.685 + <ref name="annotated" /> 1.686 + <attribute name="name"> 1.687 + <data type="NCName" /> 1.688 + </attribute> 1.689 + <choice> 1.690 + <element name="all"> 1.691 + <ref name="simpleExplicitGroup" /> <!- - RS - relaxed all content model - -> 1.692 + </element> 1.693 + <element name="choice"> 1.694 + <ref name="simpleExplicitGroup" /> 1.695 + </element> 1.696 + <element name="sequence"> 1.697 + <ref name="simpleExplicitGroup" /> 1.698 + </element> 1.699 + </choice> 1.700 + </element> 1.701 +</define--> 1.702 + 1.703 +<!--define name="groupRef"> 1.704 + <doc:p> 1.705 + This describes group element that occurs locally, referring to a 1.706 + top-level named group. It may have occurrence attributes, and must have 1.707 + a ref attribute. 1.708 + </doc:p> 1.709 + <element name="group" 1.710 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-group"> 1.711 + <ref name="annotated" /> 1.712 + <ref name="occurs" /> 1.713 + <attribute name="ref"> 1.714 + <data type="QName" /> 1.715 + </attribute> 1.716 + </element> 1.717 +</define--> 1.718 + 1.719 +<define name="explicitGroup" txw:mode="inherit"> 1.720 + <doc:p> 1.721 + This gives the content of a model group (not a group element) in the 1.722 + normal run of things. It has occurrence attributes and any number of 1.723 + particles within it. 1.724 + </doc:p> 1.725 + <ref name="annotated" /> 1.726 + <ref name="occurs" /> 1.727 + <zeroOrMore> 1.728 + <ref name="nestedParticle" /> 1.729 + </zeroOrMore> 1.730 +</define> 1.731 + 1.732 +<define name="simpleExplicitGroup"> 1.733 + <doc:p> 1.734 + This gives the content of a model group (not a group element) within a 1.735 + named group - it differs from the above in that it doesn't have any 1.736 + occurrence attributes. 1.737 + </doc:p> 1.738 + <ref name="annotated" /> 1.739 + <zeroOrMore> 1.740 + <ref name="nestedParticle" /> 1.741 + </zeroOrMore> 1.742 +</define> 1.743 + 1.744 +<define name="all"> 1.745 + <doc:p> 1.746 + This describes an all element that appears outside a named group (i.e. as 1.747 + the content of a complexType element). It has the standard model for an 1.748 + all element, but adds minOccurs and maxOccurs attributes which can only 1.749 + take certain values. 1.750 + </doc:p> 1.751 + <element name="all" 1.752 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-all"> 1.753 + <ref name="explicitGroup" /> 1.754 + </element> 1.755 +</define> 1.756 + 1.757 +<define name="choice"> 1.758 + <doc:p> 1.759 + This describes a choice element that appears outside a named group. 1.760 + </doc:p> 1.761 + <element name="choice" 1.762 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-choice"> 1.763 + <ref name="explicitGroup" /> 1.764 + </element> 1.765 +</define> 1.766 + 1.767 +<define name="sequence"> 1.768 + <doc:p> 1.769 + This describes a sequence element that appears outside a named group. 1.770 + </doc:p> 1.771 + <element name="sequence" 1.772 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-sequence"> 1.773 + <ref name="explicitGroup" /> 1.774 + </element> 1.775 +</define> 1.776 + 1.777 +<define name="wildcard" txw:mode="inherit"> 1.778 + <doc:p> 1.779 + This describes a wildcard element (i.e. any or anyAttribute). The 1.780 + namespace attribute can take a list URIs interspersed with the keywords 1.781 + '##targetNamespace' and/or '##local'. This RELAX NG schema, like the XML 1.782 + Schema Recommendation, allows the keywords to be specified more than once 1.783 + each within the list, if they're given. This model also specifies the 1.784 + processContents attribute. 1.785 + </doc:p> 1.786 + <ref name="annotated" /> 1.787 + <zeroOrMore> 1.788 + <choice> 1.789 + <attribute name="namespace"> 1.790 + <choice> 1.791 + <value type="token">##any</value> 1.792 + <value type="token">##other</value> 1.793 + <list> 1.794 + <zeroOrMore> 1.795 + <choice> 1.796 + <data type="anyURI" /> 1.797 + <value>##targetNamespace</value> 1.798 + <value>##local</value> 1.799 + </choice> 1.800 + </zeroOrMore> 1.801 + </list> 1.802 + </choice> 1.803 + </attribute> 1.804 + <attribute name="processContents"> 1.805 + <choice> 1.806 + <value type="token">lax</value> 1.807 + <value type="token">skip</value> 1.808 + <value type="token">strict</value> 1.809 + </choice> 1.810 + </attribute> 1.811 + </choice> 1.812 + </zeroOrMore> 1.813 +</define> 1.814 + 1.815 +<define name="any"> 1.816 + <doc:p> 1.817 + This describes an any element as a wildcard. 1.818 + </doc:p> 1.819 + <element name="any" 1.820 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-any"> 1.821 + <ref name="wildcard" /> 1.822 + <ref name="occurs" /> 1.823 + </element> 1.824 +</define> 1.825 + 1.826 +<!--define name="namedAttributeGroup"> 1.827 + <doc:p> 1.828 + This describes an attributeGroup element as it appears at the top level 1.829 + of the schema. It must have a name attribute, and then contains 1.830 + attribute declarations. 1.831 + </doc:p> 1.832 + <element name="attributeGroup" 1.833 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"> 1.834 + <ref name="annotated" /> 1.835 + <attribute name="name"> 1.836 + <data type="NCName" /> 1.837 + </attribute> 1.838 + <ref name="attrDecls" /> 1.839 + </element> 1.840 +</define--> 1.841 + 1.842 +<!--define name="attributeGroupRef"> 1.843 + <doc:p> 1.844 + This describes an attributeGroup element as it appears within a complex 1.845 + type. It must have a ref attribute. 1.846 + </doc:p> 1.847 + <element name="attributeGroup" 1.848 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"> 1.849 + <ref name="annotated" /> 1.850 + <attribute name="ref"> 1.851 + <data type="QName" /> 1.852 + </attribute> 1.853 + </element> 1.854 +</define--> 1.855 + 1.856 +<!--define name="include"> 1.857 + <doc:p> 1.858 + This describes an include element, which must have a schemaLocation 1.859 + attribute. 1.860 + </doc:p> 1.861 + <element name="include" 1.862 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-include"> 1.863 + <ref name="annotated" /> 1.864 + <attribute name="schemaLocation"> 1.865 + <data type="anyURI" /> 1.866 + </attribute> 1.867 + </element> 1.868 +</define--> 1.869 + 1.870 +<!--define name="redefine"> 1.871 + <doc:p> 1.872 + This describes a redefine element, which must have a schemaLocation 1.873 + attribute and can then contain any mix of annotations and redefinable 1.874 + components. 1.875 + </doc:p> 1.876 + <element name="redefine" 1.877 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-redefine"> 1.878 + <ref name="openAttrs" /> 1.879 + <optional> 1.880 + <attribute name="id"> 1.881 + <data type="ID" /> 1.882 + </attribute> 1.883 + </optional> 1.884 + <attribute name="schemaLocation"> 1.885 + <data type="anyURI" /> 1.886 + </attribute> 1.887 + <zeroOrMore> 1.888 + <choice> 1.889 + <ref name="annotation" /> 1.890 + <ref name="redefinable" /> 1.891 + </choice> 1.892 + </zeroOrMore> 1.893 + </element> 1.894 +</define--> 1.895 + 1.896 +<define name="import"> 1.897 + <doc:p> 1.898 + This describes an import element that's used when its parent schema 1.899 + element specifies a targetNamespace. In these cases, the namespace 1.900 + attribute on the import element is optional. 1.901 + </doc:p> 1.902 + <element name="import" 1.903 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-import"> 1.904 + <ref name="annotated" /> 1.905 + <optional> 1.906 + <attribute name="schemaLocation"> 1.907 + <data type="anyURI" /> 1.908 + </attribute> 1.909 + </optional> 1.910 + <optional> 1.911 + <attribute name="namespace"> 1.912 + <data type="anyURI" /> 1.913 + </attribute> 1.914 + </optional> 1.915 + </element> 1.916 +</define> 1.917 + 1.918 +<!--define name="selector"> 1.919 + <doc:p> 1.920 + This describes a selector element. The xpath attribute is a simplified 1.921 + XPath - the regular expression given here is the one from the XML Schema 1.922 + for XML Schema. 1.923 + </doc:p> 1.924 + <element name="selector" 1.925 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-selector"> 1.926 + <ref name="annotated" /> 1.927 + <attribute name="xpath"> 1.928 + <data type="token"> 1.929 + <param name="pattern">(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*</param> 1.930 + </data> 1.931 + </attribute> 1.932 + </element> 1.933 +</define> 1.934 + 1.935 +<define name="field"> 1.936 + <doc:p> 1.937 + This describes a field element. The xpath attribute is a simplified 1.938 + XPath - the regular expression given here is the one from the XML Schema 1.939 + for XML Schema. 1.940 + </doc:p> 1.941 + <element name="field" 1.942 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-field"> 1.943 + <ref name="annotated" /> 1.944 + <attribute name="xpath"> 1.945 + <data type="token"> 1.946 + <param name="pattern">(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*</param> 1.947 + </data> 1.948 + </attribute> 1.949 + </element> 1.950 +</define> 1.951 + 1.952 +<define name="keybase" txw:mode="inherit"> 1.953 + <doc:p> 1.954 + This gives the basic content for identity constraints - a name attribute 1.955 + that uniquely identifies the identity constraint, a selector element and 1.956 + one or more field elements. 1.957 + </doc:p> 1.958 + <ref name="annotated" /> 1.959 + <attribute name="name"> 1.960 + <data type="NCName" /> 1.961 + </attribute> 1.962 + <ref name="selector" /> 1.963 + <oneOrMore> 1.964 + <ref name="field" /> 1.965 + </oneOrMore> 1.966 +</define> 1.967 + 1.968 +<define name="identityConstraint" txw:mode="inline"> 1.969 + <doc:p> 1.970 + This gives a model group for the three identity constraint elements, used 1.971 + within the content of element elements. 1.972 + </doc:p> 1.973 + <choice> 1.974 + <ref name="unique" /> 1.975 + <ref name="key" /> 1.976 + <ref name="keyref" /> 1.977 + </choice> 1.978 +</define> 1.979 + 1.980 +<define name="unique"> 1.981 + <doc:p> 1.982 + This describes a unique element. 1.983 + </doc:p> 1.984 + <element name="unique" 1.985 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-unique"> 1.986 + <ref name="keybase" /> 1.987 + </element> 1.988 +</define> 1.989 + 1.990 +<define name="key"> 1.991 + <doc:p> 1.992 + This describes a key element. 1.993 + </doc:p> 1.994 + <element name="key" 1.995 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-key"> 1.996 + <ref name="keybase" /> 1.997 + </element> 1.998 +</define> 1.999 + 1.1000 +<define name="keyref"> 1.1001 + <doc:p> 1.1002 + This describes a keyref element. 1.1003 + </doc:p> 1.1004 + <element name="keyref" 1.1005 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-keyref"> 1.1006 + <ref name="keybase" /> 1.1007 + <attribute name="refer"> 1.1008 + <data type="QName" /> 1.1009 + </attribute> 1.1010 + </element> 1.1011 +</define--> 1.1012 + 1.1013 +<!--define name="notation"> 1.1014 + <doc:p> 1.1015 + This describes a notation element. The names of notation elements are 1.1016 + unique in the notation symbol space. The public attribute is required, 1.1017 + and the system attribute is optional. 1.1018 + </doc:p> 1.1019 + <element name="notation" 1.1020 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-notation"> 1.1021 + <ref name="annotated" /> 1.1022 + <attribute name="name"> 1.1023 + <data type="NCName" /> 1.1024 + </attribute> 1.1025 + <attribute name="public"> 1.1026 + <data type="token" /> 1.1027 + </attribute> 1.1028 + <optional> 1.1029 + <attribute name="system"> 1.1030 + <data type="anyURI" /> 1.1031 + </attribute> 1.1032 + </optional> 1.1033 + </element> 1.1034 +</define--> 1.1035 + 1.1036 +<define name="appinfoContent"> 1.1037 + <doc:p> 1.1038 + This is designed to describe the content of the appinfo elements in the 1.1039 + schema. At the moment this allows any mixed content without validation. 1.1040 + Note that this is fairly complex compared to the XML Schema equivalent, 1.1041 + which would be a single any element. 1.1042 + </doc:p> 1.1043 + <ref name="anyContent" /> 1.1044 +</define> 1.1045 + 1.1046 +<define name="anyContent"> 1.1047 + <empty/> <!-- KK don't care --> 1.1048 + <!--mixed> 1.1049 + <zeroOrMore> 1.1050 + <element> 1.1051 + <anyName /> 1.1052 + <zeroOrMore> 1.1053 + <attribute> 1.1054 + <anyName /> 1.1055 + </attribute> 1.1056 + </zeroOrMore> 1.1057 + <ref name="anyContent" /> 1.1058 + <empty /> 1.1059 + </element> 1.1060 + </zeroOrMore> 1.1061 + </mixed--> 1.1062 +</define> 1.1063 + 1.1064 +<define name="appinfo"> 1.1065 + <doc:p> 1.1066 + This describes an appinfo element. It has an optional source attribute 1.1067 + and can currently contain anything at all. 1.1068 + </doc:p> 1.1069 + <element name="appinfo" 1.1070 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-appinfo"> 1.1071 + <optional> 1.1072 + <attribute name="source"> 1.1073 + <data type="anyURI" /> 1.1074 + </attribute> 1.1075 + </optional> 1.1076 + <ref name="appinfoContent" /> 1.1077 + </element> 1.1078 +</define> 1.1079 + 1.1080 +<define name="documentationContent"> 1.1081 + <doc:p> 1.1082 + This is designed to describe the content of the documentation elements in 1.1083 + the schema. At the moment this allows any mixed content without 1.1084 + validation. Note that this is fairly complex compared to the XML Schema 1.1085 + equivalent, which would be a single any element. 1.1086 + </doc:p> 1.1087 + <ref name="anyContent" /> 1.1088 +</define> 1.1089 + 1.1090 +<define name="documentation"> 1.1091 + <doc:p> 1.1092 + This describes a documentation element. It has optional source 1.1093 + and xml:lang attributes and can currently contain anything at all. 1.1094 + </doc:p> 1.1095 + <element name="documentation" 1.1096 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-documentation"> 1.1097 + <zeroOrMore> 1.1098 + <choice> 1.1099 + <attribute name="source"> 1.1100 + <data type="anyURI" /> 1.1101 + </attribute> 1.1102 + <attribute name="xml:lang"> 1.1103 + <data type="language" /> 1.1104 + </attribute> 1.1105 + </choice> 1.1106 + </zeroOrMore> 1.1107 + <ref name="documentationContent" /> 1.1108 + </element> 1.1109 +</define> 1.1110 + 1.1111 +<define name="annotation"> 1.1112 + <doc:p> 1.1113 + This describes an annotation element. It can have any attributes, may 1.1114 + have an id attribute, and contains any number of documentation or appinfo 1.1115 + elements. 1.1116 + </doc:p> 1.1117 + <element name="annotation" 1.1118 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-annotation"> 1.1119 + <ref name="openAttrs" /> 1.1120 + <optional> 1.1121 + <attribute name="id"> 1.1122 + <data type="ID" /> 1.1123 + </attribute> 1.1124 + </optional> 1.1125 + <zeroOrMore> 1.1126 + <choice> 1.1127 + <ref name="documentation" /> 1.1128 + <ref name="appinfo" /> 1.1129 + </choice> 1.1130 + </zeroOrMore> 1.1131 + </element> 1.1132 +</define> 1.1133 + 1.1134 +<define name="simpleDerivation" txw:mode="inline"> 1.1135 + <doc:p> 1.1136 + This gives the various types of derivation of simple types. 1.1137 + </doc:p> 1.1138 + <choice> 1.1139 + <ref name="simpleRestriction" /> 1.1140 + <ref name="list" /> 1.1141 + <ref name="union" /> 1.1142 + </choice> 1.1143 +</define> 1.1144 + 1.1145 +<define name="simpleDerivationSet"> 1.1146 + <doc:p> 1.1147 + This specifies the values of the final attribute for simple types. This 1.1148 + RELAX NG schema for XML Schema, like the XML Schema Recommendation, allows 1.1149 + the keywords 'list', 'union' and 'restriction' to appear more than once 1.1150 + within the list. 1.1151 + </doc:p> 1.1152 + <choice> 1.1153 + <value type="token">#all</value> 1.1154 + <list> 1.1155 + <zeroOrMore> 1.1156 + <choice> 1.1157 + <value>list</value> 1.1158 + <value>union</value> 1.1159 + <value>restriction</value> 1.1160 + </choice> 1.1161 + </zeroOrMore> 1.1162 + </list> 1.1163 + </choice> 1.1164 +</define> 1.1165 + 1.1166 +<define name="simpleTypeHost" txw:mode="inherit"> 1.1167 + <ref name="typeHost" /> 1.1168 + <ref name="simpleType" /> 1.1169 +</define> 1.1170 + 1.1171 +<define name="simpleType" txw:mode="inherit"> 1.1172 + <doc:p> 1.1173 + This gives the basic content of a simple type. 1.1174 + </doc:p> 1.1175 + <element name="simpleType" 1.1176 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleType"> 1.1177 + <ref name="annotated" /> 1.1178 + <ref name="simpleDerivation" /> 1.1179 + <optional> 1.1180 + <attribute name="name"> 1.1181 + <data type="NCName" /> 1.1182 + </attribute> 1.1183 + </optional> 1.1184 + <optional> 1.1185 + <attribute name="final"> 1.1186 + <ref name="simpleDerivationSet" /> 1.1187 + </attribute> 1.1188 + </optional> 1.1189 + </element> 1.1190 +</define> 1.1191 + 1.1192 +<!--define name="rangeFacets" txw:mode="inherit"> 1.1193 + <doc:p> 1.1194 + This describes the relationship between the various range facets. Only 1.1195 + one of minExclusive and minInclusive can be present, and only one of 1.1196 + maxExclusive and maxInclusive can be present. This is a constraint that 1.1197 + can't easily be expressed using XML Schema. This RELAX NG schema 1.1198 + for XML Schema is a little more restrictive than the XML Schema 1.1199 + Recommendation in that it also forces there to be a maximum of one of 1.1200 + each of these types of facets. 1.1201 + </doc:p> 1.1202 + <interleave> 1.1203 + <optional> 1.1204 + <choice> 1.1205 + <ref name="minExclusive" /> 1.1206 + <ref name="minInclusive" /> 1.1207 + </choice> 1.1208 + </optional> 1.1209 + <optional> 1.1210 + <choice> 1.1211 + <ref name="maxExclusive" /> 1.1212 + <ref name="maxInclusive" /> 1.1213 + </choice> 1.1214 + </optional> 1.1215 + </interleave> 1.1216 +</define> 1.1217 + 1.1218 +<define name="digitFacets" txw:mode="inherit"> 1.1219 + <doc:p> 1.1220 + This specifies optional totalDigits and fractionDigits elements. This 1.1221 + RELAX NG schema for XML Schema is a little more restrictive than the XML 1.1222 + Schema Recommendation in that it also forces there to be a maximum of one 1.1223 + of each of these types of facets. 1.1224 + </doc:p> 1.1225 + <optional> 1.1226 + <ref name="totalDigits" /> 1.1227 + </optional> 1.1228 + <optional> 1.1229 + <ref name="fractionDigits" /> 1.1230 + </optional> 1.1231 +</define> 1.1232 + 1.1233 +<define name="lengthFacets" txw:mode="inherit"> 1.1234 + <doc:p> 1.1235 + This specifies optional length, minLength and maxLength elements. This 1.1236 + RELAX NG schema for XML Schema is a little more restrictive than the XML 1.1237 + Schema Recommendation in that it also forces there to be a maximum of one 1.1238 + of each of these types of facets, and says that if a length element is 1.1239 + given, then neither minLength nor maxLength should be present. 1.1240 + </doc:p> 1.1241 + <choice> 1.1242 + <ref name="length" /> 1.1243 + <interleave> 1.1244 + <optional> 1.1245 + <ref name="minLength" /> 1.1246 + </optional> 1.1247 + <optional> 1.1248 + <ref name="maxLength" /> 1.1249 + </optional> 1.1250 + </interleave> 1.1251 + </choice> 1.1252 +</define> 1.1253 + 1.1254 +<define name="commonFacets" txw:mode="inherit"> 1.1255 + <doc:p> 1.1256 + This specifies zero or more enumeration or pattern elements and an 1.1257 + optional whiteSpace element. This RELAX NG schema for XML Schema is a 1.1258 + little more restrictive than the XML Schema Recommendation in that it 1.1259 + also forces there to be a maximum of one whiteSpace element within the 1.1260 + facets. Note that the whiteSpace facet is constrained to have a value of 1.1261 + 'collapse'. 1.1262 + </doc:p> 1.1263 + <zeroOrMore> 1.1264 + <ref name="enumeration" /> 1.1265 + </zeroOrMore> 1.1266 + <optional> 1.1267 + <ref name="whiteSpaceCollapse" /> 1.1268 + </optional> 1.1269 + <zeroOrMore> 1.1270 + <ref name="pattern" /> 1.1271 + </zeroOrMore> 1.1272 +</define--> 1.1273 + 1.1274 +<define name="simpleRestrictionModel"> 1.1275 + <doc:p> 1.1276 + This specifies the types of facets that are valid in restrictions on the 1.1277 + built-in data types. This can only perform rudimentary checking, but 1.1278 + should be enough in most circumstances. Note that for xs:anySimpleType 1.1279 + and xs:string, the whiteSpace facet can take any value, for 1.1280 + xs:normalizedString it can be 'replace' or 'collapse', and for all other 1.1281 + built-in types it has to be 'collapse'. 1.1282 + </doc:p> 1.1283 + <choice> 1.1284 + <attribute name="base"> 1.1285 + <data type="QName" /> 1.1286 + </attribute> 1.1287 + <ref name="simpleTypeHost" /> 1.1288 + </choice> 1.1289 + <interleave> 1.1290 + <!--ref name="rangeFacets" /> 1.1291 + <ref name="digitFacets" /> 1.1292 + <ref name="lengthFacets" /> 1.1293 + <optional> 1.1294 + <ref name="whiteSpace" /> 1.1295 + </optional--> 1.1296 + <zeroOrMore> 1.1297 + <ref name="enumeration" /> 1.1298 + </zeroOrMore> 1.1299 + <!--zeroOrMore> 1.1300 + <ref name="pattern" /> 1.1301 + </zeroOrMore--> 1.1302 + </interleave> 1.1303 +</define> 1.1304 + 1.1305 +<define name="list"> 1.1306 + <doc:p> 1.1307 + This describes a list element. It can either specify a local simple type 1.1308 + or have a itemType attribute. This constraint cannot be expressed in XML 1.1309 + Schema. 1.1310 + </doc:p> 1.1311 + <element name="list" 1.1312 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-list"> 1.1313 + <ref name="annotated" /> 1.1314 + <choice> 1.1315 + <ref name="simpleTypeHost" /> 1.1316 + <attribute name="itemType"> 1.1317 + <data type="QName" /> 1.1318 + </attribute> 1.1319 + </choice> 1.1320 + </element> 1.1321 +</define> 1.1322 + 1.1323 +<define name="union"> 1.1324 + <doc:p> 1.1325 + This describes a union element. If the memberTypes attribute is missing 1.1326 + or empty, then it must contain one or more simpleType elements; if 1.1327 + it's present, then it can contain simpleType elements or list simple 1.1328 + types in the memberTypes attribute. This constraint cannot be expressed 1.1329 + in XML Schema. 1.1330 + </doc:p> 1.1331 + <element name="union" 1.1332 + doc:href="http://www.w3.org/TR/xmlschema-1/#element-union"> 1.1333 + <ref name="annotated" /> 1.1334 + <choice> 1.1335 + <group> 1.1336 + <attribute name="memberTypes"> 1.1337 + <list> 1.1338 + <oneOrMore> 1.1339 + <data type="QName" /> 1.1340 + </oneOrMore> 1.1341 + </list> 1.1342 + </attribute> 1.1343 + <zeroOrMore> 1.1344 + <ref name="simpleTypeHost" /> 1.1345 + </zeroOrMore> 1.1346 + </group> 1.1347 + <group> 1.1348 + <optional> 1.1349 + <attribute name="memberTypes"> 1.1350 + <empty /> 1.1351 + </attribute> 1.1352 + </optional> 1.1353 + <oneOrMore> 1.1354 + <ref name="simpleTypeHost" /> 1.1355 + </oneOrMore> 1.1356 + </group> 1.1357 + </choice> 1.1358 + </element> 1.1359 +</define> 1.1360 + 1.1361 +<define name="facet" txw:mode="inherit"> 1.1362 + <doc:p> 1.1363 + This is the basic content of a facet. It has an optional fixed attribute. 1.1364 + </doc:p> 1.1365 + <ref name="annotated" /> 1.1366 + <optional> 1.1367 + <attribute name="fixed"> 1.1368 + <data type="boolean" /> 1.1369 + </attribute> 1.1370 + </optional> 1.1371 +</define> 1.1372 + 1.1373 +<define name="noFixedFacet" txw:mode="inherit"> 1.1374 + <doc:p> 1.1375 + This is the content of a facet that cannot be fixed (enumeration or 1.1376 + pattern). It has a value attribute that can take any kind of value. 1.1377 + </doc:p> 1.1378 + <ref name="annotated" /> 1.1379 + <attribute name="value" /> 1.1380 +</define> 1.1381 + 1.1382 +<!--define name="rangeFacet"> 1.1383 + <doc:p> 1.1384 + This is the content of a range facet. The value must be one of the data 1.1385 + types shown (as these are the only types of data that accept ranges). I 1.1386 + haven't gone so far as to indicate the data type of the value 1.1387 + attribute of a range facet according to the base type as this would be 1.1388 + very complicated (although it would be possible in RELAX NG). 1.1389 + </doc:p> 1.1390 + <ref name="facet" /> 1.1391 + <attribute name="value"> 1.1392 + <choice> 1.1393 + <data type="decimal" /> 1.1394 + <data type="float" /> 1.1395 + <data type="double" /> 1.1396 + <data type="duration" /> 1.1397 + <data type="dateTime" /> 1.1398 + <data type="time" /> 1.1399 + <data type="date" /> 1.1400 + <data type="gYearMonth" /> 1.1401 + <data type="gYear" /> 1.1402 + <data type="gMonthDay" /> 1.1403 + <data type="gMonth" /> 1.1404 + <data type="gDay" /> 1.1405 + </choice> 1.1406 + </attribute> 1.1407 +</define> 1.1408 + 1.1409 +<define name="minExclusive"> 1.1410 + <doc:p> 1.1411 + This describes a minExclusive element. 1.1412 + </doc:p> 1.1413 + <element name="minExclusive" 1.1414 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-minExclusive"> 1.1415 + <ref name="rangeFacet" /> 1.1416 + </element> 1.1417 +</define> 1.1418 + 1.1419 +<define name="minInclusive"> 1.1420 + <doc:p> 1.1421 + This describes a minInclusive element. 1.1422 + </doc:p> 1.1423 + <element name="minInclusive" 1.1424 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-minInclusive"> 1.1425 + <ref name="rangeFacet" /> 1.1426 + </element> 1.1427 +</define> 1.1428 + 1.1429 +<define name="maxExclusive"> 1.1430 + <doc:p> 1.1431 + This describes a maxExclusive element. 1.1432 + </doc:p> 1.1433 + <element name="maxExclusive" 1.1434 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-maxExclusive"> 1.1435 + <ref name="rangeFacet" /> 1.1436 + </element> 1.1437 +</define> 1.1438 + 1.1439 +<define name="maxInclusive"> 1.1440 + <doc:p> 1.1441 + This describes a maxInclusive element. 1.1442 + </doc:p> 1.1443 + <element name="maxInclusive" 1.1444 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-maxInclusive"> 1.1445 + <ref name="rangeFacet" /> 1.1446 + </element> 1.1447 +</define> 1.1448 + 1.1449 +<define name="numFacet"> 1.1450 + <doc:p> 1.1451 + This is the content of a numerical facet. 1.1452 + </doc:p> 1.1453 + <ref name="facet" /> 1.1454 + <attribute name="value"> 1.1455 + <data type="nonNegativeInteger" /> 1.1456 + </attribute> 1.1457 +</define> 1.1458 + 1.1459 +<define name="totalDigits"> 1.1460 + <doc:p> 1.1461 + This describes a totalDigits element. The value attribute must take a 1.1462 + positive integer. 1.1463 + </doc:p> 1.1464 + <element name="totalDigits" 1.1465 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-totalDigits"> 1.1466 + <ref name="facet" /> 1.1467 + <attribute name="value"> 1.1468 + <data type="positiveInteger" /> 1.1469 + </attribute> 1.1470 + </element> 1.1471 +</define> 1.1472 + 1.1473 +<define name="fractionDigits"> 1.1474 + <doc:p> 1.1475 + This describes a fractionDigits element. 1.1476 + </doc:p> 1.1477 + <element name="fractionDigits" 1.1478 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-fractionDigits"> 1.1479 + <ref name="numFacet" /> 1.1480 + </element> 1.1481 +</define> 1.1482 + 1.1483 +<define name="length"> 1.1484 + <doc:p> 1.1485 + This describes a length element. 1.1486 + </doc:p> 1.1487 + <element name="length" 1.1488 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-length"> 1.1489 + <ref name="numFacet" /> 1.1490 + </element> 1.1491 +</define> 1.1492 + 1.1493 +<define name="minLength"> 1.1494 + <doc:p> 1.1495 + This describes a minLength element. 1.1496 + </doc:p> 1.1497 + <element name="minLength" 1.1498 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-minLength"> 1.1499 + <ref name="numFacet" /> 1.1500 + </element> 1.1501 +</define> 1.1502 + 1.1503 +<define name="maxLength"> 1.1504 + <doc:p> 1.1505 + This describes a maxLength element. 1.1506 + </doc:p> 1.1507 + <element name="maxLength" 1.1508 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-maxLength"> 1.1509 + <ref name="numFacet" /> 1.1510 + </element> 1.1511 +</define--> 1.1512 + 1.1513 +<define name="enumeration"> 1.1514 + <doc:p> 1.1515 + This describes an enumeration element. 1.1516 + </doc:p> 1.1517 + <element name="enumeration" 1.1518 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-enumeration"> 1.1519 + <ref name="noFixedFacet" /> 1.1520 + </element> 1.1521 +</define> 1.1522 + 1.1523 +<!--define name="whiteSpace"> 1.1524 + <doc:p> 1.1525 + This describes a whiteSpace element that can take any of the permitted 1.1526 + values. 1.1527 + </doc:p> 1.1528 + <element name="whiteSpace" 1.1529 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-whiteSpace"> 1.1530 + <ref name="facet" /> 1.1531 + <attribute name="value"> 1.1532 + <choice> 1.1533 + <value type="token">preserve</value> 1.1534 + <value type="token">replace</value> 1.1535 + <value type="token">collapse</value> 1.1536 + </choice> 1.1537 + </attribute> 1.1538 + </element> 1.1539 +</define> 1.1540 + 1.1541 +<define name="whiteSpaceReplaceOrCollapse"> 1.1542 + <doc:p> 1.1543 + This describes a whiteSpace element that can only take the values 1.1544 + 'replace' or 'collapse'. 1.1545 + </doc:p> 1.1546 + <element name="whiteSpace" 1.1547 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-whiteSpace"> 1.1548 + <ref name="facet" /> 1.1549 + <attribute name="value"> 1.1550 + <choice> 1.1551 + <value type="token">replace</value> 1.1552 + <value type="token">collapse</value> 1.1553 + </choice> 1.1554 + </attribute> 1.1555 + </element> 1.1556 +</define> 1.1557 + 1.1558 +<define name="whiteSpaceCollapse"> 1.1559 + <doc:p> 1.1560 + This describes a whiteSpace element that can only take the value 1.1561 + 'collapse'. 1.1562 + </doc:p> 1.1563 + <element name="whiteSpace" 1.1564 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-whiteSpace"> 1.1565 + <ref name="facet" /> 1.1566 + <attribute name="value"> 1.1567 + <value type="token">collapse</value> 1.1568 + </attribute> 1.1569 + </element> 1.1570 +</define> 1.1571 + 1.1572 +<define name="pattern"> 1.1573 + <doc:p> 1.1574 + This describes a pattern element. 1.1575 + </doc:p> 1.1576 + <element name="pattern" 1.1577 + doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-pattern"> 1.1578 + <ref name="noFixedFacet" /> 1.1579 + </element> 1.1580 +</define--> 1.1581 + 1.1582 +</grammar>