NiceXSL logo Contents Download Update-Site NiceXSL logo

NiceXSL

NiceXSL defines a conventional textual representation of XSL that is more amenable to conventional editing. XML overheads are much reduced and abbreviated syntaxes are provided for all XSLT 2.0 constructs.

NiceXSL is supported by translators to and from standard XSLT. (The translation from XSLT is of course written in NiceXSL and then translated to XSLT to provide a stylesheet to perform the reverse transformation).

Example

The compatibility example from Section 3.9 of the XSLT 2.0 working draft:

<xsl:stylesheet version="17.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <xsl:choose>
      <xsl:when test="system-property('xsl:version') >= 17.0">
        <xsl:exciting-new-17.0-feature/>
      </xsl:when>
      <xsl:otherwise>
        <html>
          <head>
            <title>XSLT 17.0 required</title>
          </head>
         <body>
          <p>Sorry, this stylesheet requires XSLT 17.0.</p>
          </body>
        </html>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
</xsl:stylesheet>

can be expressed using NiceXSL as

stylesheet version="17.0" {
  match (/) {
    if (system-property('xsl:version') >= 17.0)
      <xsl:exciting-new-17.0-feature>;
    else {
      <html
        <head
          <title "XSLT 17.0 required">
        >
        <body
          <p "Sorry, this stylesheet requires XSLT 17.0.">
        >
      >
    }
  }
}

A more realistic example is provided by reverse engineering the pow stylesheet of FXSL.

A more substantial example is provided by the source and the generated stylesheet for the XSL to NIceXSL reverse translator. This also demonstrates pretty printing of awkward characters.

See language.html for a language description.

See NiceXML.html for a full NiceXML syntax summary.

See NiceXSL.html for a full NiceXSL syntax summary.

Download NiceXSL from http://sourceforge.net/projects/nicexsl.

or use the Eclipse Install/Update facility via http://nicexsl.sourceforge.net/update-site.


Edward D. Willink
14 February 2004