Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] CSS Scoping in XML Namespaces

From: "Emmanuil Batsis (Manos)" <mbatsis@--------.-->
To: Robert Koberg <rob@------.--->
Date: 3/4/2004 1:57:00 PM
Robert Koberg wrote:

> Robin Berjon wrote:
>> Baaaaah. Matching prefixes instead of namespaces. Bad bad bad. You 
>> ought to declare the namespace with an @namespace rule, and then use 
>> pfx|localName.
>>
> 
> right... can you tell me which browser supports this?

Mozilla does but IE doesn't AFAIK and that should be expected as that 
"poor excuse for a browser" doesn't even handle CSS2 selectors. A quick 
search brings the following MSDN doc[1] that claims:

[[[
You must declare namespaces in the document element when using XML with 
a cascading style sheet. Locally scoped namespaces will parse correctly, 
but CSS does not currently describe a mechanism for resolving namespace 
prefixes. Therefore, CSS rules might not apply correctly to elements in 
the locally scoped namespace. Placing all namespace declarations on the 
document element ensures that they are all global and, therefore, that 
there will be no collision of prefixes. The default namespace cannot be 
used: All namespaced elements with namespaces must have an explicit 
prefix. In addition, CSS selectors can specify a namespaced element only 
by its prefix. Therefore, you must ensure that the prefix is consistent 
between the XML document and the style sheet.
]]]

[1]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/xsl_browsing1_8ss3.asp 


-- 
Manos Batsis

     _  __    __                    __
    / |/ /__ / /____ __ _ ___ _____/ /_
   /    / -_) __(_-</  ' Y _ `/ __/ __/
  /_/|_/\__/\__/___/_/_/_|_,_/_/  \__/


http://www.netsmart.gr
mailto:mbatsisSPAM_TRAP@n...
tel:+302103240940
http://forte.netsmart.gr/foaf/manos_foaf.rdf


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent