Re: pxp:set-base-uri

  I am pretty sure we talked about it in front of the Economic School
in Prague, so one year ago this week :-)  Good news, thank you!  I
must have found a workaround since then, but I'll try to find where I
needed it again, and if it actually solves this initial use case.

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


On 6 February 2014 23:00, Norman Walsh wrote:
> Hi folks,
>
> I have a long standing action to "propose a pxp:set-base-uri" step.
> Not sure for whom I took the action, but here it is:
>
> http://exproc.org/proposed/steps/other.html#set-base-uri
>
> Here's a test that my implementation passes.
>
> <?xml-stylesheet type="text/xsl" href="http://tests.xproc.org/style/testcase.xsl"?>
> <t:test xmlns:t="http://xproc.org/ns/testsuite"
>         xmlns:c="http://www.w3.org/ns/xproc-step">
>
> <t:title>Test pxp:set-base-uri</t:title>
>
> <t:pipeline>
> <p:declare-step version='1.0' name="main"
>                 xmlns:pxp="http://exproc.org/proposed/steps"
>                 xmlns:p="http://www.w3.org/ns/xproc"
>                 xmlns:c="http://www.w3.org/ns/xproc-step">
>
> <p:output port="result"/>
>
> <p:declare-step type="pxp:set-base-uri">
>    <p:input port="source"/>
>    <p:output port="result"/>
>   <p:option name="uri" required="true"/>
> </p:declare-step>
>
> <p:load href=""/>
>
> <pxp:set-base-uri uri="http://example.com/"/>
>
> <p:template>
>   <p:input port="template">
>     <p:inline><c:base-uri>{base-uri(/)}</c:base-uri></p:inline>
>   </p:input>
>   <p:input port="parameters">
>     <p:empty/>
>   </p:input>
> </p:template>
>
> </p:declare-step>
> </t:pipeline>
>
> <t:output port='result'>
> <c:base-uri>http://example.com/</c:base-uri>
> </t:output>
>
> </t:test>
>
>                                         Be seeing you,
>                                           norm
>
> --
> Norman Walsh
> Lead Engineer
> MarkLogic Corporation
> Phone: +1 512 761 6676
> www.marklogic.com

Received on Monday, 10 February 2014 14:17:05 UTC