You are not logged in Log in Join
You are here: Home » Members » jim » StructuredTextWiki » STXDocument

Log in
Name

Password

 
 

History for STXDocument

??changed:
-
STXDocument

  STXDocument is a web-managable object that contains
  information marked up in the structured text format.

  When an STXDocument is created or edited, the
  structured text it contains is parsed into a Document
  object.  This object realizes the read-only Document
  Object Model (DOM) interface.  Because this is a
  popular standard interface, it is very easy to create
  tools or use existing tool to manipulate structured
  information.

  STXDocument is a wrapper object around the new
  StructuredTextNG sytem.  It allows editing with:

    o Through the web textarea editing

    o HTTP PUT

    o FTP

    o xml-rpc call to 'manage_edit'

  The STXDocument Product comes complete with help
  screens and API Documentation.

 Download it at http://www.zope.org/Members/karl/STXDocument/STXDocument .

Usage

  The main scope of this product is to facilitate the
  production of a Zope book.  Needs:

    o Publish the book in DocBook for O'Reilly

    o Publish the book in HTML and PDF for on-line
    viewing

    o Be able to develop in a format that was easily
    revision controlled

    o Work with an easy syntax (not staring at raw SGML
    in an emacs buffer).

    o Be able to view differences visually (ediff!)

  Giving these needs, we decided earlier this year to
  author the book in structured text.  Thankfully, Jim
  had just got done putting the finishing touches on
  StructuredTextNG, which had lots of features needed.

  STXDocument are pretty easy to use.  Their user
  interface is almost identical to DTML Methods and
  Documents.  Example:

    Create a new STXDocument with the id 'foo'

    Edit the document to contain::

      Structured Text

        is an

 elegant way to write words

 in many formats

    Now you can visit foo and get an html rendering of
    the Structured text in the document::

      <html>
      <head>
      <title>Structured Text</title>
      </head>
      <body>
      <h1>Structured Text</h1>
      <p>  is an</p>
      <ul>
      <li>elegant way to write words</li>
      <li>in many formats</li>
      </ul>
      </body>
      </html>

    This is the default view of an STXDocument, in
    other words, going to 'http://localhost/foo'.  The
    same output can be seen by calling the outputHTML
    method 'http://localhost/foo/outputHTML'.

    Calling the outputDocBook method will return the
    contents of the structured text rendered as a
    chapter in a DocBook Book
    'http://localhost/foo/outputDocBook'::

      <chapter>
      <title>Structured Text</title>
      <para>  is an</para>
      <itemizedlist>
      <listitem>elegant way to write words</listitem>
      <listitem>in many formats</listitem>
      </itemizedlist>
      </chapter>