Re: Strange behaviour of XMLLiterals in RDF/XML
On Mon, Jun 25, 2012 at 12:57 PM, Martynas Jusevičius marty...@graphity.org wrote: Both br/ and br/br are well-formed and equivalent in the XML context, so why the difference in serialization? I'm using Jena 2.6.4 and ARQ 2.8.7. Martynas graphity.org Back in the bad old days br/ was not parsed correctly by some parsers and had to be written as br / (note the space). If you try that substitution does it work? Claude -- I like: Like Like - The likeliest place on the webhttp://like-like.xenei.com Identity: https://www.identify.nu/user.php?cla...@xenei.com LinkedIn: http://www.linkedin.com/in/claudewarren
Re: Strange behaviour of XMLLiterals in RDF/XML
On 25/06/12 12:57, Martynas Jusevičius wrote: Hey list, I'd like to know why the following triple @prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# . @prefix awol: http://bblfish.net/work/atom-owl/2006-06-06/AtomOwl.html# . _:smth awol:xml 'div xmlns=http://www.w3.org/1999/xhtml;pstuffbr/more stuff/p/div'^^rdf:XMLLiteral . serialized into RDF/XML produces escaped XMLLiteral: rdf:Description rdf:nodeID=A23 awol:xml rdf:datatype=http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral;lt;div xmlns=http://www.w3.org/1999/xhtmlgt;lt;pgt;stufflt;br/gt;more stufflt;/pgt;lt;/divgt;/awol:xml /rdf:Description However this one _:smth awol:xml 'div xmlns=http://www.w3.org/1999/xhtml;pstuffbr/brmore stuff/p/div'^^rdf:XMLLiteral . produces unescaped XMLLiteral, as expected: rdf:Description rdf:nodeID=A23 awol:xml rdf:parseType=Literaldiv xmlns=http://www.w3.org/1999/xhtml;pstuffbr/brmore stuff/p/div/awol:xml /rdf:Description Both br/ and br/br are well-formed and equivalent in the XML context, so why the difference in serialization? I'm using Jena 2.6.4 and ARQ 2.8.7. Try riot --validate - you may been a newer jena, can't remember Dec 2010. [[ WARN [line: 5, col: 19] Lexical form 'div xmlns=http://www.w3.org/1999/xhtml;pstuffbr/more stuff/p/div' not valid for datatype http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral ]] br/ is not canonical c14n XML. The rules for a valid XMLLiteral are complicated. The best RDF-WG is going to do is make XMLLiteral less mandatory. At the moment, it is the only special datatype built into RDF, and it's built into the RDF/XML parser as well. Andy Martynas graphity.org
Re: Strange behaviour of XMLLiterals in RDF/XML
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/06/12 13:34, Andy Seaborne wrote: The best RDF-WG is going to do is make XMLLiteral less mandatory. 'Less mandatory'? :-) I was writing a similar reply as this came in. It's horrible trying to explain it, and it will be nice not to have to do that post-rdf 1.1. Damian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/oXQIACgkQAyLCB+mTtymq8wCfW3+7CMm6uHdJhHJ+hbqbWrE3 V/oAoOlmJJfrM1k3brwi1p+j+fswdQrf =x69P -END PGP SIGNATURE-
Re: Strange behaviour of XMLLiterals in RDF/XML
Thanks, I didn't realize XMLLiterals have to be canonical. You don't mean XMLLiterals are going away, do you? Escaped XML would cut off all XML processing tools (I heavily use XSLT on RDF/XML, for example). Martynas On Mon, Jun 25, 2012 at 2:43 PM, Damian Steer d.st...@bristol.ac.uk wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/06/12 13:34, Andy Seaborne wrote: The best RDF-WG is going to do is make XMLLiteral less mandatory. 'Less mandatory'? :-) I was writing a similar reply as this came in. It's horrible trying to explain it, and it will be nice not to have to do that post-rdf 1.1. Damian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/oXQIACgkQAyLCB+mTtymq8wCfW3+7CMm6uHdJhHJ+hbqbWrE3 V/oAoOlmJJfrM1k3brwi1p+j+fswdQrf =x69P -END PGP SIGNATURE-
Re: Strange behaviour of XMLLiterals in RDF/XML
On 25/06/12 13:43, Damian Steer wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/06/12 13:34, Andy Seaborne wrote: The best RDF-WG is going to do is make XMLLiteral less mandatory. 'Less mandatory'? :-) I was writing a similar reply as this came in. It's horrible trying to explain it, and it will be nice not to have to do that post-rdf 1.1. I just rant about rdf:XMLLiterals a lot. The definition isn't changing as far as I can remember. The lexical space is still c14n exclusive canonicalization with comments, with empty inclusiveNamespaces. I only know where to look because of helping people with their data. Never used the things myself. There are so few real use cases - real XML data can't be put straight into RDF because of the canonicalization rules. e.g. People having problem with GML and RDF. Canonicalization software often isn't available at the point of data creation. I'll have another coffee now. Andy Damian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/oXQIACgkQAyLCB+mTtymq8wCfW3+7CMm6uHdJhHJ+hbqbWrE3 V/oAoOlmJJfrM1k3brwi1p+j+fswdQrf =x69P -END PGP SIGNATURE-
Re: Strange behaviour of XMLLiterals in RDF/XML
On 25/06/12 14:05, Martynas Jusevičius wrote: Thanks, I didn't realize XMLLiterals have to be canonical. You don't mean XMLLiterals are going away, do you? Escaped XML would cut off all XML processing tools (I heavily use XSLT on RDF/XML, for example). Not going way. They have a special status in that their lexical form is changed by the RDF/XML parser to be canonical, they don't behave like normal datatypes. The RDF/XML behaviour will remain but, for example, Turtle parsers will not be required to canonicalize. [[ http://lists.w3.org/Archives/Public/public-rdf-wg/2012May/0198.html RESOLVED: in RDF 1.1: [a] XMLLiterals are optional; [b] lexical space consists of well-formed XML fragments; [c] the canonical lexical form is http://www.w3.org/TR/xml-exc-c14n/, as defined in RDF 2004; [d] the value space consists of (normalized) DOM trees. ]] and http://www.w3.org/2011/rdf-wg/track/issues/13 Andy Martynas On Mon, Jun 25, 2012 at 2:43 PM, Damian Steer d.st...@bristol.ac.uk wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/06/12 13:34, Andy Seaborne wrote: The best RDF-WG is going to do is make XMLLiteral less mandatory. 'Less mandatory'? :-) I was writing a similar reply as this came in. It's horrible trying to explain it, and it will be nice not to have to do that post-rdf 1.1. Damian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/oXQIACgkQAyLCB+mTtymq8wCfW3+7CMm6uHdJhHJ+hbqbWrE3 V/oAoOlmJJfrM1k3brwi1p+j+fswdQrf =x69P -END PGP SIGNATURE-