Announcing LAML: Using Scheme as a markup language 
Author Message
 Announcing LAML: Using Scheme as a markup language

With this message I want to announce the LAML software package.
LAML means 'Lisp Abstracted Markup Language'. The idea is to use
Scheme as a markup language instead of HTML or XML. With this,
a document with markup in reality becomes a Scheme program.
Processing f.laml will - in the simple cases - give a file f.html.
In more advanced settings, a number of different html files
can be generated.

The main advantage of this approach is that abstraction and
programmed solution is uniformly available in our LAML documents.
Also, it is easy and attractive to make CGI programs using LAML
solutions (via a particular cgi library which we provide).
The main disadvantage is that textual components in a document
needs to be written as strings in Scheme. We provide some useful
Emacs editor support to alleviate the burden of embedding substrings
into Scheme forms.

The LAML package includes a library with many useful capabilities.
The most central is a mirroring of HTML in Scheme. With this
there exists a Scheme function for each common HTML tag.
Besides this, there are many other useful Scheme functions,
which are useful when we work with textual LAML documents in Scheme.

We support a number of styles in LAML:

  * A manual style, which allows us to produce HTML manuals of
    Scheme functions.
  * An advanced lecture note style, LENO, which allows to make
    slides and annontated slides.
  * A literate-like system supporting elucidative programming.
    A Scheme eludicator tool produces internal documentation of
    a Scheme program.
  * A course home page system.
  * and more...

We we also have a number of LAML tools:

  * Schemedoc which extracts documentation comments from Scheme sources.

    This can be used together with the manual style to produce manuals
    of Scheme libraries. All major LAML libraries are documented using
this
    tool.
  * A calendar generator.
  * A tool which provides for mirroring HTML in Scheme
  * and more...

I have written two papers about the LAML approach.
These can found on the LAML home page:

  http://www.*-*-*.com/ ~normark/laml/

The LAML software package runs on both UNIX and Windows.
It relies on a Scheme system such as SCM (UNIX) or MzScheme
(Windows). We have also made quite useful support of LAML in Emacs.

The LAML software together with the Emacs facilities can be downloaded
as free software from

    http://www.*-*-*.com/ ~normark/scheme/index.html

The installation proceeds by running a Scheme program on a
configuration file with less than 10 settings.

Included in the download bundle is also a number slides, which
explain our approach in further details. The slides are produced
using the LAML based LENO system.

I find LAML very useful in my daily life, where I make a lot
of WWW pages. Using LAML can make much more complex
pages, because abstraction and automation (in terms of programmed
solutions) is uniformly available.

I would appreciate any feedback about LAML from people in the
Scheme community.

Kurt N?rmark
Department of Computer Science
Aalborg University, Denmark.


http://www.*-*-*.com/ ~normark



Mon, 06 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language

Quote:

