W3C home > Mailing lists > Public > www-style@w3.org > January 2006

Re: I18n comment: xml and namespaces version

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 24 Jan 2006 09:48:45 +0100
To: "Felix Sasaki" <fsasaki@w3.org>
Cc: www-style@w3.org, public-i18n-core@w3.org
Message-ID: <61qbt11vsjubtm2c08qkujl87tqj8etdfd@hive.bjoern.hoehrmann.de>

* Felix Sasaki wrote:
>> Could you give an example of such a "clash" or how mechanisms to avoid
>> them could look like?
>
>Example for XHTML:
><?xml version="1.0" ...?>
><html>
><head> ...
><style type="text/css">
><!--
>@namespace foo url(XXX);
>  foo|h1 { color: blue }
>/* ... ... */
>-->
></style>
></head>...
></html>
>This is an error if "XXX" contains characters which are not part of the  
>NCName production in XML 1.0. In the case of XHTML it is an error anyway,  
>since XHTML has a normative reference to XML 1.0 . But if I understand you  
>correctly, you want selectors to be used for a variety, possibly currently  
>not yet existing document languages. You should prepare the creators /  
>users of such languages by telling them that such clashes are sources for  
>errors.
>Mechanism to avoid such errors: state that they have to be avoided, as the  
>XML 1.0 spec does.

There are some differences between XML/Namespaces 1.0 and 1.1, you can
use more characters in element and attribute names, you can use IRIs for
namespace names, you can use C0 control characters in documents, etc. in
XML 1.1 even though you can't (in some sense) do that in XML 1.0.

Selectors do not inherit any of these constraints, you can use any
character but U+0000 in the selector, and the @namespace at-rule is not
likely to impose any restrictions that would make it not suitable for
use with XML 1.1. Which is to say, whatever characters you use in your
namespace names, element names, attribute names, or other parts of the
tree, you can easily match them using selectors. So I don't see what the
error in your example would be, if it's namespace-wellformed, there
should not be any problem at all.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Tuesday, 24 January 2006 08:48:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:42 GMT