- From: Manu Sporny <msporny@digitalbazaar.com>
- Date: Thu, 08 Nov 2007 23:57:47 -0500
- To: RDFa <public-rdf-in-xhtml-tf@w3.org>
Ben Adida wrote: > Following up on my action to keep Ivan's points alive, I'm logging this > issue. We should discuss ASAP. Niklas recently raised some points [1] that were important to this issue: > setting style="white-space: pre" on the h1 element makes > innerHTML return a value with *most* space preserved. I don't know if we want to modify the DOM just to get the XML Literal out of it. That is an implementation detail of the DOM model that could change in any version of IE. In other words, we should look at the problem with the understanding that we can always go from white-space preserved XML Literals to a canonicalized form that does what XPath's normalize function does. However, we cannot go the other way if the Firefox or IE folks decide to change how the DOM stores spaces and newlines. If they decide to not preserve whitespace anymore, a compliant RDFa parser will never be possible in Javascript (unless we use the XMLHTTPRequest method you previously mentioned). The approach of using XMLHTTPRequest to get the document using either IE or Firefox is a very neat approach to the problem, though. At first, I thought that it would be a huge performance hit... however, I believe XMLHTTPRequest uses the browser's cache, which should be populated because the person is viewing the page that must be parsed by the Javascript RDFa parser in the first place. This makes using XMLHTTPRequest a very valid approach - we're guaranteed that most (all?) browsers have some form of that Javascript object. We know that the major browsers could definitely use this approach, the RDFa parser could be run on the document gathered by using XMLHTTPRequest and not the DOM. This means that we can (and should, IMHO) preserve all of the formatting in the original document for XML Literals. Sorry for the previous post stating that we didn't have a choice, I had not considered getting at the original document using XMLHTTPRequest. -- manu [1]http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/2007Nov/0027.html -- 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, 9 November 2007 04:57:58 UTC