Re: Using document() with a document containing xi:includes

Hi David,

In 
https://gist.github.com/dwcramer/6db7a8c017aae94c1ce15b15d6044642#file-load-xinclude-xpl-L32, 
you copy document('./loadme.xml') which is still the non-XIncluded 
original document from disk. As Norm explained in the message that you 
cited, Calabash will never instruct Saxon’s (or rather, the XML 
parser’s) XInclude facility to perform the XInclude.

If you go for the p:xinclude-first approach and if you want to process 
the expanded document, you’ll need to change line 21 to

<p:pipe step="xinclude" port="result"/>

and line 32 to

<xsl:copy-of select="."/>

In your example, you never referred to the XInclude-expanded document

—Gerrit


On 17/11/2017 22:37, David Cramer wrote:
> I was affected again by the issue cited in this tread:
> 
> https://lists.w3.org/Archives/Public/xproc-dev/2013Aug/0037.html
> 
> I've created a pipeline to test the approach of loading and xinclude the 
> document before the xslt step that uses document(). This example assumes 
> there's a loadme.xml that contains an xi:include:
> 
> https://gist.github.com/dwcramer/6db7a8c017aae94c1ce15b15d6044642
> 
> However, when I run this, the xinclude in loadme.xml is not touched and 
> shows up unresolved on the result port.
> 
> I also tried setting xInclude="true" in a Saxon config file and telling 
> Calabash about it, but when Saxon tries to resolve the xincludes, but 
> can't seem to find the files, even if I use full paths. Some mucking 
> around with the parser saxon uses might get past that, but I'd really 
> rather have Calabash resolve my xincludes because it supports xinclude 
> 1.1 and the xpath xpointer scheme.
> 
> I have a workaround in this instance, but thought I'd mention this in 
> case there's another solution or perhaps it can be addressed in a future 
> version of XProc.
> 
> Regards,
> 
> David
> 
> 

-- 
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsieke@le-tex.de, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vöckler

Received on Saturday, 18 November 2017 06:48:17 UTC