13 version.attribute = attribute version { "1.0" } |
13 version.attribute = attribute version { "1.0" } |
14 |
14 |
15 publidoc.content = |
15 publidoc.content = |
16 document |
16 document |
17 | top.topic |
17 | top.topic |
|
18 |
|
19 |
|
20 # ============================================================================= |
|
21 # HEAD LEVEL |
|
22 # ============================================================================= |
|
23 |
|
24 # ~~~~~~~~~~~~~~~~~~~~~~~ title, shorttitle, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
25 |
|
26 title = element title { title.content } |
|
27 shorttitle = element shorttitle { title.content } |
|
28 subtitle = element subtitle { title.content } |
|
29 |
|
30 title.content = inlines |
|
31 |
|
32 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
33 |
|
34 # ~~~~~~ identifier |
|
35 identifier = element identifier { |
|
36 (attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"}) |
|
37 | (attribute type { "uri" }, for.attribute?, xsd:anyURI) |
|
38 } |
|
39 |
|
40 # ~~~~~~ identifier.ean |
|
41 identifier.ean = element identifier { |
|
42 attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"} |
|
43 } |
|
44 |
|
45 # ~~~~~~ identifier.uri |
|
46 identifier.uri = element identifier { |
|
47 attribute type { "uri" }, for.attribute?, xsd:anyURI |
|
48 } |
|
49 |
|
50 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
51 |
|
52 copyright = element copyright { copyright.content } |
|
53 |
|
54 copyright.content = simple.inlines |
|
55 |
|
56 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ collection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
57 |
|
58 collection = element collection { collection.content } |
|
59 |
|
60 collection.content = simple.inlines |
|
61 |
|
62 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
63 |
|
64 # ~~~~~~ contributors |
|
65 contributors = element contributors { contributors.content } |
|
66 |
|
67 contributors.content = |
|
68 contributor+ |
|
69 |
|
70 # ~~~~~~ contributor |
|
71 contributor = element contributor { contributor.content } |
|
72 |
|
73 contributor.content = |
|
74 identifier.uri?, |
|
75 (((firstname, secondname?)?, lastname) | label), |
|
76 address?, |
|
77 link?, |
|
78 role+ |
|
79 |
|
80 # ~~~~~~ firstname, secondname, lastname, label |
|
81 firstname = element firstname { firstname.content } |
|
82 secondname = element secondname { secondname.content } |
|
83 lastname = element lastname { lastname.content } |
|
84 label = element label { label.content } |
|
85 |
|
86 firstname.content = simple.inlines |
|
87 secondname.content = simple.inlines |
|
88 lastname.content = simple.inlines |
|
89 label.content = simple.inlines |
|
90 |
|
91 # ~~~~~~ address |
|
92 address = element address { address.content } |
|
93 |
|
94 address.content = simple.inlines |
|
95 |
|
96 # ~~~~~~ role |
|
97 role = element role { role.content } |
|
98 |
|
99 role.content = "author" | "illustrator" | "publisher" | "packager" |
|
100 |
|
101 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
102 |
|
103 place = element place { place.content } |
|
104 |
|
105 place.content = simple.inlines |
|
106 |
|
107 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
108 |
|
109 source = element source { |
|
110 ( (attribute type { "book" }, bibliography.entry.content) |
|
111 | (attribute type { "file" }, source.content.file)), |
|
112 source.content |
|
113 } |
|
114 |
|
115 source.content.file = |
|
116 identifier.uri |
|
117 source.content = |
|
118 annotation* |
|
119 |
|
120 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
121 |
|
122 # ~~~~~~ keywordset |
|
123 keywordset = element keywordset { keywordset.content } |
|
124 |
|
125 keywordset.content = keyword+ |
|
126 |
|
127 # ~~~~~~ keyword |
|
128 keyword = element keyword { keyword.content } |
|
129 |
|
130 keyword.content = simple.inlines |
|
131 |
|
132 # ~~~~~~ subjectset |
|
133 subjectset = element subjectset { subjectset.content } |
|
134 |
|
135 subjectset.content = subject+ |
|
136 |
|
137 # ~~~~~~ subject |
|
138 subject = element subject { subject.content } |
|
139 |
|
140 subject.content = simple.inlines |
|
141 |
|
142 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ index ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
143 |
|
144 # ~~~~~~ index |
|
145 index = element index { index.content } |
|
146 head.index = element index { head.index.content } |
|
147 |
|
148 index.content = |
|
149 (index.w, index.entry?) |
|
150 | (index.entry, (index.w | index.entry)?) |
|
151 head.index.content = |
|
152 index.entry, index.entry? |
|
153 |
|
154 # ~~~~~~ index.w |
|
155 index.w = element w { simple.inlines } |
|
156 |
|
157 # ~~~~~~ index.entry |
|
158 index.entry = element entry { simple.inlines } |
|
159 |
|
160 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
161 |
|
162 abstract = element abstract { abstract.content } |
|
163 |
|
164 abstract.content = |
|
165 p+ |
|
166 |
|
167 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
168 |
|
169 cover = element cover { cover.content } |
|
170 |
|
171 cover.content = |
|
172 cover.image |
|
173 |
|
174 cover.image = element image { cover.image.attributes } |
|
175 |
|
176 cover.image.attributes = |
|
177 media.id.attribute |
|
178 |
|
179 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
180 |
|
181 annotation = element annotation { annotation.content } |
|
182 |
|
183 annotation.content = inlines |
18 |
184 |
19 |
185 |
20 # ============================================================================= |
186 # ============================================================================= |
21 # TOP LEVEL |
187 # TOP LEVEL |
22 # ============================================================================= |
188 # ============================================================================= |
78 |
243 |
79 # ============================================================================= |
244 # ============================================================================= |
80 # DIVISION LEVEL |
245 # DIVISION LEVEL |
81 # ============================================================================= |
246 # ============================================================================= |
82 |
247 |
83 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
248 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
84 |
249 |
85 # ~~~~~~ division |
|
86 division = element division { division.attributes, division.content } |
|
87 |
|
88 division.attributes = |
|
89 division.type.attribute? |
|
90 division.type.attribute = attribute type { xsd:NCName } |
|
91 |
|
92 division.content = |
|
93 division.head?, |
|
94 front?, |
|
95 (division | topic)+ |
|
96 |
|
97 # ~~~~~~ division.head |
|
98 division.head = element head { division.head.content } |
250 division.head = element head { division.head.content } |
99 |
251 |
100 division.head.content = |
252 division.head.content = |
101 (title, shorttitle?, subtitle*)? |
253 (title, shorttitle?, subtitle*)? |
102 & head.index* |
254 & head.index* |
103 & abstract? |
255 & abstract? |
104 & annotation* |
256 & annotation* |
105 |
257 |
106 # ~~~~~~ front |
258 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
259 |
|
260 division = element division { division.attributes, division.content } |
|
261 |
|
262 division.attributes = |
|
263 division.type.attribute? |
|
264 division.type.attribute = attribute type { xsd:NCName } |
|
265 |
|
266 division.content = |
|
267 division.head?, |
|
268 front?, |
|
269 (division | topic)+ |
|
270 |
|
271 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ front ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
272 |
107 front = element front { front.content } |
273 front = element front { front.content } |
108 |
274 |
109 front.content = |
275 front.content = |
110 section+ |
276 section+ |
111 |
277 |
148 |
314 |
149 # ============================================================================= |
315 # ============================================================================= |
150 # SECTION LEVEL |
316 # SECTION LEVEL |
151 # ============================================================================= |
317 # ============================================================================= |
152 |
318 |
153 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
319 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
154 |
320 |
155 header = element header { header.content } |
|
156 |
|
157 header.content = |
|
158 block+ |
|
159 |
|
160 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
161 |
|
162 # ~~~~~~ section |
|
163 section = element section { section.attributes, section.content } |
|
164 |
|
165 section.attributes = |
|
166 xmlid.attribute? |
|
167 & section.type.attribute? |
|
168 & lang.attribute? |
|
169 & for.attribute? |
|
170 section.type.attribute = attribute type { xsd:NCName } |
|
171 for.attribute = attribute for { xsd:NCName } |
|
172 |
|
173 section.content = |
|
174 section.head?, |
|
175 (section+ | block+) |
|
176 |
|
177 # ~~~~~~ section.head |
|
178 section.head = element head { section.head.content } |
321 section.head = element head { section.head.content } |
179 |
322 |
180 section.head.content = |
323 section.head.content = |
181 (title, shorttitle?, subtitle*)? |
324 (title, shorttitle?, subtitle*)? |
182 & keywordset? |
325 & keywordset? |
204 |
369 |
205 # ============================================================================= |
370 # ============================================================================= |
206 # BLOCK LEVEL |
371 # BLOCK LEVEL |
207 # ============================================================================= |
372 # ============================================================================= |
208 |
373 |
209 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
374 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
210 |
375 |
211 # ~~~~~~ block |
|
212 block = (p | speech | \list | blockquote | table | table.cals | media) |
|
213 |
|
214 # ~~~~~~ block.head |
|
215 block.head = element head { block.head.content } |
376 block.head = element head { block.head.content } |
216 |
377 |
217 block.head.content = |
378 block.head.content = |
218 (title, shorttitle?, subtitle*)? |
379 (title, shorttitle?, subtitle*)? |
219 & head.index* |
380 & head.index* |
|
381 |
|
382 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
383 |
|
384 block = (p | speech | \list | blockquote | table | table.cals | media) |
220 |
385 |
221 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
386 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
222 |
387 |
223 p = element p { p.content } |
388 p = element p { p.content } |
224 |
389 |
456 y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } |
621 y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } |
457 w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } |
622 w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } |
458 h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } |
623 h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} } |
459 hotspot.display.attribute = attribute display { "normal" | "visible" | "pulse" } |
624 hotspot.display.attribute = attribute display { "normal" | "visible" | "pulse" } |
460 hotspot.type.attribute = attribute type { xsd:NCName } |
625 hotspot.type.attribute = attribute type { xsd:NCName } |
461 |
626 |
462 hotspot.content = |
627 hotspot.content = |
463 ((link | p+ | image | audio | video), (spot, scenario?)?) |
628 ((link | p+ | image | audio | video), (spot, scenario?)?) |
464 | (spot, scenario?) |
629 | (spot, scenario?) |
465 | empty |
630 | empty |
466 |
631 |
467 # ~~~~~~ spot |
632 # ~~~~~~ spot |
468 spot = element spot { spot.attributes, spot.content } |
633 spot = element spot { spot.attributes, spot.content } |
469 |
634 |
470 spot.attributes = |
635 spot.attributes = |
471 dx.attribute? |
636 dx.attribute? |
539 |
704 |
540 # ~~~~~~ pages |
705 # ~~~~~~ pages |
541 pages = element pages { pages.content } |
706 pages = element pages { pages.content } |
542 |
707 |
543 pages.content = xsd:positiveInteger |
708 pages.content = xsd:positiveInteger |
544 |
|
545 |
|
546 # ============================================================================= |
|
547 # HEAD LEVEL |
|
548 # ============================================================================= |
|
549 |
|
550 # ~~~~~~~~~~~~~~~~~~~~~~~ title, shorttitle, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
551 |
|
552 title = element title { title.content } |
|
553 shorttitle = element shorttitle { title.content } |
|
554 subtitle = element subtitle { title.content } |
|
555 |
|
556 title.content = inlines |
|
557 |
|
558 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
559 |
|
560 # ~~~~~~ identifier |
|
561 identifier = element identifier { |
|
562 (attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"}) |
|
563 | (attribute type { "uri" }, for.attribute?, xsd:anyURI) |
|
564 } |
|
565 |
|
566 # ~~~~~~ identifier.ean |
|
567 identifier.ean = element identifier { |
|
568 attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"} |
|
569 } |
|
570 |
|
571 # ~~~~~~ identifier.uri |
|
572 identifier.uri = element identifier { |
|
573 attribute type { "uri" }, for.attribute?, xsd:anyURI |
|
574 } |
|
575 |
|
576 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
577 |
|
578 copyright = element copyright { copyright.content } |
|
579 |
|
580 copyright.content = simple.inlines |
|
581 |
|
582 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ collection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
583 |
|
584 collection = element collection { collection.content } |
|
585 |
|
586 collection.content = simple.inlines |
|
587 |
|
588 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
589 |
|
590 # ~~~~~~ contributors |
|
591 contributors = element contributors { contributors.content } |
|
592 |
|
593 contributors.content = |
|
594 contributor+ |
|
595 |
|
596 # ~~~~~~ contributor |
|
597 contributor = element contributor { contributor.content } |
|
598 |
|
599 contributor.content = |
|
600 identifier.uri?, |
|
601 (((firstname, secondname?)?, lastname) | label), |
|
602 address?, |
|
603 link?, |
|
604 role+ |
|
605 |
|
606 # ~~~~~~ firstname, secondname, lastname, label |
|
607 firstname = element firstname { firstname.content } |
|
608 secondname = element secondname { secondname.content } |
|
609 lastname = element lastname { lastname.content } |
|
610 label = element label { label.content } |
|
611 |
|
612 firstname.content = simple.inlines |
|
613 secondname.content = simple.inlines |
|
614 lastname.content = simple.inlines |
|
615 label.content = simple.inlines |
|
616 |
|
617 # ~~~~~~ address |
|
618 address = element address { address.content } |
|
619 |
|
620 address.content = simple.inlines |
|
621 |
|
622 # ~~~~~~ role |
|
623 role = element role { role.content } |
|
624 |
|
625 role.content = "author" | "illustrator" | "publisher" | "packager" |
|
626 |
|
627 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
628 |
|
629 place = element place { place.content } |
|
630 |
|
631 place.content = simple.inlines |
|
632 |
|
633 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
634 |
|
635 source = element source { |
|
636 ( (attribute type { "book" }, bibliography.entry.content) |
|
637 | (attribute type { "file" }, source.content.file)), |
|
638 source.content |
|
639 } |
|
640 |
|
641 source.content.file = |
|
642 identifier.uri |
|
643 source.content = |
|
644 annotation* |
|
645 |
|
646 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
647 |
|
648 # ~~~~~~ keywordset |
|
649 keywordset = element keywordset { keywordset.content } |
|
650 |
|
651 keywordset.content = keyword+ |
|
652 |
|
653 # ~~~~~~ keyword |
|
654 keyword = element keyword { keyword.content } |
|
655 |
|
656 keyword.content = simple.inlines |
|
657 |
|
658 # ~~~~~~ subjectset |
|
659 subjectset = element subjectset { subjectset.content } |
|
660 |
|
661 subjectset.content = subject+ |
|
662 |
|
663 # ~~~~~~ subject |
|
664 subject = element subject { subject.content } |
|
665 |
|
666 subject.content = simple.inlines |
|
667 |
|
668 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ index ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
669 |
|
670 # ~~~~~~ index |
|
671 index = element index { index.content } |
|
672 head.index = element index { head.index.content } |
|
673 |
|
674 index.content = |
|
675 (index.w, index.entry?) |
|
676 | (index.entry, (index.w | index.entry)?) |
|
677 head.index.content = |
|
678 index.entry, index.entry? |
|
679 |
|
680 # ~~~~~~ index.w |
|
681 index.w = element w { simple.inlines } |
|
682 |
|
683 # ~~~~~~ index.entry |
|
684 index.entry = element entry { simple.inlines } |
|
685 |
|
686 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
687 |
|
688 abstract = element abstract { abstract.content } |
|
689 |
|
690 abstract.content = |
|
691 p+ |
|
692 |
|
693 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
694 |
|
695 cover = element cover { cover.content } |
|
696 |
|
697 cover.content = |
|
698 cover.image |
|
699 |
|
700 cover.image = element image { cover.image.attributes } |
|
701 |
|
702 cover.image.attributes = |
|
703 media.id.attribute |
|
704 |
|
705 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
706 |
|
707 annotation = element annotation { annotation.content } |
|
708 |
|
709 annotation.content = inlines |
|
710 |
709 |
711 |
710 |
712 # ============================================================================= |
711 # ============================================================================= |
713 # INLINE LEVEL |
712 # INLINE LEVEL |
714 # ============================================================================= |
713 # ============================================================================= |