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

On 4/16/18 11:04 PM, Liam R. E. Quin wrote:
> This will depend on the XSLT engine - most don't do XInclude processing
> themselves.
> 
> https://www.saxonica.com/html/documentation/sourcedocs/XInclude.html
> 
> may be helpful.

Thanks Liam.

To provide more context, in a previous post (from way back in November), 
I'd pointed to this post:

https://lists.w3.org/Archives/Public/xproc-dev/2013Aug/0037.html

I was attempting to p:load/p:xinclude/p:sink a file in the pipeline that 
I would later load from an xslt using document(). My hope was that 
Calabash would have cached the xincluded document and provide that to 
Saxon when Saxon resolved document(). I haven't gotten that to work 
however.

My goal is to have Calabash resolve all the xinclude. If I teach my 
users that they can use xinclude 1.1 features and the xpath scheme, 
they'll be confused if I then explain that for some documents (which 
unbeknownst to them happen to be consumed via document()) they can't use 
all those features.

> But the other way is to do the expansion and send the expanded document
> (or documents) through the pipeline.

For now, I'll p:load/p:xinclude/p:store any documents I will later need 
to open via document(), then tell the xslts to use the pre-loaded temp 
file instead of the original source file.

As Norm says in his post "This is an area of "implementation dependent" 
behavior in the spec", so caching to temp files is the portable answer 
in any case.

> As i recall there's a debugging option you can use with Calabash at
> least that will save the contents of the pipeline to a file, so you can
> check if it's doing what you expect at that point.

Sounds handy. I'll look for that.

Thanks,
David

Received on Tuesday, 17 April 2018 15:02:57 UTC