Re: RDF and mixed content

Jeremy Carroll wrote:

> [[
> There is no need for the concept of a forged rdf-wrapper. Just as the
> integer 5 does not have to be "wrapped" to be a value, the nodeset
> corresponding to an XML literal should not have to be wrapped. It is
> just a value.
> ]]
>
> Hi Paul
>
> you may be right, but I think I need to throw this one back to you asking
> for specific textual changes. (At least a sketch).

I don't understand the whole domain well enough to suggest any text yet. 
  I'll tell you my opinions as a long-time XML user on some of these issue.

> The problems we needed to address include:
> - clarity about whether an XML Literal is or is not the same as a plain
> literal

I don't have a clear sense of what a "plain" literal is, so I don't have 
an opinion.

> - clarity about when two XML Literals are the same value (needed for
> instance in WebOnt cardinality constraints)

XML nodes should not (in general) be compared by value but by identity.

An easy way of uniquely identifying XML nodes web-wide is to form a 
tuple (URI, node-number) where node-number is 1 for the root element, 2 
for its first child, 3 for the first child's first child and so forth. 
i.e. a depth-first traversal.

XSLT also affirms that nodes have identity by providing the id() 
function which generates a unique id based on the node's identity.

You could ignore XML's traditional notion of identity and try to compare 
by value, but you get stuck with the hacks like rdf-wrapper.

Overall there is a question about how deeply RDF should natively 
understand XML. If I make the statements:

http://www.foo.com/foo.xml#element(intro) has dc:title "blah"
http://www.foo.com/foo.xml#element(/1) has dc:title "blah blah"

Is an RDF processor:

  a) allowed
  b) required

to check whether the two URIs refer to the same XML node?

> - clarity about which bits of the XML InfoSet are included in the
> rdf:parseType="Literal" and which bits are not.

I would suggest that the XPath/XSLT/XQuery specifications probably have 
a common infoset profile which should be applicable.

> - backward compatibility with RDF Model and Syntax

I don't know enough about what this implies.

> - adequate treatment of the language tag (i.e. xml:lang is significant both
> in the RDF/XML constructs, such as the property element, and within any
> marked up content e.g. on an XML element within an XML literal).

IMHO, the xml:lang is just a part of the context of the node, no 
different than in-scope namespaces, available entities, etc.

This is another reason that the rdf-wrapper strategy does not work 
right. Given:

<!ENTITY foo "blah">

...

<x xmlns:foo="bar">
<prop rdf:parseType="Literal">
	<bar:blah>&foo;</bar:blah>
</prop>
</x>

Your algorithm would generate:

<rdf-wrapper xml:lang=""><bar:blah>&foo;</bar:blah>
</rdf-wrapper>

This violates both the XML 1.0 and the namespaces specifications. And 
consider another context issue:

<prop rdf:parseType="Literal">
	<bar:blah relatedTo="element(../../foo[1]/bar[2])"/>
</prop>

If you wrap this up into a standalone document, the relatedTo link will 
be broken. XML elements, in general, can depend upon their context and 
cannot safely be removed from that context.

  Paul Prescod

Received on Monday, 18 November 2002 11:43:11 UTC