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

On 12/15/05, Patrick H. Lauke <redux@splintered.co.uk> wrote:
>
> Noah Scales wrote:
> > Well, I'll use CSS to define my more meaningful tags
> > as hypertext, hyperlinks included.  I'll let devices
> > interpret my custom mark-up just like they interpret
> > XHTML.
>
> You're not applying meaning, you're applying a look. It may display
> right, but you're making it impossible for assistive technology,
> automated user agents, and any non-css enabled browsing devices to do
> anything more meaningful than treat your custom markup as plain text.
> If that is your goal then you will certainly succeed. NoahWeb, only
> functional to sighted with a mouse whose browser applies the separate
> stylesheet information?

However, he is right in that you can apply semantic behavior through
CSS, and not just a look. There is absolutely nothing special about
XHTML that couldn't be applied through the matching mechanism that CSS
uses.

Like so:

xml:

<mynav>
    <mylink goesto="">Hey kids!</mylink>
    <mylink goesto="">Hey adults!</mylink>
</mynav>
<myheading>Hey Kids!</myheading>

css:

mynav
{
    role: section;
    display: block;
}

mylink
{
    role: link;
    link-behavior: replace url(attr(goesto))
}

myheading
{
    role: heading;
}

And this is perfectly accessible, or at least as accessible as XHTML
is when you have CSS. XHTML just implies certain role behaviors.

You see I've actually been thinking about this myself and the basic
disconnect created because you can't have two XML languages layered on
top of each other and it's much more important to me to be able to
specify data first.

But then, I thought, I would have to do it for everything. I couldn't
use language to organize my thoughts, or I'm right back to needing
XHTML -- at least for the little bits inside.

But to elaborate, there are a limited number of tools in our toolset
that we use to communicate information in written form. It would be
possible to use CSS or the matching mechanism of CSS to apply those
roles to arbitrary XML.

--

Orion Adrian

Received on Friday, 16 December 2005 12:37:56 UTC