Re: RDFa API - new editor's draft and ISSUE-33

Hi,

I have some points about hasFeature and the RDFTriple interface.

Am 17.08.2010 05:32, schrieb Manu Sporny:
> * Updated hasFeature mechanism per RDFa WG telecon discussion [1].

boolean hasFeature (in DOMString feature, in DOMString version);

I think it's confusing to pass RDFaAPI as feature and 1.1 as version.
It would be better to ask the parser for specific markup languages like:  

xhtml+rdfa, 1.1 or
xhtml+rdfa, 1.0 or
html+vcard, 1.0
 
> * Several WebIDL fixes related to ISSUE-33.
>   
Thanks Manu for fixing changes on WEB-IDL. 
What's remaining on ISSUE-33 is:
    
Dominique remarked that the factory method 

RDFTriple createTriple (in Object subject, in IRI property, in Object object); 

takes any object as input for subject and object. We specify in text for 
 - subject: The value must be either an IRI or a BlankNode.
 - object: The value must be an IRI, PlainLiteral, TypedLiteral, or BlankNode.

I recommend to create two meta interfaces called Node and Resource in order to add a small type hierarchy to our RDF Object Model:

 Node       
-PlainLiteral
-TypedLiteral
-Resource
  -IRI
  -BlankNode

Then we could define createTriple as follows:


RDFTriple createTriple (in Resource subject, in IRI property, in Node object); 


We should then also refine PropertyGroup. get(DOMString property) as

Sequence<Node> get (in DOMString property);

Another ISSUE is to access RDFTriple like an Array in order to use Array decomposition in languages like Python or Perl:
That would mean to define RDFTriple as:

[NoInterfaceObject, Null=Null]
interface RDFTriple {
    readonly attribute unsigned long size;
    [IndexGetter]
    Node       get (in unsigned long index);
    readonly attribute Resource subject;
    readonly attribute IRI    property;
    readonly attribute Node object;
    stringifier DOMString toString ();
};
Best regards,

Ben

> *

>  Lots of editorial updates related to Nathan's feedback.
> 
> -- manu
> 
> [1] http://www.w3.org/2010/02/rdfa/meetings/2010-08-05#resolution_2
> [2] http://www.w3.org/2010/02/rdfa/meetings/2010-08-05#resolution_3
> [3] http://www.w3.org/2010/02/rdfa/meetings/2010-08-12#resolution_1
> 
>   


-- 
__________________________________________
Benjamin Adrian
Email : benjamin.adrian@dfki.de
WWW : http://www.dfki.uni-kl.de/~adrian/
Tel.: +49631 20575 1450
Twitter: http://twitter.com/BenBanBun
Skype: benbanbun
__________________________________________
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschäftsführung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
__________________________________________

Received on Thursday, 19 August 2010 11:06:36 UTC