Subject: Re: [xsl] indenting maps on write From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 3 Apr 2024 00:16:03 -0000 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] indenting maps on write, Graydon graydon@xxxx | Thread | Re: [xsl] indenting maps on write, David Carlisle d.p.c |
Re: [xsl] indenting maps on write, Graydon graydon@xxxx | Date | Re: [xsl] indenting maps on write, David Carlisle d.p.c |
Month |