Mais conteúdo relacionado Schema Structures Qr 21. <extension id = ID
Constraining Facets §4.3 pt2
base = QName>
<length id = ID <maxInclusive id = ID
Content: (annotation?, ((group | all | choice | sequence)?,
fixed = boolean : false fixed = boolean : false
XML Schema - Structures ((attribute | attributeGroup)*, anyAttribute?))) </extension>
value = nonNegativeInteger > value = anySimpleType >
Content: (annotation?) </length> Content: (annotation?) </maxInclusive>
Quick Reference 6 Element Declaration §3.3.2 pt1
<minLength id = ID <maxExclusive id = ID
<element id = ID
fixed = boolean : false fixed = boolean : false
abstract = boolean : ‘ false’
value = nonNegativeInteger > value = anySimpleType >
ver 1/03
block = ( ‘ | List of ( ‘
#all’ extension’| ‘
restriction’| ‘
substitution’))
Content: (annotation?) </minLength> Content: (annotation?) </maxExclusive>
default = string
©2002, 2003 D Vint Productions
<maxLength id = ID <minInclusive id = ID final = ( ‘ | List of ( ‘
#all’ extension’| ‘restriction’))
xmlhelp@ dvint.com
fixed = boolean : false fixed = boolean : false fixed = string
http://w w w .xm l.dvint.com
value = nonNegativeInteger > value = anySimpleType /> form = ( ‘ qualified’| ‘
unqualified’)
Note: All schema components allow attributes from non-schema namespaces. Content: (annotation?) </maxLength> Content: (annotation?) </minInclusive> maxOccurs = (nonNegativeInteger | ‘ unbounded’) : 1
minOccurs = nonNegativeInteger : 1
<pattern id = ID <minExclusive id = ID
1 Namespaces §2.6 pt1 name = NCName
value = anySimpleType > fixed = boolean : false
• http://www.w3.org/2001/XMLSchema nillable = boolean : ‘ false’
Content: (annotation?) </pattern> value = anySimpleType >
• http://www.w3.org/2001/XMLSchema-instance ref = QName
Content: (annotation?) </minExclusive>
<enumeration id = ID substitutionGroup = QName
2 Schema Declaration §3.15.2 pt1 value = anySimpleType > <totalDigits id = ID type = QName >
Content: (annotation?) </enumeration> fixed = boolean : false
<schema id = ID Content: (annotation?, ((simpleType | complexType)?,
value = positiveInteger >
attributeFormDefault = ( ‘qualified’| ‘unqualified’) : ‘unqualified’’ (unique | key | keyref)*)) </element>
<whiteSpace id = ID
Content: (annotation?) </totalDigits>
blockDefault = ( ‘ l | List of ( ‘
#al’ extension’| ‘restriction’| ‘substitution’)) : '' fixed = boolean : false
elementFormDefault = ( ‘ qualified’ | ‘ unqualified’) : ‘
unqualified’ 7 Content Model §3.8.2 pt1
value = ( ‘
collapse’| ‘preserve’| <fractionDigits id = ID
finalDefault = ( ‘ | List of ( ‘
#all’ extension’| ‘restriction’)) : '' ‘
replace’) > fixed = boolean : false <choice id = ID
targetNamespace = anyURI Content: (annotation?) </whitespace> value = nonNegativeInteger > maxOccurs = (nonNegativeInteger | ‘ unbounded’) : 1
version = token Content: (annotation?) </fractionDigits> minOccurs = nonNegativeInteger : 1}>
xml:lang = language >
Content: (annotation?, (element | group | choice | sequence | any)*) </choice>
Content: ((include | import | redefine | annotation)*, (((simpleType | complexType |
<sequence id = ID
group | attributeGroup) | element | attribute | notation), annotation*)*) §3.4.2 pt1
5 Complex Data Type Declaration
maxOccurs = (nonNegativeInteger | ‘ unbounded’) : 1
</schema> <complexType id = ID
minOccurs = nonNegativeInteger : 1}>
abstract = boolean : ‘false’
Content: (annotation?, (element | group | choice | sequence | any)*) </sequence>
3 Schema Management §4.2.1, 4.2.2, 4.2.3 pt1
block = ( ‘ | List of ( ‘
#all’ extension’| ‘ restriction’))
<include id = ID final = ( ‘ | List of ( ‘
#all’ extension’| ‘restriction’)) <all id = ID
schemaLocation = anyURI > mixed = boolean : ‘false’ maxOccurs = 1 : 1 minOccurs = (0 | 1) : 1>
Content: (annotation?) </include> name = NCName > Content: (annotation?, element*) </all>
Content: (annotation?, (simpleContent | complexContent | ((group | all | choice |
<redefine id = ID
sequence)?, ((attribute | attributeGroup)*, anyAttribute?)))) </complexType> 8 W ildcard Schema Component §3.10.2 pt1
schemaLocation = anyURI>
<any id = ID
Content: (annotation | (simpleType | complexType | group | attributeGroup))* </redefine> §3.4.2 pt1
Simple Content
maxOccurs = ( nonNegativeInteger | ‘ unbounded’) : 1
<import id = ID <simpleContent id = ID>
minOccurs = nonNegativeInteger : 1
namespace = anyURI Content: (annotation?, (restriction | extension)) </simpleContent>
namespace = (( ‘##any’| ‘ ##other’) | List of (anyURI | ( ‘
##targetNamespace’| ‘
##local’)) ) : ‘
##any’
schemaLocation = anyURI>
<restriction id = ID processContents = ( ‘ | ‘
lax’ skip’| ‘
strict’) : ‘strict’>
Content: (annotation?) </import>
base = QName> Content: (annotation?) </any>
Content: (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive §3.4.2 pt1
4 Simple Data Type Declaration §3.14.2 pt1 and §4.1.2 pt2
| maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength |
<anyAttribute id = ID
<simpleType id = ID enumeration | whiteSpace | pattern)*)?, ((attribute | attributeGroup)*,
namespace = (( ‘ ##any’| ‘##other’) | List of ( anyURI | ( ‘
##targetNamespace’| ‘
##local’)) ) : ‘
##any’
final = ( ‘ | ( ‘ | ‘
#all’ list’ union’| ‘ restriction’)) anyAttribute?)) </restriction>
processContents = ( ‘ | ‘
lax’ skip’| ‘strict’) : ‘ t >
stric’
name = NCName>
<extension id = ID Content: (annotation?) </anyAttribute>
Content: ( annotation ?, ( restriction | list | union )) </simpleType>
base = QName>
<list id = ID Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?)) </extension> 9 Attribute Declaration §3.2.2 pt1
itemType = QName>
Complex Content §3.4.2 pt1 <attribute id = ID
Content: ( annotation ?, ( simpleType ?)) </list>
default = string
<complexContent id = ID
<union id = ID fixed = string
mixed = boolean>
memberTypes = List of QName> form = ( ‘qualified’| ‘
unqualified’)
Content: (annotation?, (restriction | extension)) </complexContent>
Content: ( annotation ?, ( simpleType *)) </union> name = NCName
<restriction id = ID
ref = QName
<restriction id = ID
base = QName>
type = QName
base = QName>
Content: (annotation?, (group | all | choice | sequence)?,
use = ( ‘optional’| ‘prohibited’|’required’) : ‘
optional’ >
Content: ( annotation ?, ( simpleType ?, ( minExclusive | minInclusive |
((attribute | attributeGroup)*, anyAttribute?)) </restriction>
Content: (annotation?, (simpleType?)) </attribute>
maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength |
maxLength | enumeration | whiteSpace | pattern )*)) </restriction>
2. of its base type.
10 E l e m e n t G r o u p D e c l a r a t i o n (parameter entity like) §3.7.2 pt1
m a xE x c lu s ive
fra c tio nD ig its
m a x In c lu s iv e
[namespace attribute] controls use of namespaces §3.4.2 pt1
m in E x c lu s iv e
e n um e ra tio n
m in In c lus ive
w h ite S p a ce
<group id = ID
m in L e n g th
m ax L e n g th
to ta lD ig its
Any namespace (default)
##any Simple Data Type
maxOccurs = (nonNegativeInteger | ‘ unbounded’) : 1
pa tte rn
le ng th
Any namespace other than target namespace
##other
minOccurs = nonNegativeInteger : 1
name = NCName # # t a r g e t N a m e s p a c e Must belong to the target namespace of schema
ref = QName > Any unqualified XML from local namespace
##local dateTime - CCYY-MM-DDThh:mm:ss u u u u u u u
Content: (annotation?, (all | choice | sequence)?) </group>
[processContents attribute] specify how contents decimal - Arbitrary precision decimal
u u u u u u u u u
numbers
should be processed for validation §3.10.1 pt1
11 Attribute Group Declaration (parameter entity like) §3.6.2 pt1
double - Double-precision 64-bit floating
There must be a top-level declaration for the item available, or
strict u u u u u u u
point
<attributeGroup id = ID
the item must have an xsi:type, and must be valid.
name = NCName duration - PnYn MnDTnH nMn S u u u u u u u
No constraints at all: the item must simply be well-formed.
skip
ref = QName > ENTITIES u u u u u
Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?)) </attributeGroup> Validate where you can, don't worry when you can't.
lax ENTITY u u u u u u
[form attribute] controls namespace qualifying §3.2.2 pt1 float - 32-bit floating point type u u u u u u u
12 Identity-constraint Definitions §3.11.2 pt1
gDay
Namespace qualified
qualified u u u u u u u
<unique id = ID gMonth u u u u u u u
No namespace qualification
unqualified
name = NCName >
gMonthDay u u u u u u u
Content: (annotation?, (selector, field+)) </unique> [use attribute] specifies the use of an attribute §3.2.2 pt1
gYear u u u u u u u
Attribute is optional
optional
<key id = ID
gYearMonth u u u u u u u
name = NCName > Attribute is prohibited
prohibited
hexBinary u u u u u u
Content: (annotation?, (selector, field+)) </key> Attribute is required to have a value
required
ID u u u u u u
<keyref id = ID [whitespace attribute] specifies whitespace handling §3.1.4 pt 1, IDREF u u u u u u
name = NCName §4.3.6 pt 2
IDREFS
refer = QName > u u u u u
The value is the normalized value
preserve
Content: (annotation?, (selector, field+)) </keyref> int - 2147483647 to -2147483648. u u u u u u u u u
All occurrences of tab, line feed and carriage return are replaced
replace
integer u u u u u u u u u
<selector id = ID with space.
xpath = a subset of XPath expression > language - RFC 1766] Example: en, fr u u u u u u
Contiguous sequences of spaces are collapsed to a single space,
collapse
Content: (annotation?) </selector> list u u u u u u
and initial and/or final spaces are deleted.
long - 9223372036854775807 to -
<field id = ID u u u u u u u u u
9223372036854775808
xpath = a subset of XPath expression > 16 Built-in Types Name u u u u u u
Content: (annotation?) </field> Built-in Complex type definition of Ur-Type. §3.4.7 pt1
anyType
NCName u u u u u u
Built-in Simple type definition of Ur-Type. §3.14.7 pt1
anySimpleType
negativeInteger
13 Schema Documentation Components §3.13.2 pt1 u u u u u u u u u
NMTOKEN
<annotation id = ID> u u u u u u
17 Schema Instance Related Markup §2.6 pt1 and §3.2.7 pt1
Content: (appinfo | documentation)* </annotation> NMTOKENS u u u u u
An element in an instance may explicitly assert its type using the
xsi:type
nonNegativeInteger
attribute xsi:type. The value is a QName associated with a type u u u u u u u u u
<appinfo
definition. §2.6.1 pt1
source = anyURI> nonPositiveInteger u u u u u u u u u
Content: ({any})* </appinfo> normalizedString
An element may be valid without content if it has the attribute
xsi:nil u u u u u u
xsi:nil with the value true. §2.6.2 pt1 NOTATION
<documentation u u u u u u
source = anyURI positiveInteger
xsi:noNamespaceSchemaLocation, u u u u u u u u u
Provide hints as to the physical location of schema documents
xml:lang = language> xsi:schemaLocation QName u u u u u u
§2.6.3 pt1
Content: ({any})* </documentation> short - 32767 to -32768 u u u u u u u u u
string u u u u u u
14 Notation Declaration §3.12.2 pt1 18 Simple Data Types and Constraining Facets
tim e - h h : m m : s s u u u u u u u
<notation id = ID
token u u u u u u
name = NCName
union u u
public = anyURI
m a x E xc lus ive
fra c tio n D ig its
m a x In c lu s iv e
m in E x c lu s iv e
e n u m e ra tio n
m in Inc lu siv e
w hite S p a c e
system = anyURI > unsignedByte - 0 to 255 u u u u u u u u u
m in L e n g th
m a xL e n g th
to ta lD ig its
Simple Data Type
Content: (annotation?) </notation> unsignedInt - 0 to 4294967295 u u u u u u u u u
p atte rn
le n gth
unsignedLong - 0 to
u u u u u u u u u
18446744073709551615
15 Defined Attribute Values
Any element not part of Schema namespace.
{any} unsignedShort - 0 to 65535 u u u u u u u u u
anyURI u u u u u u
ver 1/03
All of the values listed
#all
base64Binary u u u u u u
[final attribute] controls further derivation §3.4.1 pt1
boolean u u
A finite-length (possibly empty) sequence of values ©2002, 2002 D Vint Productions
list
byte - 127 to-128 u u u u u u u u u
xmlhelp@ dvint.com
A combination of the of one or more other datatypes.
union date - CCYY-MM-DD u u u u u u u
http://w w w .xm l.dvint.com
Values for constraining facets are specified to a subset of those
restriction