- From: RICAUD-DUSSARGET Matthieu <matthieu.ricaud@igs-cp.fr>
- Date: Mon, 16 Dec 2013 18:29:47 +0100
- To: Florent Georges <fgeorges@fgeorges.org>
- Cc: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@le-tex.de>, XProc Dev <xproc-dev@w3.org>
- Message-ID: <CADRkOwF9NJm1r+_W7KoLoQRQdJU48u1LCsJDT+5ytDHTMx+zuQ@mail.gmail.com>
Hi Florent, hope you're fine since XML Prague 2012 :) Thanks for your reply and the links. I didn't really know the function static-base-uri() actually, might be usefull ! Unfortunately I didn't managed to make it works with xproc/calabash : <p:import href="common.xpl"/> <igs:xslt href="xsl/igs/v2.5/main_igs_v2.5.xsl" xml:base=" http://localhost:777/"> <p:with-option name="static-base-uri" select="static-base-uri()" xml:base="toto"/> ... </igs:xslt> common.xpl <p:declare-step type="igs:xslt" name="current"> ... <p:option name="static-base-uri" select="static-base-uri()"/> <cx:message> <p:with-option name="message" select="concat('static-base-uri() : ',static-base-uri())"/> </cx:message> <cx:message> <p:with-option name="message" select="concat('$static-base-uri : ',$static-base-uri)"/> </cx:message> ... </p:declare-step> I get theses messages : static-base-uri() : $static-base-uri : Seems like static-base-uri() is always empty, equal where I call it from. Calabash ? By the way, if my last post interpretation of the problem is correct, then I have to use <p:inline> or <p:document> so my xml:base attribute are interpreted. Unless I missed something, I continue to see how it works. Au plaisir de te revoir et de discuter le coup ! Matthieu. 2013/12/16 Florent Georges <fgeorges@fgeorges.org> > On 16 December 2013 11:27, RICAUD-DUSSARGET Matthieu wrote: > > Hi, > > > - base-uri() > > - base-uri(.) > > - base-uri(/*) > > > It always refers to the base-uri of the *XML file being processed* (by > > default the folder where the xml file is stored), not the Xproc Pipeline > > neither the xml:base attribute I've add to the XPL file. > > It looks like what you are looking for is static-base-uri(.). On a > side note, URI resolution is not rocket science, but still it requires > precision. You must know how URIs are resolved, and where they come > from. That's a bit of investment, but then it makes you save time, > instead of the "trying / failing" scheme. Some interesting readings: > > http://w3.org/TR/xpath-functions/#func-base-uri > http://w3.org/TR/xpath-functions/#func-static-base-uri > http://w3.org/TR/xpath-functions/#func-resolve-uri > > What I do, usually, is always to pass either absolute URIs, or > always pass the base URI they should be resolved against when they are > relative. > > Regards, > > -- > Florent Georges > http://fgeorges.org/ > http://h2oconsulting.be/ > -- Matthieu Ricaud-Dussarget IGS-CP - Développeur XML 05 45 37 09 49
Received on Monday, 16 December 2013 17:30:48 UTC