RE: The Lazy Syntax for XSLT, or TLSX

Subject: RE: The Lazy Syntax for XSLT, or TLSX
From: Jeff Lansing <jeff@xxxxxxxx>
Date: Mon, 28 Feb 2000 19:07:26 -0800
I would suggest that the "the spirit of the XXX effort" is not that
syntactic structure is represented by angle brackets (or by spaces
either), but rather that syntactic structure is encoded in tags (and
that tags are specified by DTD's). And I would contrast that with
encoding syntactic structure in the control flow of a parser that
acepted things like
> var y = {call f {with x=3;}}

If I want to produce XSL like

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

then I use something like

<variable name="y" template="f" param="x" select="3"/>

with a DTD that tells me what those attributes are.

Then

<xsl:template match="variable">
<xsl:value-of select="@name"/>
  <xsl:element name="xsl:variable">
    <xsl:attribute name="name">
      <xsl:value-of select="@name"/>
    </xsl:attribute>
    <xsl:element name="xsl:call-template">
      <xsl:attribute name="name">
        <xsl:value-of select="@template"/>
      </xsl:attribute>
      <xsl:element name="xsl:with-param">
        <xsl:attribute name="name">
          <xsl:value-of select="@param"/>
        </xsl:attribute>
        <xsl:attribute name="select">
          <xsl:value-of select="@select"/>
        </xsl:attribute>
      </xsl:element>
    </xsl:element>
  </xsl:element>
</xsl:template>

gives me the XSL that I want to deliver, or install, or whatever.
(I hope I don't have to explain why this lengthy "meta-XSL" is not more
trouble than the target XSL is.)

Jeff


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


Current Thread