Subject: RE: [xsl] Want to process XHTML in my XSL stylesheets. From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Tue, 9 Jul 2002 13:41:14 +0100 |
> >I don't think an XSLT processor will ever be able to determine > >statically that the output of a stylesheet is guaranteed be valid > >XHTML. There may well be cases where it is able to determine > statically > >that it won't be valid, however. > > > Any specific reason for that (first) conclusion - for > instance, do you > have any feedback from XQuery implementors in this area? XQuery doesn't have the rule-based approach to tree construction that XSLT uses. They deliberately avoided it because it makes static typing so difficult. There are some things that happen in a stylesheet that make the analysis impossible, e.g. use of <xsl:element name="{expr}">. There are many other things that make the analysis impractical, for example if the stylesheet does <xsl:apply-templates select="*[position()>2]", you might have to infer that this can't select a <title> or <subtitle> element because those can only occur in the first two positions; or you have to infer that the template rule for match="para[1]" will always be fired before the one for match="para". In general that requires some quite powerful analysis. It's still very much an open question how much is achievable form static analysis of a stylesheet, but my suspicion is that in most cases the only type you can deduce for the result tree is "document". One reason for this is that I think most real stylesheets assume things about the source documents that are not actually explicit in the schema, things like "all rows will contain the same number of columns", and the stylesheet will actually fail if these assumptions prove wrong. > Moving even > further off-topic, any feedback on how suitable Haskell is for XML > processing? The Software AG XQuery prototype (QuiP)[1] is written in Haskell, and its developers are very enthusiastic about the language. [1] http://developer.softwareag.com/tamino/quip/ Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Want to process XHTML in , Francis Norton | Thread | Re: [xsl] Want to process XHTML in , David Carlisle |
[xsl] XSLTC and namespaces, irene_hall | Date | Re: [xsl] questions regd namespaces, subbu |
Month |