W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

XSLT Comments from XML Schema, part 1

From: Xan Gregg <xan.gregg@jmp.com>
Date: Thu, 11 Sep 2003 08:57:44 -0400
To: public-qt-comments@w3.org
Message-Id: <892ACC4E-E457-11D7-A579-000393BB384C@jmp.com>

Dear colleagues:

The XML Schema Working Group congratulates the XSL Working
Group on their progress, and in particular on the 2 May 2003 Working
Draft of "XSL Transformations (XSLT) Version 2.0"
(http://www.w3.org/TR/2003/WD-xslt20-20030502/).

Below are our comments so far on XSLT 2.0.  We are still reviewing 
other aspects of your Draft, such as validation, and expect to have 
more comments for you.

Xan Gregg, on behalf of the XML Schema WG

-------------------------------------

2.8 Stylesheets and Schemas
http://www.w3.org/TR/xslt20/#d0e1456

The bulleted list at the end of this section contains the following
text:
    "If validation of a result tree fails (strictly speaking, if the
    outcome of the validity assessment is invalid), then the
    transformation fails, but if it succeeds, the element and attribute
    nodes of the tree will be annotated with the names of the
    schema-defined types to which these nodes conform."

We realize this is the introduction and some degree of imprecision is
necessary, but we suggest that the phrase "if it succeeds" be a little
more precise.   In particular, how does it relate to the validity
assessment of "notKnown"?  Perhaps replacing "if it succeeds" with
"otherwise" will meet your intent.

3.10 Importing Schema Components
http://www.w3.org/TR/xslt20/#import-schema
We appreciate your use of an import mechanism that parallels the import
in XML Schema.  The Schema WG has recently worked through some of the
subtleties of import, and we suggest you update your text to reflect
the following points:

1) A schema may contain components from multiple namespaces.
2) Importing a schema only allows those top-level components that are
in the specified namespace to be used by the importing document.
3) A schema does not have a namespace; only a schema document has a
namespace (via the targetNamespace attribute).
4) XML Schema does not define the behavior of importing a schema for
which there is not a schema document.
5) An XML Schema processor may decide to do nothing in response to an
import, and it is not an error unless some component of the imported
schema is ever referenced in the importing document.

   "The xsl:import-schema declaration is used to identify schema
   components (that is, the names of type definitions and element
   and attribute declarations) which need to be available statically,
   that is, before any source document is available. "

We suggest you avoid treating components and their names as the same
things.

   "After discarding any xsl:import-schema declarations under the
   above rule, the effect of the remaining xsl:import-schema
   declarations is the same as the effect of importing a single
   hypothetical schema that consists entirely of xs:import elements
   corresponding one-for-one with the xsl:import-schema declarations
   in the stylesheet, ..."

Not quite true because of the above points.  Note that the behavior of 
a schema processor, presented with the schema document you describe, is 
non-deterministic.

   "Conflicts (multiple definitions of the same name) are handled as
   defined in [XML Schema], assuming that all the imported definitions
   are assembled into one schema using the process described above."

We suggest a general rule saying 'All errors which conformant schema 
processing produces during this process are reflected as static XSLT 
errors'.  This will cover the prose quoted above as well as many other 
cases. Note that there are other obscure ways (besides name collisions) 
in which two valid schemas can be invalid when combined.  For example, 
"action-at-a-distance" features like substitution groups and wildcards 
can cause UPA violations.

   "[ERR024] It is a static error if the processor is not able to locate 
a
   schema using the namespace and/or schema-location attributes , or if
   the document that it locates is neither a valid XML Schema nor any
   other resource that the implementation can process.

   [ERR025] It is a static error if both the namespace and the
   schema-location attributes are specified, and the schema that is
   located is not a schema for the specified namespace.

   [ERR026] It is a static error if the schema-location attribute is
   omitted, and the namespace attribute identifies a namespace whose
   schema is not known to the XSLT processor."

In these error descriptions and in the above "importing a single
hypothetical schema", we suggest you make the proper distinction
between schema and schema document.
Received on Thursday, 11 September 2003 08:58:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:49 UTC