On Tue, 12 Jun 2001, Ian Clatworthy wrote:

> Andreas Jung wrote:
> >
> > ----- Original Message -----
> > From: "Ian Clatworthy" <[EMAIL PROTECTED]>
> > Sent: Sunday, June 10, 2001 9:52 PM
> > Subject: [Zope-dev] Structured Text Plus
> >
> > > I've put together the design for an extended version of
> > > Structured Text which I'd like some feedback on before
> > > I go too much further. At this stage, the design is
> > > explained via a series of user-level How-To's, e.g.
> > > Writing Documents Using Structured Text Plus.
> >
> > Could you please summarize the benefits compared to
> > STXNG ?
> As I understand things from reading the STXNG Wiki stuff,
> it's largely an internal rewrite which adds 2 or 3 new
> features, namely images and tables.

This is only a small feature compared to what STXNG really adds to
structured text.  STXNG turns structured text into cross-format Document
Object Model (DOM) in two stages and then into a final format.  The first
stage turns it into a simple DOM that reflects the paragraph structure,
but not the "markup" (italics, bold, links, etc.).

The second stage uses the first stage DOM to create an even more elaborate
DOM based on markup or "colorized text" found in the first DOM's

The second stage DOM can then be fed to a final "outputter" stage that
renders the DOM in any format you want, currently we support HTML,
DocBook, and MML (Framemaker or something like that) and it would be easy
to add any other XML format or PDF.  Here's an example that will work for

>>> print text

  o *one*

  o **two**

  o 'three'

# Create the basic DOM structure

>>> Basic(text)
StructuredTextParagraph(Title, [
 StructuredTextParagraph(  o *one*, [
 StructuredTextParagraph(  o **two**, [
 StructuredTextParagraph(  o 'three', [

# Create the "Colorized" DOM structure

>>> Document(Basic(text))
StructuredTextSection(StructuredTextSectionTitle(Title, [
]), [
 StructuredTextBullet(StructuredTextEmphasis('one'), [
 StructuredTextBullet(StructuredTextStrong('two'), [
 StructuredTextBullet(StructuredTextLiteral('three'), [

# Generate HTML from the DOM

>>> print HTML(Document(Basic(text)))



# Generate DocBook from the DOM

>>> print DocBookChapter(Document(Basic(text)))
<listitem><para><emphasis>one</emphasis> </para></listitem>


You should really work from STXNG because we designed it to be extended,
just like you want to do.  You can subclass and customize the "colorizer"
in the second stage to recognize your own customized markup and do what
you will with it.  Amos and I did this to support images in the book.
You can also customize outputers as I explained.

> > You are targeting also the single-source approach
> > for documents with STPlus - what are the benefits
> > compared to working solution like Docbook ?
> Upwards compatibility with STX, i.e. something more
> readable than XML.

Amen to that!


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to