SGML docs and scheme 
Author Message
 SGML docs and scheme

Hi!

        Is there any tool out there to handle sgml (or even xml) docs
from scheme?  Ideally it would be something that allows to treat them
as a list.  Maybe a sgml->list and list->sgml converters.... O:-)

//-----------------------------------------------
//      Fernando Rodriguez Romero
//
//      frr at mindless dot com
//------------------------------------------------



Sat, 16 Mar 2002 03:00:00 GMT  
 SGML docs and scheme

Quote:
>    Is there any tool out there to handle sgml (or even xml) docs
>from scheme?  Ideally it would be something that allows to treat them
>as a list.  Maybe a sgml->list and list->sgml converters.... O:-)

- Parse the SGML input using NSGMLS, which generates something
  that Looks Remarkably Like S-Expressions.

- Filter that:
  - throwing away lines containing no useful info (any line with a word
    starting with "A" and then the word "IMPLIED" is a perfect candidate),
  - collecting other attributes (starts with A, but has 3 "words" on
    the line) into lists, those lists being "owned" by ...
  - the lines that start with a left parenthesis "(" and a name, which
    will be the lines representing entities,
  - Lines that start with "-" are the contents of entities, and may be
    trimmed and added to the list as a string,
  - Lines that start with ")" and a name close an entity, and may
    replaced by ")".

That gives you a list.

Reversing such a list into SGML/XML is a simple matter of tree-walking,
and may be left as a trivial exercise of recursion...

--
"Show me... show me... show me... COMPUTERS!"



Mon, 18 Mar 2002 03:00:00 GMT  
 SGML docs and scheme
: Hi!

:       Is there any tool out there to handle sgml (or even xml) docs
: from scheme?  Ideally it would be something that allows to treat them
: as a list.  Maybe a sgml->list and list->sgml converters.... O:-)

Wouldn't the tools of the PSGML Emacs mode be a starting point?

-# Georg



Mon, 18 Mar 2002 03:00:00 GMT  
 SGML docs and scheme

Quote:

> Hi!

>         Is there any tool out there to handle sgml (or even xml) docs
> from scheme?  Ideally it would be something that allows to treat them
> as a list.  Maybe a sgml->list and list->sgml converters.... O:-)

If you want to sort-of handle SGML in sort-of Scheme, there's
always DSSSL. :-)

A while back, Copernican Solutions had a Scheme interpreter
written in Java with a lot of SGML-handling library stuff and a
DSSSL engine (which I never got working and gave up on).  They
appear to have been swallowed up by some corporate monolith
that isn't interested any more.

Kawa, the Scheme-in-Java part of the project, is still alive and
much improved.  You can call Java classes from Kawa with a
minimum of fuss (you almost need never know they weren't
written in Scheme).  So it would probably be very easy to write
your Scheme application in Kawa and use one of the gazillion
XML processing packages written in Java.

-- Kevin



Thu, 21 Mar 2002 03:00:00 GMT  
 SGML docs and scheme


Quote:
>- Parse the SGML input using NSGMLS, which generates something
>  that Looks Remarkably Like S-Expressions.

What is an S-Expression?

--
/****************************************************************\
* You have just read a message from Mikael St?ldal.              *
*                                                                *
* Remove "-ingen-reklam" from the address before mail replying.  *
\****************************************************************/



Thu, 21 Mar 2002 03:00:00 GMT  
 SGML docs and scheme
On 3 Oct 1999 23:03:25 +0200, Mikael St?ldal

Quote:


>>- Parse the SGML input using NSGMLS, which generates something
>>  that Looks Remarkably Like S-Expressions.

>What is an S-Expression?

An S-Expression is an expression that may be read by a Lisp reader.

(a b c) is an S-expression that consists of a list containing three
symbols, A, B, and C.  (Symbols are commonly treated as case insensitive)

("This is a string") is an S-expression consisting of a list that
contains a string with an obvious value.

(a (b c (d e f))) is an S-expression that represents a nested set of
lists containing the symbols for A thru F.  One may use nested lists
to represent complex data structures such as n-ary trees.  That
expression might, based on the number of items in the lists, represent
a B-tree where nodes have cardinality 3.
--
The software isn't finished until the last user is dead.



Thu, 21 Mar 2002 03:00:00 GMT  
 SGML docs and scheme

Quote:

>    Is there any tool out there to handle sgml (or even xml) docs
> from scheme?  Ideally it would be something that allows to treat them
> as a list.  Maybe a sgml->list and list->sgml converters.... O:-)

We've spent several months building XML tools for PLT Scheme.  This
includes converters for XML expressions into what we call
x-expressions (a stylized form of s-expressions) and back.  We have
also designed a new transformation system for XML that has many
advantages of XSLT, and heavily exploits the Scheme connection.  With
this, we can do a form of polytypic programming as well.

The packages are already in use in-house.  I expect we will include at
least the converters in our next release.  We may or may not release
the transformation system also at that time.

For more information on PLT Scheme, see the DrScheme home page:

  http://www.cs.rice.edu/CS/PLT/packages/drscheme/

'shriram



Mon, 25 Mar 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. SGML Parser in scheme (or LISP) (Was: DSSSL)

2. grover, a Scheme implementation of Groves (ala SGML/XML)

3. Scheme and SGML

4. a Scheme based library for SGML Documents

5. a Scheme based library for SGML Documents

6. SGML Parser in scheme (or LISP) (Was: DSSSL)

7. Docs for pc-scheme??

8. PC-Scheme docs wanted

9. Scheme docs in PostScript?

10. Need Docs for Gambit v1.51 Scheme

11. Python Spanish docs updated/Docs de Python en castellano

12. Python Spanish docs updated/Docs de Python en casstellano

 

 
Powered by phpBB® Forum Software