Skip to content

ISODoc: Text Blocks

Nick Nicholas edited this page Jan 24, 2018 · 26 revisions

blocks

BasicBlock = ( figure | admonition | example | table | sourcecode | quote | paragraph_with_footnote )

formula =
  element formula {
    attribute id? { text },
    stem, dl?
}

quote =
  element quote {
    attribute id? { text },
    quote_source?,
    quote_author?,
    paragraph_with_footnote+
}

quote_source =
  element source { CitationInfo }

quote_author =
  element author { CreatorInfo }

sourcecode =
  element sourcecode {
    attribute id? { text },
    tname?, ( text | callout )+, calloutlist?
  }

table =
  element table {
    attribute id? { text },
    name?, thead?, tfoot?, tbody, note*, dl?
    # note should not be paragraph with footnote, given that tables can be footnoted already
    # tbody obligation is 1..* not 0..*
  }

thead = element thead { tr }
tfoot = element tfoot { tr }
tbody = element tbody { tr+ }

tr =
  element tr { ( td | th )+ }

td =
  element td {
    attribute colspan? { text },
    attribute rowspan? { text },
    attribute align? { "left" | "right" | "center" },
    (
      (text | TextElement | reviewer_comment )* |
      paragraph_with_footnote+
    )
}

th =
  element th {
    attribute colspan? { text },
    attribute rowspan? { text },
    attribute align? { "left" | "right" | "center" },
    (
      (text | TextElement | reviewer_comment )* |
      paragraph_with_footnote+
    )
}

th =
  element th {
    attribute colspan? { text },
    attribute rowspan? { text },
    attribute align? { "left" | "right" | "center" },
    (
      (text | em | eref | strong | stem | sub | sup | tt | xref | br | reviewer_comment )* |
      paragraph_with_footnote+
    )
}

example =
  element example {
    ( formula | ul | ol | dl | quote | sourcecode | reviewer_comment | paragraph_with_footnote )+
    # callout lists do not belong in example, list needs to be redefined
}

admonition =
  element admonition {
    attribute type ( { "warning" | "safety" | "danger" } ),
    paragraph_with_footnote*
  }

figure =
  element figure {
    attribute identifier? { text },
    # changed from anchor, need to be consistent
     source?, tname?, (figure | textelement*, note*, dl? )
  }

Items for discussion (threaded: identify by number)

  1. table/identifier, figure/identifier: changed from anchor, need to be consistent (in fact, I’d rather the clause/identifier change to anchor)

  2. table/note: note should not be paragraph with footnote, given that tables can be footnoted already

  3. table/tbody: tbody obligation is 1..* not 0..*

  4. td: I’d be more comfortable with the contents of td being TextElement than paragraph_with_footnote

  5. example/list: list in the UML includes callout lists, but callout lists do not belong in example: list needs to be redefined

  6. BasicBlock/clause: why is this here? blocks in the logical model receive their clause id from their context, so this does not need to be specified

  7. formula/stemValue, formula/stemType: These can be replaced with formula/InlineFormula (which I will call stem in the grammar`)

  8. sourcecode, formula, table, example, figure: these do not inherit paragraphs; you should instead add paragraphs to Admonition and Example, and make Paragraph a subclass of BasicBlock.

  9. sourcecode has a Value attribute of text, for the listing itself

  10. I would make id an attribute of the superclass BasicBlock; id is an attribute of several of these.

  11. Actually, both th and td can be either TextTableCell or ParagraphTableCell.

Clone this wiki locally