[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: indenting maps on write

Subject: Re: indenting maps on write
From: "Michael Kay michaelkay90@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 2 Apr 2024 21:19:15 -0000
Re:  indenting maps on write
Well, `file:write` isn't going to add any whitespace, it will be some process
prior to that (which you haven't shown us).

To know where the whitespace came from, we need to see more of the process by
which this output was generated.

Michael Kay
Saxonica

> On 2 Apr 2024, at 21:37, Graydon graydon@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> 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
> CC&s oferC)ode, C0isses swC! mC&g.
> -- Deor  ("That passed, so may this.")

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.