[XML-DEV Mailing List Archive Home]
[Reply To This Message]
Re: Does WTSIWYG make simplicity moot?
In a message dated 13/11/2002 20:26:09 GMT Standard Time, mgushee@h... writes:
It also makes XSLT processing vastly more complicated. Say you want
to change the fill color on all filled objects to 'blue', but leave
the unfilled ones alone. With discrete style attributes, you can do
<xsl:template match="@fill[normalize-space() = 'none']">
Whereas if you use the single 'style' attribute, you have to resort
to something ugly and inefficient like:
<xsl:with-param name="style" select="@style"/>
<xsl:when test="$property-name='fill' and
<xsl:with-param name="style" select="$remainder"/>
Ow! That's even worse than I thought. I've never actually done that
before, just thought about it.
Possibly a better option is to consider putting all the styling of the SVG in an external CSS style sheet in the first place and make a tiny hand edit there. :)
I assume, but don't know, that the SVG WG decided to provide several options for styling syntax because there are different approaches to creating SVG. The style attribute is the one I prefer when hand coding small SVG documents. For larger ones I would tend to use external CSS. As you point out, when using XSLT there can be advantages in using separate attributes.
Having the three options of how to specify style is actually quite useful in practice. You choose the option that best suits the situation.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please