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

Re: Performance of link target search, and Normalising

Subject: Re: Performance of link target search, and Normalising or collapsing a pathname value, best method?
From: "Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Sep 2023 12:40:51 -0000
Re:  Performance of link target search
Hi Martin



I omitted to say that I'm currently using XSL 2 and Saxon HE. So the two Saxon
functions mentioned in your other responses are not available to me
(unfortunate, because they look like exactly what I need). The urify function
might be useful though.



To answer your question, given a $match-file="../../A/../B/../C/ccc.xml" I
would expect normalize-path($match-file) to produce "../../C/ccc.xml".



cheers

T



From: Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Saturday, 23 September 2023 00:29
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Performance of link target search, and Normalising or
collapsing a pathname value, best method?





On 22/09/2023 14:09, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx
<mailto:trevor@xxxxxxxxxxxxxxxxxx>  wrote:

But if any file is not then this code produces verified/adjusted links where
the srcfile may be something like "../../A/../B/../C/ccc.xml#xyz"



Is there a simple way of normalising that path? If necessary I can probably
write my own but there may be a function which already does it that I don't
know about.



You haven't shown how the normalized path would look like but I don't know any
such functions in the XPath 3.1 library, XProc 3 has some
https://spec.xproc.org/3.0/xproc/#f.urify which might or might not help.



XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>

EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/1349719>  (by
email <> )

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.