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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] css syntax - easy question

[ Lists Home | Date Index | Thread Index ]

Sorry.  I guess I forgot to mention that with CSS namespaces using *
as a global reference is possible.  That is what triggered me to
mention CSS namespaces, but you're right, I didn't mention that in my
response.

If you take a look at the following link 

> http://dean.edwards.name/IE7/compatibility/super.xml

and view source you will find that it references the super.css, so this:

> http://dean.edwards.name/IE7/compatibility/super.css

will show you the css the first link is refering to.  In this example
the first entry shows:

my|* {
	display: block;
	color: black;
	background: #ccc;
	border: black 5px solid;
	margin-bottom: 5px;
	padding: 2px 2px 4px 4px;
	font-family: verdana, arial, sans-serif;
	font-size: 12px;
}

which means that every element in the 'my' namespace will contain the
values specified for each property which I believe is what you were
hoping to obtain.

As a side note you could also use:

*|ul {
      display:block;
}

for example to also cover the html namespace, something that, when
using CSS namespaces, you must preface each element in your source
that would normally be the default and therefore unnecessary to
preface each element with.  For example:

instead of:

<ul>
  <li>list item one</li>
  <li>list item two</li>
</ul>

would instead need to look like:

<html:ul>
  <html:li>list item one</html:li>
  <html:li>list item two</html:li>
</html:ul>

doing so will allow the browser to recognize that you want to apply
the standard html css property values to these elements unless
otherwise specified within your stylesheet.

To be honest I'm not sure if there is a way to set things such that
any element that is not prefaced with a namespace defaults to 'html'
(or some other namespace you might specify e.g. @namespace
url(http://someuri.com/directory/structure/for/namespace); which
simply leaves out the name of the namespace which would then use the
URI to map against known namespace URI's, such as the specific HTML
namespace value you plan to use, to then automatically apply every
element that is not prefaced by a namespace selector to the known
values for the namespace specified)  This would definitely be a good
thing and is something I can't imagine they would leave out of the
spec.... but stranger things have happened.

If someone else has the answer to this maybe they wouldnt mind filling
the rest of us in.  Otherwise, I will try and research this when I
have more time and respond back accordingly.

Hope this helps!

-- 
<M:D/>

M. David Peterson
http://www.xsltblog.com




 

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

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