Re: The Lazy Syntax for XSLT, or TLSX

Subject: Re: The Lazy Syntax for XSLT, or TLSX
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Fri, 25 Feb 2000 21:08:31 +0000

Kay Michael wrote:
> > But doesn't that go against the whole spirit of the "XXX" effort?
> If the spirit of the XXX effort is that the only acceptable way of
> representing syntactic structure is to use angle brackets, then why are the
> words in the above sentence separated by spaces?
Because processing the above sentence correctly requires a wetware

Actually I'm open to persuasion on the syntax issue, though I think you
could do a lot of simplification within XML constraints.


ps: in the absence of the xsl-list archive, who remembers this from
James Clark last year?:

Francis Norton wrote:

> I was thinking of an extension to XSLT (I know, it's too late for this
> version).
> Something like:
> > <xsl:function name="reverse" namespace:fn="">
>         <xsl:param name="string" />
>         <xsl:if test="$string">
>                 <xsl:value-of select="fn:reverse(substring($string,2))" />
>         </xsl:if>
>         <xsl:value-of select="substring($string,1,1)" />
> </xsl:function>
> so I could then call it with
> <xsl:stylesheet indent-result="yes" default-space="strip"
>         xmlns:xsl="";
>         xmlns:fn="">
> ...
> <xsl:value-of select="fn:reverse('able was I ere I saw Elba')" />

The trouble with that is that functions would only be able to return
result tree fragments. I had been thinking of something like:

<xsl:variable name="reverse"
          (concat($s ? $reverse(substring($s,2)) : '',

<xsl:value-of select="$reverse('able was I ere I saw Elba')"/>

Something like you suggest would be useful too (I would think of it as a
way to call named templates from functions).

There are plenty of interesting possibilities for XSLT/XPath v2.

 XSL-List info and archive:

Current Thread