192 |
- |
1 |
<?xml version='1.0'?>
|
|
|
2 |
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
|
|
|
3 |
<!ENTITY % s ''>
|
|
|
4 |
<!ENTITY % p ''>
|
|
|
5 |
<!-- keep this XML 1.0 correct -->
|
|
|
6 |
<!ATTLIST schema xmlns:hfp CDATA #IMPLIED
|
|
|
7 |
xmlns:xhtml CDATA #IMPLIED
|
|
|
8 |
xmlns:xsi CDATA #IMPLIED
|
|
|
9 |
xsi:schemaLocation CDATA #IMPLIED>
|
|
|
10 |
<!ELEMENT xhtml:p ANY>
|
|
|
11 |
<!ELEMENT xhtml:em ANY>
|
|
|
12 |
]>
|
|
|
13 |
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
|
|
14 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
15 |
xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/1999/xhtml.xsd">
|
|
|
16 |
|
|
|
17 |
<annotation>
|
|
|
18 |
<documentation>
|
|
|
19 |
<xhtml:p> This schema defines 2 elements for use in the
|
|
|
20 |
appinfo portion section of (potentially) all builtin datatypes in the schema
|
|
|
21 |
for XML Schema Part 2: Datatypes. </xhtml:p>
|
|
|
22 |
<xhtml:p> One intended use of
|
|
|
23 |
this appinfo is in the generation of the HTML version of the XML Schema Part 2:
|
|
|
24 |
Datatypes specification itself. All portions of the HTML text which describe
|
|
|
25 |
the facets and/or properties of each datatype is generated by an XSLT
|
|
|
26 |
transformation which keys off of this appinfo. </xhtml:p>
|
|
|
27 |
<xhtml:p> Schema
|
|
|
28 |
processors may have another use for this appinfo (although one certainly not
|
|
|
29 |
required in any way by the specification). The information may be useful in
|
|
|
30 |
dynamically building validation modules/classes and/or user-interfaces for
|
|
|
31 |
schema creation. </xhtml:p>
|
|
|
32 |
</documentation>
|
|
|
33 |
</annotation>
|
|
|
34 |
|
|
|
35 |
<element name="hasFacet">
|
|
|
36 |
<annotation>
|
|
|
37 |
<documentation>
|
|
|
38 |
<xhtml:p>
|
|
|
39 |
hasFacet is used to signal that the contraining facet
|
|
|
40 |
given in the name attribute is applicable to a primitive
|
|
|
41 |
datatype (and all types derived from it).
|
|
|
42 |
</xhtml:p>
|
|
|
43 |
<xhtml:p>
|
|
|
44 |
Note: this element will only appear in the appinfo of
|
|
|
45 |
primitive types or built-in types derived by "list".
|
|
|
46 |
</xhtml:p>
|
|
|
47 |
<xhtml:p>
|
|
|
48 |
A schema processor (or the XSLT which generates the
|
|
|
49 |
HTML version of the XML Schema Part 2: Datatypes
|
|
|
50 |
specification) which reads a derived simpleType
|
|
|
51 |
definition should walk up the base type chain until
|
|
|
52 |
it reaches the primitive type at the top of the chain
|
|
|
53 |
and "push" all facets found their down to all derived
|
|
|
54 |
types in the chain.
|
|
|
55 |
</xhtml:p>
|
|
|
56 |
</documentation>
|
|
|
57 |
</annotation>
|
|
|
58 |
<complexType>
|
|
|
59 |
<attribute name="name" use="required">
|
|
|
60 |
<simpleType>
|
|
|
61 |
<annotation>
|
|
|
62 |
<documentation>
|
|
|
63 |
<xhtml:p>
|
|
|
64 |
This datatype names all existing contraining facets.
|
|
|
65 |
</xhtml:p>
|
|
|
66 |
<xhtml:p>
|
|
|
67 |
Question: should each of the enumerations below be
|
|
|
68 |
given a documentation annotation, which would contain
|
|
|
69 |
the text to be used in the definition of the facet
|
|
|
70 |
in the XML Schema Part 2: Datatypes specification?
|
|
|
71 |
Might be nice to try to collect all of that information
|
|
|
72 |
together here.
|
|
|
73 |
</xhtml:p>
|
|
|
74 |
</documentation>
|
|
|
75 |
</annotation>
|
|
|
76 |
<restriction base="NMTOKEN">
|
|
|
77 |
<enumeration value="length"/>
|
|
|
78 |
<enumeration value="minLength"/>
|
|
|
79 |
<enumeration value="maxLength"/>
|
|
|
80 |
<enumeration value="pattern"/>
|
|
|
81 |
<enumeration value="enumeration"/>
|
|
|
82 |
<enumeration value="maxInclusive"/>
|
|
|
83 |
<enumeration value="maxExclusive"/>
|
|
|
84 |
<enumeration value="minInclusive"/>
|
|
|
85 |
<enumeration value="minExclusive"/>
|
|
|
86 |
<enumeration value="totalDigits"/>
|
|
|
87 |
<enumeration value="fractionDigits"/>
|
|
|
88 |
<enumeration value="whiteSpace"/>
|
|
|
89 |
<enumeration value="maxScale"/>
|
|
|
90 |
<enumeration value="minScale"/>
|
|
|
91 |
</restriction>
|
|
|
92 |
</simpleType>
|
|
|
93 |
</attribute>
|
|
|
94 |
</complexType>
|
|
|
95 |
</element>
|
|
|
96 |
|
|
|
97 |
<element name="hasProperty">
|
|
|
98 |
<annotation>
|
|
|
99 |
<documentation>
|
|
|
100 |
<xhtml:p> hasProperty is used to signal that the property
|
|
|
101 |
given in the name attribute has the value given in the value attribute for the
|
|
|
102 |
datatype in which it occurs (and all types derived from it, which do not
|
|
|
103 |
override the value of the property). </xhtml:p>
|
|
|
104 |
<xhtml:p> Note: this element
|
|
|
105 |
may appear in the appinfo of primitive and built-in derived types. </xhtml:p>
|
|
|
106 |
<xhtml:p> A schema processor (or the XSLT which generates the HTML version of
|
|
|
107 |
the XML Schema Part 2: Datatypes specification) which reads a simpleType
|
|
|
108 |
definition should gather the information from any occurances of hasProperty in
|
|
|
109 |
that simpleType definition, and then walk up the base type chain gathering
|
|
|
110 |
information from any occurances of hasProperty (unless a value was given to the
|
|
|
111 |
name in a dervied type) until either it reaches the primitive type at the top
|
|
|
112 |
of the chain or it has gathered values for all existing properties. </xhtml:p>
|
|
|
113 |
</documentation>
|
|
|
114 |
</annotation>
|
|
|
115 |
<complexType>
|
|
|
116 |
<attribute name="name" use="required">
|
|
|
117 |
<simpleType>
|
|
|
118 |
<annotation>
|
|
|
119 |
<documentation>
|
|
|
120 |
<xhtml:p> This datatype names all existing fundamental
|
|
|
121 |
facets, otherwise known as properties (with the exception of
|
|
|
122 |
<xhtml:em>equality</xhtml:em>, a property which has no
|
|
|
123 |
<xhtml:em>value</xhtml:em>). </xhtml:p>
|
|
|
124 |
<xhtml:p> Question: should each of
|
|
|
125 |
the enumerations below be given a documentation annotation, which would contain
|
|
|
126 |
the text to be used in the definition of the properties in the XML Schema Part
|
|
|
127 |
2: Datatypes specification? Might be nice to try to collect all of that
|
|
|
128 |
information together here. </xhtml:p>
|
|
|
129 |
</documentation>
|
|
|
130 |
</annotation>
|
|
|
131 |
<restriction base="NMTOKEN">
|
|
|
132 |
<enumeration value="ordered"/>
|
|
|
133 |
<enumeration value="bounded"/>
|
|
|
134 |
<enumeration value="cardinality"/>
|
|
|
135 |
<enumeration value="numeric"/>
|
|
|
136 |
</restriction>
|
|
|
137 |
</simpleType>
|
|
|
138 |
</attribute>
|
|
|
139 |
<attribute name="value" type="normalizedString" use="required"/>
|
|
|
140 |
</complexType>
|
|
|
141 |
</element>
|
|
|
142 |
</schema>
|