mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00

* xmlschemas.c: modified parsing of <list>, <union>, <restriction>, <sequence>, <choice>, <include>, <import>. Fixed schema defaults (elementFormDefault, etc.) for included schemas. Fixed a bug which reported attributes as invalid on elements declarations with the built-in type 'anyType'. Added "lax" validation of the content of elements of type 'anyType'. Fixed: element declarations with the same name were treated as duplicate if located in the subtree of <choice> -> <sequence>. (This was bug 150623, submitted by Roland Lezuo) Fixed cleanup of error codes in xmlSchemaValidateDoc as proposed by Igor Kapitanker. (This was bug 150647, submitted by Igor Kapitanker) * xmlschemastypes.c: Changed the type of anyType to XML_SCHEMAS_ANYTYPE. * include/libxml/xmlerror.h: Added schema parser errors. * result/schemas/bug145246_0_0* result/schemas/extension1_0_2.err: Changed test results. * result/schemas/ct-sc-nobase_0_0* result/schemas/facet-whiteSpace_0_0* result/schemas/import1_0_0* result/schemas/import2_0_0* result/schemas/include2_0_0* result/schemas/include3_0_0* result/schemas/restriction-attr1_0_0* result/schemas/seq-dubl-elem1_0_0* result/schemas/xsd-list-itemType_0_0*: Added new rest results. test/schemas/bug145246.xsd.imp test/schemas/ct-sc-nobase_0* test/schemas/facet-whiteSpace_0* test/schemas/import1_0* test/schemas/import2_0* test/schemas/include2_0* test/schemas/include3_0* test/schemas/restriction-attr1_0* test/schemas/seq-dubl-elem1_0* test/schemas/xml.xsd test/schemas/xsd-list-itemType_0*: Added new tests and missing files.
120 lines
4.0 KiB
XML
120 lines
4.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
xmlns="http://purl.org/dc/elements/1.1/"
|
|
targetNamespace="http://purl.org/dc/elements/1.1/"
|
|
elementFormDefault="qualified"
|
|
attributeFormDefault="unqualified">
|
|
|
|
<xs:annotation>
|
|
<xs:documentation xml:lang="en">
|
|
DCMES 1.1 XML Schema
|
|
XML Schema for http://purl.org/dc/elements/1.1/ namespace
|
|
|
|
Created 2003-04-02
|
|
|
|
Created by
|
|
|
|
Tim Cole (t-cole3@uiuc.edu)
|
|
Tom Habing (thabing@uiuc.edu)
|
|
Jane Hunter (jane@dstc.edu.au)
|
|
Pete Johnston (p.johnston@ukoln.ac.uk),
|
|
Carl Lagoze (lagoze@cs.cornell.edu)
|
|
|
|
This schema declares XML elements for the 15 DC elements from the
|
|
http://purl.org/dc/elements/1.1/ namespace.
|
|
|
|
It defines a complexType SimpleLiteral which permits mixed content
|
|
and makes the xml:lang attribute available. It disallows child elements by
|
|
use of minOcccurs/maxOccurs.
|
|
|
|
However, this complexType does permit the derivation of other complexTypes
|
|
which would permit child elements.
|
|
|
|
All elements are declared as substitutable for the abstract element any,
|
|
which means that the default type for all elements is dc:SimpleLiteral.
|
|
|
|
</xs:documentation>
|
|
|
|
</xs:annotation>
|
|
|
|
|
|
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
|
|
schemaLocation="xml.xsd">
|
|
</xs:import>
|
|
<!--http://www.w3.org/2001/03/xml.xsd-->
|
|
<xs:complexType name="SimpleLiteral">
|
|
<xs:annotation>
|
|
<xs:documentation xml:lang="en">
|
|
This is the default type for all of the DC elements.
|
|
It permits text content only with optional
|
|
xml:lang attribute.
|
|
Text is allowed because mixed="true", but sub-elements
|
|
are disallowed because minOccurs="0" and maxOccurs="0"
|
|
are on the xs:any tag.
|
|
|
|
This complexType allows for restriction or extension permitting
|
|
child elements.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
|
|
<xs:complexContent mixed="true">
|
|
<xs:restriction base="xs:anyType">
|
|
<xs:sequence>
|
|
<xs:any processContents="lax" minOccurs="1" maxOccurs="2"/>
|
|
</xs:sequence>
|
|
<xs:attribute ref="xml:lang" use="optional"/>
|
|
</xs:restriction>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
|
|
<xs:element name="any" type="SimpleLiteral" abstract="true"/>
|
|
|
|
<xs:element name="title" substitutionGroup="any"/>
|
|
<xs:element name="creator" substitutionGroup="any"/>
|
|
<xs:element name="subject" substitutionGroup="any"/>
|
|
<xs:element name="description" substitutionGroup="any"/>
|
|
<xs:element name="publisher" substitutionGroup="any"/>
|
|
<xs:element name="contributor" substitutionGroup="any"/>
|
|
<xs:element name="date" substitutionGroup="any"/>
|
|
<xs:element name="type" substitutionGroup="any"/>
|
|
<xs:element name="format" substitutionGroup="any"/>
|
|
<xs:element name="identifier" substitutionGroup="any"/>
|
|
<xs:element name="source" substitutionGroup="any"/>
|
|
<xs:element name="language" substitutionGroup="any"/>
|
|
<xs:element name="relation" substitutionGroup="any"/>
|
|
<xs:element name="coverage" substitutionGroup="any"/>
|
|
<xs:element name="rights" substitutionGroup="any"/>
|
|
|
|
<xs:group name="elementsGroup">
|
|
<xs:annotation>
|
|
<xs:documentation xml:lang="en">
|
|
This group is included as a convenience for schema authors
|
|
who need to refer to all the elements in the
|
|
http://purl.org/dc/elements/1.1/ namespace.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
|
|
<xs:sequence>
|
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
<xs:element ref="any"/>
|
|
</xs:choice>
|
|
</xs:sequence>
|
|
</xs:group>
|
|
|
|
<xs:complexType name="elementContainer">
|
|
<xs:annotation>
|
|
<xs:documentation xml:lang="en">
|
|
This complexType is included as a convenience for schema authors who need to define a root
|
|
or container element for all of the DC elements.
|
|
</xs:documentation>
|
|
</xs:annotation>
|
|
|
|
<xs:choice>
|
|
<xs:group ref="elementsGroup"/>
|
|
</xs:choice>
|
|
</xs:complexType>
|
|
|
|
|
|
</xs:schema>
|
|
|