From: Simon Wright <simon@pushface.org>
Subject: Re: Calendar - leap seconds
Date: 01 Apr 2001 12:57:24 +0100
Date: 2001-04-01T11:57:49+00:00 [thread overview]
Message-ID: <x7vk854g7dn.fsf@smaug.pushface.org> (raw)
In-Reply-To: 200103311407.GAA00752@well.com
xanthian@well.com (Kent Paul Dolan) writes:
> And into my head full blown lept lust for a programming language
> whose source code syntax was SGML based, like HTML or VML:
>
> <pragma pname = "foo" pparm_the_first = "bar">
>
> <!-- lots of code -->
>
> <namespace nsname = "baz">
>
> <!-- lots more code -->
>
> </namespace nsname = "baz">
>
> </pragma pname = "foo">
Have you come across XSLT? A tiny fragment from my not-formally-announced
code framework generator at http://www.pushface.org/coldframe/ ..
<!-- Generate the individual components of the class identifier
or instance record. -->
<xsl:template match="attribute" mode="instance-record-component">
<xsl:text> </xsl:text>
<xsl:call-template name="attribute-name"/>
<xsl:text> : </xsl:text>
<xsl:call-template name="attribute-type"/>
<xsl:if test="initial">
<xsl:text> := </xsl:text>
<xsl:value-of select="initial"/>
</xsl:if>
<xsl:text>; </xsl:text>
</xsl:template>
Templates are slightly like subprograms; the outer one is a matcher,
which finds all the <attribute> nodes in (the current subset of) the
input document (but only operates in the "instance-record-component"
mode), while the target of <xsl:call-template name="attribute-type"/>
is only invoked when explicitly named .. <xsl:if test="initial">
succeeds if the current <attribute> element contains an <initial>
element .. <xsl:value-of select="initial"/> outputs the content of
said <initial> element .. loads more fun available!
> The last line could be just:
>
> </pragma>
I rather think this is required in SGML? not sure ..
prev parent reply other threads:[~2001-04-01 11:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-17 17:46 Calendar - leap seconds singlespeeder
2001-03-18 15:53 ` Wilhelm Spickermann
2001-03-19 3:47 ` Nick Roberts
2001-03-19 14:43 ` Robert A Duff
2001-03-19 20:10 ` Laurent Guerby
2001-03-20 10:26 ` Nick Roberts
2001-03-20 19:23 ` Laurent Guerby
2001-03-20 11:34 ` Joseph P Vlietstra
2001-03-20 13:08 ` Wilhelm Spickermann
2001-03-31 14:07 ` Kent Paul Dolan
2001-04-01 11:57 ` Simon Wright [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox