- From: Romain Deltour <rdeltour@gmail.com>
- Date: Mon, 16 Dec 2013 20:33:03 +0100
- To: RICAUD-DUSSARGET Matthieu <matthieu.ricaud@igs-cp.fr>
- Cc: XProc Dev <xproc-dev@w3.org>
- Message-Id: <E4506890-A579-4DBD-B433-AFABCF670062@gmail.com>
If I understand correctly I believe your goal below is not achievable if the step “igs:xslt” is implemented in XProc (i.e. if it is *not* a processor-specific step implemented in Java). I’ll try to explain why. A. if the step is implemented in XProc All the step knows is that it declares an option “href” in its signature, which is received as a string. The step’s inner implementation (“subpipeline") has absolutely no idea of the caller’s base URI. The step's inner implementation may do whatever it wants with that string. It may identify the string as a relative URI and then resolve against something, but at this point the only base against which it can resolve it is the step’s document itself. The only ways that the step’s inner implementation may know about the caller URI are: * make sure that only absolute URIs are passed to the href option (i.e. use the “resolve-uri()” function upfront when you call the step. In this case you would call the step like: <igs:xslt href=“resolve-uri(xsl/step1.xsl)”/> * pass the base URI as another option <igs:xslt href=“xsl/step1.xsl” base-uri=“file:///D:/res/common/xsl/”/> B. If the step is an atomic step, for instance implemented in Java The implementation will know the XML context where the step is called, so it will know the base URI of the caller. It can use it to post-process the step’s options, like resolving the href option. Hope this helps. Romain. On 16 déc. 2013, at 18:17, RICAUD-DUSSARGET Matthieu <matthieu.ricaud@igs-cp.fr> wrote: > My goal is to make the first file (call "profile.xpl") as simple as possible (see "the context" at http://markmail.org/thread/ih72ahgckiuejb4o). > For example : > > <p:import href="common.xpl"/> > <p:pipeline type="igs:xml2ecf" xml:base="file:///D:/res/common/xsl/"> > <igs:xslt href="xsl/step1.xsl"/> > <igs:xslt href="xsl/step2.xsl"/> > <igs:xslt href="xsl/step3.xsl" xml:base="file:///C:/local/res/xsl"/> > <igs:xslt href="xsl/step4.xsl"/> > <igs:xslt href="xsl/step5.xsl" xml:base="http://www.igs-cp.fr/net/res/xsl"/> > </p:pipeline> > > As you see there is not only one xml:base to care, the user define the most usefull xml:base for his resssources and then can make exception when necessary. > I would have like the file to keep so simple as this sample but I guess this will be difficult.
Received on Monday, 16 December 2013 19:33:34 UTC