W3C

XML Security RELAX NG Schemas

W3C Working Draft 31 August 2010

This version:
http://www.w3.org/TR/2010/WD-xmlsec-rngschema-20100831/
Latest published version:
http://www.w3.org/TR/xmlsec-rngschema/
Latest editor's draft:
http://www.w3.org/2008/xmlsec/Drafts/xmlsec-rngschema/
Previous version:
http://www.w3.org/TR/2010/WD-xmlsec-rngschema-20100316/
Editors:
Makoto Murata, Invited Expert
Frederick Hirsch, Nokia

Abstract

This document serves to publish RELAX NG schemas for XML Security specifications, including XML Signature 1.1, and XML Signature Properties.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This Working Draft collects non-normative RELAX NG Schemas for XML Security specifications, including XML Signature 1.1, XML Encryption 1.1, XML Security Generic Hybrid Ciphers and XML Signature Properties. The normative description of the respective data formats are included in the Recommendation-track Working Drafts.

These schemas are drafts and subject to further revisions. This is a work in progress. This document is intended to evolve to include additional RELAX NG schemas.

The changes to this document since the last publication on 16 March 2010 are the following:

A diff-marked version of this specification that highlights changes against the previous version is available.

This document was published by the XML Security Working Group as a Working Draft. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, please send them to public-xmlsec@w3.org (subscribe, archives). All feedback is welcome.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1. Introduction

The XML Security specifications include normative XML Schema [XMLSCHEMA-1], [XMLSCHEMA-2]. This note provides non-normative RELAX NG schemas in compact form [RELAXNG-SCHEMA].

These RELAX NG schemas are highly modularized. This modularization has two significant advantages. First, it is easy to create schemas dedicated to enveloped or enveloping signatures. Second, it is easy to create schemas for imposing tight constraints where <xsd:any> in the original XSD schemas does not impose such tight constraints.

However, this modularization increases the number of schema modules.

First, a wildcard schema is needed for each core schema (e.g., xmldsig-core-schema.rnc and xenc-schema.rnc). Wildcard schemas mimic <xsd:any> in core schemas. A wildcard can be further customized by a driver schema or it can be simply replaced by another schema when tight constraints have to be hardcoded.

Second, one top-level schema is needed for each combination of core schemas and the choice from the "enveloping" and "enveloped" options. In this note, we only provide top-level schemas for enveloped signatures or encryptions, but it is easy to create top-level schemas for enveloping signatures.

2. Included RNG Schema files

This section is non-normative.

The following are RELAX NG schema files that are included in other files described in this document.

Define anyElement and anyAttribute
any.rnc
Exclusive Canonicalization Algorithms RNG Schema Definitions
exclusiveC14N.rnc

RNG Schema to allow Exclusive Canonicalization algorithms.

3. XML Signature 1.0 RNG Schema

This section is non-normative.

The following are RELAX NG schemas for XML Signature 1.0 [XMLDSIG-CORE].

XML Signature Core RELAX NG Schema Instance
xmldsig-core-schema.rnc
This is the schema corresponding to XML Signature 1.0, Second Edition.
RELAX NG XML Signature 1.0 Top-Level Schema
any-containing-xmldsig.rnc
Any correct use of XML Signature 1.0 schema is expected be valid against this top-level schema.
RELAX NG XML Signature 1.0 schema, allowing Exclusive Canonicalization
any-containing-xmldsig-exclusiveC14N.rnc
Any correct use of XML Signature 1.0 schema is expected be valid against this top-level schema, including use of the Exclusive Canonicalization algorithm.
RELAX NG Schema corresponding to xsd:any
xmldsig-allowAnyForeign.rnc
This is used by the top-level schema to mimic xsd:any.

4. XML Signature 1.1 RNG Schema

This section is non-normative.

The following are RELAX NG schemas for XML Signature 1.1 [XMLDSIG-CORE1].

XML Signature 1.1 RELAX NG Schema Instance
xmldsig11-schema.rnc
RELAX NG XML Signature 1.1 Top-Level Schema
any-containing-xmldsig11.rnc
Any correct use of XML Signature 1.1 schema is expected be valid against this top-level schema.
RELAX NG Schema corresponding to xsd:any
xmldsig11-allowAnyForeign.rnc
This is used by the top-level schema to mimic xsd:any.

5. XML Signature Properties RNG Schema

This section is non-normative.

The following are RELAX NG schemas for XML Signature Properties [XMLDSIG-PROPERTIES].

Signature Properties RNG Schema Instance
xmldsig-properties-schema.rnc

Valid RNG Schema instance.

