[
Lists Home |
Date Index |
Thread Index
]
Jason Diamond wrote:
>
> Is it possible to reorder the mapped forms? What if I wanted the date
> element to appear after the byline element? I'm assuming that the order of
> forms in the map has no effect since they don't match the result document.
>
> I like the idea but it seems that all your map can do is strip and rename.
> Wouldn't mapping from one form to another with more complex vocabularies
> require more functionality than that?
>
> I'm just a youngin' so AFs are entirely new to me. But it seems that you're
> just trying to write a transform but without using XSLT or other procedural
> code. Don't get me wrong, I think that'd be great but it doesn't seem to
> have the flexibility and power that you get with full XSLT.
That's right. But there's also less complexity, which has many
benefits. For example, it's possible to process any architectural
transformation in "streaming" mode (e.g., with a SAX filter),
which is not the case for general XSLT transformations.
Given a source DTD, architectural mapping, and architectural
DTD, it's possible to determine whether or not all documents
conforming to the source DTD also conform to the architecture
after mapping.
As for reordering elements, the best practice is to design
the architecture so that, to the extent possible, it's never
necessary. In John Cowan's example [1], the architecture
could be defined (using SGML notation) like:
<!element article ((headline & byline? & datestamp? & lead?), para*)>
Architectures should be designed to be as flexible as possible;
the above is better than
<!element article (headline, byline, datestamp, lead, para+)>
since a larger class of source documents can be transformed
into the former with a lightweight transformation process
than the latter.
[1] <URL: http://lists.xml.org/archives/xml-dev/200201/msg01686.html >
--Joe English
jenglish@flightlab.com
|