Re: issue: type of modelReference attribute?

Hi John, please see inside.

On Wed, 2006-04-19 at 17:57 -0400, jam@cs.uga.edu wrote:
> 
> Hi all,
> 
> This is a follow up to yesterday's teleconference which
> discussed the merits of using URI's and/or QNames for
> model references.  I have listed a couple of options
> for you to comment on.
> 
> ==========================================================
> 
> *** Option 1: modelReference = URI  (with QName supported)
> 
> Base the standard on URI's for model references, but
> allow a URI to be abbreviated using a QName
> 
>   <qname> ::= <prefix> : <localName>
> 
> The following Web page discusses a way to "correctly map"
> (they claim) a QName into a URI and should work for both
> XML Schema and RDF (even though XML Schema and RDF do
> things differently).
> 
>   http://www.openhealth.org/RDF/QNameQuagmire.html
> 
> Another longer discussion may be found in the following paper:
> 
>   http://www.metalex.nl/pages/reports/lexml-rdf-mt.pdf

Since every qname is syntactically a valid URI (even qnames in the
default namespace, i.e. without prefix and the colon), would this mean
that the type of the attribute would be either a qname if it fits the
syntax, or otherwise a URI?

This would disallow URIs like urn:foo, however this may not be a
practical problem.

What would the value space of the attribute be - would it also contain
qnames (tuple of namespace URI and local name) and URIs or would it be
only URIs, after turning the qname tuple into a URI somehow?

> ==========================================================
> 
> *** Option 2: modelReference = URI (with QName NOT supported)
> 
> Do NOT support the use of QNames, only URI's
> 
> Since SAWSDL intends to support multiple languages,
> using option 1's "trick" may lead to future trouble.
> 
> Then, in order to support the convenience and readability
> that QNames afford, XML bases might be used instead,
> as shown in the third example below (contrasted with
> Full URI's and QNames).
> 
> 1.  Full URI
> 
>  <xs:element name="processPurchaseOrderResponse" type="xs:string"
>              wssem:modelReference="http://ontologies.com/PurchaseOrder.owl#OrderConfirmation"/>
> 
> 2.  QName
> 
>  xmlns:POOntology="http://ontologies.com/PurchaseOrder.owl#">
> 
>  <xs:element name="processPurchaseOrderResponse" type="xs:string"
>             wssem:modelReference="POOntology:OrderConfirmation"/>
> 
> 3.  XML Base
> 
> I think Jacek mentioned we could use XML Base, but it seems like
> that would only allow one namespace to be used (within a scope),
> so if multiple ontologies are used, this might be problematic?
> 
> Here's an example from http://www.w3.org/TR/xmlbase/
> 
>   xml:base="http://example.org/today/

Yes, xml:base can only be one for a particular scope, but I have seen
DTD entities used in RDF/XML, something like this:

<!DOCTYPE Ontology [
<!ENTITY ont "http://www.daml.org/2001/03/daml+oil#">
<!ENTITY col "http://www.openhealth.org/WOWG/collection.ont#">
<!ENTITY this "http://www.openhealth.org/WOWG/Schema.owl#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema">
]>
<Ontology  xmlns:rdf="&rdf;"
	   xmlns="&ont;"      >

	<Class rdf:ID="Type">
		<subClassOf rdf:resource="&ont;Class"/>
	</Class>
</Ontology>

This also shortens the URIs, so it can be thought of as option 4.

> ==========================================================
> 
> Afterthought:
> 
> As discussed after yesterday's meeting, there are some subtle issues
> with using QNames across individual standards.  From my reading,
> I began to see some of the possible problems.  However, I wonder
> if it could it be the case that they are not show stoppers and we
> could still provide the convenience of QNames.  If someone could
> give specific examples of problems likely to occur, that would be
> helpful.

The biggest problem is that in languages that use qnames (other than
RDF/XML), a qname by itself doesn't identify anything, it's always a
qname with a type. In XML Schema, for example, if we just say ex:car
(xmlns:ex="http://example.com/") we don't know whether ex:car is an
element declaration, type definition, model group or other things. WSDL
introduces more: interface, binding, service, all can be identified by
qnames. RDF/XML doesn't have this problem because it only uses qnames as
syntactic shortcut for writing down URIs, but note that this usage is
constrained to XML elements and attributes, any attribute values in
RDF/XML (for example rdf:about or rdf:resource) are plain URIs.

Therefore if we use qnames as pointers to models, we must be able to
specify for each such qname what entity type is being referred to
(schema element declarations, schema type defintions, wsdl interfaces
being three examples from only two languages), adding more complexity to
SAWSDL.

If somebody wants to pursue this direction, a concrete use case and
qname type disambiguation mechanism proposal will be useful. 8-)

Best regards,

Jacek

Received on Friday, 21 April 2006 16:28:04 UTC