Skip to content

ISODoc: Text Blocks

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

blocks

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

paragraph =
  element p { ParagraphType }

Alignments = ( "left" | "right" | "center" | "justified" )

ParagraphType =
    attribute id { xsd:ID },
    attribute alignment { Alignments }?,
   ( TextElement )*, review*

paragraph_with_footnote =
  element p {
    attribute id { xsd:ID },
    attribute alignment { Alignments }?,
   ( TextElement | fn  )*, review*
}

review =
  element review {
  attribute id { xsd:ID },
  attribute reviewer? { text },
  attribute date { text },
  paragraph+
}


formula =
  element formula {
    attribute id { xsd:ID },
    stem, dl?
}

quote =
  element quote {
    attribute id { xsd:ID },
    attribute alignment { Alignments }?,
    quote_source?,
    quote_author?,
    paragraph_with_footnote+
}

quote_source =
  element source { CitationInfo }

quote_author =
  element author { CreatorInfo }

sourcecode =
  element sourcecode {
    attribute id { xsd:ID },
    tname?, ( text | callout )+, annotation*
  }

table =
  element table {
    attribute id { xsd:ID },
    name?, thead?, tfoot?, tbody, table_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+ }

table_note = element note { ParagraphType }

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

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

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

example =
  element example {
    attribute id { xsd:ID },
    ( formula | ul | ol | dl | quote | sourcecode | paragraph_with_footnote | review )+
}

admonition =
  element admonition {
    attribute type ( { "warning" | "note" | "tip" | "important" | "caution" } ),
    attribute id { xsd:ID },
    paragraph_with_footnote*
  }

figure =
  element figure {
    attribute id { xsd:ID },
     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`)

    • I’m still calling FormulaBlock formula, it’s InlineForumla that should be renamed stem.

      1. Addressed

  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.

    1. Addressed

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

    1. Addressed

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

    1. Addressed

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

    1. Addressed

  12. Do Figure/Id and Figure/Anchor mean different things?

    1. Addressed

Clone this wiki locally