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

RE: <Kein Betreff>

Subject: RE: <Kein Betreff>
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 15 Sep 2003 15:18:04 -0400
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


Current Thread
  • <Kein Betreff>
    • clemens schrenk - Mon, 15 Sep 2003 14:42:56 -0400 (EDT)
      • <Possible follow-ups>
      • Passin, Tom - Mon, 15 Sep 2003 15:18:39 -0400 (EDT) <=

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.