xsl-list
[Top] [All Lists]

RE: [xsl] Is it possible to rewrite part of an attribute value with XSL?

2009-07-03 14:26:04
<path style="fill:none;stroke:black;stroke-width:1.55"/>

I am looking for a way to remove the "fill:none;stroke:black" 
of the above, but to keep the "stroke-width:155" part of the 
attribute.

It's very hard to derive a general rule from one example. Can you describe
the general form of the attribute value? Will it always contain fill,
stroke, and stroke-width, in this order? What should happen if it doesn't?
What if it contains other properties besides these three?

You've been given various solutions using regular expressions, but they are
all making guesses about your requirements, and if the guesses are wrong
then the code is wrong.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--