[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Is it possible to rewrite part of an attribute val

Subject: RE: Is it possible to rewrite part of an attribute value with XSL?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 3 Jul 2009 19:25:41 +0100
RE:  Is it possible to rewrite part of an attribute val
> <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 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.