[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Co-operating with Architectural Forms


architectural conformance

Ronald Bourret wrote:

> How rich are the transformations that AFs can perform? Can they do
> anything more than renaming? For example, can they do reordering,
> concatenating, adding/eliminating intermediate structure, etc.?

Architectural processing as defined in the HyTime AFDR appendix
(<URL: http://www.ornl.gov/sgml/wg8/docs/n1920/html/clause-A.3.html >)
can:
	+ rename elements (ArcForm)
	+ rename attributes (ArcNames)
	+ map #PCDATA content to an attribute value (#CONTENT)
	+ map an attribute value to #PCDATA content (#ARCCONT)
	+ "unwrap" elements (ignore the element but process its children)
	+ ignore entire subtrees (ArcSupr)

When used in combination with IMPLICIT LINK, all of these mappings
can be context-sensitive based on ancestor elements (#USELINK)
or previous siblings (#POSTLINK).

(Steve -- does this sound right, or have I missed something?)

It can't map attributes to subelements or subelements to attributes;
to get around this I often define the architectural DTD with both
an attribute and a subelement (with the implied constraint that
they are mutually exclusive), so that client document types can
use whichever one is more convenient.

It can't reorder subelements; best practice is to use the '&' connector
in the architectural DTD when the order doesn't matter (so reordering
isn't needed), or ',' when the order does matter (since reordering
wouldn't be correct).

It can remove intermediate structures (ArcForm #IMPLIED), but can't
introduce intermediate elements.  Again, best practice is to design
the architectural DTD to be "flat", so that (to the extent possible)
the latter is never necessary.

One other note: architectural conformance is defined in terms
of transformation (transform the source document and validate
against the architectural DTD), but in practice architectural
processing usually works more like an Infoset augmentation.
That is, the application works off the original tree, which the
AF processor annotates with architectural information.  This
is critical for things like HyTime -- most of the linking elements
have to be recognized in the context of the source document
to be useful.

One last note -- you don't need to use a full-blown AFDR-compliant
architectural processor to make use of AFs (I almost never do).
You can go a long way just putting #FIXED attributes in the DTD
and writing applications to key off those instead of element type
names.


--Joe English

  jenglish@f...

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.