This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ShoXS: a Shorter XSL Syntax


Thanks for pointing out that link. You are right, I did not know about
XSLScript.

The idea is the same, but the approach is slightly different: there is no
such thing as a ShoXS file or a ShoXS processor. ShoXS is just the 
syntax you use to edit XSL and display it in an editor, but you would 
not save ShoXS but XSL.

Remco

----- Original Message -----
From: "Michael Kay" <michael.h.kay@ntlworld.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Wednesday, June 05, 2002 10:26 AM
Subject: RE: [xsl] ShoXS: a Shorter XSL Syntax


> You seem to have developed this independently from Paul T's XSLScript,
> see http://www.pault.com/pault/prod/XSLScript
>
> Michael Kay
> Software AG
> home: Michael.H.Kay@ntlworld.com
> work: Michael.Kay@softwareag.com
>
> > -----Original Message-----
> > From: owner-xsl-list@lists.mulberrytech.com
> > [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of
> > Remco Bouckaert
> > Sent: 04 June 2002 20:28
> > To: xsl-list@lists.mulberrytech.com
> > Subject: [xsl] ShoXS: a Shorter XSL Syntax
> >
> >
> > The last two year I have been doing quite a bit of
> > XSL scripting, but after a while I found the
> > syntax to be a bit too verbose to my taste. So, to
> > help do the scripting I put together a little tool
> > that translates XSL to a more compact syntax, edit
> > in that syntax and translate back to XSL. This syntax
> > is ShoXS (SHOrter Xsl Syntax, you get it:-).
> >
> > ShoXS is a bit Javascript-ish, as far as XSL allows
> > this. Just to give an impression, an XSL fragment
> > from the XSL FAQ and its ShoXS equivalent:
> >
> > ===============================XSL===============================
> >
> > <xsl:template name="displayyear">
> >     <xsl:param name="yearlist"/>
> >     <xsl:variable name="year"
> >         select="substring-before($yearlist,',')"/>
> >     <xsl:choose>
> >         <xsl:when test="string-length($year) > 0">
> >             <td><xsl:value-of select="$year"/></td>
> >             <xsl:call-template name="displayyear">
> >                 <xsl:with-param
> >              name="yearlist"><xsl:value-of
> >              select="substring-after($yearlist,',')"/>
> >                </xsl:with-param>
> >             </xsl:call-template>
> >        </xsl:when>
> >         <xsl:otherwise>
> >              <td><xsl:value-of select="$yearlist"/></td>
> >         </xsl:otherwise>
> >     </xsl:choose>
> > </xsl:template>
> >
> > ===============================ShoXS==============================
> >
> > fun displayyear {
> >     par yearlist=""{}
> >     var year="substring-before($yearlist,',')"{}
> >     switch {
> >         case(string-length($year) > 0) {
> >             <td>val($year)</td>
> >             call displayyear {
> >                 wpar yearlist=""{val(substring-after($yearlist,','))
> >                }
> >             }
> >         }
> >         default{
> >              <td>val($yearlist)</td>
> >         }
> >     }
> > }
> >
> > ===================================================================
> >
> > If you want to see a bit more about ShoXS, have
> > a browse on http://www.xm.co.nz/ShoXS.htm where you
> > can find ShoXSPad, a notepad like tool to toggle between
> > XSL and ShoXS. A bit more useful is a version integrated
> > in jEdit, which I use myself.
> >
> > It should be easy to get to grips with ShoXS if you know XSL:
> > just key in the XSL, toggle to ShoXS and look at the ShoXS
> > equivalent.
> >
> > Let me know if you have any constructive comments or
> > suggestions (or find any bugs).
> >
> > Enjoy,
> >
> > Remco
> > rrb@xm.co.nz
> >
> >
> >
> >
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> >
> >
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]