Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Convert CSV To html via XSLT

From: "Dimitre Novatchev" <dimitren@---.---.-->
To: 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
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent