Subject: Re: [xsl] What is exciting in XSLT 2.0 (Was: Re: [xsl] parameters in XSLT 2.0) From: James Fuller <jim.fuller@xxxxxxxxxxxxxx> Date: Wed, 08 Jun 2005 14:14:24 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] What is exciting in XSLT , Bruce D'Arcus | Thread | Re: [xsl] What is exciting in XSLT , Colin Paul Adams |
Re: [xsl] What is exciting in XSLT , Bruce D'Arcus | Date | Re: [xsl] parameters in XSLT 2.0, Bruce D'Arcus |
Month |