Scratch my suggestion. I *finally* understand what your after and my suggestion 
wont do it ... sorry
Doing a textual replace on the resultant XML might be your best bet.   
Especially if you output a unusal string instead of \n like 
"****REPLACE-ME-WITH-NL****"

-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
[email protected]
Phone: +1 650-287-2531
Cell:  +1 812-630-7622
www.marklogic.com

This e-mail and any accompanying attachments are confidential. The information 
is intended solely for the use of the individual to whom it is addressed. Any 
review, disclosure, copying, distribution, or use of this e-mail communication 
by others is strictly prohibited. If you are not the intended recipient, please 
notify us immediately by returning this message to the sender and delete all 
copies. Thank you for your cooperation.


> -----Original Message-----
> From: [email protected] [mailto:general-
> [email protected]] On Behalf Of David Lee
> Sent: Tuesday, February 21, 2012 7:46 PM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Passing Character Entities to Output
> 
> did you try
> 
> <cell><data>hello&amp;#10;big&amp;#10;world</data></cell>
> 
> -----------------------------------------------------------------------------
> David Lee
> Lead Engineer
> MarkLogic Corporation
> [email protected]
> Phone: +1 650-287-2531
> Cell:  +1 812-630-7622
> www.marklogic.com
> 
> This e-mail and any accompanying attachments are confidential. The
> information is intended solely for the use of the individual to whom it is
> addressed. Any review, disclosure, copying, distribution, or use of this 
> e-mail
> communication by others is strictly prohibited. If you are not the intended
> recipient, please notify us immediately by returning this message to the
> sender and delete all copies. Thank you for your cooperation.
> 
> 
> > -----Original Message-----
> > From: [email protected] [mailto:general-
> > [email protected]] On Behalf Of Betty Harvey
> > Sent: Tuesday, February 21, 2012 7:41 PM
> > To: MarkLogic Developer Discussion
> > Subject: [MarkLogic Dev General] Passing Character Entities to Output
> >
> > I asked this question on the XQuery list and it looks like this can't be
> > done in straight XQuery.  I am asking this question here just in case
> > there is a MarkLogic function that can be  used.
> >
> > I need to pass a linefeed character to the output.  I am creating Excel
> > spreadsheets where I need a list on separate lines in a single cell.
> > Excel recognizes the character entity &#10; for linefeeds.
> >
> > My output needs to look like this:
> >
> > <cell><data>hello&#10;big&#10;world</data></cell>
> >
> > The output I am getting is:
> >
> > <cell><data>hello
> > big
> > world</data></cell>
> >
> > I have tried several variations of:
> >
> > let $newline := "&#10;"
> > let $newline := fn:concat("&", "#10;")
> >
> > etc. All having the same results, getting a linefeed instead of placing
> > the actual character entity in the output.
> >
> > Are there any MarkLogic tricks to passing a character entity through
> > without serializing it?
> >
> > TIA!
> >
> > Betty
> >
> >
> >
> > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> > Betty Harvey                         | Phone:  410-787-9200  FAX: 9830
> > Electronic Commerce Connection, Inc. |
> > [email protected]                    | Washington,DC XML Users Grp
> > URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug
> > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
> > Member of XML Guild (www.xmlguild.org)
> > _______________________________________________
> > 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