Re: Parser mods to support rdf:dtype and rdf:lform

>>>Patrick Stickler said:
> On 2002-02-15 12:10, "ext Brian McBride" <bwm@hplb.hpl.hp.com> wrote:
> 
> > At 11:04 15/02/2002 +0200, Patrick Stickler wrote:
> > [...]
> >>    <dc:date rdf:value="2002-02-14" rdf:dtype="&xsd;date"/>
> > 
> > Am I right that under the current proposal this can be more
> > compactly written: 
> > 
> >  <dc:date xsd:date="2002-02-14"/>
> 
> Yes and no. It is more compact, but is less local (thus it
> is not exactly an equivalent variant of the doublet idiom).
> 
> In this case, it is not clear from the RDF that xsd:date is a
> datatype. It could be any kind of property at all. It has
> no more datatyping clarity to the parser than
> 
>    <dc:date foo:bar="2002-02-14"/>

Yeah, that is an issue, but maybe just one of education - choose
clearly the prefixes and local names for data type URIs.

If the foo:bar property isn't given an RDF datatype meaning via some
extra info, then it remains a property?

> And it is unclear, if e.g xml:lang is specified, whether
> the value of xsd:date or foo:bar is the actual literal
> value of the dc:date property or just some extra attribution
> of the bNode. Thus, schema knowledge would be required
> by the parser (not just pre-defined automatic statements
> in the spec) to know for sure that xsd:date or foo:bar
> should be treated as rdf:value.
> 
> And one would not, I think, expect xml:lang to apply to
> all attributes of the element -- or really to any of
> the attributes, but rather only the content of the element,
> and it's just a trick of rdf:value that the content can
> be hidden (contracted) into an attribute.

  "A special attribute named xml:lang may be inserted in documents to
  specify the language used in the contents and attribute values of
  any element in an XML document. "

  -- http://www.w3.org/TR/2000/REC-xml-20001006#sec-lang-tag

so it is clear that xml:lang affects attribute values.


> If I have
> 
>  <dc:title rdf:value="Foo" xml:lang="en" x:scope="237a87"/>
> 
> we're saying that "Foo" is English, but not "237a87".

XML says both are.


> Yet if I have
> 
>  <dc:title xsd:string="Foo" xml:lang="en" x:scope="237a87"/>
> 
> how does the parser know which attribute, if any, denotes
> the actual content of the dc:title property element?

'actual content'?

XML says attribute starting with 'xml' are reserved; so that leaves
two for the XML-application, RDF here, to use.  The triple mapping
that RDF/XML provides to ntriples is quite clear, it gives you:

  _:x dc:title _:y .
  _:y xsd:string "Foo"(en) .
  _:y x:scope "237a87"(en) .

What 'actual content' do you mean?  Some RDF application may
understand that xsd:string rdf:subPropertyOf rdf:value and then
do the datatyping thing, or not.


> Thus, with the datatype triple idiom, the parser cannot
> know what is or is not the content of the property element
> to which xml:lang is to be attached simply from the
> vocabulary used in the idiom itself.
> 
> I admit that it's a handy form of expression, but these
> issues have to be resolved before we're completely
> done, I think.

I don't see any issues.

<snip/>

> Though, as pointed out above, proper attachment of xml:lang
> to the literal either requires schema knowledge or results
> in over-attachment to all attributes.

No.

I can't see any implementation problems with the above.

Dave

Received on Friday, 15 February 2002 09:02:35 UTC