AFs and the DPH (Was Animal Friends, etc.)

David Megginson (ak117@freenet.carleton.ca)
Thu, 2 Oct 1997 09:38:45 -0400


Peter Murray-Rust writes:

> However, all the benefits from AFs have to be realised by having an
> AF-aware processor (I differentiate parser from processor - an ESIS stream
> could be input into an AF-aware processor). My understanding is that:
> - there are no freely available AF processors
> - generic AF processors are beyond the ability (or at least the time) for
> a DPH to write from scratch
>
> Therefore AFs are only available to largish groups with time and/or
> money... This rules out the DPH.

Actually, none of these statements is true. I am working on a very
large project where people are using Omnimark and even ACL to work
with architectural forms. Further more, the SP-family of programs --
nsgmls, jade, sgmlnorm, etc. -- have a full-featured architectural
engine built right in.

In the simplest sort of architectural processing, you simply designate
an attribute name -- say, Biblio -- and take actions based on the
attribute's value for different element types. For example, with

<monograph Biblio="entry">...</monograph>

you would note that the value of the Biblio attribute is "entry" (or,
more generally, that "entry" is the architectural form of this
element) and process the contents accordingly. With

<byline Biblio="author">...</byline>

you would note that the architectural form is "author", and process
accordingly. In a different document type, you might have

<responsibility Biblio="author">...</responsibility>

However, since the value of the Biblio attribute is the same, you
should be able to process it with the same code.

A very easy way to set this up is to use #FIXED attributes declared in
the DTD:

<!ATTLIST monograph
Biblio CDATA #FIXED "entry">

<!ATTLIST byline
Biblio CDATA #FIXED "author">

That way, when an author includes

<byline>David Megginson</byline>

your software will see

<byline Biblio="author">David Megginson</byline>

Of course, if you are doing DTD-less parsing (ick), you can specify
the architectural form attribute values explicitly on the elements, as
in the earlier examples.

All the best,

David

-- 
David Megginson                 ak117@freenet.carleton.ca
Microstar Software Ltd.         dmeggins@microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@ic.ac.uk the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)