You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have made an initial implementation, which executes copy instructions when the function file:copy is available (which is the case, by the way, for users of Oxygen). See PR 483.
Directly executable copy instructions are only possible, if both the source and the destination are known as absolute file paths. That means that i have to resolve every relative URI in ' img/@src` against the base-uri() of the HTML file.
In case of a regular, non-chunked transformation i don't know the destination of the transformations primary result (the HTML file), so i don't know the base-uri for copy instructions.
But chunked output can't be done without knowing the base-uri for HTML files, that's the rationale for $chunk-output-base-uri.
So i am able to generate executable copy instructions only when doing chunked output.
That is fine for online publishing, but what can i do if i am interested in PDF output?
Solution: Doing "fake chunking" by setting the parameter $chunk-include to the empty list. I will get only one file at the file path that is the combination of $chunk-output-base-uri and $chunk. And i get executable copy instructions since the base-uri in known.
This works well when i use docbook.xsl for transformation. It does not, however, when i use print.xsl for paged media. The Error message is
Error at char 56 in expression in xsl:variable/@select on line 437 column 45 of chunk-cleanup.xsl:
FORG0002 Base URI {} is not an absolute URI. Found while atomizing the value of parameter
$adjusted-uri in {supplied} on line 647. Found while atomizing the value of variable
$adjusted-uri in {xsl:apply-templates} on line 621
This error is independent of the value of the parameter $chunk-include, it also happens with the default value. I think the reason is that print.xsl has never been tested with the chunk mechanism.
I don't know how to use the XSpec based test mechanism for this special case, so i made a test case in the attached archive. The included shell script should explain how it is to be used. testcase.zip
Greetings, Frank
The text was updated successfully, but these errors were encountered:
fsteimke
changed the title
Fake chunk generation for paged media fails when source file contains mediaobjects
Support chunk for print media
Mar 10, 2024
The whole idea of chunk support for print media is based on the conviction, that there is no other way to find out the base uri of the primary output document than to use the $chunk-output-base-uri parameter. I never wanted print files to be chunked. I just wanted the current outpu URI.
Today i have learned that there is a fn:current-output-uri standard function in XSLT 3. Sigh.
I admit that this seems to be a rather esoteric configuration, so let me first explain the general idea and use case:
file:copy
is available (which is the case, by the way, for users of Oxygen). See PR 483.This works well when i use
docbook.xsl
for transformation. It does not, however, when i useprint.xsl
for paged media. The Error message isThis error is independent of the value of the parameter
$chunk-include
, it also happens with the default value. I think the reason is thatprint.xsl
has never been tested with the chunk mechanism.I don't know how to use the XSpec based test mechanism for this special case, so i made a test case in the attached archive. The included shell script should explain how it is to be used.
testcase.zip
Greetings, Frank
The text was updated successfully, but these errors were encountered: