Re: XML Syntax Issues, xsi:type vs rif:type

Sandro Hawke wrote:
> Dave Reynolds <der@hplb.hpl.hp.com> writes:
>> Boley, Harold wrote:
>>
>>>> Why are you using "type" (eg rif:type) instead of xsi:type there?
>>> For uniformity reasons: rif:type is more general than xsi:type.
>>> For example, we also have rif:type="rif:local".
>> That's not a problem, xsi:type can be used to refer to any schema 
>> element including user defined ones and so can certainly be used to 
>> refer to one defined in a separate W3C spec.
>>
>> More significant is that the value of xsi:type is a QName whereas 
>> rif:type currently seems to be a curi.
> 
> Yes, I hadn't caught that in the BLD spec before (section 2.1.2).  I'm a
> bit concerned about it because the CURIE spec looks almost two-years
> idle as an internal draft, and because I think one might want to use
> URIs directly in simple software.  I suppose if we use CURIEs we could
> propose another disambiguation technique.  The current draft says that
> when you want CURIEs and URIs in the same spot and the default is URIs,
> then use [...] for CURIES.  But we could could also make the default be
> CURIEs and use <...> for URIs.

The current RIF text says just curies so no disambiguation required. I'd 
agree that in the XML syntax having plain URIs instead might be simpler.
I'm more interested in having Curies in the presentation syntax.

>> I'm happy to use rif:type attribute, seems like a good move to me.
> 
> You don't see a useful synergy with XML tools in using xsi:type?

I don't have enough experience with XML tools to really comment on that. 
For the types that we define (rif:iri etc) then an XML tool would 
presumably want to map the rif namespace URI to some XSD document 
defining them, we'd need to produce such a document which might be a 
little tricky.

I think we need input from someone who uses XML for real - Gary?

> What's your take on skipping the "name" stripe?  I have to admit that
> <Const type="foo">bar</Const> reads well, but I'm worried about the
> inconsistency.

It seems reasonable to me. The convention that all leaf things have 
their lexical form as the element content and attributes defining type, 
signature or other annotations seems reasonable and in keeping with XML 
style.

Dave
-- 
Hewlett-Packard Limited
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England

Received on Tuesday, 25 September 2007 09:24:41 UTC