- From: Manu Sporny <msporny@digitalbazaar.com>
- Date: Wed, 10 Nov 2010 20:42:51 -0500
- To: RDFa WG <public-rdfa-wg@w3.org>
If there are no objections to this proposal in 7 days, we will close ISSUE-49: RDFNode type, equality and canonicalization. http://www.w3.org/2010/02/rdfa/track/issues/49 This proposal is based on discussion that happened on the telecon two weeks ago: http://www.w3.org/2010/02/rdfa/meetings/2010-10-28#ISSUE__2d_49_RDFNode_type__2c__equality_and_canonicalization The proposal is to add the following methods to the RDFNode interface: 2) DOMString getType(); 3) DOMString toCanonical(); 1) boolean equals(in RDFNode otherNode); The getType() method will return the string name of the relevant interface - IRI, BlankNode, PlainLiteral, or TypedLiteral. This is required because all WebIDL interfaces are decorated with the [NoInterfaceObject] decorator. This means that it is impossible to tell the type of the interface at runtime. Having a getType() mechanism will allow us to tell the type of the interface at runtime. The toCanonical() method is provided for the purposes of generating a canonical string that can be used for equality comparison. The canonical format that the RDFa API will use is the N-Triples format. The equals() method will return true if both RDFNodes have the same nodeType() and the same toCanonical() result. Simple string comparison between the two methods is sufficient when testing for equality between RDFNodes. Please comment in 7 days from this post if you object to this proposal. If there are no objections within 7 days, ISSUE-49 will be closed. -- manu -- Manu Sporny (skype: msporny, twitter: manusporny) President/CEO - Digital Bazaar, Inc. blog: Linked Data in JSON http://digitalbazaar.com/2010/10/30/json-ld/
Received on Thursday, 11 November 2010 01:43:22 UTC