History for StructuredTextNGUsage
??changed:
-
How does one use Structured Text NG
- ST.py contains the function StructuredText and the class DOC
- To use the function StructuredText, call ST.StructuredText(source),
where source is a single large string.
- ST.StructuredText returns a structure which ST.DOC will accept.
The structure returned has the format ![A,[B]]. A is the original
paragraph and ![B] is a list of sub-paragraphs of A.
- ST.DOC is a class whose call function has been overloaded to
accept the structure returned by ST.StructuredText. Since ST.DOC
is a class, an instance must first be created.
- ST.DOC returns a structure of the same format returned by
ST.StructuredText. However, the original paragraph (part A) will be
altered to reflect that structured text types have been found. Part
A will consist either of a string if no structured text types were
found, or it will consist of a list of sub-strings of the original
paragraph which were not part of the structured text item and
instances which internally maintain the sub-string which contained
the structured text item
Jim -- We should change this so that the the returned object is
a DOM tree of some sort.
- Html contains a class, !HTML whose call function has been
overloaded to accept a ST.DOC structure.
- Since Html.HTML is a class, an instance of it must first be created before it
can be used.
- Html.HTML will traverse the ST.DOC structure. The instance's will be interrogated
to determine which type they are and Html.HTML will generate the appropriate code.