inline, headstyles and external sheets in XML syntax

Another wish for SVG2 (and all other stylable XML namespaces):

Currently, one can apply CSS inline, inside the style element
('headstyles'),
or in an external file.
Only the inline styles in SVG can be expressed using XML syntax.
Everything that's expressed in XML can be read, manipulated, and
generated by all tools
that can deal with XML; this greatly improves interoperability, and
makes it easier
to implement authoring tools, generators, viewers.
So there should be alternative XML syntaxes not only for inline styles,
but also for head and external styles.

Rules are expressed with the rule element, selectors are select
attributes
containing XPath expressions, and declaration pairs consisting of
property and value
are the same as SVG's inline XML style attributes.

All this would be great to have for all stylable XML namespaces, such as
XHTML, SVG, etc.

1. Headstyles:

<?xml version="1.0" standalone="no" encoding="UTF-8" ?> 
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
 <desc>
  Style with CSS in XML syntax anywhere; here are headstyles.
 </desc>
 <style type="text/xml">
  <rule select="text[@class='button']" fill="red" stroke="blue"
stroke-width="3" />
  <rule select="polyline[@class = 'frame'] stroke-linejoin="round"
fill="yellow" stroke="pink"/>
  <rule select="g[class = 'dots']/circle" fill="white"/>
 </style>
 <g>
  <!-- ... -->
 </g>
</svg>

2. External styles:

A bunch of rules in an external file, referenced like:
<?xml-stylesheet href="mystyle.xml" type="text/xml"?>

Tobi
-- 
Tobias Reif
http://www.pinkjuice.com/myDigitalProfile.xhtml

go_to('www.ruby-lang.org').get(ruby).play.create.have_fun

Received on Saturday, 11 August 2001 18:44:54 UTC