Subject: Re: Template repository (Was: Re: [xsl] Re: namespace values) From: cutlass <cutlass@xxxxxxxxxxx> Date: Wed, 14 Mar 2001 11:10:36 +0000 |
OK, let's do this. I agree that it could feed [the core] EXSLT with new functionality, in just the same way as a function repository would.
I think it would be appropriate to use the same namespaces for the templates as we use for the EXSLT modules, to have them under the same umbrella, but I can see some people objecting that these templates aren't extensions. On the other hand, the divisions between the
i like this idea, but maybe we would like to eventually 'extract' a library for each specific xsl parser, so we should think about a transform, to do this, on the above example template or maybe seperating versions using modes and xsl:includes; prob too cumbersome that.
It'll be fairly simple to change the exsl:function definitions into similar templates to do roughly the same thing, so I'll do that. One thing, though - should I include within them shortcuts using implementation-specific functions. For example:
<xsl:template name="math:min"> <xsl:param name="node-set" select="/.." /> <xsl:choose> <xsl:when test="function-available('saxon:min')"> <xsl:value-of select="saxon:min($node-set)" /> </xsl:when> ... <xsl:otherwise> <!-- XSLT recursive template --> </xsl:otherwise> </xsl:choose> </xsl:template>
Dave, do you want to host this and the function repository? I can send you the stylesheets and put in RDDL links from the EXSLT pages to them. Or I can host them here.
I really like Colin Muller's idea of basing the repository around conformance tests. If you have an idea for a template, then you should also submit one or more examples of the:
(a) source XML [if appropriate] (b) template call (c) desired output
If you have the template itself, so much the better. A while ago I actually wrote an XSLT stylesheet to do use case testing automatically. I'll tidy that up and make it available so that we can use it.
As I've been thinking about the function repository, I've been thinking about an XML structure to hold the pertinent information about the functions; we need something similar for a template repository as well. If anyone would like to work on designing that XML format, please stick up your hand. It will make submissions a lot easier if we have it.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Template repository (Was: Re: [xsl], Jeni Tennison | Thread | Re: Template repository (Was: Re: [, Jeni Tennison |
RE: [xsl] Selecting a descendant ch, Peter McEvoy | Date | Re: [xsl] Functional programming in, Alexey Gokhberg |
Month |