- From: Paul Grosso <pgrosso@arbortext.com>
- Date: Wed, 8 Dec 2004 12:39:45 -0500
- To: <public-xml-core-wg@w3.org>
- Cc: "Rotan Hanrahan" <Rotan.Hanrahan@MobileAware.com>
With permission, I am forwarding this to the XML Core WG mailing list. Please include Rotan Hanrahan on the cc line in any replies. paul -----Original Message----- From: Rotan Hanrahan [mailto:Rotan.Hanrahan@MobileAware.com] Sent: Wednesday, 08 December, 2004 4:30 To: Paul Grosso; Norman.Walsh@east.sun.com; ht@w3.org Subject: XInclude use case for Device Independence Greetings, I'm reporting on an idea and a "difficulty" related to XInclude from the DIWG, and I'm seeking some comments from people more familiar with the use and direction of XInclude, which I will subsequently report to DIWG. At a DIWG face-to-face some weeks ago, the possibility of using XInclude with DISelect [1] was discussed. This presents an interesting use case whereby DISelect provides a content negotiation function, and XInclude acquires the content selected via DISelect. Among the many illustrative cases, we considered the following: <?xml version='1.0'?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:xi="http://www.w3.org/2001/XInclude"> xmlns:sel="http://www.w3.org/2004/CSelection"> <head><title>News</title></head> <body> <h1>Top Story</h1> <sel:select> <sel:when sel:expr="dc:cssmq-width('px') > 200"> <xi:include href="/full_story.xyz?date=EXPRESSION_GOES_HERE"/> </sel:when> <sel:otherwise> <xi:include href="/small_story.xyz?date=EXPRESSION_GOES_HERE"/> </sel:otherwise> </sel:select> </body> </html> In this case we used DISelect to choose a suitable version of a news story. The selection is based on the pixel width of the screen similar to the approach used in CSS Media Queries. This is a simple template mechanism. However, the href of the XInclude requires a parameter to be passed to the process. We have illustrated this as a "date" value determined by an expression. We have considered the possibility of using XPath expressions within the href attribute, but currently the XInclude proposal only supports escaping of characters. It does not support any form of "evaluation" of the href. Can you advise on any alternative strategy that might be adopted to facilitate the passing of evaluated parameters to URLs referenced by XInclude markup? One alternative proposed at the meeting was an extension to DISelect that would mimic (or map to) XInclude but would permit XPath expressions to create the href attribute value. This would, however, create a new DI variant of XInclude and we would need to keep the DI version of XInclude in step with the official version of XInclude. This idea does not attract much support, so we are seeking advice on how to proceed. Any advice or guidance you can offer us would be most welcome, and feel free to share this request with whoever you deem may be best suited to offer support. Regards, ---Rotan Hanrahan (DIWG and AC Rep for MobileAware) [1] http://www.w3.org/TR/cselection/
Received on Wednesday, 8 December 2004 17:40:01 UTC