Michael O'Connor wrote:
> My question: Can I add markup to the <table> so that I can query/transform
> it as <table> or as <landholder> from the one TEI-encoded document?
This question, or rather the issues behind it, puts down roots deep into the
fundamental differences between the data models of XML documents and
relational datbases. But without embarking on that right now, why don't you
just use "role" attributes on your <cell>s just as you are already doing on
your row, although you might consider a different approach to your row value
At the moment, you are using the "role" attribute essentially as a rendering
hint, and only secondarily as a data descriptor. If instead you assign the
row role values according to what entity the row represents, and the cell
values according to the designated attribute of that entity [caveat:
"entity" and "attribute" here are NOT used in their XML sense!!] you can
model a relational table with no information loss.
> <table rows="2" cols="4">
> <row role="label">
> <cell role="label>Name</cell>
> <cell role="label>Area</cell>
> <cell role="label>Parcel</cell>
> <cell role="label>Date</cell>
> <row role = "landHolding">
> <cell role = "name"><name>Mr J. Smith</name></cell>
> <cell role = "area">1500</cell>
> <cell role = "parcel">B51</cell>
> <cell role = "purchaseDate">1832>/cell>
I am skipping over additional points such as the normalisation of dates etc.
If you balk at entering all those attributes (and by no means all of them
are informationally necessary anyway) remember that XSLT is a superb tool
for that sort of thing.
Whether doing it along the above lines is a good idea in the longer term is
another question, but it looks to me like the short term answer to what you