📄 archform.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN"><HTML><HEAD><TITLE>Architectural Form Processing</TITLE></HEAD><BODY><H1>Architectural Form Processing</H1><P>The Hytime standard (ISO/IEC 10744) introduced the concept ofarchitectural forms. This document assumes you are already familiarwith this concept. HyTime 2nd Edition generalizes this, and makes itpossible to have an <I>architecture engine</I> which can performarchitectural form processing for arbitrary architectures. SPincludes such an architecture engine.<P>Non-markup sensitive applications built using SP now supportarchitectural form processing using the <SAMP>-A<VAR>archname</VAR></SAMP> option. When this option is specified, thedocument will be validated against all declared base architectures,and the output will be for the architectural document for thatarchitecture: the element types, notations and attributes will bethose defined in the meta-DTD.<P>Although spam does not support the <SAMP>-A</SAMP> option because itworks with the markup of your document, sgmlnorm does.<H2>Architectural Support Attributes</H2><P>To use the <SAMP>-A</SAMP> option with a document, you must add<UL><LI>an architecture base declaration for <SAMP><VAR>archname</VAR></SAMP>,<LI>a notation declaration and associated attribute definition listdeclaration for <SAMP><VAR>archname</VAR></SAMP>;this is called the <I>architecture notation declaration</I>.</UL><P>An architecture base declaration is a processing instruction of the form:<PRE><?IS10744 ArcBase <VAR>archname</VAR>></PRE><P>The processing instruction is recognized either in the DTD or in anactive LPD.<P>The architecture notation declaration and associated attributedefinition list declaration serve to declare a number of architecturalsupport attributes which control the architecture engine. The valuefor each architecture support attribute is taken from the defaultvalue, if any, specified for that attribute in the attributedefinition list declaration. It is an error to declare anarchitecture support attribute as <SAMP>#REQUIRED</SAMP>.<P>The following architectural support attributes are recognized:<DL><DT><SAMP>ArcDTD</SAMP><DD>The name of an external entity that contains the meta-DTD.This attribute is required.If the name starts with the PERO delimiter <SAMP>%</SAMP>,the entity is a parameter entity,otherwise it is a general entity.<DT><SAMP>ArcQuant</SAMP><DD>A list of tokens that looks like what follows <SAMP>QUANTITY SGMLREF</SAMP>in the quantity set section of an SGML declaration.The quantities used for parsing the meta-DTDand validating the architectural documentwill be the maximum of the quantities in the document's concrete syntaxand the quantities specified here.<DT><SAMP>ArcDocF</SAMP><DD>The name of the document element type in the meta-DTD.This would be <SAMP>HyDoc</SAMP> for HyTime.This defaults to <SAMP><VAR>archname</VAR></SAMP>.<DT><SAMP>ArcFormA</SAMP><DD>The name of the attribute that elements use to specify thecorresponding element type, if any, in the meta-DTD.Data entities also use this attribute to specify the correspondingnotation in the meta-DTD.This would be <SAMP>HyTime</SAMP> for HyTime.This defaults to <SAMP><VAR>archname</VAR></SAMP>.<DT><SAMP>ArcNamrA</SAMP><DD>The name of the attribute that elements use to specify substitutes forthe names of attributes in the meta-DTD. A value of<SAMP>#DEFAULT</SAMP> is allowed for a substitute name; this inhibitsmapping of an attribute to an architectural attribute, but specifiesthat the value of the architectural attribute should be defaultedrather than taken from the value of another attribute in the document.For HyTime the value of this attribute would be <SAMP>HyNames</SAMP>.By default no attribute name substitutition is done.<DT><SAMP>ArcSuprA</SAMP><DD>The name of an attribute that elements may use to suppress processingof their descendants. This attribute is not recognized for dataentities. The value of the attribute must be one of the followingtokens:<DL><DT><SAMP>sArcAll</SAMP><DD>Completely suppress all architectural processing of descendants.It is not possible to restore architectural processingfor a descendant.<DT><SAMP>sArcForm</SAMP><DD>Suppress processing of the <SAMP>ArcFormA</SAMP> attribute of alldescendants of this element, except for those elements that have anon-implied <SAMP>ArcSuprA</SAMP> attribute.<DT><SAMP>sArcNone</SAMP><DD>Don't suppress architectural processing for the descendants ofthis element.</DL><P>The value may also be implied, in which case the state ofarchitectural processing is inherited.<P>If an element has an ArcSuprA attribute that was processed, itsArcFormA attribute will always be processed. Otherwise its ArcFormAattribute will be processed unless its closest ancestor that has anon-implied value for the ArcSuprA attribute suppressed processing ofthe ArcFormA attribute. An element whose ArcFormA attribute isprocessed will not be treated as architectural if it has an impliedvalue for the ArcFormA attribute.<DT><SAMP>ArcSuprF</SAMP><DD>The name of the element type in the meta-DTD that suppressesarchitectural processing in the same manner as does the<SAMP>sHyTime</SAMP> form in HyTime. By default, no element typedoes. This behaves like an element with an<SAMP>ArcSuprA</SAMP> attribute of <SAMP>sArcForm</SAMP>. The elementtype should be declared in the meta-DTD. You should not specify avalue for this attribute if you specified a value for the<SAMP>ArcSuprA</SAMP> attribute.<P>This is a non-standardized extension.<DT><SAMP>ArcIgnDA</SAMP><DD>The name of an attribute that elements may use to control whetherdata is ignored.The value of the attribute must be one of the following values:<DL><DT><SAMP>nArcIgnD</SAMP><DD>Data is not ignored.It is an error if data occurs where not allowed by the meta-DTD.<DT><SAMP>cArcIgnD</SAMP><DD>Data is conditionally ignored.Data will be ignored only when it occurs where the meta-DTDdoes not allow it.<DT><SAMP>ArcIgnD</SAMP><DD>Data is always ignored.</DL><P>The value may also be implied, in which case the state ofarchitectural processing is inherited.If no the document element has no value specified,<SAMP>cArcIgnD</SAMP> will be used.<DT><SAMP>ArcBridF</SAMP><DD>The name of a default element type declared in a meta-DTD,to which elements in the document should be automatically mappedif they have an ID and would not otherwise be consideredarchitectural.This would be <SAMP>HyBrid</SAMP> for HyTime.If your meta-DTD declares IDREF attributes, it willusually be appropriate to specify a value for<SAMP>ArcBridF</SAMP>, and to declare an ID attributefor that form in your meta-DTD.<DT><SAMP>ArcDataF</SAMP><DD>The name of a default notation declared in the meta-DTD,to which the external data entities in the documentshould be automatically mapped if they wouldnot otherwise be considered architectural.If this attribute is defined,then general entities will be automatically architectural:any external data entity whose notation cannot otherwise be mappedinto a notation in the meta-DTD will be automatically treatedas an instance of the <SAMP>ArcDataF</SAMP> notation.This would be <SAMP>data</SAMP> for HyTime.If your meta-DTD declares entity attributes, it will usuallybe appropriate to specify a value for <SAMP>ArcDataF</SAMP>even if your meta-DTD declares no data attributes for thenotation.<DT><SAMP>ArcAuto</SAMP><DD>This must have one of the following values:<DL><DT><SAMP>ArcAuto</SAMP><DD>If an element does not have an <SAMP>ArcFormA</SAMP> attribute and themeta-DTD defines an element type with the same name as the element'stype, the element will be automatically treated as being an instanceof the meta-type. This rule does not apply to thedocument element type; this is automatically treated as being aninstance of the meta-DTD's document element type.Note that this automatic mapping is prevented ifthe element has an <SAMP>ArcFormA</SAMP> attribute with an impliedvalue. It is also prevented if processing of the<SAMP>ArcFormA</SAMP> attribute is suppressed. This applies equallyto the notations of external data entities.The default element or notation specified with the<SAMP>ArcBridF</SAMP> or <SAMP>ArcDfltN</SAMP> attributeis only considered after the mapping specified by <SAMP>ArcAuto</SAMP>.<DT><SAMP>nArcAuto</SAMP><DD>Automatic mapping is not performed.</DL><P>The default value is <SAMP>ArcAuto</SAMP>.<DT><SAMP>ArcOptSA</SAMP><DD>A list of names of architectural support attributes,each of which is interpreted as a list of parameter entitiesto be defined with a replacement text of <SAMP>INCLUDE</SAMP>when parsing the meta-DTD.The default value is <SAMP>ArcOpt</SAMP>.</DL><H2>Meta-DTDs</H2><P>A meta-DTD is allowed to use the following extensions:<UL><LI>a single element type or notation is allowed to be an associatedelement type or associated notation name for multiple attributedefinition lists.<LI><SAMP>#ALL</SAMP> can be used as an associated element typeor associated notation name in an attribute definition listto define attributes for all element types or notationsin the meta-DTD</UL><P>Before any of these extensions can be used, the meta-DTD must include adeclaration<PRE><!AFDR "ISO/IEC 10744:1997"></PRE><P>This declaration should only be included if the extensions are used.<P>In all other respects a meta-DTD must be a valid SGML DTD.<P>A declared value of ENTITY for an attribute in a meta-DTD means thatthe value of the attribute must be an entity declared inthe (non-meta) DTD that is architectural.An external data entity is architectural only if its notation can bemapped into a notation in the meta-DTD.All other kinds of data entities and subdoc entities are automaticallyarchitectural.<P>An IDREF attribute in the meta-document must have a corresponding IDin the meta-document. An attribute with a declared value of ID in thedocument will be automatically mapped to an attribute with a declaredvalue of ID in the meta-DTD.<P>A declared value of NOTATION in the meta-DTD means that the value ofthe attribute must have one the values specified in the name group andthat it must be a notation in the meta-DTD.(Perhaps if the attribute also has a declared value of NOTATIONin the non-meta-DTD, the value should be mapped in a similarway to the notation of an external data entity.)<H2>Differences from HyTime</H2><P>There are a number of differences from how architectural processing isdefined in the pre-Corringendum version of the HyTime standard.<UL><LI>The <SAMP>ArcNamrA</SAMP> and <SAMP>ArcFormA</SAMP> attributes are notpart of the meta-DTD. Rather they are used by the architecture enginein deriving the meta-document that is validated against the meta-DTD.<LI>The <SAMP>use:</SAMP> conventional comment is not recognized. Insteada single element type is allowed to be an associated element type formultiple attribute definition lists.<LI>The notation and data attributes of an external data entity aretreated just like the element type and attributes of an element. Thenotation of an external data entity is mapped into a notation in themeta-DTD and the data attributes of the entity are mapped ontoattributes defined for the meta-DTD notation.<LI><SAMP>#FIXED</SAMP> has the same meaning in a meta-DTD that it does ina regular DTD: the value of the attribute must be the same as thedefault value of the attribute specified in the meta-DTD.</UL><H2>Specifying architectural processing with an LPD</H2><P>Link attributes defined by an implicit link process are treated in thesame way as non-link attributes. The only complication is that SGMLallows link attributes to have the same name as non-link attributes.If there is a link attribute and a non-link attribute with the samename, the architecture engine will only look at the link attribute,even if the value of the link attribute is implied. The onlyexception is the <SAMP>ArcNamrA</SAMP> attribute: the architectureengine will use both the link attribute and the non-link attribute,but the substitute names in the value of the non-link attribute cannotrefer to link attribute names.<P>The <SAMP>-A <VAR>archname</VAR></SAMP> option automatically activatesany link type <SAMP><VAR>archname</VAR></SAMP>.<P>The architecture notation declaration and associated attributedefinition list declaration are allowed in the LPD. Although theproductions of ISO 8879 do not allow a notation declaration in a linktype declaration subset, it is clearly the intent of the standard thatthey be allowed. You can use a <SAMP>-wlpd-notation</SAMP> option todisallow them.<H2>Derived architectures</H2><P>A meta-DTD can have one or more base architectures in the same way asa normal DTD. Multiple <SAMP>-A</SAMP> options can be used to exploitthis. For example,<PRE>-A <VAR>arch1</VAR> -A <VAR>arch2</VAR></PRE><P>will perform architectural processing on the source document toproduce an architectural document conforming to the architecture<SAMP><VAR>arch1</VAR></SAMP> declared in the source document, andwill then perform architectural processing on this architecturaldocument to produce an architectural document conforming to the<SAMP><VAR>arch2</VAR></SAMP> architecture declared in<SAMP><VAR>arch1</VAR></SAMP>'s meta-DTD.<P>A document that is validated against a meta-DTD will automaticallybe validated against any base architectures of that meta-DTD.<H2><A NAME=hi2diff>Unimplemented features</A></H2><P>The following features from the AFDR specification in HyTime 2ndedition are not yet implemented:<UL><LI>use of <CODE>#MAPTOKEN</CODE> in the architectural attribute renamer.</UL><P><ADDRESS>James Clark<BR>jjc@jclark.com</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -