# A note schema for bibliographic records. # by Bruce D'Arcus #------------------------------------------------------------------------------ # Cited content should be linked directly with its referent(s). # In biblio-notes, we thus add attributes that allow various # elements -- including the main note element -- to be linked to their # bibliographic referent(s). # # The main "reference" ID refers to the primary source(s), while the # related allows a second-order of linking. # #------------------------------------------------------------------------------ default namespace = "http://refdb.sourceforge.net/xnotes-ns" ## Start pattern is defined for maximum flexibility: to create both standalone ## notes, as well as notes embedded in other documents. start |= ( xnoteset | xnote ) xnoteset = element xnoteset { attlist.xnoteset, xnote* } attlist.xnoteset &= empty xnote = element xnote { xn.title?, xn.note*, xn.keyword*, attlist.xnote } attlist.xnote &= empty xn.title = element title { text } xn.keyword = element keyword { text } ## The main element is "note," and can be repeated. Attributes have been ## added to enhance note-taking support related to bibliographic data. xn.note = element content { attlist.note, para* } attlist.note &= attribute ID { xsd:ID }?, attribute user { text }?, attribute href { text }?, attribute xml:lang { text }?, attribute date { xsd:date }?, Citation.attlist? ## Add attributes to attach elements with their citation referent(s). Citation.attlist = attribute refid { xsd:IDREF }?, attribute name { text }?, attribute nameid {xsd:IDREF }?, attribute seealso { xsd:IDREFS }?, attribute unit { xsd:NMTOKEN }?, attribute start { xsd:NMTOKEN }?, attribute end { xsd:NMTOKEN }? # main elements Blocks = para | blockquote | ext.Blocks Inlines = text | xn.emphasis | xn.quote | xn.span | xn.foreignphrase | xn.socalled | xn.list | xn.pagebreak | ext.Inlines ## The following elements allow for future extension if needed. ext.Inlines = notAllowed ext.Blocks = notAllowed para = element p { attlist.para, (Inlines | Blocks)* } attlist.para &= Citation.attlist xn.quote = element q { attlist.quote, Inlines* } attlist.quote &= Citation.attlist blockquote = element blockquote { attlist.blockquote, para* } attlist.blockquote &= Citation.attlist xn.list = element list { attlist.xn.list, listitem* } attlist.xn.list &= attribute type { "bullets" | "numbers" } listitem = element item { head*, body*, Inlines* } head = element head { text } body = element body { text } ## A "source" attribute to indicate whether the emphasis ## has been added by the note-taker, or was present in the original source. xn.emphasis = element em { attlist.emphasis, Inlines* } attlist.emphasis &= attribute source { "original" | "added" }? ## The span element is added as a more generic way to tag text. I imagine it ## could be used to tag chunks of text with a language attribute, or perhaps ## to act as a kind of highlighter of key pieces of content. xn.span = element span { attlist.span, Inlines* } attlist.span &= attribute type { text }?, attribute xml:lang { text }? xn.foreignphrase = element foreignphrase { Inlines* } xn.socalled = element socalled { Inlines* } ## page break element, for extended quotes xn.pagebreak = element pb { empty }