OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: docbook tiny? Again.


Attached, (I think attachments get through on this list)
a 'tiny' (my definition) version of docbook.
After Jirka corrected me, it is now valid to docbook 5.0b

Just to show what can be done I guess?
I haven't 'extended' it at all.

Changing the subject:

>From the reports from xml 2005,
quote
Awards!
Ken Holman (Yeah!!), yet another Canadian (there aren't many
NON-Canadians here!) is now presenting to Dr. James Mason a collection
of notes from the SGML standard committees from the last twenty years of
his overseeing the evolution of SGML.

Lauren Wood is now awarding the XML Cup - the winner are ...

Norm Walsh (Father of DocBook, TAG and many others) and Michael Kay (THE
XSLT Guru of gurus!)!! Fantastic!

end quote

http://www.understandingxml.com/archives/2005/11/keynote_from_at.html#more


-- 
Regards, 

Dave Pawson
XSLT + Docbook FAQ
http://www.dpawson.co.uk
default namespace db = "http://docbook.org/ns/docbook";


namespace s = "http://www.ascc.net/xml/schematron";
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0";
include "/sgml/docbook/v5/rng/docbook.rnc" 

{ ## file level brace

## Start point. I chose article. YMMV
start = db.article

##
## Note. Reductions have removed structure. 
## Always look at docbook.rnc to check on the original definition
## when restoring content models, to keep aligned with docbook
##


div {
## Remove  db.all.blocks* 
db.itemizedlist |=
    element itemizedlist {
       db.itemizedlist.attlist,
       db.itemizedlist.info,
       db.listitem+
     }
}
div {
## db.listitem reductions.
db.listitem =
    element listitem { db.listitem.attlist, db.para.blocks+ }
}

div {
##
## db.info.elements reductions. db.artpagenums db.bibliocoverage
##    db.biblioid db.bibliosource  db.collab db.confgroup
##    db.contractsponsor  db.contractnum db.keywordset db.legalnotice
##    db.mediaobject db.pagenums db.printhistory db.productname
##    db.productnumber db.seriesvolnums db.subjectset db.volumenum
##    db.extendedlink (db.bibliomisc | db.bibliomset | 
##    db.bibliorelation | db.biblioset) db.itermset
##
db.info.elements =
  (db.abstract
   | db.address
   | db.author
   | db.authorgroup
   | db.authorinitials
   | db.copyright
   | db.date
   | db.edition
   | db.editor
   | db.issuenum
   | db.orgname
   | db.othercredit
   | db.pubdate
   | db.publisher
   | db.publishername
   | db.releaseinfo
   | db.revhistory)
  | db.annotation
}



div{
## db.para.blocks reductions. db.anchor, db.simpara
db.para.blocks =  db.para | db.formalpara 
}
div{
## db.nopara reductions. db.math.blocks db.indexterm db.synopsis.blocks
## FIXME.   
db.nopara.blocks =
  db.list.blocks
   | db.admonition.blocks
   | db.formal.blocks
   | db.informal.blocks
   | db.publishing.blocks
   | db.graphic.blocks
   | db.technical.blocks
   | db.verbatim.blocks
   | db.bridgehead
   | db.remark
   | db.revhistory
}

div{
##
## db.list.block reductions.  db.procedure db.variablelist db.segmentedlist
## db.glosslist  db.bibliolist db.calloutlist db.qandaset
db.list.blocks =
  db.itemizedlist
   | db.orderedlist
   | db.simplelist 
 }
div{
##
## db.admonition.blocks reductions. db.tip | db.warning
##
db.admonition.blocks =
  db.caution | db.important | db.note 
}


## Basic excludes. I decided I didn't want them. You choose.
#  These are not allowed anywhere.

div{
##
## db.blocks reduction.
##
db.informal.blocks=notAllowed
}
div{
##
## db.publishing.blocks reduction. db.epigraph
##
db.publishing.blocks =
  db.sidebar | db.blockquote | db.address 
}
div{
##
## db.graphic.blocks reduction. db.screenshot
##
db.graphic.blocks = db.mediaobject 
}

div{
##
## db.technical.blocks reduction.   (db.productionset | db.constraintdef)
##   db.msgset
##
div{
db.technical.blocks =
  db.procedure  | db.task
}
##
## db.verbatim.blocks reduction. db.screen db.synopsis
## (db.programlistingco | db.screenco)
##
db.verbatim.blocks =
  db.programlisting |   db.literallayout  | db.screen
  }
div{
##
## db.synopsis.blocks reduction.  All removed
##
db.synopsis.blocks = notAllowed
}

div{
##
## db.revdescription reductions. db.all.blocks*
##  Added. db.para.blocks*
##  ## A extended description of a revision to a document
  db.revdescription =
    element revdescription { db.revdescription.attlist, db.para.blocks*  }
}

div {
##
## db.date.contentmodel reductions. text
##
db.date.contentmodel =
  xsd:date | xsd:dateTime | xsd:gYearMonth | xsd:gYear 
}

div{
##
## db.para reductions. db.nopara.blocks replaced by text
##
  db.para =
    
    ## A paragraph
    [
      s:pattern [
        name = "Root must have version"
        "\x{a}" ~
        "          "
        s:rule [
          context = "/db:para"
          "\x{a}" ~
          "            "
          s:assert [
            test = "@version"
            "The root element must have a version attribute."
          ]
          "\x{a}" ~
          "          "
        ]
        "\x{a}" ~
        "        "
      ]
    ]
    element para {
      db.para.attlist,
      db.para.info,
      (db.all.inlines, text )*
    }
}

div{

#
# General high level element restrictions.
#
db.abstract = notAllowed
db.accel = notAllowed
db.ackno = notAllowed
db.anchor=notAllowed
db.bibliography=notAllowed
db.bibliolist=notAllowed
db.calloutlist=notAllowed
db.caution=notAllowed
db.classsynopsis=notAllowed
db.cmdsynopsis=notAllowed
db.colophon=notAllowed
db.constraintdef=notAllowed
db.constructorsynopsis=notAllowed
db.destructorsynopsis=notAllowed
db.epigraph=notAllowed
db.equation=notAllowed
db.fieldsynopsis=notAllowed
db.formalpara=notAllowed
db.funcsynopsis=notAllowed
db.glossary=notAllowed
db.glosslist=notAllowed
db.important=notAllowed
db.index=notAllowed
db.indexterm=notAllowed
db.informalequation=notAllowed
db.informalexample=notAllowed
db.informalfigure=notAllowed
db.informaltable=notAllowed
db.methodsynopsis=notAllowed
db.msgset=notAllowed
db.productionset=notAllowed
db.programlistingco=notAllowed
db.refentry=notAllowed
db.screenco=notAllowed
db.screenshot=notAllowed
db.sect1=notAllowed
db.sect2=notAllowed
db.sect3=notAllowed
db.sect4=notAllowed
db.sect5=notAllowed
db.segmentedlist=notAllowed
db.sidebar=notAllowed
db.simplesect=notAllowed
db.subtitle=notAllowed
db.synopsis=notAllowed
db.task=notAllowed
db.tip=notAllowed
db.titleabbrev=notAllowed
db.variablelist=notAllowed
db.warning=notAllowed
}

##
##Inline reductions
##


div{
#
# db.publishing.inlines reductions. db.glossary.inlines db.coref db.wordasword
#
db.publishing.inlines = 
  db.abbrev
   | db.acronym
   | db.date
   | db.emphasis
   | db.footnote
   | db.footnoteref
   | db.foreignphrase
   | db.phrase
   | db.quote
   | db.subscript
   | db.superscript
   
}
div {
##
## db.product.inlines reductions. 
##
db.product.inlines = notAllowed
}

div{
##
## db.bibliography.inlines reductions.   db.citation  db.citerefentry
##   db.citetitle  db.citebiblioid
##  
db.bibliography.inlines =
   db.author
  | db.personname
  | db.orgname
  | db.editor
}

div {
##
## db.indexing.inlines reductions. db.indexterm
##
db.indexing.inlines=notAllowed
}

div{
##
## db.link.inlines reductions. db.biblioref
##
db.link.inlines =
  db.xref | db.link | db.olink | db.anchor

}

div{
##
## db.technical.inlines reductions. all.
##
db.technical.inlines =notAllowed
}

div{
##
## db.error.inlines reductions. all
##
db.error.inlines = notAllowed
}
div{
##
## db.os.inlines reductions.   db.prompt db.envar  db.computeroutput
##   db.userinput
##
db.os.inlines =
   db.filename  | db.command
}
div{
##
## db.programming.inlines reductions. all
##
db.programming.inlines = notAllowed
}
div{
##
## db.oo.inlines reductions. All
##
db.oo.inlines = notAllowed
}
div{
##
## db.markup.inlines reductions.    db.tag db.markup db.token db.symbol
## db.literal   db.constant  
##
db.markup.inlines =
  db.code  | db.email   | db.uri
}

div{
##
## db.gui.inlines. All.
##
db.gui.inlines = notAllowed

}

div{
##
## db.keyboard.inlines reductions. All.
##
db.keyboard.inlines =notAllowed

}





div{
##
## db.systemitem.inlines reductions. db.co
##
db.systemitem.inlines = db._text 
}

div{
##
## db.ubiq.inlines reductions. db.indexterm
##
db.ubiq.inlines =
  (db.inlinemediaobject
   | db.remark
   | db.superscript
   | db.subscript
   | db.link.inlines
   | db.alt)
  | db.annotation
  
}


div{
##
## db._text reductions. db.replaceable
##
db._text = (text | db.ubiq.inlines | db._phrase  )*
}

##
##Attribute reductions.
##

div {
##
## db.common.attributes reductions. db.remap.attribute 
##   db.revisionflag.attribute db.version.attribute
##   db.effectivity.attributes 
##
db.common.attributes =
    db.xml.id.attribute?
  & db.xml.lang.attribute?
  & db.xml.base.attribute?
  & db.xreflabel.attribute?
  & db.dir.attribute?
  & db.annotations.attribute?
}

div {
##
## db.common.idreq.attributes reductions. db.version.attribute
## db.remap.attribute db.revisionflag.attribute db.effectivity.attributes
db.common.idreq.attributes =
    db.xml.id.attribute
  & db.xml.lang.attribute?
  & db.xml.base.attribute?
  & db.xreflabel.attribute?
  & db.dir.attribute?
  & db.annotations.attribute?

}




}


 




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]