473,549 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xslt 2.0 missed the point?

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.
Jan 28 '07 #1
3 3315
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
Jan 28 '07 #2
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" <sh*******@wana doo.frwrote in message
news:sh******** *************** ******@news.wan adoo.fr...
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.

Jan 28 '07 #3
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" <sh*******@wana doo.frwrote in message
news:sh******** *************** ******@news.wan adoo.fr...
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.


Jan 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2882
by: Iain | last post by:
I want to create an XML configuration file which might look like <REGION Name="Europe" WingDing="Blue"> <COUNTRY Name="UK" WingDing="white"> <TOWN Name="London" WingDing="Orange" /> </COUNTRY> </REGION> <REGION Name="NorthAmerica" WingDing="Yellow"> <COUNTRY Name="Canada"> <TOWN Name="Quebec" WingDing="Brown" />
1
2909
by: Rhino | last post by:
Can anyone point me to a good free XSLT Tutorial online? I looked for some a few months ago and didn't find anything very good. I'm hoping some of the experts here can point me to a good XSLT tutorial..... -- Rhino --- rhino1 AT sympatico DOT ca "There are two ways of constructing a software design. One way is to make it
3
2241
by: Jack Fox | last post by:
I've never had the need to work with XML, but I believe I now have an appropriate application. I have time-series data in objects organized as a tree that I want an ASP.NET program to write out to web pages formatted as a matrix. It is not a simple matrix, since the number of row heading cells can vary, but the data cells must be aligned by...
3
1998
by: thomas.porschberg | last post by:
Hi, I want to read records from a database and export it in an arbitrary format. My idea was to feed a class with a String array fetched from the database and let this class fire SAX events as processor input. The basic class hierarchy is:
18
2052
by: yinglcs | last post by:
Hi, I have a newbie XSLT question. I have the following xml, and I would like to find out the children of feature element in each 'features' element. i.e. for each <featuresI would like to look up what each feature depends on and gerenate a text file. For example, in the following file, I would like to find out feature A depends on A1...
2
1687
by: Adam dR. | last post by:
I have an xml file similar to: <menu> <menuitem name="home" show="false"/> <menuitem name="about" show="true"/> <menuitem name="links" show="true"/> <menuitem name="games" show="true"/> <menuitem name="learn" show="true"/> <menuitem name="order" show="true"/> <menuitem name="contact" show="true"/> <menuitem name="support" show="false"/>
8
15883
by: Hercules Dev. | last post by:
Hi all, I'm new in xslt and xpath, so my question might be simple but i'm learning. I have an XML document and need to transform it into another XML, I use xslt and it works, but there is a case that i don't know how to solve, I need to concat a string from multiple childs into a standard way, the following is an example of the source...
2
3039
by: groo78 | last post by:
Hi, I have an XML document that I need to convert to XHTML and I would like to use XSLT. I have attempted transformations using javascript and it works fine. The problem I have is that I need to transform my XML document into multiple DIVs which I can access individually and place in different locations around my page. Is it better to...
3
4514
by: joelkeepup | last post by:
Hi, im trying to create a text email message using xslt template , the transforms work great, but the newlines and whitespace in the xslt doc are removed. Is there a setting somewhere I have missed: My template is: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ Transform"...
0
7521
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7451
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7473
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1944
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1061
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
764
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.