1 |
# -*- comment-start: "# " -*- |
2 |
|
3 |
# Pseudo-formal description of the AlcoveBook customisation layer, |
4 |
# trying to follow the non-xml dtd-cust draft specs. |
5 |
|
6 |
# Note: "ZAP ELEMENTS:" are really IGNORE settings on modules, and |
7 |
# should be somehow mapped to IGNOREs by the (non-existing-yet) |
8 |
# dtd-cust engine. |
9 |
|
10 |
|
11 |
RESTRICTS: PUBLIC "-//OASIS//DTD DocBook V4.1//EN" |
12 |
|
13 |
# book and set |
14 |
|
15 |
ZAP ELEMENTS: (Set|Book|Chapter|SetIndex|Preface)(Info)? |
16 |
ZAP ELEMENTS: Part(Into|Intro)? |
17 |
|
18 |
ZAP ELEMENTS: (Epigraph|Ackno|Colophon|Dedication) |
19 |
|
20 |
|
21 |
# toc* should be autogenerated |
22 |
|
23 |
# No better formalism, there's too much in this module |
24 |
# Or: ZAP ELEMENTS: ToC ZAPORPHANS: .* |
25 |
<!ENTITY % toc.content.module "IGNORE"> |
26 |
|
27 |
|
28 |
# zap sect[1-5], we have <section> |
29 |
ZAP ELEMENTS: Sect[1-5](Info)? |
30 |
ZAP ELEMENTS: SimpleSect |
31 |
|
32 |
|
33 |
# Olink and friends |
34 |
ZAP ELEMENTS: (OLink|ModeSpec) |
35 |
|
36 |
|
37 |
# features we don't want to use |
38 |
ZAP ELEMENTS: QandASet ZAPORPHANS: .* |
39 |
ZAP ELEMENTS: (Audio|Video)(Object|Data) |
40 |
|
41 |
|
42 |
# elements for editorial descriptions and such |
43 |
ZAP ELEMENTS: BeginPage |
44 |
ZAP ELEMENTS: BridgeHead |
45 |
|
46 |
|
47 |
# obsolescent stuff |
48 |
ZAP ELEMENTS: Graphic(CO)? |
49 |
|
50 |
|
51 |
# too-specific inline components |
52 |
ZAP ELEMENTS: (Abbrev|Acronym) |
53 |
|
54 |
|
55 |
# Maybe leftover from former ZAP of Phrase |
56 |
REMOVE WHICH: all ELEMENTS: Phrase FROM ENTITIES: gen.char.class |
57 |
REMOVE WHICH: all ELEMENTS: Phrase FROM ELEMENTS: GlossTerm |
58 |
|
59 |
|
60 |
REDEFINE ENTITY: tech.char.class AS: |
61 |
|
62 |
<!ENTITY % local.markupdescription.char.class ""> |
63 |
<!ENTITY % markupdescription.char.class |
64 |
"(Markup|SGMLTag |
65 |
%local.markupdescription.char.class;)"> |
66 |
|
67 |
<!ENTITY % local.harddescription.char.class ""> |
68 |
<!ENTITY % harddescription.char.class |
69 |
"(Hardware |
70 |
|MouseButton|SystemItem |
71 |
%local.harddescription.char.class;)"> |
72 |
|
73 |
<!ENTITY % local.softdescription.char.class ""> |
74 |
<!ENTITY % softdescription.char.class |
75 |
"%harddescription.char.class; |
76 |
|(Action|Application |
77 |
|Command|ComputerOutput |
78 |
|Email|EnVar|Filename |
79 |
|GUIButton|GUIIcon|GUILabel|GUIMenu|GUIMenuItem |
80 |
|GUISubmenu|Interface|KeyCap |
81 |
|KeyCombo|Literal|MenuChoice |
82 |
|Option|Optional|Parameter |
83 |
|Prompt|Replaceable|ReturnValue|UserInput |
84 |
%local.softdescription.char.class;)"> |
85 |
|
86 |
<!ENTITY % local.softinternals.char.class ""> |
87 |
<!ENTITY % softinternals.char.class |
88 |
"%softdescription.char.class; |
89 |
|(ClassName|MethodName|InterfaceName|ExceptionName |
90 |
|OOClass|OOInterface|OOException |
91 |
|Database|ErrorCode|ErrorName|ErrorType |
92 |
|Function|KeyCode|KeySym|Constant |
93 |
|Property|StructField |
94 |
|StructName|Symbol|Token|Type|VarName |
95 |
%local.softinternals.char.class;)"> |
96 |
|
97 |
<!ENTITY % local.tech.char.class ""> |
98 |
<!ENTITY % tech.char.class |
99 |
"%softinternals.char.class; |
100 |
|%markupdescription.char.class; |
101 |
|(MediaLabel |
102 |
%local.tech.char.class;) |
103 |
%ebnf.inline.hook;"> |
104 |
|
105 |
END REDEFINE |
106 |
|
107 |
|
108 |
# Restrict Article to something manageable, with requirements |
109 |
|
110 |
REMOVE WHICH: all ENTITIES: div.title.content FROM ELEMENTS: Article |
111 |
|
112 |
REQUIRE: Role IN: Article |
113 |
TOKENIZE: Role FROM: Article AS: (Proposal|WhitePaper|Specification|Documentation|Delivery|Other) |
114 |
|
115 |
REMOVE ATTRIBUTES: (Class|ParentBook) FROM ELEMENTS: Article |
116 |
|
117 |
|
118 |
DESYNC ENTITY: common.attrib IN ATTLIST: Article |
119 |
TO: RESTRICTION NAMED: article.common.attrib LINKED: NO |
120 |
DESYNC ENTITY: lang.attrib IN ENTITY: article.common.attrib |
121 |
TO: RESTRICTION NAMED: article.lang.attrib LINKED: NO |
122 |
REQUIRE: Lang IN ATTLIST-ENTITY: article.lang.attrib |
123 |
|
124 |
|
125 |
# Make some elements mandatory and/or unique in ArticleInfo, forcing |
126 |
# to group together like elements for clarity |
127 |
|
128 |
# FIXME: not completely formalized |
129 |
REDEFINE ELEMENT-CONTENT: ArticleInfo |
130 |
AS: (Title&Subtitle&InvPartNumber?&Abstract?&Date&RevHistory&%articleinfo.mixed;) |
131 |
|
132 |
|
133 |
# FIXME: not completely formalized |
134 |
REDEFINE ELEMENT-CONTENT: ReferenceInfo |
135 |
AS: (%morearticleinfo.mixed;) |
136 |
|
137 |
# FIXME: need to formalize %sectioninfo.mixed; |
138 |
|
139 |
REDEFINE ELEMENT-CONTENT: (AppendixInfo|SectionInfo|ObjectInfo|SidebarInfo |
140 |
|RefEntryInfo|BibliographyInfo|GlossaryInfo|IndexInfo |
141 |
|RefSect1Info|RefSect2Info|RefSect3Info|RefSynopsisDivInfo) |
142 |
AS: (%sectioninfo.mixed;) |
143 |
|
144 |
REPLACE WHICH: all ENTITIES: component.mix WITH: divcomponent.mix |
145 |
IN ELEMENTS: (Glossary|Bibliography|Index) |
146 |
|
147 |
FIX TYPO: (%nav.class) TO: (%nav.class;) |
148 |
IN ELEMENTS: Appendix |