- From: Antoine Zimmermann <antoine.zimmermann@emse.fr>
- Date: Tue, 04 Sep 2012 15:11:55 +0200
- To: public-rdf-comments@w3.org, richard@ex-parrot.com
FWIW, OWL 2 has a feature to define custom datatypes that can be written completely in RDF, without using XML Schema. Your example for Chapman codes can be written as follows, in Turtle syntax: @prefix geo: <http://www.example.com/geo#> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> @prefix owl: <http://www.w3.org/2002/07/owl#> @prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> geo:chapman-code a rdfs:Datatype; owl:equivalentClass [ a rdfs:Datatype; owl:onDatatype xsd:string; owl:withRestriction ( [xsd:pattern "[a-zA-Z]{3}"] ) ] . --AZ Le 04/09/2012 14:26, Richard Smith a écrit : > > Hi Richard, > > Richard Cyganiak wrote: >> Richard Smith wrote: > > [snip] > >>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >>> xmlns:dct="http://purl.org/dc/terms/"> >>> <xsd:annotation><xsd:appinfo> >>> <rdf:RDF><rdf:Resource about=""> >>> <dct:issued >>> rdf:datatype="xsd:gYearMonth">2012-08</dct:issued> >>> </rdf:Resource></rdf:RDF> >>> </xsd:appinfo></xsd:annotation> >>> </xsd:schema> >>> >>> I certainly don't think a substantive change is required. But at the >>> risk of advancing the argument that I wrote bad RDF and therefore >>> it's a bug in someone else's standard, I do think a non-normative >>> note mentioning this difference might be in order. >> >> The xs: prefix is conventionally associated with one namespace URI, >> and the xsd: prefix is conventionally associated with another URI. > > Except that isn't applied uniformly, even amongst the W3 > recommendations. For instance, in section 2.1 of the XML Schema Primer > > http://www.w3.org/TR/xmlschema-0/#POSchema > > the example begins with > > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > and that recommendation uniformly uses 'xsd' as the prefix for the XML > Schema namespace, without the '#'. > > And a google search finds comparably many hits for "xsd:element" and > "xs:element", so even if using 'xs' is recommended practice, it > certainly doesn't seem to be established practice. > > >> As far as I know, we have no evidence, and no reason to believe, that >> this is a common confusion. > > Probably not in the form I gave. But the much the same problem manifests > in a second manner that I hadn't considered when I sent the earlier > email. I think this is more serious. > > The implication of section 5 of the RDF 1.1 Concepts draft is that it > should be possible to use suitable types from third-party XML Schemas. A > real example: English counties have a three-letter abbreviation known as > a Chapman code, and I can define an XML Schema type to represent them. E.g. > > <xs:schema xmlns="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://www.example.com/geo"> > <xs:simpleType name="chapman-code"> > <xs:restriction base="xs:string"> > <!-- I could enumerate them or use a pattern --> > </xs:restriction> > <xs:simpleType> > </xs:schema> > > If I want to use this type in RDF, what is its datatype URI? The RDF 1.1 > Concepts draft is silent on the issue. By comparison with XML Schema, we > might infer that it should be > > http://www.example.com/geo#chapman-code > > But nothing in the Concepts draft says we should add a '#' in this way. > And I am aware of nothing in the XML Schema recommendations that defines > the notion of a datatype URI for a schema type. > > And if we do add the '#', do we still do this if the XML Schema > targetNamespace already ends with a '#'? Or with a '/'? > >> (It also seems more of an RDF/XML issue than an RDF Concepts issue to >> me, given that RDF/XML is the one RDF technology that is somewhat >> likely to be used in conjunction with XML Schema. > > I'm not sure I agree. In some ways, I think RDFa is the most likely > technology to be used within an XML Schema. > > Richard > > -- Antoine Zimmermann ISCOD / LSTI - Institut Henri Fayol École Nationale Supérieure des Mines de Saint-Étienne 158 cours Fauriel 42023 Saint-Étienne Cedex 2 France Tél:+33(0)4 77 42 66 03 Fax:+33(0)4 77 42 66 66 http://zimmer.aprilfoolsreview.com/
Received on Tuesday, 4 September 2012 13:12:28 UTC