xref: /onnv-gate/usr/src/cmd/man/src/util/nsgmls.src/doc/archform.htm (revision 0:68f95e015346)
1<!-- SCCS keyword
2#pragma ident	"%Z%%M%	%I%	%E% SMI"
3-->
4<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
5<HTML>
6<HEAD>
7<TITLE>Architectural Form Processing</TITLE>
8</HEAD>
9<BODY>
10<H1>Architectural Form Processing</H1>
11<P>
12The Hytime standard (ISO/IEC 10744) introduced the concept of
13architectural forms.  This document assumes you are already familiar
14with this concept. The first Technical Corrigendum to HyTime, which is
15soon to be published, generalizes this, and makes it possible to have
16an <I>architecture engine</I> which can perform architectural form
17processing for arbitrary architectures.  SP now includes such an
18architecture engine.
19<P>
20Non-markup sensitive applications built using SP now support
21architectural form processing using the <SAMP>-A
22<VAR>archname</VAR></SAMP> option.  When this option is specified, the
23document will be validated against all declared base architectures,
24and the output will be for the architectural document for that
25architecture: the element types, notations and attributes will be
26those defined in the meta-DTD.
27<P>
28This option is experimental and has not been subject to much testing.
29Please be sure to report any bugs or problems you encounter.
30<P>
31Although spam does not support the <SAMP>-A</SAMP> option because it
32works with the markup of your document, sgmlnorm does.
33
34<H2>Architectural Support Attributes</H2>
35<P>
36To use the <SAMP>-A</SAMP> option with a document, you must add
37<UL>
38<LI>
39an architecture base declaration for <SAMP><VAR>archname</VAR></SAMP>,
40<LI>
41a notation declaration and associated attribute definition list
42declaration for <SAMP><VAR>archname</VAR></SAMP>;
43this is called the <I>architecture notation declaration</I>.
44</UL>
45<P>
46An architecture base declaration is a processing instruction of the form:
47<PRE>
48&lt;?ArcBase <VAR>archname</VAR>&gt;
49</PRE>
50<P>
51The processing instruction is recognized either in the DTD or in an
52active LPD.
53<P>
54The architecture notation declaration and associated attribute
55definition list declaration serve to declare a number of architectural
56support attributes which control the architecture engine.  The value
57for each architecture support attribute is taken from the default
58value, if any, specified for that attribute in the attribute
59definition list declaration.  It is an error to declare an
60architecture support attribute as <SAMP>#REQUIRED</SAMP>.
61<P>
62The following architectural support attributes are recognized:
63<DL>
64<DT>
65<SAMP>ArcDTD</SAMP>
66<DD>
67The name of an external entity that contains the meta-DTD.
68This attribute is required.
69If the name starts with the PERO delimiter <SAMP>%</SAMP>,
70the entity is a parameter entity,
71otherwise it is a general entity.
72<DT>
73<SAMP>ArcQuant</SAMP>
74<DD>
75A list of tokens that looks like what follows <SAMP>QUANTITY SGMLREF</SAMP>
76in the quantity set section of an SGML declaration.
77The quantities used for parsing the meta-DTD
78and validating the architectural document
79will be the maximum of the quantities in the document's concrete syntax
80and the quantities specified here.
81<DT>
82<SAMP>ArcDocF</SAMP>
83<DD>
84The name of the document element type in the meta-DTD.
85This would be <SAMP>HyDoc</SAMP> for HyTime.
86This defaults to <SAMP><VAR>archname</VAR></SAMP>.
87<DT>
88<SAMP>ArcFormA</SAMP>
89<DD>
90The name of the attribute that elements use to specify the
91corresponding element type, if any, in the meta-DTD.
92Data entities also use this attribute to specify the corresponding
93notation in the meta-DTD.
94This would be <SAMP>HyTime</SAMP> for HyTime.
95This defaults to <SAMP><VAR>archname</VAR></SAMP>.
96<DT>
97<SAMP>ArcNamrA</SAMP>
98<DD>
99The name of the attribute that elements use to specify substitutes for
100the names of attributes in the meta-DTD.  A value of
101<SAMP>#DEFAULT</SAMP> is allowed for a substitute name; this inhibits
102mapping of an attribute to an architectural attribute, but specifies
103that the value of the architectural attribute should be defaulted
104rather than taken from the value of another attribute in the document.
105For HyTime the value of this attribute would be <SAMP>HyNames</SAMP>.
106By default no attribute name substitutition is done.
107<DT>
108<SAMP>ArcSuprA</SAMP>
109<DD>
110The name of an attribute that elements may use to suppress processing
111of their descendants.  This attribute is not recognized for data
112entities.  The value of the attribute must be one of the following
113tokens:
114<DL>
115<DT>
116<SAMP>sArcAll</SAMP>
117<DD>
118Completely suppress all architectural processing of descendants.
119It is not possible to restore architectural processing
120for a descendant.
121<DT>
122<SAMP>sArcForm</SAMP>
123<DD>
124Suppress processing of the <SAMP>ArcFormA</SAMP> attribute of all
125descendants of this element, except for those elements that have a
126non-implied <SAMP>ArcSuprA</SAMP> attribute.
127<DT>
128<SAMP>sArcNone</SAMP>
129<DD>
130Don't suppress architectural processing for the descendants of
131this element.
132</DL>
133<P>
134The value may also be implied, in which case the state of
135architectural processing is inherited.
136<P>
137If an element has an ArcSuprA attribute that was processed, its
138ArcFormA attribute will always be processed.  Otherwise its ArcFormA
139attribute will be processed unless its closest ancestor that has a
140non-implied value for the ArcSuprA attribute suppressed processing of
141the ArcFormA attribute.  An element whose ArcFormA attribute is
142processed will not be treated as architectural if it has an implied
143value for the ArcFormA attribute.
144<DT>
145<SAMP>ArcSuprF</SAMP>
146<DD>
147The name of the element type in the meta-DTD that suppresses
148architectural processing in the same manner as does the
149<SAMP>sHyTime</SAMP> form in HyTime.  By default, no element type
150does.  This behaves like an element with an
151<SAMP>ArcSuprA</SAMP> attribute of <SAMP>sArcForm</SAMP>.  The element
152type should be declared in the meta-DTD.  You should not specify a
153value for this attribute if you specified a value for the
154<SAMP>ArcSuprA</SAMP> attribute.
155<P>
156This is a non-standardized extension.
157<DT>
158<SAMP>ArcIgnDA</SAMP>
159<DD>
160The name of an attribute that elements may use to control whether
161data is ignored.
162The value of the attribute must be one of the following values:
163<DL>
164<DT>
165<SAMP>nArcIgnD</SAMP>
166<DD>
167Data is not ignored.
168It is an error if data occurs where not allowed by the meta-DTD.
169<DT>
170<SAMP>cArcIgnD</SAMP>
171<DD>
172Data is conditionally ignored.
173Data will be ignored only when it occurs where the meta-DTD
174does not allow it.
175<DT>
176<SAMP>ArcIgnD</SAMP>
177<DD>
178Data is always ignored.
179</DL>
180<P>
181The value may also be implied, in which case the state of
182architectural processing is inherited.
183If no the document element has no value specified,
184<SAMP>cArcIgnD</SAMP> will be used.
185<DT>
186<SAMP>ArcBridF</SAMP>
187<DD>
188The name of a default element type declared in a meta-DTD,
189to which elements in the document should be automatically mapped
190if they have an ID and would not otherwise be considered
191architectural.
192This would be <SAMP>HyBrid</SAMP> for HyTime.
193If your meta-DTD declares IDREF attributes, it will
194usually be appropriate to specify a value for
195<SAMP>ArcBridF</SAMP>, and to declare an ID attribute
196for that form in your meta-DTD.
197<DT>
198<SAMP>ArcDataF</SAMP>
199<DD>
200The name of a default notation declared in the meta-DTD,
201to which the external data entities in the document
202should be automatically mapped if they would
203not otherwise be considered architectural.
204If this attribute is defined,
205then general entities will be automatically architectural:
206any external data entity whose notation cannot otherwise be mapped
207into a notation in the meta-DTD will be automatically treated
208as an instance of the <SAMP>ArcDataF</SAMP> notation.
209This would be <SAMP>data</SAMP> for HyTime.
210If your meta-DTD declares entity attributes, it will usually
211be appropriate to specify a value for <SAMP>ArcDataF</SAMP>
212even if your meta-DTD declares no data attributes for the
213notation.
214<DT>
215<SAMP>ArcAuto</SAMP>
216<DD>
217This must have one of the following values:
218<DL>
219<DT>
220<SAMP>ArcAuto</SAMP>
221<DD>
222If an element does not have an <SAMP>ArcFormA</SAMP> attribute and the
223meta-DTD defines an element type with the same name as the element's
224type, the element will be automatically treated as being an instance
225of the meta-type.  This rule does not apply to the
226document element type; this is automatically treated as being an
227instance of the meta-DTD's document element type.
228Note that this automatic mapping is prevented if
229the element has an <SAMP>ArcFormA</SAMP> attribute with an implied
230value.  It is also prevented if processing of the
231<SAMP>ArcFormA</SAMP> attribute is suppressed.  This applies equally
232to the notations of external data entities.
233The default element or notation specified with the
234<SAMP>ArcBridF</SAMP> or <SAMP>ArcDfltN</SAMP> attribute
235is only considered after the mapping specified by <SAMP>ArcAuto</SAMP>.
236<DT>
237<SAMP>nArcAuto</SAMP>
238<DD>
239Automatic mapping is not performed.
240</DL>
241<P>
242The default value is <SAMP>ArcAuto</SAMP>.
243<DT>
244<SAMP>ArcOptSA</SAMP>
245<DD>
246A list of names of architectural support attributes,
247each of which is interpreted as a list of parameter entities
248to be defined with a replacement text of <SAMP>INCLUDE</SAMP>
249when parsing the meta-DTD.
250The default value is <SAMP>ArcOpt</SAMP>.
251</DL>
252<H2>Meta-DTDs</H2>
253<P>
254A meta-DTD is allowed to use the following extensions:
255<UL>
256<LI>
257a single element type or notation is allowed to be an associated
258element type or associated notation name for multiple attribute
259definition lists.
260<LI>
261<SAMP>#ALL</SAMP> can be used as an associated element type
262or associated notation name in an attribute definition list
263to define attributes for all element types or notations
264in the meta-DTD
265</UL>
266<P>
267Before any of these extensions can be used, the meta-DTD must include a
268declaration
269<PRE>
270&lt;!AFDR "ISO/IEC 10744:1992"&gt;
271</PRE>
272<P>
273This declaration should only be included if the extensions are used.
274<P>
275In all other respects a meta-DTD must be a valid SGML DTD.
276<P>
277A declared value of ENTITY for an attribute in a meta-DTD means that
278the value of the attribute must be an entity declared in
279the (non-meta) DTD that is architectural.
280An external data entity is architectural only if its notation can be
281mapped into a notation in the meta-DTD.
282All other kinds of data entities and subdoc entities are automatically
283architectural.
284<P>
285An IDREF attribute in the meta-document must have a corresponding ID
286in the meta-document.  An attribute with a declared value of ID in the
287document will be automatically mapped to an attribute with a declared
288value of ID in the meta-DTD.
289<P>
290A declared value of NOTATION in the meta-DTD means that the value of
291the attribute must have one the values specified in the name group and
292that it must be a notation in the meta-DTD.
293(Perhaps if the attribute also has a declared value of NOTATION
294in the non-meta-DTD, the value should be mapped in a similar
295way to the notation of an external data entity.)
296
297<H2>Differences from HyTime</H2>
298<P>
299There are a number of differences from how architectural processing is
300defined in the pre-Corringendum version of the HyTime standard.
301<UL>
302<LI>
303The <SAMP>ArcNamrA</SAMP> and <SAMP>ArcFormA</SAMP> attributes are not
304part of the meta-DTD.  Rather they are used by the architecture engine
305in deriving the meta-document that is validated against the meta-DTD.
306<LI>
307The <SAMP>use:</SAMP> conventional comment is not recognized.  Instead
308a single element type is allowed to be an associated element type for
309multiple attribute definition lists.
310<LI>
311The notation and data attributes of an external data entity are
312treated just like the element type and attributes of an element.  The
313notation of an external data entity is mapped into a notation in the
314meta-DTD and the data attributes of the entity are mapped onto
315attributes defined for the meta-DTD notation.
316<LI>
317<SAMP>#FIXED</SAMP> has the same meaning in a meta-DTD that it does in
318a regular DTD: the value of the attribute must be the same as the
319default value of the attribute specified in the meta-DTD.
320</UL>
321
322<H2>Specifying architectural processing with an LPD</H2>
323<P>
324Link attributes defined by an implicit link process are treated in the
325same way as non-link attributes.  The only complication is that SGML
326allows link attributes to have the same name as non-link attributes.
327If there is a link attribute and a non-link attribute with the same
328name, the architecture engine will only look at the link attribute,
329even if the value of the link attribute is implied.  The only
330exception is the <SAMP>ArcNamrA</SAMP> attribute: the architecture
331engine will use both the link attribute and the non-link attribute,
332but the substitute names in the value of the non-link attribute cannot
333refer to link attribute names.
334<P>
335The <SAMP>-A <VAR>archname</VAR></SAMP> option automatically activates
336any link type <SAMP><VAR>archname</VAR></SAMP>.
337<P>
338The architecture notation declaration and associated attribute
339definition list declaration are allowed in the LPD.  Although the
340productions of ISO 8879 do not allow a notation declaration in a link
341type declaration subset, it is clearly the intent of the standard that
342they be allowed.  You can use a <SAMP>-wlpd-notation</SAMP> option to
343disallow them.
344
345<H2>Notation set architecture</H2>
346<P>
347An architecture for which <VAR>archname</VAR> is declared
348as a notation with a public identifier of
349<PRE>
350"ISO/IEC 10744//NOTATION AFDR ARCBASE
351Notation Set Architecture Definition Document//EN"
352</PRE>
353<P>
354is special.  The element types in the meta-DTD for this architecture
355are the notations of the document DTD and the attributes defined for
356the element types in the meta-DTD are the data attributes defined for
357the notations in the document DTD.  For each element, the attribute
358with a declared value of NOTATION performs the function that the
359ArcFormA attribute performs for normal architectures.  Only the
360<SAMP>ArcNamrA</SAMP> and <SAMP>ArcSuprA</SAMP> architectural support
361attributes can be used with this architecture.
362<P>
363The notation set architecture can also be declared using
364an architecture base declaration of the form:
365<PRE>
366&lt;?ArcBase #NOTATION&gt;
367</PRE>
368<P>
369In this case, no architecture support attributes can be declared;
370<SAMP>ArcNamrA</SAMP> will be defaulted to <SAMP>notnames</SAMP>,
371and <SAMP>ArcSuprA</SAMP> to <SAMP>notsupr</SAMP>.
372
373<H2>Derived architectures</H2>
374<P>
375A meta-DTD can have one or more base architectures in the same way as
376a normal DTD.  Multiple <SAMP>-A</SAMP> options can be used to exploit
377this.  For example,
378<PRE>
379-A <VAR>arch1</VAR> -A <VAR>arch2</VAR>
380</PRE>
381<P>
382will perform architectural processing on the source document to
383produce an architectural document conforming to the architecture
384<SAMP><VAR>arch1</VAR></SAMP> declared in the source document, and
385will then perform architectural processing on this architectural
386document to produce an architectural document conforming to the
387<SAMP><VAR>arch2</VAR></SAMP> architecture declared in
388<SAMP><VAR>arch1</VAR></SAMP>'s meta-DTD.
389<P>
390A document that is validated against a meta-DTD will automatically
391be validated against any base architectures of that meta-DTD.
392
393<H2>Not implemented</H2>
394<P>
395The following features in the current AFDR draft are not implemented:
396<UL>
397<LI>
398<SAMP>ArcIndr</SAMP> architectural support attribute with value
399other than <SAMP>nArcIndr</SAMP>.
400</UL>
401<P>
402<ADDRESS>
403James Clark<BR>
404jjc@jclark.com
405</ADDRESS>
406</BODY>
407</HTML>
408