|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: <Kein Betreff>
[clemens schrenk] > i'm stuck at my xslt-stylesheet, trying to get and partly change the > contents of an element - it looks like this: > <ATTRIBUTE>ITEM: "Winword"param:"C:\\Documents and > Settings\\clemens\\Desktop\\Clemens XML"</ATTRIBUTE> > all i want is to draw the part after C: and before the final > ", and change > the dobbelslashes to single ones. > is there any combined functions that could make that possible ? You can certainly do it using a combination of substring-before(), substring-after(), and a recursive template - one that calls itself again. But it would be even better if you could avoid generating this format in the first place. Is there any chance of that? It looks like you are going through geistry entries. If so, whatever tool you are using could possibly be persuaded to make the changes, or you could write a regular expression to do it in Python (or sed, awk, perl, etc). If I had to capture this kind of information, I would think about using an xml format more like this - <ATTRIBUTE> <ITEM>Winword</ITEM> <PARAM>C:\Documents and Settings\clemens\Desktop\Clemens XML</PARAM> </ATTRIBUTE> Even if the backslashes were still double, this would be easier to work with (although you would still need a recursive template to change them). Dimitre Novatchev's fxsl functional library could also do the job (hiding any recursive templates so you would not see them). Cheers, Tom P XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








