[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: New XSL Optimization
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: restrictions: 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' elements 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. -- Francis Norton. Air Rage - a "flight *and* fight" reaction? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|