Re: controlling indentation on individual XSLT steps?

Hi David,

The XProc processor *should* honor the serialization settings from the 
XSLT 
(https://spec.xproc.org/master/head/xproc/#document-properties.4.3.2.1.2).

However, if you chain both XSLT steps in a pipeline, the document won't 
be serialized after the first. Only when the pipeline finishes, the 
serialization properties, if they are retained by the XProc processor, 
will be applied to the document.

Therefore indent:'yes' will be the final serialization map entry if the 
document is serialized after the second XSLT step.

Are you wondering why suppress-indentation is not honored? One possible 
reason is that the elements are in a namespace and you need to supply 
expanded QNames (https://www.w3.org/TR/xpath-31/#dt-expanded-qname), 
that is, prefix:local-name or Q{uri}local-name.

If your elements are in no namespace, I think it's possible that Morgana 
doesn't yet support the suppress-indentation serialization property. One 
hint to that is that 'suppress-indentation' cannot be found in the test 
suite 
(https://github.com/xproc/3.0-test-suite/search?q=suppress-indentation) 
while indent can be found 26 times. The other important pieces of 
information are that a) Achim wrote most of the tests while he developed 
Morgana III and b) he covered everything he implemented with tests.

Gerrit

On 03.10.2020 18:51, David Birnbaum wrote:
> Dear xproc-dev,
> 
> I'm executing a pipeline that includes two consecutive XSLT step where, 
> outside the XPRoc 3 environment, I control pretty-printing with:
> 
>     <xsl:output method="xml" indent="no"/>
> 
>     <xsl:output method="xml" indent="yes" suppress-indentation="form
>     stressed"/>
> 
> 
> It looks as if XProc overrides the serialization settings in the XSLT 
> and indents the output, and I don't know how to override that in 
> different ways for the two pipelined XSLT steps. I suspect that 
> the unwanted pretty-printing is being imposed by XProc because I get 
> pretty-printed output from the XProc, but when I run the two 
> transformations outside the XProc environment, I get the more 
> fine-grained control that I need.
> 
> The steps currently use default connections, that is, the output of a 
> previous step is the principal input into the first XSLT step, its 
> output is the input into the second XSLT step, and its output undergoes 
> further processing. If I've understood correctly, I can use 
> <p:with-option> with a map to set serialization parameters on an output 
> port, but since I'm connecting default input and output between the 
> steps, I don't know where the serialization should be specified. 
> Would someone be able to point me toward an explanation? Thank you!
> 
> Best,
> 
> 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 / Managing Directors:
Gerrit Imsieke, Svea Jelonek, Thomas Schmidt

Received on Saturday, 3 October 2020 17:39:36 UTC