- From: Manu Sporny <msporny@digitalbazaar.com>
- Date: Fri, 02 Nov 2007 16:45:38 -0400
- To: W3C RDFa task force <public-rdf-in-xhtml-tf@w3.org>
Ivan Herman wrote: >> In other words, the following XHTML (Test Case #11): >> >> <div about=""> >> Author: <span property="dc:creator">Albert Einstein</span> >> <h2 property="dc:title"> >> E = mc<sup>2</sup>: The Most Urgent Problem of Our Time >> </h2> >> </div> >> >> Should produce the following triples: >> >> @prefix _5: >> <http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0011.>. >> @prefix dc: <http://purl.org/dc/elements/1.1/>. >> >> _5:xhtml dc:creator "Albert Einstein"; >> dc:title """E = mc<sup>2</sup>: The Most Urgent Problem of Our Time""" >> ^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>. >> >>> So I believe we should either refer to these two ideas, or even import >>> the prose as is, if we have to. > > Wait, that is a different issue. It is still undecided whether the > canonicalization should apply on XML Literals. Mark's proposal is to use > XPath for the definition of canonicalization, not (yet) on what exactly > it applies to! If only we had a choice, Ivan :) I took some time last night to do some research on how XMLLiterals could be implemented in Javascript. Here are the results for RDFa Test Case #11: http://rdfa.digitalbazaar.com/tests/xmlliteral.html If you use Firefox's DOM and Javascript implementation to get the contents of the H2 element, here are the results on the node: outerHTML: 'undefined' innerHTML: '\n E = mc<sup>2</sup>: The Most Urgent Problem of Our Time\n ' (there are extra spaces after the last \n) innerText: 'undefined' If you use Internet Explorer 7's DOM and Javascript implementation to get the contents of the "E = mc^2: The Most Urgent Problem of Our Time", here are the results on the node: outerHTML: '\r\n<H2 id=dc-title property="dc:title">E = mc<SUP>2</SUP>: The Most Urgent Problem of Our Time </H2>' innerHTML: 'E = mc<SUP>2</SUP>: The Most Urgent Problem of Our Time ' innerText: 'E = mc2: The Most Urgent Problem of Our Time ' In short - Firefox's implementation allows you to retrieve the original whitespace and line breaks using Javascript. IE7 does not. IE7 normalizes all of the whitespace before inserting it into the DOM, which means that Javascript does not have access to the original text in the XHTML file. This means that the same canonacalization rules should be used for regular strings and XMLLiterals for RDFa-in-XHTML. Somebody please correct me if they have a different understanding of the IE7 DOM. -- manu -- Manu Sporny President/CEO - Digital Bazaar, Inc. blog: Bitmunk Launches World's First Open Music Recommendation Service http://blog.digitalbazaar.com/2007/09/09/bitmunk-music-recommendation/
Received on Friday, 2 November 2007 20:47:06 UTC