Skip to topic | Skip to bottom
Home

Tesi
Tesi.SchemaPathImplementationsr1.4 - 22 Mar 2008 - 11:52 - PaoloMarinellitopic end

Start of topic | Skip to actions

Our SchemaPath Implementation

Overview

The current SchemaPath implementation is an XSLT-based preprocess that generates an XML Schema document that is then sent to an XML Schema validator according to the following image:

SchemaPath.gif

Given a SchemaPath document SP and an XML file X, the validation corresponds to a four step process as follows:

  1. The XSLT document T' is applied to the SchemaPath SP, obtaining a plain XML Schema S'.
  2. The metastylesheet (also an XSLT document) MT is also applied to the SchemaPath SP, generating an XSLT T".
  3. The stylesheet T" is in turn applied to X, thus obtaining the derived XML document X'.
  4. The XML document X' is validated against the XML Schema S' using a plain XML Schema validator.

X' and S' have the property that X' validates against S' in XML Schema if and only if X validates against SP in SchemaPath.

Links to the XSLT stylesheets

Here we provide links to the XSLTs used to perform the aforementioned transformations.

  • mt.xsl: The meta-stylesheet MT that has to be applied to the SchemaPath SP in order to obtain the intermediate stylesheet T', that in turn has to be applied to the XML document X.
  • t1.xsl: The stylesheet T1 that has to be applied to the SchemaPath SP in order to obtain the XML Schema S'.

These two XSLT files also require and use some additional library stylesheets for their working:

  • main_variables.xsl: Stylesheet included by both mt.xsl and t1.xsl, where some common and useful variables are defined.
  • utility.xsl: Stylesheet included by both mt.xsl and t1.xsl, where some useful and widely used named templates are defined.
  • default_priority.xsl: Stylesheet included by utility.xsl, that defines the needed named templates to calculate the default priority of an alternative of a conditional declaration (it has to be calculated for all the alternatives that do not explicitly provide a priority).
  • xpath_syntax_checker.xsl: The default priority of an alternative is calculated depending on the XPath condition associated to the alternative. Thus a syntactical analysis on such XPath is required, and this stylesheet (included by default_priority.xsl) provides the necessary templates to perform it.
  • classes.xsl: Stylesheet included by xpath_syntax_checker.xsl that provides the needed templates to check which grammatical class a character (of an XPath expression) belongs to.
  • BaseChar.xsl: Stylesheet included by classes.xsl that defines a named template to decide whether a character belongs to the grammatical class BaseChar (defined by XML 1.0) or not.
  • Ideographic.xsl: Stylesheet included by classes.xsl that defines a named template to decide whether a character belongs to the grammatical class Ideographic (defined by XML 1.0) or not.
  • CombiningChar.xsl: Stylesheet included by classes.xsl that defines a named template to decide whether a character belongs to the grammatical class CombiningChar (defined by XML 1.0) or not.
  • Digit.xsl: Stylesheet included by classes.xsl that defines a named template to decide whether a character belongs to the grammatical class Digit (defined by XML 1.0) or not.
  • Extender.xsl: Stylesheet included by classes.xsl that defines a named template to decide whether a character belongs to the grammatical class Extender (defined by XML 1.0) or not.

-- PaoloMarinelli - 06 Nov 2004
to top


You are here: Tesi > SchemaPath > SchemaPathImplementations

to top

Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Fabio's Wiki? Send feedback