> What I would find more interesting would be to see a mechanism that
> could take DocBook as input, turn it into S-expressions (which
> wouldn't be hard to do using the output of SGMLS), and then allow the
> gentle user to have *that* as the programmable markup language, which
> could then be, on demand:

I haven't read all the details of DocBook, and it looks a little too
SGML-happy to me.  Nevertheless, a good starting point might be the
PLT Scheme XML collection.  You can read XML documents into
s-expressions, and vice versa.  We use a stylized form of s-expression
called x-expression; not all s-exps are x-exps but, importantly, all
x-exps are s-exps.  This lets you harness the full power of Scheme's
generic list operators.

The interesting problem is still validation.  The folks at Emergent
Technologies produced a collection called SchemeCGI for PLT Scheme
some years back; this is extremely similar in spirit to LAML.  By
using procedures as the representation of tags, these libraries can
validate data directly.  (SchemeCGI did this; I assume LAML does too.)
You lose this with a generic representation.  On the other hand, it's
a massive pain to keep these validators up-to-date in the face of
constantly changing standards.  A more fruitful approach is to instead
generate validators automatically from DTDs/Schemas.  (We have a cute
little application along these lines in our paper at PADL 2000 that
shows why Schemas are preferable to DTDs.)

In the end, for data longevity, I prefer to use an XML language rather
than some custom format such as LAML's, like Chris Browne says.  If
the antichrist should strike and all Scheme's be erased from the face
of this earth, I could always learn something wretched like XSLT to
transform my data.  Of course, -- I pause to wonder -- if all the
Scheme's were erased, what would be the point to living?

<shriram/>



Mon, 06 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language
Have a look at

        http://www.xs4all.nl/~jantien/yodl/

also.

Regards, WH.



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language


Quote:
>With this message I want to announce the LAML software package.
>LAML means 'Lisp Abstracted Markup Language'. The idea is to use
>Scheme as a markup language instead of HTML or XML. With this,
>a document with markup in reality becomes a Scheme program.
>Processing f.laml will - in the simple cases - give a file f.html.
>In more advanced settings, a number of different html files
>can be generated.

... Material elided...

Quote:
>I would appreciate any feedback about LAML from people in the
>Scheme community.

This looks *rather* interesting...

I've adopted DocBook as my "markup language of choice," and would find
it onerous to transfer over to something that can *only* deploy output
in HTML form.

<http://docbook.org/> has more details about that format; it's
definitely rather richer than HTML...

What I would find more interesting would be to see a mechanism that
could take DocBook as input, turn it into S-expressions (which
wouldn't be hard to do using the output of SGMLS), and then allow the
gentle user to have *that* as the programmable markup language, which
could then be, on demand:

a) Transformed into DocBook, for rendering into HTML/RTF/whatever
   other formats people can turn that into, using DSSSL, or
b) Perhaps directly into HTML, using LAML-like tools.
--
Rules of the Evil Overlord #42. "I will see to it that plucky young
lads/lasses in strange clothes and with the accent of an outlander
shall REGULARLY climb some monument in the main square of my capital
and denounce me, claim to know the secret of my power, rally the
masses to rebellion, etc. That way, the citizens will be jaded in case
the real thing ever comes along."
<http://www.eviloverlord.com/lists/overlord.html>



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language


Quote:
>With this message I want to announce the LAML software package.
>LAML means 'Lisp Abstracted Markup Language'. The idea is to use
> ....

Thanks for putting the work into it to make laml. It looks good to me
and i will give it a try. Have you ever thought of other backends than
html? In some kind of way, I have to think about unroff, an elk scheme
application which translates roff markup to different output formats
(http://www-rn.informatik.uni-bremen.de/software/elk/proj.html).

greetings,

Marc

--
------------------------------------------------------------------------------
email: marc dot hoffmann at users dot whh dot wau dot nl
------------------------------------------------------------------------------



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language

+---------------
| Of course, -- I pause to wonder -- if all the
| Scheme's were erased, what would be the point to living?
+---------------

As much as I like Scheme, if somehow it *were* to suddenly disappear
entirely, I would -- after a suitably respectful period of mourning --
simply get on with my various activities... using Common Lisp.  ;-}  ;-}

-Rob

-----

Applied Networking              http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.          Phone: 650-933-1673
1600 Amphitheatre Pkwy.         FAX: 650-933-0511
Mountain View, CA  94043        PP-ASEL-IA



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language
LAML is thought to mirror HTML in Scheme, with the possibility
to abstract from the details, and in reality to approach many of the advantages
of XML (on the server side, or by means of generation, and anarchistic).

I am considering  a{*filter*}backend, because some of my LAML based taching materials
print
badly from a browser.

Quote:


> >With this message I want to announce the LAML software package.
> >LAML means 'Lisp Abstracted Markup Language'. The idea is to use
> > ....

