Hi Chris,

I ended up using a single root text node with multiple strings (one per line)
and using string-join() to add CR-LF after each line.

Thanks for the helpful and simplifying suggestions!

Tim

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Christopher Hamlin
Sent: Monday, September 01, 2014 1:17 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] How to force EOL characters when
downloading a text file

Hi Tim,

You'll need to have text nodes inside elements, but the impression I got was
that the code created a bunch of consecutive text nodes.
That's not something that would occur in a 'normal' document tree, I think, so
maybe the serialization is adding the line feeds in there.

If that is what's happening, I'd try joining all the string values of the
consecutive text nodes and putting in one text node as needed.

- Chris


On Mon, Sep 1, 2014 at 1:11 PM, Tim <[email protected]> wrote:
> Hi Chris,
>
> I was under the impression that I need to create text nodes to do this, but it
sounds like it could solve the problem.
>
> Tim
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Christopher Hamlin
> Sent: Monday, September 01, 2014 12:58 PM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] How to force EOL characters when 
> downloading a text file
>
>>
>> It seems that using the text{  } directive adds the linefeed 
>> character to the generated text without explicitly adding CR-LF.
>>
>>
>
> Hi Tim,
>
>
> I'm not sure where all this happens, but maybe you could try creating and
joining a bunch of strings rather than text nodes.  Add in CR-LF explicitly as
needed?
>
> That might give you better control, but it's just a guess.
>
>
> - Chris
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to