OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: An analysis of the <text:meta-field> element


I'm trying to understand the <text:meta-field> element.

I can imagine two ways the <text:meta-field> element can be used in a 
word processor.

1. To show predicates from an RDF file elsewhere in the document 
container as a "tooltip", the same way the title attribute behaves in 
HTML. The text content would then be the sensitive area causing the 
tooltip to show when the mouse is hovering over it.
2. To replace the content of the element with predicates from an RDF 
file elsewhere in the document container. That would make it work like 
the <text:user-field> but with a different source of the data.

I'll investigate the first one:

Imagine that the author of the document wants to add metadata to the 
names of the actors in a play:

<text:meta-field xml:id="x1">BENVOLIO</text:meta-field>
By my head, here come the Capulets.

<text:meta-field xml:id="x2">MERCUTIO</text:meta-field>
By my heel, I care not.

Enter <text:meta-field xml:id="x3">TYBALT</text:meta-field> and others

<text:meta-field xml:id="x4">TYBALT</text:meta-field>
Follow me close, for I will speak to them.
Gentlemen, good den: a word with one of you.

<text:meta-field xml:id="x5">MERCUTIO</text:meta-field>
And but one word with one of us? couple it with
something; make it a word and a blow.

The problem with having only xml:id to attach metadata to is that you 
are forced to repeat the metadata. We could have an actors.rdf file in 
the document container that would look like this:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
  xmlns:foaf="http://xmlns.com/foaf/0.1/";
  xmlns:f="http://x.com/plays#";>
<rdf:Description rdf:about="content.xml#x1">
<foaf:name>Benvolio</foaf:name>
<f:playedBy>Rupert Everett</f:playedBy>
<f:friendOf rdf:resource="#Romeo"/>
</rdf:Description>

<rdf:Description rdf:about="content.xml#x2">
<foaf:name>Mercutio</foaf:name>
<f:playedBy>Ben Affleck</f:playedBy>
<f:friendOf rdf:resource="#Romeo"/>
</rdf:Description>

<rdf:Description rdf:about="content.xml#x3">
<foaf:name>Tybalt</foaf:name>
<f:playedBy>Martin Clunes</f:playedBy>
<fam:friendOf rdf:resource="#Juliet"/>
</rdf:Description>

<rdf:Description rdf:about="content.xml#x4">
<foaf:name>Tybalt</foaf:name>
<f:playedBy>Martin Clunes</f:playedBy>
<fam:friendOf rdf:resource="#Juliet"/>
</rdf:Description>

<rdf:Description rdf:about="content.xml#x5">
<foaf:name>Mercutio</foaf:name>
<f:playedBy>Ben Affleck</f:playedBy>
<f:friendOf rdf:resource="#Romeo"/>
</rdf:Description>
</rdf:RDF>

It would be so much easier if <text:meta-field> had used the text:name 
attribute like the <text:variable-get> element does. If you're using 
xml:id because it looks a lot like rdf:ID, the you should remember, that 
allthough RDF has the attribute rdf:ID, it is just an abbreviation of 
rdf:about. rdf:ID="x" equals rdf:about="#x". RDF doesn't have the 
concept of internal identifiers that point to a location in the XML 
document, because the document is first parsed into triples before any 
use takes place.

If, however, using the text:name attribute is out of the question, then 
if <text:meta-field xml:id="x5"> would be allowed to have the 
xhtml:about attribute, the repetition would be unnecessary. You could 
just write <text:meta-field xhtml:about="#x3">MERCUTIO</text:meta-field>.

Going back to what I imagine it would look like in a word-processor, it 
that when you let the mouse hover over MERCUTIO, a tooltip will appear 
looking like this:
+---------+------------+
|Name     |Mercutio    |
|Played by|Ben Affleck |
|Friend of|Romeo       |
+---------+------------+

If however, the way it is supposed to work matches option 2, then which 
predicate is expected to replace MERCUTIO in <text:meta-field 
xml:id="x2">MERCUTIO</text:meta-field>? Name, playedBy or friendOf?

Best regards,

Søren Roug



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]