[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Performance of link target search, and Normalising
Too simple perhaps, a recursive function with the last param building the path rel to the path of this stylesheet? HTH On Fri, 22 Sept 2023 at 13:32, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On 22/09/2023 14:31, Martin Honnen martin.honnen@xxxxxx wrote: > > > On 22/09/2023 14:28, Martin Honnen martin.honnen@xxxxxx wrote: > > > On 22/09/2023 14:09, Trevor Nicholls 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. > > > https://www.saxonica.com/html/documentation12/functions/expath-file/resolve-path.html might also help. > > > Or perhaps https://www.saxonica.com/html/documentation12/functions/expath-file/path-to-native.html even more. > > XSL-List info and archive > EasyUnsubscribe (by email) -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|