- From: Wendell Piez <wapiez@wendellpiez.com>
- Date: Tue, 17 Jun 2025 13:12:02 -0400
- To: XProc Dev <xproc-dev@w3.org>
- Message-ID: <CAAO_-xwFwGg2rk+=zNE1YSZq9eRP6-e6BRxAD_jaHAQQ81OKJw@mail.gmail.com>
Hello XProc fans, At the moment I am interested in URI resolution. Specifically, I would like to be able to determine when "path/to/file.xml" and "path/to/the/same/../../file.xml" will get me the same file (without getting the file). The XProc Spec says not a whole lot about this, while it is not difficult to get functions static-base-uri(), resolve-uri(), p:urify() etc. to present paths with ".." or "." i.e. this normalization is not built in. What the spec does say is a bit, um, careful: > In some URI schemes, it is possible for different URIs to identify “the same” resource. Consider, for example, file:/path/file and file:/path/to/../file. To the extent practical, implementations should attempt to resolve these differences before deciding if a particular library URI has already been imported. [ https://spec.xproc.org/master/head/xproc/#p.import] This suggests to me that the necessary operation is difficult to support in a standard or testable way. Is this so? I have made an XPath function that will perform the operation AFAIK ... but I might not understand the full problem. It accounts for '.' and '..' steps -- are there more complications? What I would most like to know is whether creating such a function was unnecessary, since there is already a simple way to do a fairly 'ordinary' thing. I'm also wondering what makes this hard? Thanks! Wendell -- ...Wendell Piez... ...wendell -at- nist -dot- gov... ...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org... ...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...
Received on Tuesday, 17 June 2025 17:12:18 UTC