W3C home > Mailing lists > Public > public-owl-wg@w3.org > August 2009

Re: Prefix names cannot be empty according to the OWL/XML schema

From: Bijan Parsia <bparsia@cs.man.ac.uk>
Date: Fri, 7 Aug 2009 11:13:35 +0100
Cc: 'W3C OWL Working Group' <public-owl-wg@w3.org>
Message-Id: <A4E88F86-BB56-44C5-BEAD-1E49DE1CEBB1@cs.man.ac.uk>
To: Antoine Zimmermann <antoine.zimmermann@deri.org>
On 7 Aug 2009, at 10:53, Antoine Zimmermann wrote:

> Dear all,
>
> According to the XML Schema of the OWL/XML syntax, the element  
> Prefix must have a name which is a xsd:string of the form:
>
> "(&PN_CHARS_BASE;)((&PN_CHARS;|\.)*(&PN_CHARS;  ))?"
>
> where &PN_CHARS_BASE; is a character. So the Prefix must be  
> nonempty. This makes many examples in the test cases invalid. This  
> is obviously a bug in the Schema, not in the examples.

Good catch.

It's a bug internal to the schema as well.
<!ENTITY PNAME_NS "(&PN_PREFIX;)?:">
allows for references without prefixes. But the current prefix element  
gives no way to bind a uri to the null prefix.
(It also makes abbreviated URIs with no prefix have a leading :. Ugly,  
though consistent with sparl and FS.)
The fix is simple:
   <xsd:complexType name="Prefix">
     <xsd:attribute name="name" use="required">
       <xsd:simpleType>
         <xsd:restriction base="xsd:string">
           <xsd:pattern value="&PN_PREFIX;|"/>
         </xsd:restriction>
       </xsd:simpleType>
     </xsd:attribute>
     <xsd:attribute name="IRI" type="xsd:anyURI" use="required"/>
   </xsd:complexType>
(I think it's better to do this in the regular expression here than in  
&PN_PREFIX; so &PN_PREFIX; remains identical to the sparql version.)
Cheers,
Bijan.
Received on Friday, 7 August 2009 10:14:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 7 August 2009 10:14:11 GMT