[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Stop Conversion of Character Entities

Betty Harvey harvey at eccnet.com
Tue Feb 21 13:01:03 PST 2012


  Stop Conversion of Character Entities
Yes Excel XML 2003 and 2007 understands character entities because it
understands XML

Converting to CSV wouldn't solve the problem of getting a list in a single
cell.

Also, I am doing some fancy formatting in the Excel:

1.  Header Rows with different fonts and colors
2.  Freeze panes
3.  Filtering on columns turned on.
4.  Different fonts (colors, bold, italics)
4.  Multiple worksheets

Excel is a little persnickety and I have solved all of the above.  In XSLT
I have also solved above, as well as having lists in a single cell because
of the <xsl:text disable-output-escaping="yes"> command.   In XSLT I
would:

<xsl:text disable-output-escaping="yes">&</xsl:text>#10;

I could always let it wrapped but it looks messy and isn't pleasing to the
eyes of the users using the reports I am generating.

I can't find an equivalent in XQuery.

Thanks!

Betty

> OK Back to the beginning
>
> First off I didnt know Excel understood XML character entities ...but
> trusting you
> what does this give you
>
>
> <cell><data>hello&#10;big&#10;world</data></cell>
>
> Alternatively have you thought of converting to CSV instead and let Excel
> read that ?
>
> ----------------------------------------
> David A. Lee
> http://x-query.com/mailman/listinfo/talk
> http://www.xmlsh.org
>
>
>> -----Original Message-----
>> From: Betty Harvey [mailto:http://x-query.com/mailman/listinfo/talk]
>> Sent: Tuesday, February 21, 2012 3:44 PM
>> To: David Lee
>> Cc: Andrew Welch; xquery-discuss; Mike Sokolov
>> Subject: Re:  Stop Conversion of Character Entities
>>
>> This is what I getting (simplified) in the output -- the linefeeds are
>> being created:
>>
>> <cell><data>hello
>> big
>> world</data></cell>
>>
>>
>> What I want is:
>>
>> <cell><data>hello
big
world</data></cell>
>>
>> When the Excel 2003 file is opened in Excel the cell is coming out:
>>
>> hello big world
>>
>> What I want it displayed in list form:
>>
>> hello
>> big
>> world
>>
>> Excel doesn't recognize actual linefeeds as linefeeds in a cell -- it
>> requires the actual character entity
>>
>> Betty
>>
>>
>> > I guess Im confused as to what your problem is.
>> > Here is ML code I just ran
>> >
>> > <p>hello world
</p>
>> >
>> >
>> > Result:
>> >
>> > <p>hello world
>> > </p>
>> >
>> >
>> > So my next question is ... how are you printing the result of a
>> MarkLogic
>> > XQuery output ?  It seems likely the problem is in your serialization
>> code
>> > not ML itself
>> >
>> >
>> >
>> > ----------------------------------------
>> > David A. Lee
>> > http://x-query.com/mailman/listinfo/talk
>> > http://www.xmlsh.org
>> >
>> >
>> >> -----Original Message-----
>> >> From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk] On
>> >> Behalf Of Betty Harvey
>> >> Sent: Tuesday, February 21, 2012 3:24 PM
>> >> To: Andrew Welch
>> >> Cc: xquery-discuss; Mike Sokolov
>> >> Subject: Re:  Stop Conversion of Character Entities
>> >>
>> >> I guess I should have said MarkLogic is the XQuery engine.  I thought
>> >> there might be generic solution.
>> >>
>> >> Betty
>> >>
>> >> >> I have tried just about every trick I can think of with no
>> success.
>> >> >
>> >> >
>> >> > declare namespace saxon="http://saxon.sf.net/";
>> >> > declare option saxon:output "method=text";
>> >> >
>> >> > 'a &#10; b'
>> >> >
>> >> > returns
>> >> >
>> >> > a 
 b
>> >> >
>> >> > --
>> >> > Andrew Welch
>> >> > http://andrewjwelch.com
>> >> >
>> >>
>> >>
>> >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
>> >> Betty Harvey                         | Phone:  410-787-9200  FAX:
>> 9830
>> >> Electronic Commerce Connection, Inc. |
>> >> http://x-query.com/mailman/listinfo/talk                    | Washington,DC XML Users Grp
>> >> URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug
>> >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
>> >> Member of XML Guild (www.xmlguild.org)
>> >> _______________________________________________
>> >> http://x-query.com/mailman/listinfo/talk
>> >> http://x-query.com/mailman/listinfo/talk
>> >
>> >
>> >
>> > _______________________________________________
>> > http://x-query.com/mailman/listinfo/talk
>> > http://x-query.com/mailman/listinfo/talk
>> >
>>
>>
>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
>> Betty Harvey                         | Phone:  410-787-9200  FAX: 9830
>> Electronic Commerce Connection, Inc. |
>> http://x-query.com/mailman/listinfo/talk                    | Washington,DC XML Users Grp
>> URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug
>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
>> Member of XML Guild (www.xmlguild.org)
>
>
>


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Betty Harvey                         | Phone:  410-787-9200  FAX: 9830
Electronic Commerce Connection, Inc. |
http://x-query.com/mailman/listinfo/talk                    | Washington,DC XML Users Grp
URL:  http://www.eccnet.com          | http://www.eccnet.com/xmlug
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
Member of XML Guild (www.xmlguild.org)


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.