Re: Inline macros

Murray Altheim (
Thu, 25 Apr 1996 18:46:52 -0500

Message-Id: <v02110104ada5ab48e945@[]>
Date: Thu, 25 Apr 1996 18:46:52 -0500
To: Paul Prescod <>
From: (Murray Altheim)
Subject: Re: Inline macros

Paul Prescod <> writes:
>At 01:40 PM 4/25/96 -0700, David Ornstein wrote:
>>Is there some literal introduction character we could use (back tick or
>>something) that would allow the lexer to simply gobble this stuff up into
>>one big binary chunk?  This would allow something like:
>><mimesection type=txt/x-funk>
>>`%my(funcky, macro);
>>more stuff in the funk language`
>You are both trying to reinvent SGML marked CDATA sections. There is no need
>to reinvent it. It does exactly what you are suggesting. Most SGMLers
>consider it a Bad Idea to mix SGML and non-SGML data in the same file, but
>if you want to do it, SGML already allows it.
> Paul Prescod

And it's not syntactically ugly or complicated, won't make your palms hairy
or anything. Given that HTML is *an application of SGML* it is already part
of HTML. Because this feature is simply not available in *most* browsers
doesn't make it invalid HTML. No need to reinvent anything here, folks:
Just implement what is already there.

('MSC' is SGML-eze for 'marked section close', which is ']]'.)

    <![ CDATA [
        -- any durned thing in here you want except MSC --
    (This file must be converted with BinHex 4.0)

That's it. Not much of a barn burner. And legal, just not widely supported.

Oh, just read David O's latest message. MSC is not ']', rather ']]', so I
don't think that's so much of an issue. You mention describing a chunk --
well, that can be done several ways. One way it could be done in
'SGML-savvy HTML' (for lack of a better term) which would keep the SGML and
non-SGML data distinct by declaring an entity that refers to your non-SGML

  -- sample embedding ----

    <!DOCTYPE HTML PUBLIC "-//Spyglass//DTD HTML 2.0 Extended//EN"
                          "" [
    <!ENTITY foo SYSTEM "" >
    <TITLE>Document Title</TITLE>
    <P>Here's some embedded doodad: <![ CDATA [&foo;]]> </P>


The 'SGML Bad Idea' (but still legal) would simply be putting the contents
of 'foo.sit.hqx' in the place of '&foo;', which is what the processing
system is doing anyway.

Declaration subsets (the [part] after the PUBLIC and SYSTEM references in
the above DOCTYPE declaration) are a common SGML structure. We just don't
see them in this neck of the woods much.


     Murray Altheim, Program Manager
     Spyglass, Inc., Cambridge, Massachusetts
     email: <>
     http:  <>
            "Give a monkey the tools and he'll eventually build a typewriter."