Ian, +1
Although in RDF a property is simply a URI, in practice there are benefits to using URIs that can be represented as QNames since this also makes other formats (SPARQL, Turtle, JSON) more readable. However, rather than cite just QName which is an XML concept, it would be better to also cite the guidance in the related RDF specs. For example, SPARQL 1.1 defines local names via the grammar rule PN_LOCAL [1]. Also, the Turtle grammar defines local names via the grammar rule PN_LOCAL [2] which looks identical to the SPARQL rule. Therefore we should recommend that RDF terms should be built up from an HTTP URI prefix concatenated with a local name that satisfies the PN_LOCAL grammar rule, AND the local name should also satisfy the XML LocalPart grammar rule. [3] I'd need to read the rules more carefully to say if in fact LocalPart is a strict subset of PN_LOCAL. The recommendation should be to use local names that work in all the important formats. [1] http://www.w3.org/TR/sparql11-query/#rPN_LOCAL [2] http://www.w3.org/TR/turtle/#grammar-production-PN_LOCAL [3] http://www.w3.org/TR/REC-xml-names/#NT-LocalPart Regards, ___________________________________________________________________________ Arthur Ryman DE, Chief Architect, Reporting & Portfolio and Strategy Management IBM Software, Rational Toronto Lab | +1-905-413-3077 (office) | +1-416-939-5063 (mobile) From: Ian Green1 <[email protected]> To: [email protected], Cc: Dominic Tulley <[email protected]> Date: 10/11/2013 06:22 AM Subject: [oslc-core] Guidance on URI design for RDF/XML representations Sent by: "Oslc-Core" <[email protected]> What is the guidance on how RDF vocabulary terms should be chosen so as to ensure they are directly representable in RDF/XML (eg see [1])? For example, the triple <http://example.com/req> <http://example.com/ns/1> "value of property 1". can't be directly represented in RDF/XML because one can't write the property "http://example.com/ns/1" as an XML QName. (OSLC V2.0 representations don't admit reification of RDF properties in general). I ask because we're allowing users to define their own vocabulary terms and we're struggling with how to express these constraints to the end-user, as well as concerned that other applications and vocabulary designers don't consider all RDF resource formats. Since OSLC V2 requires RDF/XML format, it is unlikely today that OSLC consumers & providers will encounter RDF that can't be represented in RDF/XML, but this doesn't seem like a robust position as we move into V3. My first stab at the definition is "Each and every user-supplied RDF URI Reference MUST be representable as an XML QName". (This is a sufficient condition but it might not be a necessary one.) best wishes, -ian [1] http://lists.w3.org/Archives/Public/www-rdf-comments/2001JulSep/0124.html [email protected] (Ian Green1/UK/IBM@IBMGB) IBM Rational Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU _______________________________________________ Oslc-Core mailing list [email protected] http://open-services.net/mailman/listinfo/oslc-core_open-services.net
