Re: ISSUE-29: Re: When is equal and when is it nonequal (eg, the IRI interface)

Hi Manu,

Cheers for the reply - all agreed of course, and clarifying the last point:

Manu Sporny wrote:
> On 08/02/2010 11:28 PM, Nathan wrote:
>> 3: Would a simple method on the document to return elements by filtering
>> not suffice
>>   document.getElementsByFilter( subject, predicate, object );
>> where each param is optional and where at least one is required.
> 
> This method is on DataStore:
> 
> document.data.store.filter( subject, predicate, object, ... );
> 
> Would that address this use caes?

nope, the primary difference is that store.filter returns a store for 
working with RDF - but I'm putting forward a method which would allow 
you to filter the document by triple and get back the elements - thus 
addressing the primary thing we're discussing.

>>  document.getElementByTriple( RDFTriple triple );
>> again where 1 or more properties of the triple would need to be set.
> 
> You can specify a RDFTripleFilter to DataStore.filter():
> 
> http://www.w3.org/2010/02/rdfa/sources/rdfa-dom-api/#widl-DataStore-filter
> 
> Does that address your use case, or are you stating that you would like
> to see this method exposed on the Document interface?

I'd certainly like to see it on the document. The filter methods work 
perfectly on the store object to get back triples - why not add matching 
methods to the document to get back elements? to me it seems it would 
cover all the use-cases we've all mentioned.

document.getElementsByFilter("http://www.ivan-herman.net/foaf#me", 
"foaf:name" , null ); // element holding ivan's name

document.getElementsByFilter( null, "foaf:name" , null ); // everybodies 
name(s).

Basically just allows us to use RDFa s/p/o as DOM Element selectors.

Not sure if I'm explaining this correctly

Best,

Nathan

Received on Thursday, 5 August 2010 13:40:26 UTC