Subject: RE: [xsl] <Kein Betreff> From: "Passin, Tom" <tpassin@xxxxxxxxxxxx> Date: Mon, 15 Sep 2003 15:18:04 -0400 |
[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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] <Kein Betreff>, clemens schrenk | Thread | [xsl] extracting preceding nodes wi, Matthew L. Avizinis |
[xsl] <Kein Betreff>, clemens schrenk | Date | [xsl] extracting preceding nodes wi, Matthew L. Avizinis |
Month |