W3C home > Mailing lists > Public > www-tag@w3.org > April 2007

RE: should CSS, HTML, etc. documents bear version information? (XMLVersioning-41?)

From: David Carlisle <davidc@nag.co.uk>
Date: Thu, 5 Apr 2007 11:58:07 +0100
Message-Id: <200704051058.l35Aw7ux016410@edinburgh.nag.co.uk>
To: www-tag@w3.org

Noah Mendelsohn wrote
> 
> <container  xmlns="http://example.org/container">
>   <document>
>        <html xmlns="http://www.w3.org/1999/xhtml">
>        </html>
>   </document>
>   <document>
>        <music xmlns="http://example.org/musiclanguage">
>        </music>
>   </document>
> </container>
> 
> which is sort of a mythical XML equivalent of multipart mime, which of the 
> language versions matter?  I think all 3 do, I.e. the versioning of the 
> html used in the first document, the versioning of the music language used 
> in the second, and the versioning of the container itself. 

I think perhaps XSLT shows one useful way of approaching this. It has a
version attribute (in no namespace) which is used on xsl:stylesheet but
it also has a version attribute (in the xsl namespace) for use in
contexts where the element's namespace is not xslt.
So if the three languages above all followed that convention you'd end up
with something like


 <container  xmlns="http://example.org/container"
             xmlns:h="http://www.w3.org/1999/xhtml"
             xmlns:m="http://example.org/musiclanguage"
             version="0.1"
             h:version="1.1"
             m:version="42">
   <document>
        <html xmlns="http://www.w3.org/1999/xhtml">
        </html>
   </document>
   <document>
        <music xmlns="http://example.org/musiclanguage">
        </music>
   </document>
 </container>

This allows each version to be specified idependently and avoids the
problem with the current XHTML M12N approach where essentially you have to
invent (and get end users to recognise) a new name for every combination
of languages that you construct.

Certainly in XHTML+MathML documents it is in practice _very_ useful to
force that the existence of MathML somewhere in the document is declared
at the top of the file. (This is more important than versioning usually,
but versioning might be useful too) and this is one quite natural way of
ensuring that the necessary namespaces are declared up front. Some current
browsers will only look at the top of the file to decide whether to
enable additional components for, for example, MathML display.

David
Received on Thursday, 5 April 2007 10:58:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:45 GMT