Overview - ISO/IEC 19757-11:2011 (Schema association)
ISO/IEC 19757-11:2011 defines a schema-agnostic way to associate one or more external schemas with an XML document by means of an xml-model processing instruction placed in the document prolog. It specifies the syntax, required parsing behavior and the pseudo-attributes that convey schema location and metadata (for example, href, type, schematypens, charset, title, group, phase). The standard is aligned with the W3C "Associating Schemas with XML documents" specification and is part of the DSDL family for XML schema definition and validation.
Key topics and technical requirements
- xml-model processing instruction: must appear in the document prolog (before the root element) with target
xml-model. Processors parse its pseudo-attributes using the parsing rules from the W3C xml-stylesheet/ASSOCSS recommendation.
- Mandatory and optional pseudo-attributes:
- href (required): an IRI-reference pointing to the schema (RFC 3987).
- type: media/content type of the schema (advisory; defaults to application/xml if omitted).
- schematypens: namespace identifying the schema language (helps determine language like RELAX NG, W3C XML Schema, Schematron).
- charset, title, group, phase: charset names must match IANA registry;
group enables schema grouping selection; phase is used with Schematron.
- Conformance for processors: an xml-model processor must report the full parsing result to the application and may be part of a larger XML tool. If parsing pseudo-attributes fails, the PI is not an xml-model instruction.
- Multiple schemas & precedence: multiple xml-model PIs are allowed; the standard does not mandate processing order nor dictate interaction with xsi:schemaLocation/xsi:noNamespaceSchemaLocation.
- Non-normative: examples and annex guidance (e.g., suggested schematypens values) are informative only.
Applications - who uses it and why
- XML tool and editor developers: attach validation schemas directly in documents for content completion and editor-driven validation.
- Validator and processor implementers: discover schema locations and types programmatically via
xml-model.
- Technical architects and standards authors: embed authoritative schema associations in sample or canonical documents.
- Use cases include validation workflows, data binding, editorial tools, and archival documents that carry explicit schema references.
Related standards and references
- ISO/IEC 19757 (DSDL series) - Part 3 (Schematron), Part 4 (NVDL), etc.
- W3C "Associating Schemas with XML documents" (xml-model)
- XML 1.0 (W3C), ASSOCSS (pseudo-attribute parsing), IETF RFC 3987 (IRIs), IANA character set registry
Keywords: ISO/IEC 19757-11, xml-model, schema association, DSDL, xml schema, RELAX NG, Schematron, processing instruction, schematypens, href, XML validation.