[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: indenting maps on write
On Wed, 3 Apr 2024 at 00:28, Graydon graydon@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Tue, Apr 02, 2024 at 09:19:29PM -0000, Michael Kay > michaelkay90@xxxxxxxxx scripsit: > > Well, `file:write` isn't going to add any whitespace, it will be some > process prior to that (which you haven't shown us). > > If I boil the whole thing down to a simple example, if I start with: > > so you are adding the space, not the xslt system. In an xml attribute the xml parser will normalise newlines to a space so you are adding 9 spaces before each key of the map from a newline and 8 spaces. You could replace . in replace(.,'''','') by normalize-space(.) or replace(.,' ','') depending how aggressively you want to remove space. David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|