Re: <xsl-script>

Subject: Re: <xsl-script>
From: Rick Geimer <rick.geimer@xxxxxxx>
Date: Tue, 11 May 1999 16:56:13 -0700
>
> <xsl:template match="P">
>   <paragraph><xsl:apply-templates></paragraph>
> </xsl:template>
>
> <xsl:template match="INS">
>   <underline><xsl:apply-templates></underline>
> </xsl:template>
>
> <xsl:template match="INS[@author='john']">
>   <underline><bold><xsl:apply-templates></bold></underline>
> </xsl:template>
>
> <xsl:template match="DEL">
>   <strike><xsl:apply-templates></strike>
> </xsl:template>
>
> Here's where you can prove me wrong. Show me how this would look in your
> favorite programming language with an appropriate function library.

A sample in my favorite language, without a function library :-)

    down-translate    ;    start OmniMark program

    element P
        output "<paragraph>%c</paragraph>%n"

    element INS when not attribute author matches (value-start  'john' value-end)

        output "<underline>%c</underline>%n"

    element INS when attribute author matches (value-start  'john' value-end)
        output "<underline>%c</underline>%n"

    element DEL
        output "<strike>%c</strike>%n"

Rick Geimer
National Semiconductor
rick.geimer@xxxxxxx


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


Current Thread