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

Closest matching value

Subject: Closest matching value
From: "Stuart Robinson" <serob@xxxxxxxxxxx>
Date: Mon, 10 May 2004 20:48:57 +0100
url controller
Hello,

I've scoured the Web and these archives for a solution to this problem, all
to no avail I'm afraid.

My source dosument looks like this

<root>
 <domain>
  <url>http://localhost:8080/site1</url>
  <url>http://www.domain.com</url>
  <controller>members\www1\site1</controller>
 </domain>
 <domain>
  <url>http://localhost:8080/site2</url>
  <controller>members\www2\site2</controller>
 </domain>
 <domain>
  <url>http://localhost:8080/site2/folder1</url>
  <controller>members\www3</controller>
 </domain>
</root>

My xsl doc contains a variable holding the Request URI. I want to select the
controller in the domain which contains the closest matching url value (url
values are unique) for the Request URI.

For example,

If RequestURI = http://localhost:8080/site2/folder1/page/page/page)
Then controller = members\www3.

If RequestURI = http://localhost:8080/site2)
Then controller = members\www2\site2

etc....

Thanks for reading, any help would be very much appreciated.


Stuart

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.