# -*- comment-start: "# " -*- # Pseudo-formal description of the AlcoveBook customisation layer, # trying to follow the non-xml dtd-cust draft specs. # Note: "ZAP ELEMENTS:" are really IGNORE settings on modules, and # should be somehow mapped to IGNOREs by the (non-existing-yet) # dtd-cust engine. RESTRICTS: PUBLIC "-//OASIS//DTD DocBook V4.1//EN" # book and set ZAP ELEMENTS: (Set|Book|Chapter|SetIndex|Preface)(Info)? ZAP ELEMENTS: Part(Into|Intro)? ZAP ELEMENTS: (Epigraph|Ackno|Colophon|Dedication) # toc* should be autogenerated # No better formalism, there's too much in this module # Or: ZAP ELEMENTS: ToC ZAPORPHANS: .* # zap sect[1-5], we have
ZAP ELEMENTS: Sect[1-5](Info)? ZAP ELEMENTS: SimpleSect # Olink and friends ZAP ELEMENTS: (OLink|ModeSpec) # features we don't want to use ZAP ELEMENTS: QandASet ZAPORPHANS: .* ZAP ELEMENTS: (Audio|Video)(Object|Data) # elements for editorial descriptions and such ZAP ELEMENTS: BeginPage ZAP ELEMENTS: BridgeHead # obsolescent stuff ZAP ELEMENTS: Graphic(CO)? # too-specific inline components ZAP ELEMENTS: (Abbrev|Acronym) # Maybe leftover from former ZAP of Phrase REMOVE WHICH: all ELEMENTS: Phrase FROM ENTITIES: gen.char.class REMOVE WHICH: all ELEMENTS: Phrase FROM ELEMENTS: GlossTerm REDEFINE ENTITY: tech.char.class AS: END REDEFINE # Restrict Article to something manageable, with requirements REMOVE WHICH: all ENTITIES: div.title.content FROM ELEMENTS: Article REQUIRE: Role IN: Article TOKENIZE: Role FROM: Article AS: (Proposal|WhitePaper|Specification|Documentation|Delivery|Other) REMOVE ATTRIBUTES: (Class|ParentBook) FROM ELEMENTS: Article DESYNC ENTITY: common.attrib IN ATTLIST: Article TO: RESTRICTION NAMED: article.common.attrib LINKED: NO DESYNC ENTITY: lang.attrib IN ENTITY: article.common.attrib TO: RESTRICTION NAMED: article.lang.attrib LINKED: NO REQUIRE: Lang IN ATTLIST-ENTITY: article.lang.attrib # Make some elements mandatory and/or unique in ArticleInfo, forcing # to group together like elements for clarity # FIXME: not completely formalized REDEFINE ELEMENT-CONTENT: ArticleInfo AS: (Title&Subtitle&InvPartNumber?&Abstract?&Date&RevHistory&%articleinfo.mixed;) DESYNC ELEMENT-CONTENT: ArticleInfo TO: RESTRICTION ENTITY NAMED: articleinfo.mixed REMOVE WHICH: all ELEMENTS: (Abbrev|ArtPageNums|BiblioMisc|BiblioSet|Collab|Editor|ISBN|ISSN|IssueNum|OrgName|) FROM ENTITY: articleinfo.mixed # assuming existence of types: # - Mix # - UnrestrictedMix => (a|b|...)* - isa: Mix # - UnlimitedGroupedMix => (a*&b*&...) - isa: GroupedMix # - GroupedMix => (a*&b&c+&...) - isa: Mix RESTRICT CONTENT-MODEL-TYPE: UnrestrictedMix OF ENTITY: articleinfo.mixed TO: UnlimitedGroupedMix # FIXME: the following is wrong RESTRICT OCCURENCE-COUNT OF ELEMENTS: (Title|Subtitle|Date|RevHistory) TO: 1 IN ENTITY: articleinfo.mixed RESTRICT OCCURENCE-COUNT OF ELEMENTS: (InvPartNumber|Abstract) TO: 0..1 IN ENTITY: articleinfo.mixed # FIXME: still to formalize content split of %articleinfo.mixed; and # apply that to ArticleInfo as well # FIXME: not completely formalized REDEFINE ELEMENT-CONTENT: ReferenceInfo AS: (%morearticleinfo.mixed;) # FIXME: need to formalize %sectioninfo.mixed; REDEFINE ELEMENT-CONTENT: (AppendixInfo|SectionInfo|ObjectInfo|SidebarInfo |RefEntryInfo|BibliographyInfo|GlossaryInfo|IndexInfo |RefSect1Info|RefSect2Info|RefSect3Info|RefSynopsisDivInfo) AS: (%sectioninfo.mixed;) REPLACE WHICH: all ENTITIES: component.mix WITH: divcomponent.mix IN ELEMENTS: (Glossary|Bibliography|Index) FIX TYPO: (%nav.class) TO: (%nav.class;) IN ELEMENTS: Appendix