Re: [XSCH] Component Designators

I was discussing this with colleagues over lunch: at least one strongly 
prefers the DAML+OIL type solution with simply #foo to refer to the foo 
type. This could interact with the TAG issue:

[[
http://www.w3.org/2001/tag/issues.html?type=1#fragmentInXML-28
agreed on 12 May 2004
In general, the fragment part of a URI may be used to refer to 
abstractions as well as syntactic fragments of a representation; the 
media type identifies a specification, which explains the semantics.
]]

and the current revision of the XML mediatypes RFC 3023 being worked on.
The old one says:
http://www.ietf.org/rfc/rfc3023.txt
[[
As of today, no established specifications define identifiers for XML
media types.  However, a working draft published by W3C, namely "XML
Pointer Language (XPointer)", attempts to define fragment identifiers
for text/xml and application/xml.  The current specification for
XPointer is available at http://www.w3.org/TR/xptr.
]]

This points to:
http://www.w3.org/TR/xptr-framework/#shorthand
which says:
[[
A shorthand pointer, formerly known as a barename, consists of an NCName 
alone. It identifies at most one element in the resource's information 
set; specifically, the first one (if any) in document order that has a 
matching NCName as an identifier.
]]

Thus modifying the example
<!-- Stock Keeping Unit, a code for identifying products -->
<xsd:simpleType name="SKU" id="SKU">
   <xsd:restriction base="xsd:string">
   <xsd:pattern value="\d{3}-[A-Z]{2}"/>
   </xsd:restriction>
</xsd:simpleType>

we would have

schema-URI#SKU identifying the above piece of XML as an element in the 
infoset, and schema-URI#xscd(\type(SKU)) as identifying the 'simple type 
definition'. Neither appear to identify the simple type itself.

Another colleague, who I've not yet spoken with, has some experience 
with using this xscd's in Semantic Web work.

Jeremy




Jeremy Carroll wrote:

> 
> Hi
> 
> I have read (well skimmed)
> 
> http://www.w3.org/TR/2004/WD-xmlschema-ref-20040716/
> [[
> XML Schema: Component Designators
> W3C Working Draft 16 July 2004
> ]]
> 
> Relevant sections are:
> 2.2 Use Cases
> http://www.w3.org/TR/2004/WD-xmlschema-ref-20040716/#section-usecases
> 
> 4.2.4 Simple Type Definition
> http://www.w3.org/TR/2004/WD-xmlschema-ref-20040716/#simple-type-def-component 
> 
> 
> 6 Example
> http://www.w3.org/TR/2004/WD-xmlschema-ref-20040716/#section-example
> 
> particularly:
> [[
> The following is a global simple type definition component,
> 
> <!-- Stock Keeping Unit, a code for identifying products -->
> <xsd:simpleType name="SKU">
>  <xsd:restriction base="xsd:string">
>   <xsd:pattern value="\d{3}-[A-Z]{2}"/>
>  </xsd:restriction>
> </xsd:simpleType>
> 
> The canonical schema component designator for this simple type 
> definition [and ...] are,
> 
> schema-URI#xscd(/type(SKU))
> ]]
> 
> basically that looks OK.
> Standard usage of these for SW would be to have named simple types like 
> this one and then use X-Pointer fragment IDs like
> #xscd(/type(*name*))
> where *name* is the name of the type. Slightly more complicated than 
> just using *name* by itself, but only a little.
> For element declarations (whatever they are) it is permitted to use 
> *name* by itself e.g. #xscd(/purchaseOrder) instead of 
> #xscd(/element(purchaseOrder)). It might be possible to request that 
> this abbreviation should also be open to simple types - personally I 
> don't think it's worth the effort.
> 
> 
> I need to fully understand when a namespace prefix is needed, because 
> that seriously complicates things, since the namespace binding has to be 
> included in the xpointer expression using the xmlns() syntax. In section 
> 4.2.4, I believe this relates to the target-namespace.
> 
> Assuming we go with this, our note should indicate both:
> a) an example of using xmlns()
> b) an explanation of how to avoid the need for this
> i.e. we need to give simple recipes as to how to use this stuff 
> reasonably effectively, in the SW
> 
> A final issue is that in N3 it is conventional to write XML schema 
> datatypes with QName convention e.g. xsd:int. However, the thing after 
> the : should be an NCName from Namespaces in XML. If we use these xscd 
> constructs, and my is a namespace prefix for a schema document defining 
> a type foo then
>    my:xscd(/type(foo))
> is not a legal QName, and in fact, no legal QName can be constructed for 
> the URI
> &my;xscd(/type(foo))
> 
> (where &my; is an entity referring to the same base URI)
> 
> I think that it makes sense to provisionally go with this solution to 
> the naming of user-defined simple types.
> 
> Jeremy
> 
> 
> 
> 
> 
> 
> 
> 

Received on Tuesday, 28 September 2004 14:15:12 UTC