diff --git a/.gitattributes b/.gitattributes index fbf15102..78048603 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,8 +3,10 @@ /tools/ export-ignore /tests/bootstrap.php export-ignore /tests/resources/xml export-ignore +/tests/InterOperability/ export-ignore /tests/Utils/ export-ignore /tests/XML/ export-ignore +/tests/XMLSchema/ export-ignore codecov.yml export-ignore .editorconfig export-ignore .gitattributes export-ignore diff --git a/src/XML/Type/BaseValue.php b/src/XML/Type/BaseValue.php new file mode 100644 index 00000000..fc9d5db6 --- /dev/null +++ b/src/XML/Type/BaseValue.php @@ -0,0 +1,30 @@ +sanitizeValue($value); + + if ($sanitized !== '') { + parent::validateValue($sanitized); + } + } + + + /** + * Convert this value to an attribute + * + * @return \SimpleSAML\XML\Attribute + */ + public function toAttribute(): Attribute + { + return new Attribute(C::NS_XML, 'xml', 'lang', $this); + } +} diff --git a/src/XML/Type/SpaceValue.php b/src/XML/Type/SpaceValue.php new file mode 100644 index 00000000..091b3604 --- /dev/null +++ b/src/XML/Type/SpaceValue.php @@ -0,0 +1,71 @@ +sanitizeValue($value); + parent::validateValue($sanitized); + + Assert::oneOf( + $sanitized, + [ + SpaceEnum::Default->value, + SpaceEnum::Preserve->value, + ], + SchemaViolationException::class, + ); + } + + + /** + * @param \SimpleSAML\XML\XML\xml\SpaceEnum $value + * @return static + */ + public static function fromEnum(SpaceEnum $value): static + { + return new static($value->value); + } + + + /** + * @return \SimpleSAML\XML\XML\xml\SpaceEnum $value + */ + public function toEnum(): SpaceEnum + { + return SpaceEnum::from($this->getValue()); + } + + + /** + * Convert this value to an attribute + * + * @return \SimpleSAML\XML\Attribute + */ + public function toAttribute(): Attribute + { + return new Attribute(C::NS_XML, 'xml', 'space', $this); + } +} diff --git a/src/XML/XML/xml/SpaceEnum.php b/src/XML/XML/xml/SpaceEnum.php new file mode 100644 index 00000000..bff4df2f --- /dev/null +++ b/src/XML/XML/xml/SpaceEnum.php @@ -0,0 +1,11 @@ +base; + } + + + /** + * Set the value of the base-property + * + * @param \SimpleSAML\XML\Type\BaseValue|null $base + */ + protected function setBase(?BaseValue $base): void + { + $this->base = $base; + } + + + /** + * Collect the value of the id-property + * + * @return \SimpleSAML\XML\Type\IDValue|null + */ + public function getId(): ?IDValue + { + return $this->id; + } + + + /** + * Set the value of the id-property + * + * @param \SimpleSAML\XML\Type\IDValue|null $id + */ + protected function setID(?IDValue $id): void + { + $this->id = $id; + } + + + /** + * Collect the value of the lang-property + * + * @return \SimpleSAML\XML\Type\LangValue|null + */ + public function getLang(): ?LangValue + { + return $this->lang; + } + + + /** + * Set the value of the lang-property + * + * @param \SimpleSAML\XML\Type\LangValue|null $id + */ + protected function setLang(?LangValue $lang): void + { + $this->lang = $lang; + } + + + /** + * Collect the value of the space-property + * + * @return \SimpleSAML\XML\Type\SpaceValue|null + */ + public function getSpace(): ?SpaceValue + { + return $this->space; + } + + + /** + * Set the value of the space-property + * + * @param \SimpleSAML\XML\Type\SpaceValue|null $id + */ + protected function setSpace(?SpaceValue $space): void + { + $this->space = $space; + } +} diff --git a/src/XMLSchema/Type/Helper/AttributeTypeInterface.php b/src/XMLSchema/Type/Helper/AttributeTypeInterface.php new file mode 100644 index 00000000..0c5a11f1 --- /dev/null +++ b/src/XMLSchema/Type/Helper/AttributeTypeInterface.php @@ -0,0 +1,22 @@ +assertTrue($shouldPass); + } catch (SchemaViolationException $e) { + $this->assertFalse($shouldPass); + } + } + + + /** + * Test helpers + */ + public function testHelpers(): void + { + $base = BaseValue::fromString('urn:x-simplesamlphp:namespace'); + $attr = $base->toAttribute(); + + $this->assertEquals($attr->getNamespaceURI(), C::NS_XML); + $this->assertEquals($attr->getNamespacePrefix(), 'xml'); + $this->assertEquals($attr->getAttrName(), 'base'); + $this->assertEquals($attr->getAttrValue(), 'urn:x-simplesamlphp:namespace'); + } + + + /** + */ + public function testEquals(): void + { + // Assert that two identical values are equal + $this->assertTrue(AnyURIValue::fromString('hello')->equals(AnyURIValue::fromString('hello'))); + $this->assertTrue(AnyURIValue::fromString('hello')->equals(StringValue::fromString('hello'))); + $this->assertTrue(AnyURIValue::fromString('hello')->equals('hello')); + + // Assert that two different values are not equal + $this->assertFalse(AnyURIValue::fromString('hello')->equals(AnyURIValue::fromString('world'))); + $this->assertFalse(AnyURIValue::fromString('hello')->equals(StringValue::fromString('world'))); + $this->assertFalse(AnyURIValue::fromString('hello')->equals('world')); + } + + + /** + * @return array + */ + public static function provideValidBase(): array + { + return [ + 'trailing newline' => [true, "https://sts.windows.net/{tenantid}/\n"], + ]; + } +} diff --git a/tests/XML/Type/IDValueTest.php b/tests/XML/Type/IDValueTest.php new file mode 100644 index 00000000..80f4b554 --- /dev/null +++ b/tests/XML/Type/IDValueTest.php @@ -0,0 +1,53 @@ +assertTrue($shouldPass); + } catch (SchemaViolationException $e) { + $this->assertFalse($shouldPass); + } + } + + + /** + * Test helpers + */ + public function testHelpers(): void + { + $id = IDValue::fromString('phpunit'); + $attr = $id->toAttribute(); + + $this->assertEquals($attr->getNamespaceURI(), C::NS_XML); + $this->assertEquals($attr->getNamespacePrefix(), 'xml'); + $this->assertEquals($attr->getAttrName(), 'id'); + $this->assertEquals($attr->getAttrValue(), 'phpunit'); + } +} diff --git a/tests/XML/Type/LangValueTest.php b/tests/XML/Type/LangValueTest.php new file mode 100644 index 00000000..6ecdf61b --- /dev/null +++ b/tests/XML/Type/LangValueTest.php @@ -0,0 +1,76 @@ +assertTrue($shouldPass); + } catch (SchemaViolationException $e) { + $this->assertFalse($shouldPass); + } + } + + + /** + * Test helpers + */ + public function testHelpers(): void + { + $lang = LangValue::fromString('en-us'); + $attr = $lang->toAttribute(); + + $this->assertEquals($attr->getNamespaceURI(), C::NS_XML); + $this->assertEquals($attr->getNamespacePrefix(), 'xml'); + $this->assertEquals($attr->getAttrName(), 'lang'); + $this->assertEquals($attr->getAttrValue(), 'en-us'); + } + + + /** + * @return array + */ + public static function provideValidLang(): array + { + return [ + 'empty string' => [true, ''], + ]; + } + + + /** + * @return array + */ + public static function provideInvalidLang(): array + { + return [ + 'too long' => [false, 'toolongLanguage'], + ]; + } +} diff --git a/tests/XML/Type/SpaceValueTest.php b/tests/XML/Type/SpaceValueTest.php new file mode 100644 index 00000000..f379ef01 --- /dev/null +++ b/tests/XML/Type/SpaceValueTest.php @@ -0,0 +1,72 @@ +assertTrue($shouldPass); + } catch (SchemaViolationException $e) { + $this->assertFalse($shouldPass); + } + } + + + /** + * Test helpers + */ + public function testHelpers(): void + { + $lang = SpaceValue::fromString('default'); + $attr = $lang->toAttribute(); + + $this->assertEquals($attr->getNamespaceURI(), C::NS_XML); + $this->assertEquals($attr->getNamespacePrefix(), 'xml'); + $this->assertEquals($attr->getAttrName(), 'space'); + $this->assertEquals($attr->getAttrValue(), 'default'); + + // + $x = SpaceValue::fromEnum(SpaceEnum::Default); + $this->assertEquals(SpaceEnum::Default, $x->toEnum()); + + $y = SpaceValue::fromString('default'); + $this->assertEquals(SpaceEnum::Default, $y->toEnum()); + } + + + /** + * @return array + */ + public static function provideSpace(): array + { + return [ + 'default' => ['default', true], + 'preserve' => ['preserve', true], + 'undefined' => ['undefined', false], + 'empty' => ['', false], + ]; + } +} diff --git a/tests/resources/schemas/XMLSchema.xsd b/tests/resources/schemas/XMLSchema.xsd new file mode 100644 index 00000000..f0c9505f --- /dev/null +++ b/tests/resources/schemas/XMLSchema.xsd @@ -0,0 +1,2534 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]> + + + + Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp + Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp + + + + + + The schema corresponding to this document is normative, + with respect to the syntactic constraints it expresses in the + XML Schema language. The documentation (within <documentation> elements) + below, is not normative, but rather highlights important aspects of + the W3C Recommendation of which this is a part + + + + + The simpleType element and all of its members are defined + towards the end of this schema document + + + + + + Get access to the xml: attribute groups for xml:lang + as declared on 'schema' and 'documentation' below + + + + + + + + This type is extended by almost all schema types + to allow attributes from other namespaces to be + added to user schemas. + + + + + + + + + + + + + This type is extended by all types which allow annotation + other than <schema> itself + + + + + + + + + + + + + + + + This group is for the + elements which occur freely at the top level of schemas. + All of their types are based on the "annotated" type by extension. + + + + + + + + + + + + + This group is for the + elements which can self-redefine (see <redefine> below). + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction} + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {extension, restriction, list, union} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for maxOccurs + + + + + + + + + + + + for all particles + + + + + + + for element, group and attributeGroup, + which both define and reference + + + + + + + + 'complexType' uses this + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This branch is short for + <complexContent> + <restriction base="xs:anyType"> + ... + </restriction> + </complexContent> + + + + + + + + + + + + + + + Will be restricted to required or forbidden + + + + + + Not allowed if simpleContent child is chosen. + May be overriden by setting on complexContent child. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Overrides any setting on complexType parent. + + + + + + + + + + + + + + + This choice is added simply to + make this a valid restriction per the REC + + + + + + + + + + + + + + + + + No typeDefParticle group reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + #all or (possibly empty) subset of {substitution, extension, + restriction} + + + + + + + + + + + + + + + + + + + + + + + + + The element element can be used either + at the top level to define an element-type binding globally, + or within a content model to either reference a globally-defined + element or type or declare an element-type binding locally. + The ref form is not allowed at the top level. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for explicit groups, named top-level groups and + group references + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + group type for the three kinds of group + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This choice with min/max is here to + avoid a pblm with the Elt:All/Choice/Seq + Particle derivation constraint + + + + + + + + + + restricted max/min + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Only elements allowed inside + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + simple type for the value of the 'namespace' attr of + 'any' and 'anyAttribute' + + + + Value is + ##any - - any non-conflicting WFXML/attribute at all + + ##other - - any non-conflicting WFXML/attribute from + namespace other than targetNS + + ##local - - any unqualified non-conflicting WFXML/attribute + + one or - - any non-conflicting WFXML/attribute from + more URI the listed namespaces + references + (space separated) + + ##targetNamespace or ##local may appear in the above list, to + refer to the targetNamespace of the enclosing + schema or an absent targetNamespace respectively + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in selectors + A utility type, not for public +use + + + + The following pattern is intended to allow XPath + expressions per the following EBNF: + Selector ::= Path ( '|' Path )* + Path ::= ('.//')? Step ( '/' Step )* + Step ::= '.' | NameTest + NameTest ::= QName | '*' | NCName ':' '*' + child:: is also allowed + + + + + + + + + + + + + + + + + + + + + + + A subset of XPath expressions for use +in fields + A utility type, not for public +use + + + + The following pattern is intended to allow XPath + expressions per the same EBNF as for selector, + with the following change: + Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + + + + + + + + + + + + + + + + + + + + + + + + + + + The three kinds of identity constraints, all with + type of or derived from 'keybase'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + A public identifier, per ISO 8879 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + notations for use within XML Schema schemas + + + + + + + + + Not the real urType, but as close an approximation as we can + get in the XML representation + + + + + + + + + + First the built-in primitive datatypes. These definitions are for + information only, the real built-in definitions are magic. + + + + For each built-in datatype in this schema (both primitive and + derived) can be uniquely addressed via a URI constructed + as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype + + For example, to address the int datatype, the URI is: + + http://www.w3.org/2001/XMLSchema#int + + Additionally, each facet definition element can be uniquely + addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the facet + + For example, to address the maxInclusive facet, the URI is: + + http://www.w3.org/2001/XMLSchema#maxInclusive + + Additionally, each facet usage in a built-in datatype definition + can be uniquely addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype, followed + by a period (".") followed by the name of the facet + + For example, to address the usage of the maxInclusive facet in + the definition of int, the URI is: + + http://www.w3.org/2001/XMLSchema#int.maxInclusive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOTATION cannot be used directly in a schema; rather a type + must be derived from it by specifying at least one enumeration + facet whose value is the name of a NOTATION declared in the + schema. + + + + + + + + + + Now the derived primitive types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern specifies the content of section 2.12 of XML 1.0e2 + and RFC 3066 (Revised version of RFC 1766). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern matches production 7 from the XML spec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern matches production 5 from the XML spec + + + + + + + + + + + + + + + pattern matches production 4 from the Namespaces in XML spec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + #all or (possibly empty) subset of {restriction, union, list} + + + A utility type, not for public use + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Can be restricted to required or forbidden + + + + + + + + + + + + + + + + + + Required at the top level + + + + + + + + + + + + + + + + + + + Forbidden when nested + + + + + + + + + + + + + + + + + + + We should use a substitution group for facets, but + that's ruled out because it would allow users to + add their own, which we're not ready for yet. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + base attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + itemType attribute and simpleType child are mutually + exclusive, but one or other is required + + + + + + + + + + + + + + + + + + memberTypes attribute must be non-empty or there must be + at least one simpleType child + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/schemas/saml-schema-assertion-2.0.xsd b/tests/resources/schemas/saml-schema-assertion-2.0.xsd similarity index 100% rename from resources/schemas/saml-schema-assertion-2.0.xsd rename to tests/resources/schemas/saml-schema-assertion-2.0.xsd diff --git a/resources/schemas/saml-schema-metadata-2.0.xsd b/tests/resources/schemas/saml-schema-metadata-2.0.xsd similarity index 100% rename from resources/schemas/saml-schema-metadata-2.0.xsd rename to tests/resources/schemas/saml-schema-metadata-2.0.xsd diff --git a/resources/schemas/saml-schema-protocol-2.0.xsd b/tests/resources/schemas/saml-schema-protocol-2.0.xsd similarity index 100% rename from resources/schemas/saml-schema-protocol-2.0.xsd rename to tests/resources/schemas/saml-schema-protocol-2.0.xsd diff --git a/resources/schemas/soap-envelope-1.1.xsd b/tests/resources/schemas/soap-envelope-1.1.xsd similarity index 100% rename from resources/schemas/soap-envelope-1.1.xsd rename to tests/resources/schemas/soap-envelope-1.1.xsd diff --git a/resources/schemas/xenc-schema.xsd b/tests/resources/schemas/xenc-schema.xsd similarity index 100% rename from resources/schemas/xenc-schema.xsd rename to tests/resources/schemas/xenc-schema.xsd diff --git a/tests/resources/schemas/xml.xsd b/tests/resources/schemas/xml.xsd new file mode 100644 index 00000000..bd291f3d --- /dev/null +++ b/tests/resources/schemas/xml.xsd @@ -0,0 +1,286 @@ + + + + + + +
+

About the XML namespace

+ +
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

+

+ Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + + +
+ +

lang (as an attribute name)

+

+ denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

+ +
+
+

Notes

+

+ Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

+

+ See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + + +
+ +

space (as an attribute name)

+

+ denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

+ +
+
+
+ + + + + + +
+ + + +
+ +

base (as an attribute name)

+

+ denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

+ +

+ See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

+
+
+
+
+ + + + +
+ +

id (as an attribute name)

+

+ denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

+ +

+ See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

+
+
+
+
+ + + + + + + + + + +
+ +

Father (in any context at all)

+ +
+

+ denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

+
+

+ In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

+
+
+
+
+
+ + + +
+

About this schema document

+ +
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+          <schema . . .>
+           . . .
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+     
+

+ or +

+
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+     
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+          <type . . .>
+           . . .
+           <attributeGroup ref="xml:specialAttrs"/>
+     
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + + +
+

Versioning policy for this schema document

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + http://www.w3.org/2009/01/xml.xsd. +

+

+ At the date of issue it can also be found at + + http://www.w3.org/2001/xml.xsd. +

+

+ The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + http://www.w3.org/2001/xml.xsd + + will change accordingly; the version at + + http://www.w3.org/2009/01/xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+ +
diff --git a/resources/schemas/xmldsig-core-schema.xsd b/tests/resources/schemas/xmldsig-core-schema.xsd similarity index 100% rename from resources/schemas/xmldsig-core-schema.xsd rename to tests/resources/schemas/xmldsig-core-schema.xsd