Technically there is no difference: 
 *means* codepoint 10 to any XML 
processor. A tool that only works when reading one or the other is broken.

But you can configure your app server and set the "output sgml character 
entities" to "normal" - or anything other than "none". Then you should see this:

<cell>
  <data>hello&NewLine;big&NewLine;world</data>
</cell>

I don't know if that's any better for your purposes, but at least it isn't the 
literal codepoint.

-- Mike

On 21 Feb 2012, at 16:41 , Betty Harvey wrote:

> 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

Reply via email to