Re: Pre-loading files

If you use doc(resolve-uri(/ol:book/@path, base-uri(.))) for the href attribute, it’s no wonder that you’re seeing the files’ content there.
Just use resolve-uri(/ol:book/@path,

On June 12, 2014 9:39:59 PM CEST, David Cramer <> wrote:
>I have a pipeline that takes as input a file that points to one or more
>XML documents:
><books xmlns="">
>  <book path="src/docbkx/cbs-getting-started.xml"/>
>  <book path="src/docbkx/cbs-devguide.xml"/>
>  <book path="src/docbkx/cbs-releasenotes.xml"/>
>It then processes that file using an xslt that reads in each listed
>and adds information from it to a larger file (and olink database if
>you're familiar with that):
>My problem is that this xslt reads in each document using the
>function. While Calabash understands xpointer schemes like element()
>xpath(), Saxon does not.
>I recall getting advice in a similar situation that I should use
><p:load> to load the files first using Calabash and then Saxon would
>the loaded ones.
>Given this pipeline:
>I'm trying to understand how to pre-load the files listed in the source
>using Calabash, but not sure how to proceed. I'm thinking that I can
>loop over each book listed and pre-load each one:
> <p:for-each xmlns:ol="">
>    <p:iteration-source select="/ol:books/ol:book"/>
>    <p:load>
>     <p:with-option name="href" select="doc(resolve-uri(/ol:book/@path,
>    </p:load>
>  </p:for-each>
>But my results are strange. E.g. "java.lang.IllegalArgumentException:
>Illegal character in scheme name at index 0" followed by what appears
>be the contents of one of the docs.
>Can someone point me in the correct direction or suggest what
>I should consider to avoid this xinclude problem?

Sent from my Android device with K-9 Mail. Please excuse my brevity.

Received on Thursday, 12 June 2014 20:32:40 UTC