Difference between revisions of "SwNodesBNF"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (SwNodes)
(SwNodes)
Line 8: Line 8:
 
  EndNd = SwEndNode
 
  EndNd = SwEndNode
 
  TextNd = SwTxtNode
 
  TextNd = SwTxtNode
  GrafikNd = SwGrfNode
+
  GraphicNd = SwGrfNode
 
  OLENd = SwOLENode
 
  OLENd = SwOLENode
 
  TableNd = SwTableNode
 
  TableNd = SwTableNode
Line 18: Line 18:
 
  FooterNd = SwFooterStartNode
 
  FooterNd = SwFooterStartNode
  
<Document> ::= StartNd EndNd StartNd <Footnote content> EndNd StartNd <Special content> EndNd StartNd <Change tracking> EndNd StartNd <Content> EndNd
+
<Document> ::= <Empty> <Footnote content> <Special content> <Change tracking> <Body content>
 +
 
 +
<Empty> ::= StartNd EndNd
 +
 
 +
<Body content> ::= StartNd <Content> EndNd
  
 
<Content> ::= TextNd | <'Table> | <Section> | <Content> <Content>
 
<Content> ::= TextNd | <'Table> | <Section> | <Content> <Content>
Line 30: Line 34:
 
<Section> ::= SectionNd <Content> EndNd
 
<Section> ::= SectionNd <Content> EndNd
  
<Special content> ::= ....
+
<Special content> ::= <Empty> | StartNd <Special> EndNd
 +
 
 +
<Special> ::= <Special> >Special> | HeaderNd <Content> EndNd | FooterNd <Content> EndNd | FlyNd <Fly content> EndNd
 +
 
 +
<Fly content> ::= OLENd | GraphicNd | <Content>
 +
 
 +
<Footnote content> ::= <Empty> | StartNd <Footnotes> EndNd
 +
 
 +
<Footnotes> ::= <Footnote> | >Footnote> <Footnotes>
 +
 
 +
<Footnote> ::= FootnoteNd <Content> EndNd
  
<Footnote content> ::= ....
+
<Change tracking> ::= <Empty> | StartNd <Changes> EndNd
  
<Change tracking> ::= ....
+
<Changes> ::= <Body content> | <Changes> <Changes>

Revision as of 15:26, 16 November 2007

SwNodes

Let us describe a "well-formed" SwNodes array of a Writer document in Backus-Naur form.

There are the following node types used as "terminal" symbols:

StartNd = SwNormalStartNode
EndNd = SwEndNode
TextNd = SwTxtNode
GraphicNd = SwGrfNode
OLENd = SwOLENode
TableNd = SwTableNode
SectionNd = SwSectionNode
CellNd = SwTableBoxStartNode
FlyNd = SwFlyStartNode
FootnoteNd = SwFootnoteStartNode
HeaderNd = SwHeaderStartNode
FooterNd = SwFooterStartNode

<Document> ::= <Empty> <Footnote content> <Special content> <Change tracking> <Body content>

<Empty> ::= StartNd EndNd

<Body content> ::= StartNd <Content> EndNd

<Content> ::= TextNd | <'Table> |

Personal tools