RE: Crazy idea: loopback namespace

Subject: RE: Crazy idea: loopback namespace
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 25 Feb 2000 11:37:53 -0000
> 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


Current Thread