Asir S
Vedamuthu has announced
a W3C XML Schema for XSLT
1.0 that can validate the structure of XSLT stylesheets and can be used in
conjunction with schemas of target
vocabularies to pre-validate the generated documents.
The schema, using advanced object-oriented features of W3C XML Schema such as groups
of elements and attributes and substitution groups, captures all the structural
constraints of the XSLT 1.0 recommendation; except a point raised as a W3C XML
Schema issue
by James Clark, that has been solved by the latest PR (16 March 2001):
The wildcard facility in
XML Schemas doesn't seem to handle the case of xsl:stylesheet, which allows
specific elements from xsl namespace plus any element whose namespace URI is
both not XSL and not absent.
It defines
its own version of the QName simple type to match the definition from the XSLT
specification, after a workaround
for another comment from Clark:
It occurred to me that an
XSLT-like QName datatype which doesn't apply the default namespace to
unprefixed values (ie treats them like attribute names rather than element
names) can be simulated in XML Schemas by a union of 1/ NCName, and 2/ a
restriction of QName using the pattern facet to require a colon.
Literals in
the stylesheets are allowed though a group of elements that can be redefined to
perform some pre-validation on target vocabularies.
Although the
schema; authored by Asir S Vedamuthu (webMethods) acknowledges the contribution
of James Clark and is described in its comments as "a product of the W3C
XML Schema WG Task Force for authoring schema
for W3C Recommendations as an illustration of the XML Schema Language",
it has been announced as the "webMethods' XML Schema for XSLT 1.0"
and is available on the webMethods web site.