- From: RICAUD-DUSSARGET Matthieu <matthieu.ricaud@igs-cp.fr>
- Date: Mon, 16 Dec 2013 09:50:11 +0100
- To: xproc-dev@w3.org
- Message-ID: <CADRkOwGwq2nvjxeZ5VxhTMYKJvib9T9ncQG3cLxg=4ntL1aqQg@mail.gmail.com>
Hi all,
I'm using Calabash. I don't know if the problem comes from xproc
implementation or just xproc dev.
When I use a pipeline with an xml:base attribute, I can use p:xslt with
p:document/@href relative to this xml:base :
<p:pipeline type="igs:xml2ecf" xml:base="file:///C:/foo/bar/">
<p:xslt>
<p:input port="stylesheet"><p:document href="xsl/my.xsl"/></p:input>
</p:xslt>
</p:pipeline>
As long as file:///C:/foo/bar/xsl/my.xsl exists, it works, perfect !
But when I want to override p:xslt with my own step in a library, it
doesn't work anymore :
<p:import href="common.xpl"/>
<p:pipeline type="igs:xml2ecf" xml:base="file:///C:/foo/bar/">
<igs:xslt href="xsl/igs/v2.5/main_igs_v2.5.xsl"/>
</p:pipeline>
where common.xpl defines :
<p:declare-step type="igs:xslt" name="current">
<p:input port="source" sequence="true" primary="true"/>
<p:input port="parameters" kind="parameter"/>
<p:output port="result" primary="true"/>
<p:option name="href" required="true" cx:type="xsd:anyURI"/>
<p:load name="load_stylesheet"><p:with-option name="href"
select="$href"/></p:load>
<p:xslt>
<p:input port="stylesheet">
<p:pipe port="result" step="load_stylesheet"/>
</p:input>
<p:input port="source">
<p:pipe port="source" step="current"/>
</p:input>
<p:input port="parameters">
<p:pipe port="parameters" step="current"/>
</p:input>
</p:xslt>
<ut:log>
<p:with-option name="href" select="resolve-uri($debug_fileName,
base-uri(.))"/>
</ut:log>
</p:declare-step>
I have added cx:type="xsd:anyURI" on href option so it is affect by
xml:base but it doesn't work either.
I get an error because the xsl file is not available in the same folder as
the xpl file.
Of course I can add the xml:base on "igs:xslt" p:declare-step and it works.
But this step is a common one and the goal is to be able to call it with a
different xml:base each time.
Do you have any advices or ideas to solve this ?
Thanks in advance,
Matthieu
--
Matthieu Ricaud-Dussarget
IGS-CP - Développeur XML
05 45 37 09 49
Received on Monday, 16 December 2013 08:51:09 UTC