[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: following-sibling and xsl:sort

Subject: Re: following-sibling and xsl:sort
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 29 Apr 2005 23:49:15 +0100
following sibling example
   > > 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.