W3C home > Mailing lists > Public > www-style@w3.org > December 2005

Re: styling xml with css - copying xml attribute values into CSS attribute values

From: Noah Scales <noahjscales@yahoo.com>
Date: Wed, 14 Dec 2005 21:03:43 -0800 (PST)
Message-ID: <20051215050343.60756.qmail@web50402.mail.yahoo.com>
To: Laurens Holst <lholst@students.cs.uu.nl>
Cc: www-style@w3.org

Hi, Laurens.

You wrote that CSS-defined custom mark-up languages
are not accessible. How about accessible to ordinary
hypertext users? They are potential hypertext authors.
So are opendocument and docbook authors. 

Hmm, how about adding a "webpage" value to the CSS
display attribute to break up those long XML pages?
Allowing xpointer expressions as urls? Well, I'm
getting carried away.

But consider:

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="bob.css"?>
<document xmlns="http://www.bobswebsite.com/bob.dtd">
<browser-title>Hi, this is bob's
<picture location="./mypicture.jpg" />
<caption>Dapper Bob</caption>
<paragraph>Hi, my name is Bob, welcome.</paragraph>
<paragraph>Visit: <link target="aboutme.xml">All About


<title>Hi, this is bob's homepage.</title>
<link rel="stylesheet" type="text/css" href="bob.css"
<table class="image">
<tr><td><img src="mypicture.jpg" /></td></tr>
<tr><td class="caption">Dapper Bob</td></tr>
<p>Hi, my name is Bob, welcome.</p>
<p>Visit: <a href="about.htm">All About Me</a>.</p>

Bob uses CSS so that his hypertext will be meaningful
to a browser, that is, so that a browser will know how
to display it. Bob also uses a DTD. But Bob doesn't
use RDF. Bob's CSS looks like:

browser-title  {display:browser-bar-title;}
image  {display:table-cell;}
caption  {display:inline;}
link  {display:hyperlink;hyperlink-url:attr(target);}
paragraph {display:block;}

or in XML:

<?xml version="1.0"?>
<selectors xmlns="http://www.w3.org/2006/CSS">
<selector value="/document/browser-title">
<display setting="browser-bar-title" />
<selector value="/document//image">
<display setting="table-cell" />
<selector value="/document//image/picture">
<display setting="block-image" />
<image-url setting="xpath(./@location)" />
<selector value="/document//image/caption">
<display setting="inline" />
<selector value="/document//image/@url">
<display setting="hyperlink" />
<hyperlink-url setting="xpath(./@target)" />
<selector value="/document//paragraph">
<display setting="block" />

Once Google interpret's Bob's CSS, Google images can
show you
Bob's picture and spider Bob's "About Me" page.

My CSS examples are an HTML handcoder's idea of how
CSS allows browsers to display custom hypertext. If
you've spent much time handcoding HTML, you might
appreciate why custom hypertext mark-up appeals to me.

I've been getting carried away, so I think I'll leave
the list. Thank you all for your responses and good
information. My apologies for the syntax and semantics


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
Received on Thursday, 15 December 2005 05:03:47 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:22 UTC