Re: Locating In EARL Example

On Tue, 05 Apr 2005 15:02:41 +1000, Chris Ridpath  
<chris.ridpath@utoronto.ca> wrote:

>> The attributes that you have added are not valid. They probably should  
>> be modelled as properties - i.e. they could equally be expressed as
>>
>> <earl:subject r:resource="#subject">
>>   <earl:element>img</earl:element>
>>   ...
>> </earl:subject>
>>
> OK. All the identifier elements would be children of the earl:subject.  
> What
> about using <earl:element> and a number of attributes? Example:
> <earl:subject rdf:resource="#subject">
> <earl:element name="img" src="rex.jpg"/>
> </earl:subject>

Eh. I should have written my own example as a complete RDF document and  
validated it.

Remember RDF doesn't have a child/parent model in the way that XML  
normally does, but an object-relation-object model.

So we would have a class for subject, and that would have various  
properties hanging from it.

But having thought about it more I think it is more sensibleto have the  
location information tied directly to the assertion itself (which we have  
already modelled as a Class, so there is less change from existing EARL).

> and for the xpath expression:
> <earl:xpath name="/HTML/BODY/P/IMG"/>

If you have a property, it has a value:

<Assertion>
   <xpath>/html/body/p/img</xpath>
<!-- an Xpath is only valid on XHTML anyway... -->
   ...

or

<earl:Assertion>
   ...
   <earl:xpath rdf:value="/html/p//img[!@alt]" />
   ...

> I noticed you're using the "r:resource" element instead of the
> "rdf:resource" element. Which one is correct?

Whatever you prefer - it is a namespace prefix soit depends on the  
namespace declaration you make. I am used to shorter ones in my own code  
(a d f o r s where many people use anotea, dc, foaf, owl, rdf, rdfs). The  
tool I use to write RDF (RDF Author, although while I wait for my mac to  
be repaired I can't run it on my temporary windows machine :-( actually  
uses NS0, NS1, NS2 etc ;-)

>> I think it is probably better to think about how this is modelled. One  
>> possibility is to think of a subject (a page) and to have a context  
>> property (this is what annotea does) that *attempts* to provide a more  
>> accurate pointer.
>>
> This sounds good to me. Whatever we use to identify the thing causing the
> accessibility problem is going to be fragile and not very pretty to look  
> at.
> However I believe we can create something that will work most of the time
> and be useful.
>
>> <earl:subject r:resource="#subject"/>
>> <earl:context>
>>   <earl:line>9</earl:line>
>>   <earl:near r:parseType="Literal">
>>   blah blah look at <img src="rex.png"/> if you like that kind of thing
>>   </earl:near>
>>   <earl:pointer ... >
>> </earl:context>
>>
> Do we need the earl:context element (can't we just put the identifier
> elements as children of the earl:subject)?
>
>> You should also be using parseType="Literal" in your message.
>>
> Is this to be used when including actual bits of the source document? Any
> docs to describe its use?

The RDF primer I think describes it. Basically, you can use it to include  
XML directly in RDF as the value of something, rather than as more RDF  
that the parser should expect to understand. It's a little like declaring  
"any" in XML schema.

I wil try to find my explanation of RDF and publish it - it covers a bunch  
of things like this.

> I see you are using an "earl:near" element. Was this just something you  
> are
> using in your example or is it something you think we should be using?

It's just an example, but I think it is worth considering as one of the  
things we should have available...

cheers

Chaals

-- 
Charles McCathieNevile                      Fundacion Sidar
charles@sidar.org   +61 409 134 136    http://www.sidar.org

Received on Tuesday, 5 April 2005 06:05:11 UTC