Pre-loading files

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 file
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 document()
function. While Calabash understands xpointer schemes like element() and
xpath(), Saxon does not.

I recall getting advice in a similar situation that I should use XProc's
<p:load> to load the files first using Calabash and then Saxon would use
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:with-option name="href" select="doc(resolve-uri(/ol:book/@path,

But my results are strange. E.g. "java.lang.IllegalArgumentException:
Illegal character in scheme name at index 0" followed by what appears to
be the contents of one of the docs.

Can someone point me in the correct direction or suggest what constructs
I should consider to avoid this xinclude problem?


Received on Thursday, 12 June 2014 19:40:30 UTC