Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xslt 2.0 missed the point?

Reply
Thread Tools

xslt 2.0 missed the point?

 
 
shaun roe
Guest
Posts: n/a
 
      01-28-2007
mild rant follows

Working now for a couple of years with xslt and now xslt 2.0, does
anyone else get the impression that xslt 2.0 somehow missed the point?
Yes its got a fancy new data model (and thank goodness for the new
grouping functions), but where are the functions which would really have
made it useful without taxing the implementers? e.g trigonometry
functions for SVG; square root /log function to do simple statistics?
hex/ dec conversions which dont need 50 lines of extraneous code?
i.e. practical functions, implementable in a web browser which would not
mean re-writing the whole thing from the ground up, and which would have
done a lot more to popularize its usage.

There's plenty of room here for a XSLT 1.5 standard implemented
retroactively...

ok that was it. I'll get back in my box now.
 
Reply With Quote
 
 
 
 
Joe Kesselman
Guest
Posts: n/a
 
      01-28-2007
shaun roe wrote:
> but where are the functions which would really have
> made it useful without taxing the implementers?


XSLT is a specialized language for XML transformation. It's not a full
general-purpose language, and there are things which it considers out of
scope.

This is pretty trivially fixed, of course -- plug in extension functions
like the EXSLT library. XSLT 2.0 improved the ability to write them in
XSLT itself, and even XSLT 1.0 had the ability to call out to code
written in other languages (details of the API for doing so weren't well
standardized, but the XSLT end of it was). Trig in particular is pretty
easy to do either way; do a series implementation in XSLT or call
existing (eg Java) trig functions externally.

If you really think something should be a standard feature of XSLT
itself, the best way to promote the idea is to implement it and
demonstrate that there's sufficient uptake to make folding it into the
standard worthwhile. I cited EXSLT; some of EXSLT's features *did* make
it into 2.0 because they were clearly valuable to a wide enough slice of
XSLT's user base. Others didn't.

Finally: There are deliberate tradeoffs in languages tuned for specific
tasks. Sometimes the right answer really is to say "That's nice, but I
have to implement my own solution." XSLT's a good thing, but it does not
replace all possible processing of XML and isn't intended to. Sometimes
you need to code an additional processing stage (a postprocessor to
interpret trig functions would be trivial), or you really do need to
code a full processor youself. Nature of the beast. No matter how
complicated XSLT gets, there will *ALWAYS* be something that's better
handled another way.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
 
Reply With Quote
 
 
 
 
Dimitre Novatchev
Guest
Posts: n/a
 
      01-28-2007
> where are the functions which would really have
> made it useful without taxing the implementers? e.g trigonometry
> functions for SVG; square root /log function to do simple statistics?
> hex/ dec conversions which dont need 50 lines of extraneous code?
> i.e. practical functions, implementable in a web browser which would not
> mean re-writing the whole thing from the ground up, and which would have
> done a lot more to popularize its usage.


You are describing FXSL 2.x -- and it is ready for use.

Of course, to use the FXSL 2.x functions in a browser, one must first have a
browser with XSLT 2.0 support.

FXSL 1.x can be used (and has been used) in browsers.

Besides its main advantages (implementation of higher-order functional
programming in XSLT) FXSL provides the end user with functions(/templates in
XSLT 1.0) for:

- Recursion over a list

- Iteration (N times or conditional)

- Mapping of a list

- Filtering or splitting of a list

- Zipping of two and more lists

- Functional composition (and multi-pass transformation)

- sum/product of computed values (such as sum/product of units, sums of
products, sums of results of transformations of elements of a list,
hexadecimal arithmetic or arithmetic in any other numeric system)

- min(), max(), avg()

- Trigonemetric functions with controlled precision: sin(), cos(), tan(),
cotg(), sec(), cosec().

- Exponentiation and logarithmic functions: exp(), pow() (a^x), logy(X)

- Character-wize processing of strings and bitwize processing of bit
strings

- String processing -- tokenization, replacement, spelling checking,
finding most likely candidates for spelling correction,
concordance

- Random numbers generation -- sequences of random numbers from a given
interval or with pre-specified distribution, random
shuffling of a list, ..., etc.

- Finding prime numbers

- Generation of Fibonacci numbers

- Generation of permutations, combinations, etc. of elements of a set

More advanced features:

- The feans to write and evaluate Higher-Order Functions (HOF). Higher -
Order Functions are such functions that accept other functions as parameters
or return other functions as their result.



