Hi!
I found the existing documentation to be severely lacking.
I agree with you completely. For the same reason, I made an attempt of
creating an SXML tutorial some time ago
(http://modis.ispras.ru/Lizorkin/sxml-tutorial.html), but your tutorial is
definitely more detailed and user-friendly.
I'm not sure I understand the question. I assume you are referencing to
the
*NAMESPACES* annotations for *TOP*.
I mean that you state in your tutorial that "When we translate this [XHTML
page] to SXML it looks like this:" [and you give the SXML representation].
Since the conventional instrument for translating an X(HT)ML document into
SXML is Oleg Kiselyov's SSAX parser, a reader would probably expect the SXML
fragment to be the result of calling the SSAX parser for the XHTML page.
However, the SSAX parser produces a substantially different result (below),
and such an inconsistency would lead a reader to a confusion when attempting
to develop his/her own applications.
(ssax:xml->sxml
(open-input-string
"<html xmlns='http://www.w3.org/1999/xhtml'
xml:lang='en' lang='en'>
<head>
<title>An example page</title>
</head>
<body>
<h1 id='greeting'>Hi, there!</h1>
<p>This is just an >>example<< to show XHTML & SXML.</p>
</body>
</html>")
'())
==>
(*TOP*
(http://www.w3.org/1999/xhtml:html
(@ (xml:lang "en") (lang "en"))
(http://www.w3.org/1999/xhtml:head
(http://www.w3.org/1999/xhtml:title "An example page"))
(http://www.w3.org/1999/xhtml:body
(http://www.w3.org/1999/xhtml:h1 (@ (id "greeting")) "Hi, there!")
(http://www.w3.org/1999/xhtml:p
"This is just an >>example<< to show XHTML & SXML."))))
Of course, such an SXML fragment with long expanded element names does not
look simple and illustrative at all, and I agree with you that your SXML
example is much more suitable for the discussion in your tutorial, since the
presentational aspect is very important here. However, the tutorial should
also give much care to the technical correctness of the information
presented. For sustaining correctness, I can think of two approaches:
1. Completely removing "xmlns='http://www.w3.org/1999/xhtml' " from
consideration here. However, as this namespace declaration is the essential
part of the XHTML recommendation, such an approach may not be acceptable
when generating complete XHTML pages.
2. Explicitly stating (e.g., in a note or a footnote) that the SXML fragment
presented is not obtained by automatically translating the XHTML page
(although the XHTML page _can_ be obtained from that SXML fragment by
automatic conversion tools, and _that_ kind of conversion is the ultimate
goal of our activity when generating dynamic websites with SXML). For
example, you may wish to put it like this: "For simplicity, we treat XML
namespace declarations as common attributes throughout this tutorial.
Although slightly different from namespaces treatment in SXML, such an
interpretation allows us to achieve desired and well-formed results in the
generated XHTML documents. The detailed discussion on XML namespaces
handling in SXML is outside the scope of this tutorial."
Hope these thoughts will help in improving your tutorial.
Dmitry
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users