[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: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 3 Apr 2024 00:16:03 -0000
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

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.