[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: Crazy idea: loopback namespace


Subject: RE: Crazy idea: loopback namespace
From: "Julian Reschke" <reschke@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Feb 2000 15:23:37 +0100

Actually,

it seems it would be an interesting test to write an XSLT stylesheet that
translates XSLT to TLSX. Might be useful for documenting existing XSLTs...

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Kay Michael
Sent: Friday, February 25, 2000 12:38 PM
To: 'xsl-list@xxxxxxxxxxxxxxxx'
Subject: RE: Crazy idea: loopback namespace


> I am finding the param/call-template syntax of XSL to be
> quite clumsy. It does work, it is just very verbose.

I toyed around recently with devising an abbreviated syntax for XSLT - I
thought of calling it The Lazy Syntax for XSLT, or TLSX. It would not be an
XML syntax, but would be trivially transformable into the current syntax.
Examples:

(1)
<xsl:variable name="x" select="$y * 2"/> becomes
var x = $y * 2;

(2)
<xsl:variable name="x"><xsl:text>Z</xsl:text></xsl:variable> becomes
var x = {text {Z}}

(3)
<xsl:variable name="y">
  <xsl:call-template name="f">
    <xsl:with-param name="x" select="3"/>
  </xsl:call-template>
</xsl:variable>

becomes

var y = {call f {with x=3;}}

(4)
<xsl:template name="fred">
  This is Fred
  <tr>
    <xsl:for-each select="joe">
       <td valign="top"><xsl:value-of select="jane"/></td>
    </xsl:for-each>
  </tr>
</xsl:template>

becomes

template name=fred {
  put "This is Fred";
  put tr att="1" {
     for-each joe {
        put td valign=top {get jane}
     }
  }
}

Any takers? Any students wanting an interesting project?
(Don't ask for the full spec - it doesn't exist!)

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords