- From: Arjohn Kampman <arjohn.kampman@aduna.biz>
- Date: Mon, 17 Jan 2005 09:52:10 +0100
- To: Damian Steer <damian.steer@hp.com>
- Cc: public-rdf-dawg-comments@w3.org
Damian Steer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > Some poorly though out suggestions from someone ill-qualified to comment > on XML. > > 1) Schema validation. > > Since variable names are used as element names this seems to prohibit > some useful validation. I'm no expert (by along way) but it seems that > something along the lines of: > > <result> > ... > <var name="a" ...> ... </var> > ... > </result> The use of variable names as element names is also my major concern. The lack of a simple validation mechanism is only one of the drawbacks. Other issues are: - It implicitly restrict variable names to what is allowed as an XML element name. (Disclaimer: I am not enough of an expert on the subject of XML QNames and Unicode to determine whether this is problematic.) - A variable name is always required to be able to export the results table in XML. With the current SPARQL spec this is trivial as one is only able to enumerate variable names in the projection. However, as soon as features like set operations, expressions or functions are added this becomes problematic. Some (pseudo-) examples to make things a bit clearer: Q1: SELECT X WHERE ... UNION SELECT Y WHERE ... Q2: SELECT COUNT(X), Y WHERE ... GROUP BY ... Q3: SELECT concat(X,Y), sum(A,B) WHERE ... > would give the XML schema languages more help. Even better (perhaps) is > using the element to type the result: > > <uri> > <literal> > <bnode> > <unbound> > > so, e.g., one could prohibit datatype and lang on uris, bnodes and > unbound values. This is very similar to the Sesame's result format, using 'null' instead of 'unbound': <?xml version="1.0" encoding="UTF-8"?> <tableQueryResult> <header> <columnName>X</columnName> <columnName>Y</columnName> </header> <tuple> <uri>http://www.foo.com/schema.rdf#change</uri> <literal>Change</literal> </tuple> <tuple> <bNode>node001</bNode> <literal datatype="http://www.w3.org/2001/XMLSchema#int">256</literal> </tuple> <tuple> <bNode>node002</uri> <null/> </tuple> </tableQueryResult> Regards, Arjohn Kampman -- arjohn.kampman@aduna.biz Aduna BV - http://aduna.biz/ Prinses Julianaplein 14-b, 3817 CS Amersfoort, The Netherlands tel. +31-(0)33-4659987 fax. +31-(0)33-4659987
Received on Monday, 17 January 2005 09:10:17 UTC