Annotated target tree (SAAT)

We propose to model alignments as metadata describing target locations. The alignments of a given target location consist of source location identifiers. A readible form of these are name paths like /resources/books/book. A straightforward representation of the alignments describing a document-to-document transformation is a location tree of the target documents, augmented by additional attributes on the location nodes which convey the name paths of the aligned source locations. Such a document we call a SAAT – Source Alignment Annotated Target tree. Here comes an example, in which the attributes supplying alignments are named al:

<z:saats xmlns:z="">
    <publications al="/resources/books">
        <updatedAt al="/resources/books/@lastUpdate"/>
      <publication al="/resources/books/book">
          <publicationYear al="/resources/books/book/py" />
        <isbn al="/resources/books/book/isbn"/>
        <title al="/resources/books/book/title"/>
        <creator al="/resources/books/book/author">
          <creatorName al="/resources/books/book/author"/>

Compare this to the SNAT tree specifying the transformation precisely, in which all attributes describing navigation are highlighted:

<z:snats xmlns:z="">
    <publications ctxt="books">
        <updatedAt src="@lastUpdate" alt=""/>
      <publication for-each="book">
          <publicationYear src="py" alt=""/>
        <isbn src="@isbn" dflt="'#MISSING'"/>
        <title src="title" dflt=""/>
        <creator for-each="author">
          <creatorRole src="=Author" dflt=""/>
          <creatorName src="." dflt="'?'"/>

In a SNAT tree, navigation is described by expressions, to be evaluated at runtime in a current context implied by the preceding steps of navigation. Alignments, on the other hand, are static identifiers, not expressions (in spite of the apprearance). Nevertheless, the example exhibits a striking correspondence between the name paths describing alignments and navigation expressions.

Table 6. A comparison between navigation steps and alignments.

Target locationAlignmentNavigationNavigation attribute
. @updatedAt/resources/books/@lastUpdate@lastUpdatesrc
. publication/resources/books/bookbookfor-each
. . @publicationYear/resources/books/book/pypysrc
. . isbn/resources/books/book/isbnisbnsrc
. . title/resources/books/book/titletitlesrc
. . creator/resources/books/book/authorauthorfor-each
. . . creatorRole---
. . . creatorName/resources/books/book/author.src

Corresponding values of alignment and navigation are marked by a subset relationship: the navigation leads to a set of nodes which is a subset of the nodes represented by the corresponding alignment. So, for example, navigation author (which is short for child::author) is evaluated in the context of an individual book element and selects all author nodes found under that book node. This is a subset of the nodes represented by the alignment /resources/books/book/author, which is the set of all author nodes found under any book node.