But on the website of w3c they say:
XML Schema was approved as a W3C Recommendation on 2 May 2001 and a
second edition incorporating many errata was published on 28 October
2004
What I ask is what happens if a document refers to an older schema
(usually backwards compatibility is reserved) and also if there is a
prefix instead of a full uri (like xsd:) what does raptor returns? I
am just getting confused with this plain strcmp for types.
lefteris
On Thu, Apr 17, 2008 at 8:14 PM, Sjoerd Mullender
On 2008-04-17 18:25, Lefteris wrote:
On Thu, Apr 17, 2008 at 5:24 PM, Marco Antonelli
wrote: Update of /cvsroot/monetdb/MonetDB5/src/modules/mal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26814/src/modules/mal
Modified Files: rdf.mx Log Message: Added a T bat that stores the types of the RDF objects (IRI, integer, double, plain literal...). It still has to be sorted together with the S, P, O bats in all their possible combinations
U rdf.mx Index: rdf.mx =================================================================== RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/rdf.mx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rdf.mx 1 Apr 2008 14:48:08 -0000 1.2 +++ rdf.mx 17 Apr 2008 15:24:15 -0000 1.3
+static rdf_type RDFparseXsdDataType(char *uri) +{ + rdf_type ret; + if (uri == NULL) + ret = PLAIN; + else if ( strcmp(uri, "http://www.w3.org/2001/XMLSchema#int") || + strcmp(uri, "http://www.w3.org/2001/XMLSchema#integer")) + ret = INTEGER; + else if (strcmp(uri, "http://www.w3.org/2001/XMLSchema#decimal")) + ret = DECIMAL; + else if (strcmp(uri, "http://www.w3.org/2001/XMLSchema#double")) + ret = DOUBLE; + else if (strcmp(uri, "http://www.w3.org/2001/XMLSchema#boolean")) + ret = BOOLEAN; + else if (strcmp(uri, "http://www.w3.org/2001/XMLSchema#float")) + ret = FLOAT; + else if (strcmp(uri, "http://www.w3.org/2001/XMLSchema#string")) + ret = STRING; + else if (strcmp(uri, "http://www.w3.org/2001/XMLSchema#dateTime")) + ret = DATETIME; + else + ret = UNKNOWN; + + raptor_free_memory(uri); + return ret; +}
I am not sure if this is the correct way to identify the type, what happens if 2001 changes to 1998 or 2003? or if they use prefix instead of the uri? Does raptor gives you always the full uri back? it seems way to much hard wired.
W3C URI's are stable. These URI's (presumably) refer to a published W3C recommendation (or are published in said recommendation), so then they will remain in perpetuity.
If and when a new recommendation gets published, you will need to (also) support the new URI's, but the old ones remain and continue to refer to the recommendation that is currently being implemented.
Disclaimer: I know more about W3C process than about XML Schema, so I don't know about the status of the recommendation or where these URI's actually come from.
-- Sjoerd Mullender