[xsl] indenting maps on write

Subject: [xsl] indenting maps on write
From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 2 Apr 2024 20:36:42 -0000
Hello --

I'm in an environment using Saxon-J PE 12.4. I have a large transform
that I want to have consistently formatted because it goes into version
control and it vexes my colleagues if there's random whitespace change
when they're asked to review the actual changes to the transform.

This transform is automatically updated with metadata when it passes
automated testing and the result is serialized, via file:write(), to the
deployed location on disk. 

Mostly this works fine, but this transform contains lots of maps, and
these come out in a vexing sort of way:

  <xsl:variable name="punctuationNameMap"
                select="           map {             ',': 'comma',             ';': 'semicolon',             ':': 'colon',             '.': 'period'           }"
                static="yes"/>

Does anyone have any suggestions for getting the transform or the
file:write() to not do that to the white space in the maps?

Thanks!

Graydon

-- 
Graydon Saunders  | graydonish@xxxxxxxxxxxx
^fs oferiode, pisses swa mfg.
-- Deor  ("That passed, so may this.")

Current Thread