W3C home > Mailing lists > Public > www-html@w3.org > January 2008

Proposal: [WWW] Seperate site and document

From: Luca Del Re <info.ldr@arcor.de>
Date: Sat, 19 Jan 2008 20:13:17 +0100
Message-ID: <B8D342F13FE94E5CB02E7E335BC38AB5@lucanbvis>
To: <www-html@w3.org>

Hi everyone!

In a discussion on a German board (about the future of XHTML), an user asked
for the seperation between navigation and the proper document.
The others told him that there's always been a possibilty for this:
Framesets. Well, as you should know, frames have a lot of problems, that
make them inadequate.

I had another idea: Why not embed the XHTML in a "Site Description Language"
document? So I wrote the following peace of code:

<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href=http://example.org/mysite/style.css ?>
<sdl xmlns="http://example.org/SDL"
xmlns:h = "http://www.w3.org/1999/xhtml"
xmlns:f = "http://www.w3.org/2002/xforms"
xmlns:l = "http://www.w3.org/1999/xlink">
 <title>John Doe Ltd.</title>
 <subtitle>Since 1950</subtitle>
    title="Our services">
    title="Furniture" />
    title="Kitchen equipment" />
       method="post" id="s" />
    <f:input ref="searchterm"><f:label>Search site</f:label></f:input>
    <f:submit submission="s"><f:label>OK</f:label></f:submit>
     <h:p>John Doe Ltd. is a company...</h:p>

The benefit:
Document and site are seperated. The site properties are
semantically marked up.

But there are some disadvantages:
The user complained that there's still traffic caused by the navigation. He
wanted it to be seperated physically, so that the UA may cache it. Also
older UAs that don't interprete this new language could not access the whole

The user was right. After a bit of thinking I had another idea: templating.

How does this work?
Our new SDL language can be used to create templates. This is an example:

<?xml version="1.0" ?>
<?xml-stylesheet type="text/css"
href=http://example.org/mysite/sdl-style.css" ?>
<?sdl-templating is-template="true" ?>

<?xml-stylesheet type="text/css" href=http://example.org/mysite/style.css ?>
<sdl xmlns="http://example.org/SDL"
xmlns:l = http://www.w3.org/1999/xlink"
xmlns:f = "http://www.w3.org/2002/xforms">
  <title>John Doe Ltd.</title>
  <subtitle>Since 1950</subtitle>
  <!-- It's the same as above, the table of contents the searchform,
etc. -->
 <document />

The difference: A processing instruction that indicates wheter this SDL
document is a template, and an empty document element. It will be replaced
by the parser.

So what happens now when we request the index.xhtml?
The server responds with an ordinary XHTML document (without navigation) and
adds the following HTTP header:

X-SDL-Template-Location: http://example.org/mysite/template.sdl

The browser requests the template and inserts the proper document
(index.xhtml) into the document element. (Of course only if it's XML. If 
the parser may add a sample XHTML document with object element or so).

 - Compatible with older browser
 - Navigation can be cached
 - Template may be different (context sensitive)

Disadvantage: Older browser receive a document without navigation...

What do you think about this? This would change the way of organizing 
Navigations can be replaced very easy, and the document is independent from
the site.

I look forward to your comments

Luca Del Re

PS: I know this would fit better to WWW Distributed Indexing and Searching 
information, but the www-disw mailing list seems to be abandoned and is full 
of spam, so I hope you apologize that I posted this here :) 
Received on Sunday, 20 January 2008 04:02:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:17 UTC