[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What is exciting in XSLT 2.0 (Was: Re: para
Bruce D'Arcus wrote: > > On Jun 8, 2005, at 7:37 AM, Dimitre Novatchev wrote: > >> With the introduction of xsl:function in XSLT 2.0 there are a number >> of extremely interesting and important topics that are now becomming >> more relevant but (I wonder why), are rarely discussed on this list. > > > Maybe because not that many people here are using 2.0, and those that > are are still learning about the possibilities? > > I'm a bit unique, I think: not only did I not have much experience > with XSLT 1.0 before starting my project, but I really didn't have any > significant programming experience. So I don't really understand most > of the issues you listed. That said, as my questions hinted at, I'm > appreciating that basic choices like whether and how to type a > parameter (or variable) are important. > actually, I too am surprised...but not really. With EXSLT one of the main reasons for its existence was to provide the facility to create functions...the funny thing is that almost (except for power users) no one used this module....I think that we underestimate the power of templates as both a reuse mechanism and primary processing method. It might have been a novel idea to continue from a template POV, providing all the xsl:function stuff in the context of xsl:call-template, though this is just semantics...I dont think XSLT 2.0 got functions wrong....actually keeping them a 2nd class citizen maybe validated by the little uptake.... personally, I think what is potentially useful is the building up of function libraries. BTW what is the current interaction of compiled stylesheets and XSLT 2.0...also can an XSLT 2.0 just have xsl:function definitions aka; <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:str="http://example.com/namespace" version="2.0" exclude-result-prefixes="str"> <xsl:function name="str:reverse" as="xs:string"> <xsl:param name="sentence" as="xs:string"/> <xsl:sequence select="if (contains($sentence, ' ')) then concat(str:reverse(substring-after($sentence, ' ')), ' ', substring-before($sentence, ' ')) else $sentence"/> </xsl:function> </xsl:transform> so libraries can be built up? cheers, Jim Fuller
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|