An XSD 1.1 Schema Validator Written in XSLT 3.0

Michael Kay

Saxonica

Abstract

The paper describes an implementation of an XML Schema validator written entirely in XSLT 3.0. The main benefit of doing this is that the validator becomes available on any platform where XSLT 3.0 is implemented. At the same time, the experiment provides a valuable test of the performance and usability of an XSLT 3.0 implementation, and the experience gained from writing this application can feed back improvements to the XSLT processor that will benefit a large range of applications.


Table of Contents

Introduction
The Validation Task
Design Considerations
Generic Stylesheet or Generated Stylesheet?
Subset of XSLT 3.0
Streaming
Typed data
Support for xsi:schemaLocation
Implementation
Use of Maps for Returned Values
Declaring Map Types
Assessment against Complex Types using Finite State Machines
Checking Assertions
Other Complications
Results
Conformance
Usability
Performance
Conclusions