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

Re: Re: How to strip partial text?

Subject: Re: Re: How to strip partial text?
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Sun, 19 Mar 2006 11:03:26 +0000
regex isbn
On 3/19/06, Gerard Bierens <gerard.bierens@xxxxxxxxx> wrote:
> The given solutions in the thread did not work for me, I did find
> another one which brings me very close to the result I want:

How didn't they work?  They should've worked for the question you asked....

> http://images.amazon.com/images/P/<xsl:value-of
> select="substring(isbn/isbnprim, 6, 10)"/>.01.THUMBZZZ
>
> This eliminates the first 5 characters, which was what I needed. But
> now it turns out that some of the ISBN-numbers are written like this:
> ISBN 91-12-304-403-x
>
> Thus, I need to filter out the '-' and 'x' characters, anyone knows
> how to do that?

translate() will do that,  for example:

translate(isbn/isbnprim, '-x', '')

However you might want to get rid of all non-numeric characters, in
which case replace() is best (in 2.0) or a different translate() in
1.0

It's probably best to fully define the problem first, so you know up
front exactly what you need... (rather than tacking on extra parts to
an existing solution)

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.