source: project/release/4/sxml-transforms/trunk/SSAX/ssax-sourceforge.scm @ 25833

Last change on this file since 25833 was 13784, checked in by sjamaan, 12 years ago

Update to latest upstream version; remove own hacked version of pre-post-order-splice

File size: 13.1 KB
Line 
1; Evaluation of this file yields an HTML document
2; $Id: ssax-sourceforge.scm,v 1.12 2009/03/11 04:13:56 oleg Exp $
3
4(define Content
5'(html:begin
6  (Header
7   (title "XML and Scheme")
8   (description "Representing, authoring, querying and transforming
9markup data in Scheme; XML notation for a programming language")
10   (Date-Revision-yyyymmdd "20090310")
11   (Date-Creation-yyyymmdd "20010706")
12   (keywords "XML, XML parsing, XML Infoset, XPath, XSLT, SAX, SXML, SXSLT, SXPath, Scheme, HTML composition, HTML authoring")
13   (AuthorAddress "oleg-at-okmij.org")
14   (long-title "S-exp-based XML parsing/query/conversion")
15   )
16
17  (body
18   (navbar
19     ("Home" "http://ssax.sourceforge.net")
20     ("Docs" "#Documentation")
21     ("Availability" "#Availability")
22     ("CVS" "http://sourceforge.net/cvs/?group_id=30687")
23     ("Summary" "http://sourceforge.net/projects/ssax/")
24     ("Discussion" "http://sourceforge.net/mail/?group_id=30687")
25     ("News" "http://sourceforge.net/news/?group_id=30687")
26     ("Related" "#SXML-related"))
27
28   (page-title)
29
30   (a (@ (href "http://sourceforge.net/projects/ssax")) " "
31      (img (@ (src 
32            "http://sflogo.sourceforge.net/sflogo.php?group_id=30687&type=9")
33              (width "80") (height "15") (border "0")
34              (alt "Get S-exp-based XML parsing/query/conversion at
35   SourceForge.net. Fast, secure and Free Open Source software downloads"))))
36
37; Ref to Makoto Satoo
38
39   (p "This project offers tools to inter-convert between an
40angular-bracket and a more efficient S-expression-based notations for
41markup documents, and to manipulate and query xML data in Scheme. The
42main components of the project are SSAX, SXML, SXPath, and SXSLT.")
43
44   (p
45    "A SSAX functional XML parsing framework consists of a DOM/SXML
46parser, a SAX parser, and a supporting library of lexing and parsing
47procedures. The procedures in the package can be used separately to
48tokenize or parse various pieces of XML documents. The framework
49supports XML Namespaces, character, internal and external parsed
50entities, attribute value normalization, processing
51instructions and CDATA sections.  The package includes a
52semi-validating " (em "SXML parser") ": a DOM-mode parser that is an
53instantiation of a SAX parser (called SSAX).")
54
55   (p "" (strong "SSAX") " is a full-featured, algorithmically optimal,
56pure-functional parser, which can act as a stream processor. SSAX is
57an efficient SAX parser that is " (em "easy to use") ". SSAX minimizes
58the amount of application-specific state that has to be shared among
59user-supplied event handlers. SSAX makes the maintenance of an
60application-specific element stack unnecessary, which eliminates
61several classes of common bugs. SSAX is written in a pure-functional
62subset of Scheme. Therefore, the event handlers are referentially
63transparent, which makes them easier for a programmer to write and to
64reason about.  The more expressive, reliable and easier to use
65application interface for the event-driven XML parsing is the outcome
66of implementing the parsing engine as an enhanced tree fold
67combinator, which fully captures the control pattern of the
68depth-first tree traversal.")
69
70  (p
71    "" (strong "SXML") " is an abstract syntax tree of an XML
72document. SXML is also a concrete representation of the XML Infoset in
73the form of S-expressions.")
74
75  (p
76    "" (strong "SXSLT") " is a manipulation language for XML and
77" (strong "SXPath") " is an XPath-conforming XML query language. Both
78languages internally rely on SXML as a representation of the XML Infoset.")
79
80    (ul
81      (li (local-ref "Documentation"))
82      (li (local-ref "Availability")
83        (ul (li (local-ref "CVS"))
84            (li (local-ref "Distributions"))))
85      (li (local-ref "SXML-related")
86        (ul (li (local-ref "SXML"))))
87      (li 
88        (a (@ (href "http://lists.sourceforge.net/lists/listinfo/ssax-sxml"))
89          "SSAX-SXML Mailing list"))
90      (li (a (@ (href "http://sourceforge.net/projects/ssax"))
91            "SSAX project summary page at SourceForge"))
92      )
93
94; Add the news section
95
96   (Section 3 "Documentation" " and tutorials")
97   
98    (p "SXML Tools Tutorial by Dmitry Lizorkin:"
99      (URL "http://modis.ispras.ru/Lizorkin/sxml-tutorial.html"))
100
101    (p "Main SSAX/SXML page:"
102      (URL "http://pobox.com/~oleg/ftp/Scheme/xml.html"))
103
104    (p "XML Matters: Investigating SXML and SSAX: "
105       "Manipulating XML in the Scheme programming language" (br)
106      "by David Mertz, Ph.D. " 
107      "IBM developerWorks article"
108      (URL "http://www-106.ibm.com/developerworks/library/x-matters31.html")
109      (URL 
110        "http://www-6.ibm.com/jp/developerworks/library/j_x-matters31.html")
111      "[Japanese]")
112   
113   (p "Authoring dynamic websites with SXML by Peter Bex:"
114     (URL "http://sjamaan.ath.cx/docs/scheme/sxslt.pdf"))
115
116   (p
117    "Detailed introduction, motivation and real-life case-studies of
118SSAX, SXML, SXPath and SXSLT." (br) "The paper and the complementary talk
119presented at the International Lisp Conference 2002."
120    (URL "http://pobox.com/~oleg/ftp/papers/SXs.pdf")
121    (URL "http://pobox.com/~oleg/ftp/papers/SXs-talk.pdf")
122    )
123
124   (p
125    "The derivation of the SSAX API and the comparison of SSAX with other
126functional-style XML parsers and with the Expat" (br)
127"A transcript of a presentation at PADL 2002, the 4th International
128Symposium on Practical Aspects of Declarative Languages."
129    (URL "http://pobox.com/~oleg/ftp/papers/XML-parsing-talk.ps.gz") (br)
130    "The paper (Copyright of Springer-Verlag) is available at: "
131    (URL "http://link.springer.de/link/service/series/0558/tocs/t2257.htm")
132    (URL "http://pobox.com/~oleg/ftp/papers/XML-parsing.ps.gz"))
133
134   (p
135     "SXML tutorial (in Japanese)"
136     (URL "http://homepage1.nifty.com/blankspace/scheme/nsx.html"))
137
138   (p
139     "SXML, SSAX, and SXML Transforms. Presentation, notes, and exercises" (br)
140     "4th December 2002 and 8th January 2003 meetings of the Scheme UK group"
141     (who "Noel Welsh and Matt Jadud")
142     (URL "http://schematics.sourceforge.net/scheme-london/"))
143
144    (p
145      "Advanced SXLST tutorial"
146      (URL "http://pobox.com/~oleg/ftp/Scheme/sxslt-advanced.scm") (br)
147      "This file describes common patterns of SXSLT on an interesting
148example. We demonstrate higher-order tags, pre-order and post-order
149transformations, re-writing of SXML elements in regular and special
150ways, context-sensitive applications of re-writing rules, and
151reflection. Although the file is technically a Scheme source code, it is
152actually a tutorial. Of 357 lines in the file, 241 are comments and 24
153are just blank lines. August 2003.")
154    (p 
155      "SXSLT: Manipulation Language for XML"
156      (URL "http://pobox.com/~oleg/ftp/papers/SXSLT-talk.pdf") (br)
157      "A transcript of a presentation at PADL 2003. The talk introduces
158SXSLT and compares it with XSLT.  Our experience and user comments
159show that SXSLT is expressive and easy to use. We argue that this
160outcome is a consequence of SXSLT providing right abstractions for XML
161transformations, of being higher-order, declarative and extensible.")
162
163
164   (Section 3 "SXML-related" " projects")
165
166   (p
167     "Sedna - a Native XML DBMS"
168     (URL "http://www.modis.ispras.ru/Development/sedna.htm") (br)
169     "Since version 0.2, Sedna provides the representation of query
170results in SXML")
171
172   (p
173     "SXPath library: an implementation of XPath. The SXML query library."
174     (br)
175     "SXPointer: an SXPath-based implementation of XPointer"
176     (who "Kirill Lisovsky")
177     (URL "http://pair.com/lisovsky/query/"))
178
179   (p
180     "SXLink: An implementation of W3C XLink"
181     (who "Dmitry Lizorkin")
182     (URL "http://pair.com/lisovsky/download/contrib/xlink/"))
183
184   (p
185     "STX: a compiler for a subset of XSLT and an embedding of XSLT
186into Scheme"
187     (who "Kirill Lisovsky")
188     (URL "http://pair.com/lisovsky/transform/stx/"))
189   
190    (p "DataGuides: A descriptive database schema for XML/SXML data"
191     (who "Kirill Lisovsky")
192      (URL "http://pair.com/lisovsky/xml/dg/"))
193
194    (p
195      "WebIt! - An XML Framework for Scheme"
196      (who "Jim Bender")
197      (URL "http://celtic.benderweb.net/webit/"))
198
199   (p
200     "HtmlPrag: a permissive HTML parser that emits SXML"
201     (who "Neil W. Van Dyke")
202     (URL "http://www.neilvandyke.org/htmlprag/"))
203
204   (p
205     "WebScraperHelper: simple generation of SXPath queries to extract
206data from (parsed) Web pages"
207     (who "Neil W. Van Dyke")
208     (URL "http://www.neilvandyke.org/webscraperhelper/"))
209
210   (p
211     "sxmlcnv: XML <-> SXML SmartDoc-friendly conversion application"
212     (who "Kiyoka Nishiyama")
213     (URL "http://www.netfort.gr.jp/~kiyoka/sxmlcnv/"))
214
215   (Section 4 "SXML" " for static and dynamic websites")
216   (p
217     "The website of the MISA Technical University (one of the top ten
218technical universities in the whole Russia) has been developed using
219STX:"
220     (URL "http://ir.misis.ru/english/about/general.htm"))
221   (p "This page and all SXML-related pages are authored in SXML.")
222    (p
223      "For more detailed explanation of these projects, see the talk
224at the International Lisp Conference.")
225
226
227
228   (Section 3 "Availability")
229   (p "The current released version of SSAX is 5.1.
230The whole SSAX code is in public domain.")
231
232   "SSAX has been tested on the following Scheme systems:"
233   (br)
234   "PLT Scheme, Bigloo, GambitC 4.0,
235Chicken, Guile, SCM, MIT Scheme 7.5.2, Scheme48, SCSH, Gauche, SISC."
236
237
238   (Section 3 "Distributions")
239   (p "SSAX download site at SourceForge:"
240      (URL "http://sf.net/project/showfiles.php?group_id=30687"))
241
242   (p "Kirill Lisovsky's index of various SSAX distributions. Kirill
243has put together many of those distributions, in particular, the ones
244for PLT Scheme."
245     (URL "http://pair.com/lisovsky/xml/ssax/"))
246
247    (p "SSAX/SXML has been integrated into various Scheme systems
248and, in some cases, become part of the distribution for those systems:")
249    (ul
250      (li "guile-lib, version 5.1"
251        (who "Andy Wingo"))
252
253      (li "Gauche/SXML, SSAX version 4.9+"
254        (who "Shiro Kawai")
255        (URL "http://gauche.cvs.sourceforge.net/gauche/"))
256
257      (li "SCSH and Scheme48, version 4.9"
258        (who "Michael Sperber")
259        (URL "http://www.scsh.net/resources/markup.html"))
260
261      (li "Chicken ssax.egg, version 4.9.7"
262        (who "Felix Winkelmann")
263        (URL "http://www.callcc.org/eggs/ssax.html"))
264
265      (li "SISC, an extensible Java based interpreter, SSAX version 4.9"
266        (who "Noel Welsh"))
267      )
268
269
270  (Section 3 "CVS" " Tree")
271  (p (a (@ (href "http://sourceforge.net/cvs/?group_id=30687"))
272        "The CVS Tree")
273     " includes the complete SSAX/SXML code, some
274documentation, validation tests, as well as several sample applications.")
275  (p "You can "
276     (a (@ (href "http://ssax.cvs.sourceforge.net/ssax"))
277        "browse the files in the CVS tree")
278     " from any web browser.")
279
280
281;    (dl
282
283;     (dt (a (@ (href  "http://sourceforge.net/tracker/?group_id=30687"))
284;          "Trackers"))
285;     (dd "You can use a tracker to make a suggestion, to request a
286; feature, or to report a problem.")
287
288;     (dt (a (@ (href "http://sourceforge.net/forum/?group_id=30687"))
289;          "Forums"))
290;     (dd "You can browse, search, and post messages related to SSAX and SXML"
291;       (br) (n_))
292
293;     (dt (a (@ (href "http://sourceforge.net/docman/?group_id=30687"))
294;          "Doc Manager"))
295;     (dt (a (@ (href "http://sourceforge.net/pm/?group_id=30687"))
296;          "Task Manager"))
297;     (dt (a (@ (href "http://sourceforge.net/survey/?group_id=30687"))
298;          "Surveys"))
299;     )
300
301   (footer)
302
303)))
304
305;(pp Content)
306
307;========================================================================
308;                       HTML generation
309
310; IMPORT
311; SXML-to-HTML-ext.scm and all of its imports
312
313
314; Generating HTML
315
316(define (generate-HTML Content)
317 (SRV:send-reply
318  (pre-post-order Content
319   (generic-web-rules Content 
320     `((who *macro*
321         . ,(lambda (tag . elems)
322              `((n_) "[by " ,elems "]")))
323
324                ; A reference to an anchor in the present file
325                ; (local-ref target . title)
326                ; If title is given, generate a regular
327                ;       <a href="#target">title</a>
328                ; Otherwise, transform the content so that a
329                ; construct that may generate an anchor 'target' (such
330                ; as Section) is re-written to the
331                ; title SXML. All other constructs re-write to
332                ; nothing.
333     (local-ref
334      *preorder*
335      . ,(lambda (tag target . title)
336           (let
337               ((title
338                 (if (pair? title) title        ; it is given explicitly
339                     (pre-post-order Content
340                       `((*text* . ,(lambda (trigger str) '()))
341                         (*default*
342                          . ,(lambda (tag . elems)
343                               (let ((first-sign (signif-tail elems)))
344                                 (if first-sign
345                                     (let ((second-sign
346                                            (signif-tail (cdr first-sign))))
347                                       (assert (not second-sign))
348                                       (car first-sign))
349                                     '()))))
350                         (Section
351                          *preorder*
352                          . ,(lambda (tag level key . elems)
353                               (if (equal? key target)
354                                   (list key elems)
355                                   '()))))))))
356             (assert (pair? title) report: target)
357             (cerr "title: " title nl)
358             (post-order 
359              `(a (@ (href #\# ,target)) ,title)
360              universal-conversion-rules))))
361
362       ; (navbar (title url) ...)
363       (navbar
364        *preorder*
365        . ,(lambda (tag . elems)
366             (post-order
367               `(p (hr (@ (size 1) (noshade)))
368                  (div (@ (align "center"))
369                    ,(map
370                     (lambda (title-url)
371                       `((a (@ (href ,(cadr title-url))) ,(car title-url))
372                         (n_) "|" (n_)))
373                     elems))
374                  (hr (@ (size 1) (noshade))) (br))
375               universal-conversion-rules)))
376
377       )))))
378
379(generate-HTML Content)
Note: See TracBrowser for help on using the repository browser.