[osis-core] annotateWork and annotateType

Todd Tillinghast osis-core@bibletechnologieswg.org
Thu, 22 Aug 2002 11:29:06 -0600


Harry,

> > Agreed, better understanding what the purpose of annotation,
> > I see how a reference to a whole work does not make sense (I
> > think I may have been thrown off by the "Work" in annotation
> > work").  To me this further suggests that eliminating
> > annotationWork and annotationType in favor of using a child
> > <reference> element.
> 
> I am not wild about the idea of using a child <reference/> element. Do
I
> assume that this <reference/> element applies to the smallest
containing
> element? Then I suppose I would have to write an xpath expression to
> find it.
> 
> To me that seems rather messy and contrary to the spirit of XML.  You
> wouldn't mark a word as emphasized by <w><hi/>emphasized</w> -- the
> normal approach would be <hi>emphasized</hi>.
> The messiness arises from those Xpath expressions that would be
required
> for finding the commentary on Matt.1.13, etc. -- the search is not as
> straightforward. You can't search for the element with
> annotateWork="Matt.1.13" and annotateType="commentary".
> 
> -Harry

It is no uncommon for child elements to further describe their parent.  

Any time there can be more than one of a data type that describes an
element child elements are employed when the data is not a single token
which precludes the use of a list attribute.  
I this case type/role/purpose of the describing data can not be
enumerated at schema design which indicates the use of a child element.

In this case the set of possible types of reference decorations for an
element is a large set (annotation being only one case).  We could add a
pair of attributes (one for the reference and one for the type) for each
case.  This would leave us with an element with a large number of
attributes and would be tailored to the purpose of the people with
enough influence to get the attributes added for the purposes that are
important to them.  Since XML does not allow us have more than one
instance of each attribute name we can not simply add osisRef, refType,
and refSubType to the parent element.  The alternative being used is a
child <reference> element that serves the same purpose.

When I got moved to CO and was back keeping up with postings, I saw that
annotation related attributes had been added and understood that they
could not use the <reference> mechanism because they referred to an
entire work, which was a problem for <reference>s at that point, so I
did not object to the addition of these attributes at that point.
However, since the behavior can be accommodated with the <reference>
mechanism there is no reason to retain attributes.  

There is little difference between 
//*[@annotationWork="Matt.1.13"][@annotationType="commentary"] and
//*[child::reference[@type="annotation"][@osisRef="Matt.1.13"][@subType=
"commentary"]]

This also allows for a you to have a commentary on multiple texts.  A
case I can see is if the commentary is on a set of parallel texts from
the four gospels.  You could say:
<p>
	<reference type="annotation" osisRef="Matt.x.y"
subType="commentary"/>
	<reference type="annotation" osisRef="Mark.a.b"
subType="commentary"/>
	<reference type="annotation" osisRef="Luke.c.e"
subType="commentary"/>
	<reference type="annotation" osisRef="John.s.t"
subType="commentary"/>
	<reference type="topic" osisRef="naves:GRACE"/>
...commentary...
</p>


By using this strategy we can support multiple "adornments" of a variety
of types and have not added attributes that serve only special cases.

Todd