[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] following-sibling and xsl:sort
Subject: Re: [xsl] following-sibling and xsl:sort From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 29 Apr 2005 23:49:15 +0100 |
> > Therefore, any problem, which has solution using the xxx:node-set() > > extension function should have a solution without using it. > > I tend to disagree with that statement. Me too. Turing completeness is not the same as closure over the data model. To take an obvious example, there is no way of creating a result tree that contains an unparsed entity, even though the data model allows unparsed entities to exist. Closer to the hypothesis in question, I don't believe it is possible in XSLT 1.0 without the xx:node-set() extension to create a result tree containing a namespace that is declared in neither the source document nor the stylesheet, if the result tree contains no element or attribute whose name is in that namespace. Michael Kay http://www.saxonica.com/ In one pass of course. You can always avoid node-set if you are prepared to use multiple stylesheet executions. To expand on Mike's point, Turing completeness only means that you can execute a program which models any computation. It doesn't mean that you can actually obtain a given output from a given input. For example the example mentioned earlier of implementing a JVM. A real JVM that accepts normal java classes probably requires some byte sequences that can't be written by XSLT as they are not allowed in XML. However if efficency isn't your concern (and no one programming a machine whose only storage device is an infinite paper tape should care about efficiency) Then clearly one could design an equivalent virtual machine that accepts the byte sequences of a java class as (say) ascii encoded decimal numbers. It may be theoretically possible to implement a program which acts as a virtual machine for such input. Note however that any proof that xslt is "turing complete" must have some model of an infinite storage device somewhere. Given that encoding things in XSLT1 isn't particularly easy, in real cases you may find that your infinite paper tape becomes very short, and you can't actually do many real sized examples. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] following-sibling and xsl, Dimitre Novatchev | Thread | Re: [xsl] following-sibling and xsl, Elliotte Harold |
RE: [xsl] following-sibling and xsl, Wendell Piez | Date | Re: [xsl] following-sibling and xsl, Elliotte Harold |
Month |
Keywords