> Thanks for putting the work into it to make laml. It looks good to me
> and i will give it a try. Have you ever thought of other backends than
> html? In some kind of way, I have to think about unroff, an elk scheme
> application which translates roff markup to different output formats
> ( http://www.*-*-*.com/ ).

Kurt N?rmark



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language


Quote:
>    http://www.xs4all.nl/~jantien/yodl/

YODL has nothing to do with Lisp or Scheme: the similarity with LISP,
its use of parentheses, is only superficial.  YODL is a
not-particularly-good macro processor.

--


      http://www.cs.uu.nl/people/hanwen/lilypond/index.html



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language

 > By using procedures as the representation of tags, these libraries can
 > validate data directly.  (SchemeCGI did this; I assume LAML does too.)
 > You lose this with a generic representation.

Why would you want to bind the tags to functions to do the validation
rather than just running the sexp form of the document through a
validation function?  I'd think the latter would be more flexible in a
variety of ways (ex - tags affecting the behavior of other tags inside
their range, overall document structure requirements, etc).  How would
you even handle things like "a document must consist of a <head>
section followed by a <body> section".  For that matter, how would you
handle a set of stylistic rules that an organization might want to
impose on its documents?  I'd think it would be much more flexible and
managable to work with a document in a data representation (i.e. - an
sexp) rather than as a program (i.e. - having the tags bound to
functions and effectively evaluating the program).  Basically, the
latter is forcing the use of a recursive descent parser, which seems
restrictive & difficult to work with in general.

I guess one advantage of binding the tags to functions is that eval
then automatically parses the document.  But, given that the sexp
version of the document is just a list, the parsing part is scheme is
trivial, so it doesn't seem advantageous to bind functions to the
tags.  It certainly doesn't seem to outweight the disadvantages.

Or can someone point out advantages I'm missing?

--
Harvey Stein
Bloomberg LP



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language

Quote:

> I am considering a{*filter*}backend, because some of my LAML based
> taching materials print badly from a browser.

An alternate strategy (which we use in the PLT suite) is to write
transformers between XML languages.  In this case, TeXML is a
reasonable target language.  There are problems with its design, but
it gets the job done adequately.

In addition, I have a prototype TeXML->LaTeX translator (so I don't
need to rely on a JVM and the like to transform the TeXML).  This lets
me start with a single abstract XML source, transform it one way to
TeXML and another way to HTML, then take the TeXML down to{*filter*}and
thence to DVI/PS/PDF.  It's all very nice in principle, and not a
whole lot worse in practice (so far).

If there's interest, I will consider releasing the TeXML->LaTeX
translator in our next release.  Let me know.

'shriram



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language

Quote:



> >     http://www.xs4all.nl/~jantien/yodl/

> YODL has nothing to do with Lisp or Scheme: the similarity with LISP,
> its use of parentheses, is only superficial.  YODL is a
> not-particularly-good macro processor.

Latte (<http://www.zanshin.com/latte/home.html>), OTOH, seems to be
basically scheme embedded in the text stream with TeXish delimiters
(i.e., '{}' instead of '()', and \ to mark variables & functions). Why
it isn't written *in* a Scheme, I'm not sure :)

Here's a little sample from the Latte source for the Latte home page:
---------
{\table \align=center \width=80% \border=1
  {\tr
   {\td {\center {\font \size=+2 {\b New!} Latte 2.1 is released.}}

    Latte 2.1 contains a change incompatible with Latte 1.1 and
    earlier.  If you've used earlier versions of Latte, you may need
    to make {\a \href=upgrade.html two simple adjustments} in your
    Latte files.}}}

 {\h3 Why Latte?}

 HTML, the language of the web, has numerous serious shortcomings.
 Its own creator has said that it was never meant to be seen by
 humans, let alone written by them.  HTML was meant to be {\em
 generated}, with the actual editing taking place in WYSIWYG editors
 or with higher-level languages.  Latte is one such language.

------------

And here's a bit from the Latte site's style page:

-----------
\; style file for Latte website

{\def \html-filename {\concat {\substr \__FILE__ 0 -6} .html}}

{\def {\example \&rest}
  {\table \align=center \border=0 \bgcolor=#f0f0ff
   {\tr {\td {\pre \rest}}}}}

{\def {\unavailable \&text}
  {\b {\span \style={color: #c0c0c0} \text}}}

-----------

One thing I see as an advantage of the Latte approach is that it
minimizes the markup you need to write in the simple case. E.g., like
TeX, you just leave a blank line between paragraphs. You don't have to
quote (and thus escape quotes in) your regular text.

Cheers,
Bijan Parsia



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language

Quote:

> I'd consider it not all that bad, at any rate; a trivial change is to
> redefine the functions so that rather than producing output, they
> insert the material-to-be-output into a tree, thus giving you a tree
> that can then be analyzed.  In effect, the functions are themselves
> "self-parsing."

would this be another name for macros (and the process macro-expansion)?

thi



Tue, 07 May 2002 03:00:00 GMT  
 Announcing LAML: Using Scheme as a markup language
On 18 Nov 1999 21:42:15 -0600, Shriram Krishnamurthi

Quote:


>> What I would find more interesting would be to see a mechanism that
>> could take DocBook as input, turn it into S-expressions (which
>> wouldn't be hard to do using the output of SGMLS), and then allow the
>> gentle user to have *that* as the programmable markup language, which
>> could then be, on demand:

>I haven't read all the details of DocBook, and it looks a little too
>SGML-happy to me.  

There is work ongoing on an XML version.
  <http://nwalsh.com/docbook/xml/index.html>

Quote:
>Nevertheless, a good starting point might be the PLT Scheme XML
>collection.  You can read XML documents into s-expressions, and vice
>versa.  We use a stylized form of s-expression called x-expression;
>not all s-exps are x-exps but, importantly, all x-exps are s-exps.
>This lets you harness the full power of Scheme's generic list
>operators.

Gonna have to look at that; good pointer...

Quote:
>The interesting problem is still validation.  The folks at Emergent
>Technologies produced a collection called SchemeCGI for PLT Scheme
>some years back; this is extremely similar in spirit to LAML.  By
>using procedures as the representation of tags, these libraries can
>validate data directly.  (SchemeCGI did this; I assume LAML does too.)
>You lose this with a generic representation.  On the other hand, it's
>a massive pain to keep these validators up-to-date in the face of
>constantly changing standards.  

Indeed.

Quote:
>A more fruitful approach is to instead generate validators
>automatically from DTDs/Schemas.  (We have a cute little application
>along these lines in our paper at PADL 2000 that shows why Schemas
>are preferable to DTDs.)

That sounds extremely interesting, particularly the automatic
validator generation; can you suggest any web-based pointers?

Quote:
>In the end, for data longevity, I prefer to use an XML language rather
>than some custom format such as LAML's, like Chris Browne says.

[Possibly elaborating words into your mouth, hopefully fairly...]

The merit is not primarily in XML itself, as that is merely a format
that is not forcibly better than s-exprs; the merit is in using a
well-known DTD so that the data format has a bunch of software that
knows how to read/write it.

If I made up my own CBBROWNE DTD, thus mandating my own [DSSSL | XSL |
.... ] postprocessor, I've had to create substantially all of my own
local tools.  In that case, pretty much the whole thing is custom,
which means that I might as well pick whatever tools *I* prefer, with
no particular merit to preferring either XML or an S-expr-based thing.
--
"It's the sort of mail you should wear a welding helmet while reading...."
-- Dave Moon



Wed, 08 May 2002 03:00:00 GMT  
 
 [ 28 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Announcing version 15 of LAML: Using Scheme for markup purposes

2. Q? : SBML - Scheme-Based Markup Language

3. ANNOUNCE: LML (Lisp Markup Language) Available

4. Announcing 'Lisp Abstracted Markup Language' (LAML) vers. 14

5. Announcing 'Lisp Abstracted Markup Language' (LAML) vers. 14

6. Announcing LAML version 17.00

7. Announcing Rule Markup Initiative

8. REPOST: ANN: Pdx 1.4.1 (markup language)

9. ANN: Pdx 1.4.1 (markup language)

10. VRML - Virtual Reality Markup Language??

11. Instrument Control Markup Language

12. HDML Hardware Definition Markup Language

 

 
Powered by phpBB® Forum Software