W3C home > Mailing lists > Public > www-svg@w3.org > August 2001

inline, headstyles and external sheets in XML syntax

From: Tobias Reif <tobiasreif@pinkjuice.com>
Date: Sat, 11 Aug 2001 23:40:21 +0200
Message-ID: <3B75A645.ABB6E614@pinkjuice.com>
To: www-svg@w3.org
CC: www-svg2-comments@w3.org
Another wish for SVG2 (and all other stylable XML namespaces):

Currently, one can apply CSS inline, inside the style element
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
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">
  Style with CSS in XML syntax anywhere; here are headstyles.
 <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"/>
  <!-- ... -->

2. External styles:

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

Tobias Reif

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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:51 UTC