Re: New XSL Optimization

Subject: Re: New XSL Optimization
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Sat, 26 Jun 1999 09:49:58 +0100

Jonathan Borden wrote:
>     This is an excellent article and raises several important issues. One
> that struck me is in regards to the question of validating transforms, e.g.
> that the result of an HTML -> HTML transform is valid against the HTML DTD.
> Paul notes that because such transforms are frequently carried out via
> turing complete general purpose languages, that such validation is
> impossible. I wonder what the effect of being side-effect free has on the
> ability to determine whether a result set conforms to a schema? Agreed,
> since XSL is "Turing complete" it is not possible to determine the general
> correctness of XSL programs, for example whether such programs will have
> infinite loops etc. Might it be possible to verify a restricted set of
> conditions?

I'm doing some XSLT hacking at the moment.

Intuitively it strikes me that you could validate a source-schema plus
transform against a target schema through some restrictions and steps:


1	all target elements and attributes to be created using literal names
2	no variables in control-flow expressions, particularly the 'match',
'select' or 'name' attributes of 'apply-templates' or 'call-template'

steps (very high-level, with lots of hand-waving):

1	extract from the stylesheet a map from source elements to possible
target elements
2	replace the source elements in the map with the containment structure
from the source schema
3	see if the resulting element structure is a subset of the official
target schema

Of course, none of the steps are exactly trivial, and the whole approach
is a hack compared to the approach contained in the Forest paper.

Did the designers of the xml Schema consider Forest Theory as a basis
for their proposal, given their unfulfilled mandate to look at the issue
of schema evolution?

Alternatively, have the Forest proponents considered offering an xml
schema standard together with some open source code (XSLT, or
JavaScript+DOM) as a proof-of-concept?

Francis Norton.

Air Rage - a "flight *and* fight" reaction?

 XSL-List info and archive:

Current Thread