"shaun roe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> mild rant follows
>
> Working now for a couple of years with xslt and now xslt 2.0, does
> anyone else get the impression that xslt 2.0 somehow missed the point?
> Yes its got a fancy new data model (and thank goodness for the new
> grouping functions), but where are the functions which would really have
> made it useful without taxing the implementers? e.g trigonometry
> functions for SVG; square root /log function to do simple statistics?
> hex/ dec conversions which dont need 50 lines of extraneous code?
> i.e. practical functions, implementable in a web browser which would not
> mean re-writing the whole thing from the ground up, and which would have
> done a lot more to popularize its usage.
>
> There's plenty of room here for a XSLT 1.5 standard implemented
> retroactively...
>
> ok that was it. I'll get back in my box now.



 
Reply With Quote
 
Dimitre Novatchev
Guest
Posts: n/a
 
      01-28-2007
Sorry, pressed the wrong keys. Continuing the unfinished post:

> where are the functions which would really have
> made it useful without taxing the implementers? e.g trigonometry
> functions for SVG; square root /log function to do simple statistics?
> hex/ dec conversions which dont need 50 lines of extraneous code?
> i.e. practical functions, implementable in a web browser which would not
> mean re-writing the whole thing from the ground up, and which would have
> done a lot more to popularize its usage.


You are describing FXSL 2.x -- and it is ready for use.

Of course, to use the FXSL 2.x functions in a browser, one must first have a
browser with XSLT 2.0 support.

FXSL 1.x can be used (and has been used) in browsers.

Besides its main advantages (implementation of higher-order functional
programming in XSLT) FXSL provides the end user with functions(/templates in
XSLT 1.0) for:

- Recursion over a list

- Iteration (N times or conditional)

- Mapping of a list

- Filtering or splitting of a list

- Zipping of two and more lists

- Functional composition (and multi-pass transformation)

- sum/product of computed values (such as sum/product of units, sums of
products, sums of results of transformations of elements of a list,
hexadecimal arithmetic or arithmetic in any other numeric system)

- min(), max(), avg()

- Trigonemetric functions with controlled precision: sin(), cos(), tan(),
cotg(), sec(), cosec().

- Exponentiation and logarithmic functions: exp(), pow() (a^x), logy(X)

- Character-wize processing of strings and bitwize processing of bit
strings

- String processing -- tokenization, replacement, spelling checking,
finding most likely candidates for spelling correction,
concordance

- Random numbers generation -- sequences of random numbers from a given
interval or with pre-specified distribution, random
shuffling of a list, ..., etc.

- Finding prime numbers

- Generation of Fibonacci numbers

- Generation of permutations, combinations, etc. of elements of a set

More advanced features:

- The means to write and evaluate Higher-Order Functions (HOF). Higher -
Order Functions are such functions that accept other functions as
parameters
or return other functions as their result.

- Provide the means for the implementation and evaluation of
currying/partial-application

More about FXSL can be found on its home page:

http://fxsl.sf.net

and I'd recommend the last ExtremeMarkup Languages conference paper at:

http://www.idealliance.org/papers/ex...ovatchev01.pdf


Cheers,
Dimitre Novatchev



"shaun roe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> mild rant follows
>
> Working now for a couple of years with xslt and now xslt 2.0, does
> anyone else get the impression that xslt 2.0 somehow missed the point?
> Yes its got a fancy new data model (and thank goodness for the new
> grouping functions), but where are the functions which would really have
> made it useful without taxing the implementers? e.g trigonometry
> functions for SVG; square root /log function to do simple statistics?
> hex/ dec conversions which dont need 50 lines of extraneous code?
> i.e. practical functions, implementable in a web browser which would not
> mean re-writing the whole thing from the ground up, and which would have
> done a lot more to popularize its usage.
>
> There's plenty of room here for a XSLT 1.5 standard implemented
> retroactively...
>
> ok that was it. I'll get back in my box now.




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why the properties of web user controls which inherted from my custom base UI controls missed? ABC ASP .Net 0 11-21-2005 04:08 AM
User Web Controls properties missed. Bug? ABC ASP .Net 0 11-18-2005 01:29 AM
What is missed? Mr T Cisco 0 12-23-2004 08:39 PM
Drowning in 'access-list logging rate-limited or missed 1 packet' entries Joe Filla Cisco 0 12-04-2003 01:53 AM
"access-list logging rate-limited or missed <X> packets" John Caruso Cisco 5 10-29-2003 08:24 AM



Advertisments