OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Expanded names are not enough

[ Lists Home | Date Index | Thread Index ]
  • From: Chris Maden <crism@oreilly.com>
  • To: xml-dev@ic.ac.uk
  • Date: Thu, 6 Aug 1998 17:09:39 -0400 (EDT)

[John Cowan]
> Chris Maden wrote:
> 
> > Not true.  In this context, foo:p has some universal name (URI +
> > local name), depending on the namespace map in effect when the CSS
> > style rules appeared or were included.  This style rule applies to
> > any element with the same universal name, whatever prefix was used
> > to get it.
> 
> Nope, nope, nope.  Consider this:
> 
> <STYLE type="text/css">
> 	foo:p {ident 1em}
> </STYLE>  <!-- or substitute however you like to embed stylesheets -->
> <foo:p xmlns:foo="http://some.net/ns-1">
> This is a paragraph.
> </p>
> <foo:p xmlns:foo="http://some.va/ns">
> John Paul II
> </p>
> 
> The CSS stylesheet will blindly style both foo:p's, even though they
> are semantically distinct ("paragraph" vs. "pope"), because the
> stylesheet is global and the ns prefixes are local.

"[W]ill" in what sense?  In the sense that IE 5, developed before the
current namespace spec does this?  In the sense that you think it
might.

The behavior of CSS in the presence of namespaces is undefined.  But I
have every reason to expect that it will follow the (soon-to-be-)
defined behavior of XSL, which is that the universal name is
compared.  So consider this:

<quasi-html>
<STYLE type="text/css" xmlns:foo="http://some.net/ns-1">
	foo:p {ident 1em}
</STYLE>
<foo:p xmlns:foo="http://some.net/ns-1">
This is a paragraph.
</foo:p><!-- note: not </p> -->
<foo:p xmlns:foo="http://some.va/ns">
John Paul II
</foo:p>
</quasi-html>

The stylesheet will only affect the first <foo:p>, since it is a style
for http://some.net/ns-1:p, and only matches same.  It would also
match

<bar:p xmlns:bar="http://some.net/ns-1">
This is also a paragraph.
</bar:p>

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS