W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > July 2003

Re: Proposal (re rdfms-literal-is-xml-structure)

From: Patrick Stickler <patrick.stickler@nokia.com>
Date: Tue, 15 Jul 2003 10:36:45 +0300
Message-ID: <001e01c34aa3$dc01dc60$100da20a@NOE.Nokia.com>
To: "ext Martin Duerst" <duerst@w3.org>
Cc: <w3c-rdfcore-wg@w3.org>, <w3c-i18n-ig@w3.org>


----- Original Message -----
From: "ext Martin Duerst" <duerst@w3.org>
To: "Patrick Stickler" <patrick.stickler@nokia.com>
Cc: <w3c-rdfcore-wg@w3.org>; <w3c-i18n-ig@w3.org>
Sent: 15 July, 2003 00:21
Subject: Re: Proposal (re rdfms-literal-is-xml-structure)


> Hello Patrick,
>
> For some additional opinion on this issue, please see
> http://www.tbray.org/ongoing/When/200x/2003/04/22/RSS-Problems.
>
> Regards,    Martin.

Thanks for the pointer, Martin.

I agree that escaping of XML in XML is a problem. But it is a common
problem for any encoding which can recursively embed nativly encoded
fragments.

In such cases, multiple level escapment is unavoidable (as any UNIX script
writers will appreciate).

This is not a problem with XML, or RDF, or RSS. It is a general problem.
It is simply the nature of  the beast.

Though, granted, multiple level escapement in XML is pushing the limit in
terms of readability and convenience. No argument there.

Literals expressed as either attribute values or element content are
unescaped
(top level entities resolved) when mapping them to the graph -- because XML
is the serialization model, and that's what happens to PCDATA.

If someone actually wants "...&lt;..." in the graph, they have to say
"...&amp;lt;".

Cest la vie.

(they should try Bourne shell programming with scripts that autogenerate
other scripts that also include regular expressions! Now there's some
escaping ;-)

Patrick


> At 11:03 03/07/11 +0300, Patrick Stickler wrote:
>
>
> >----- Original Message -----
> >From: "ext Dan Connolly" <connolly@w3.org>
> >To: "Patrick Stickler" <patrick.stickler@nokia.com>
> >Cc: "Brian McBride" <bwm@hplb.hpl.hp.com>; <w3c-rdfcore-wg@w3.org>;
"Martin
> >Duerst" <duerst@w3.org>; <w3c-i18n-ig@w3.org>
> >Sent: 10 July, 2003 20:34
> >Subject: Re: Proposal (re rdfms-literal-is-xml-structure)
> >
> >
> > > On Thu, 2003-07-10 at 10:02, Patrick.Stickler@nokia.com wrote:
> > > > OK folks,
> > > >
> > > > In the interests of satisfying all interested parties,
> > > > I offer the following proposal for an alternative
> > > > solution to the present one, based on nothing new,
> > > > just a partial roll back to a more traditional M&S
> > > > treatment of XML literals.
> > > >
> > > > Changes:
> > > [...most of this looks clear and straightforward...]
> > > > --
> > > >
> > > > All of the following:
> > > >
> > > > 4. <rdf:Description rdf:about="#x">
> > > >       <ex:foo
rdf:parseType="Literal"><xhtml:b>bar</xhtml:b></ex:foo>
> > > >    </rdf:Description>
> > > >
> > > > 5. <rdf:Description rdf:about="#x">
> > > >       <ex:foo>&lt;xhtml:b&gt;bar&lt;/xhtml:b&gt;</ex:foo>
> > > >    </rdf:Description>
> > > >
> > > > 6. <rdf:Description rdf:about="#x"
> >ex:foo="&lt;xhtml:b&gt;bar&lt;/xhtml:b&gt;"/>
> > > >
> > > > generate the same triple:
> > > >
> > > >    <#x> ex:foo "<xhtml:b>bar</xhtml:b>"@fi .
> > >
> > > I'm uncomfortable with that... my strong intuition is that this
> > > loss of information is going to hurt.
> >
> >It does indeed simplify the view of literals having XML markup.
> >
> >The only issues that I have been able to think of are:
> >
> >1. At present, one knows that any lexical form of type rdf:XMLLiteral
> >is a well formed XML fragment.
> >
> >2. If RDF systems wish to re-serialize literals using parseType="Literal"
> >then each literal will need to be checked for well formedness.
> >
> >Essentially what this means is that there are no longer any "XML
literals"
> >per se, but only a means for serializing literals as XML, in the RDF/XML,
> >and that distinction is lost in the graph.
> >
> > >From a modelling perspective, that actually feels right, since the
graph
> >is agnostic about the serialization used, there shouldn't necessarily be
> >any special distinction between literals with XML markup and literals
> >without XML markup in the graph, simply due to the fact that XML
> >is used for the official serialization syntax of a graph.
> >
> >But I'm waiting anxiously to hear from the parser implementors.
> >
> > >From my position, as a consumer of RDF and RDF/XML, there
> >are no significant concerns to this loss of distinction.
> >
> >Patrick
> >
> >
> > > Meanwhile, I've been aware of the issue for over a year...
> > > wow, more like two...
> > > http://www.w3.org/2000/03/rdf-tracking/#rdfms-literal-is-xml-structure
> > >
> > > and I haven't developed any particular implementation experience
> > > that validates my intuition. cwm doesn't really grok
> > > parseType="Literal" at all, and it would probably be easier
> > > to support this interpretation of it. So I'm not in a position
> > > to object.
> > >
> > >
> > >
> > > --
> > > Dan Connolly, W3C http://www.w3.org/People/Connolly/
> > >
> > >
> > >
> > >
>
>
Received on Tuesday, 15 July 2003 03:36:57 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:58:45 EDT