W3C home > Mailing lists > Public > xproc-dev@w3.org > June 2014

Re: Pre-loading files

From: Romain Deltour <rdeltour@gmail.com>
Date: Thu, 12 Jun 2014 22:32:44 +0200
Cc: xproc Dev <xproc-dev@w3.org>
Message-Id: <66F6D362-C997-4DEF-B969-AAF6AC45E308@gmail.com>
To: David Cramer <david@thingbag.net>
> I'm thinking that I can
> loop over each book listed and pre-load each one

Yes, that approach looks good.

>    <p:load>
>      <p:with-option name="href" select="doc(resolve-uri(/ol:book/@path,
> base-uri(.)))"/>
>    </p:load>

The option “href” must be a URI, so it s/b instead:

     <p:with-option name="href" select="resolve-uri(/ol:book/@path,

Hope this helps,

On 12 juin 2014, at 21:39, David Cramer <david@thingbag.net> wrote:

> I have a pipeline that takes as input a file that points to one or more
> XML documents:
> <books xmlns="http://docs.rackspace.com/olink">
>  <book path="src/docbkx/cbs-getting-started.xml"/>
>  <book path="src/docbkx/cbs-devguide.xml"/>
>  <book path="src/docbkx/cbs-releasenotes.xml"/>
> </books>
> 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):
> https://github.com/rackerlabs/olink-maven-plugin/blob/master/src/main/resources/olink/make-olink-db.xsl
> 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:
> https://github.com/rackerlabs/olink-maven-plugin/blob/master/src/main/resources/olink/olink.xpl
> 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="http://docs.rackspace.com/olink">
>    <p:iteration-source select="/ol:books/ol:book"/>
>    <p:load>
>      <p:with-option name="href" select="doc(resolve-uri(/ol:book/@path,
> base-uri(.)))"/>
>    </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 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?
> Thanks,
> David
Received on Thursday, 12 June 2014 20:33:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:12 UTC