Difference between revisions of "SwNodesBNF"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (SwNodes)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== SwNodes ==
+
{{Writer Project|Category=Writer/CoreDoc}}
 
+
 
Let us describe a "well-formed" SwNodes array of a Writer document in Backus-Naur form.
 
Let us describe a "well-formed" SwNodes array of a Writer document in Backus-Naur form.
  
Line 8: Line 7:
 
  EndNd = SwEndNode
 
  EndNd = SwEndNode
 
  TextNd = SwTxtNode
 
  TextNd = SwTxtNode
  GrafikNd = SwGrfNode
+
  GraphicNd = SwGrfNode
 
  OLENd = SwOLENode
 
  OLENd = SwOLENode
 
  TableNd = SwTableNode
 
  TableNd = SwTableNode
Line 18: Line 17:
 
  FooterNd = SwFooterStartNode
 
  FooterNd = SwFooterStartNode
  
<Document> ::= StartNd EndNd StartNd <Footnote content> EndNd StartNd <Special content> EndNd StartNd <Change tracking> EndNd StartNd <Content> EndNd
+
And now we get:
 
+
<Content> ::= TextNd | <'Table> | <Section> | <Content> <Content>
+
 
+
<'Table> ::= TableNd <Cells> EndNd
+
 
+
<Cells> ::= <Cell> | <Cell> <Cells>
+
 
+
<Cell> ::= CellNd <Content> EndNd
+
 
+
<Section> ::= SectionNd <Content> EndNd
+
 
+
<Special content> ::= ....
+
 
+
<Footnote content> ::= ....
+
  
<Change tracking> ::= ....
+
<Document> ::= <Empty> <Footnote content> <Special content> <Change tracking> <Body content>
 +
<Empty> ::= StartNd EndNd
 +
<Body content> ::= StartNd <Content> EndNd
 +
<Content> ::= TextNd | <'Table> | <Section> | <Content> <Content>
 +
<'Table> ::= TableNd <Cells> EndNd
 +
<Cells> ::= <Cell> | <Cell> <Cells>
 +
<Cell> ::= CellNd <Content> EndNd
 +
<Section> ::= SectionNd <Content> EndNd
 +
<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
 +
<Change tracking> ::= <Empty> | StartNd <Changes> EndNd
 +
<Changes> ::= <Body content> | <Changes> <Changes>

Latest revision as of 13:48, 28 March 2010

Writer Icon.png

Writer Project

Please view the guidelines
before contributing.

Popular Subcategories:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

Internal Documentation:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

API Documentation:

Ongoing Efforts:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

Sw.OpenOffice.org

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

And now we get:

<Document> ::= <Empty> <Footnote content> <Special content> <Change tracking> <Body content>
<Empty> ::= StartNd EndNd
<Body content> ::= StartNd <Content> EndNd
<Content> ::= TextNd | <'Table> | 
Personal tools