RELAX NG XML Signature 1.1 with Properties Top-Level Schema
any-containing-xmldsig11-properties.rnc
Any correct use of XML Signature 1.1 schema containing Signature Properties defined in this specification is expected be valid against this top-level schema.
RELAX NG XML Signature 1.1 with Properties Top-Level Schema, allowing Exclusive Canonicalization
any-containing-xmldsig11-properties-exclusiveC14N.rnc
Any correct use of XML Signature 1.1 schema containing Signature Properties defined in this specification is expected be valid against this top-level schema, including use of Exclusive Canonicalization algorithm.

6. XML Encryption 1.0 RNG Schema

This section is non-normative.

The following is a RELAX NG schema for XML Encryption 1.0 [XMLENC-CORE].

XML Encryption 1.0 RELAX NG Schema Instance
xenc-schema.rnc
This is the schema corresponding to XML Encryption 1.0.
RELAX NG XML Encryption 1.0 Top-Level Schema
any-containing-encryption.rnc
Any correct use of XML Encryption schema is expected be valid against this top-level schema.
RELAX NG Schema corresponding to xsd:any
xenc-allowAnyForeign.rnc
This is used by the top-level schema to mimic xsd:any.

7. XML Encryption 1.1 RNG Schema

This section is non-normative.

The following are RELAX NG schemas for XML Encryption 1.1 [XMLENC-CORE1].

XML Encryption 1.1 RELAX NG Schema Instance
xenc-schema-11.rnc
RELAX NG XML Encryption 1.1 Top-Level Schema
any-containing-encryption11.rnc
Any correct use of XML Encryption 1.1 schema is expected be valid against this top-level schema.
RELAX NG Schema corresponding to xsd:any
xenc11-allowAnyForeign.rnc

8. XML Security Generic Hybrid Ciphers RNG Schema

This section is non-normative.

The following are RELAX NG schemas for XML Security Generic Hybrid Ciphers [XMLSEC-GHCIPHERS].

XML Security Generic Hybrid Ciphers RELAX NG Schema Instance
xmlsec-gh-schema.rnc
RELAX NG XML Security Generic Hybrid Ciphers Top-Level Schema
any-containing-encryption11-gh.rnc
Any correct use of XML Security Generic Hybrid Ciphers is expected be valid against this top-level schema.
RELAX NG Schema corresponding to xsd:any
xmlsec-gh-allowAnyForeign.rnc

A. References

Dated references below are to the latest known or appropriate edition of the referenced work. The referenced works may be subject to revision, and conformant implementations may follow, and are encouraged to investigate the appropriateness of following, some or all more recent editions or replacements of the works cited. It is in each case implementation-defined which editions are supported.

A.1 Normative references

No normative references.

A.2 Informative references

[RELAXNG-SCHEMA]
Information technology -- Document Schema Definition Language (DSDL) -- Part 2: Regular-grammar-based validation -- RELAX NG. ISO/IEC 19757-2:2008. URI: http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html
[XMLDSIG-CORE]
Joseph Reagle; et al. XML Signature Syntax and Processing (Second Edition). 10 June 2008. W3C Recommendation. URL: http://www.w3.org/TR/2008/REC-xmldsig-core-20080610
[XMLDSIG-CORE1]
D. Eastlake, J. Reagle, D. Solo, F. Hirsch, T. Roessler, K. Yiu. XML Signature Syntax and Processing Version 1.1. 13 May 2010. W3C Working Draft. (Work in progress.) URL: http://www.w3.org/TR/2010/WD-xmldsig-core1-20100513/
[XMLDSIG-PROPERTIES]
Frederick Hirsch. XML Signature Properties. 4 February 2010. W3C Working Draft. (Work in progress.) URL: http://www.w3.org/TR/2010/WD-xmldsig-properties-20100204/
[XMLENC-CORE]
Donald Eastlake; Joseph Reagle. XML Encryption Syntax and Processing. 10 December 2002. W3C Recommendation. URL: http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/
[XMLENC-CORE1]
J. Reagle; D. Eastlake, F. Hirsch, T. Roessler XML Encryption Syntax and Processing Version 1.1. 13 May 2010. W3C Working Draft. (Work in progress.) URL: http://www.w3.org/TR/2010/WD-xmlenc-core1-20100513/
[XMLSCHEMA-1]
Henry S. Thompson; et al. XML Schema Part 1: Structures Second Edition. 28 October 2004. W3C Recommendation. URL: http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/
[XMLSCHEMA-2]
Paul V. Biron; Ashok Malhotra. XML Schema Part 2: Datatypes Second Edition. 28 October 2004. W3C Recommendation. URL: http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/
[XMLSEC-GHCIPHERS]
Magnus Nyström; Frederick Hirsch. XML Security Generic Hybrid Ciphers. 14 May 2010. W3C Working Draft. (Work in progress.) URL: http://www.w3.org/TR/2010/WD-xmlsec-generic-hybrid-20100513/