Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Convert CSV To html via XSLT [Thread Next] Re: Convert CSV To html via XSLTTo: NULL Date: 6/1/2007 11:23:00 PM > I really think that what we say we're converting really > should be the input document, which still needs to be XML (as far as I > know, not really having followed XSLT2! :-) ) In XSLT 2.0 it is not necessary to have an input xml document and XSLT 2.0 can be used to read any text file (not only xml) using the standard function unparsed-text(). In both cases quoted by David Carlisle XSLT is used to read and process non-xml text. > The fact that we could import a separate text document and process it > instead of the actual input document is akin to saying that we can > extract square roots with XSLT or solve the Towers of Hanoi with > XSLT. In fact, XSLT is Turing complete: You'll surprize nobody that sqrt() is implemented entirely in XSLT. In fact this was done more than 5 years ago. The FXSL library offers comprehensive, pure XSLT implementation of most of the fundamental mathematical functions, such as powers, logarithms, trigonometric and hyperbolic trigonometric functions, inverse trigonometric, inverse hyper-trigonometric functions, finding the zeroes of any continuous function with one real argument (the roots of the equation f(x) = 0 ), generation of random numbers, numerical differentiation, numerical integration, Fibonacci numbers, prime numbers and primality checking, ..., ets. So, this is much more than just general theoretic considerations -- we have these functions implemented in XSLT and we have been using them for quite a long time. Using the LR Parsing Framework of FXSL it is now easy and straightforward to produce a parser for any LR(1) language -- this is how JSON is processed entirely in XSLT. Do read more about FXSL here: http://www.idealliance.org/papers/extreme/proceedings/xslfo-pdf/2006/Novatchev01/EML2006Novatchev01.pdf and here: http://fxsl.sourceforge.net/ Cheers, Dimitre Novatchev. "Scott Sauyet" <Scott.Sauyet@g...> wrote in message news:1180444018.047756.292340@p...... > David Carlisle wrote: >> Scott Sauyet wrote: >>> But XSLT will only work on XML documents. It won't even work on older >>> HTML that doesn't conform to XML standards. >> >> Never say never:-) [ ... ] >> >> XSLT2 can input text files, and has regex support which means you can >> parse all sorts of things, [ ... ] > > This is true, of course, and it'll teach me to open my mouth without > all the facts! :-) > > Still, I'm a little uncomfortable calling this a conversion of a CSV > using XSLT. I really think that what we say we're converting really > should be the input document, which still needs to be XML (as far as I > know, not really having followed XSLT2! :-) ) > > The fact that we could import a separate text document and process it > instead of the actual input document is akin to saying that we can > extract square roots with XSLT or solve the Towers of Hanoi with > XSLT. In fact, XSLT is Turing complete: > > http://www.unidex.com/turing/utm.htm > > But I still wouldn't suggest using XSLT to write your next chess- > playing program! > > -- Scott > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
