From helena.galhardas at ist.utl.pt Mon Feb 6 03:46:36 2012 From: helena.galhardas at ist.utl.pt (Helena Galhardas) Date: Mon, 6 Feb 2012 11:46:36 +0000 Subject: [xquery-talk] XML data sets with (known) data quality problems Message-ID: Dear all, (sorry if you've have received an email similar to this some time ago) We?ve implemented a library of data cleaning functions in XQuery. The most recent version has been distributed with the last release of the Zorba query processor (http://www.zorba-xquery.com/html/modules). In order to test exhaustively this library, we need to have XML data sets that have data quality problems known a priori. By data quality problems, we mean: missing values, misspellings, synonyms, values out of domain, approximate duplicates, etc. We would like to ask you if you are aware of XML data sets in those conditions, that we can use to write data profiling and cleaning programs in XQuery. Thanks in advance. Best Regards, Helena Galhardas From christian.gruen at gmail.com Tue Feb 7 15:42:07 2012 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Wed, 8 Feb 2012 00:42:07 +0100 Subject: [xquery-talk] [ANN] BaseX 7.1: The XMLPrague 2012 Edition In-Reply-To: References: Message-ID: Dear all, three months have passed, and we are now proud to release the XMLPrague 2012 Edition of BaseX! These are some of the new exciting features (a full list is attached below): * GUI: the management of your databases, documents & binary files and index structure has got easier than ever before! * JSON: import, query and export your JSON data via XQuery, REST, or on command line! * Incremental Indexing: update your text and attributes index in realtime! * Enhanced Path Statistics: retrieve distinct values of location paths in constant time! * New XQuery functions to simplify database, full-text, index, and repository access * New XQuery 3.0 Features: support for EQNames, namespace constructors, etc. * Revised Command-Line API: process multiple inputs or commands in one run * Document Index: improved update performance BaseX is a light-weight, high-performance and scalable XML Database and XPath/XQuery Processor, including full support for the W3C Update and Full Text extensions. An interactive and user-friendly GUI frontend gives you great insight into your XML documents and collections. BaseX is platform independent, fully Open Source (BSD-licensed) and backed by commercial services. And what's best: it is easy to use and runs straight out of the box! We hope you have fun with our latest release, and we're looking forward to your feedback, and seeing some of you in Prague! Christian BaseX Team _____________________________________________ BaseX 7.1 Feature List: GUI * improved document management: hierarchical view of databases resource * easier index creation/removal and database optimization * JSON/JsonML parser added * editor: updated and reopened files are reverted from disk REST * automatic XML conversion of popular content types (JSON/JsonML, CSV, HTML) XQUERY * new index module for directly accessing database index structures * new repository module to manage EXPath packages via XQuery * db:list-details() returns information on the database resources * db:content-type() retrieves the content-type of a specific database resource * ft:tokens() returns full-text tokens stored in the index * ft:tokenize() tokenizes a given input string * util:path() returns the path to the (currently executed) query file * util:time() prints the time needed to evaluate a given expression * util:mem() prints the allocated memory for evaluating a given expression * expanded QNames, computed namespace constructors COMMAND-LINE * multiple query files and -c/-i/-q flags can now be specified INDEXING * ID/Pre mapping, incremental indexing of value index structures * document index fix: correct replacement of existing documents * document index: faster updates OPTIONS * ADDRAW: add new resources as raw files if not filtered by CREATEFILTLER * MAXLEN: max. length of strings to be added to the index structures * MAXCATS: max. number of distinct values stored in statistics * UPDINDEX: turn on incremental index updates for value indexes * improved BINDINGS option CLIENT/SERVER * improved log output if query iterator is used * new ActionScript API (thanks to Manfred Knobloch!) SERIALIZATION * a project specific "newline" parameter specifies the type of newline to be used COMMANDS * modified KILL command accepts IP:port combination to specify target TRANSLATIONS * Bahasa Indonesian: thanks to Andria Arisal! * Mongolian: thanks to Tuguldur Jamiyansharav! From John.Snelson at marklogic.com Fri Feb 10 01:32:02 2012 From: John.Snelson at marklogic.com (John Snelson) Date: Fri, 10 Feb 2012 01:32:02 -0800 Subject: [xquery-talk] XQuery 3 function cast assignment In-Reply-To: <220256FDE771B74FB662165BC562CF59D5C293@CH1PRD0802MB107.namprd08.prod.outlook.com> References: <220256FDE771B74FB662165BC562CF59D5C293@CH1PRD0802MB107.namprd08.prod.outlook.com> Message-ID: This returns true: local:cat#2 instance of function(xs:string, xs:string) as xs:string However there are many function types that local:cat#2 matches. John On 9 Feb 2012, at 23:50, David Lee wrote: > I'm learning the exciting world of xquery3 function items. > I'd like to tightly type an assignment but can't quite get the syntax. > > Should this work ? > > --------------- > declare function local:cat( $a as xs:string , $b as xs:string ) as xs:string { > concat($a,$b) > }; > > let $animal as xs:string := "Cat" , > $func as function( ) as xs:string := local:cat#2 (: HERE - how to type $func ? :) > return $func("bad " , $animal ) > > > Thanks for any suggestions From djbpitt at pitt.edu Sun Feb 12 17:45:55 2012 From: djbpitt at pitt.edu (Birnbaum, David J) Date: Sun, 12 Feb 2012 20:45:55 -0500 Subject: [xquery-talk] format-number()? References: Message-ID: <00BE4424-865B-43B6-8682-E992F26EE653@pitt.edu> > Dear XQuery List, > > Does anyone happen to know why XPath format-number() is not available > in XQuery? This is just a historical question, and not a request for > technical advice. > > Thanks, > > David > djbpitt at gmail.com From matthias.brantner at 28msec.com Sun Feb 12 18:35:36 2012 From: matthias.brantner at 28msec.com (Matthias Brantner) Date: Sun, 12 Feb 2012 18:35:36 -0800 Subject: [xquery-talk] format-number()? In-Reply-To: <00BE4424-865B-43B6-8682-E992F26EE653@pitt.edu> References: <00BE4424-865B-43B6-8682-E992F26EE653@pitt.edu> Message-ID: XQuery 3.0 will support it (see http://www.w3.org/TR/xpath-functions-30/#func-format-number). Also, some XQuery processor implement it already (e.g., Zorba, BaseX, and eXist) HTH Matthias On Feb 12, 2012, at 5:45 PM, Birnbaum, David J wrote: >> Dear XQuery List, >> >> Does anyone happen to know why XPath format-number() is not available >> in XQuery? This is just a historical question, and not a request for >> technical advice. >> >> Thanks, >> >> David >> djbpitt at gmail.com > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From mike at saxonica.com Sun Feb 12 22:53:58 2012 From: mike at saxonica.com (Michael Kay) Date: Mon, 13 Feb 2012 06:53:58 +0000 Subject: [xquery-talk] format-number()? In-Reply-To: <00BE4424-865B-43B6-8682-E992F26EE653@pitt.edu> References: <00BE4424-865B-43B6-8682-E992F26EE653@pitt.edu> Message-ID: <4F38B386.5060906@saxonica.com> On 13/02/2012 01:45, Birnbaum, David J wrote: >> Dear XQuery List, >> >> Does anyone happen to know why XPath format-number() is not available >> in XQuery? This is just a historical question, and not a request for >> technical advice. >> >> Historically XQuery was more interested in accessing the data in a database than in rendering it for human output - people liked the idea of keeping the data access (model) part separate from the user interface part (view) of the application, and XQuery was focused on the former. Moving the function from XSLT also wasn't trivial because of the dependency on the xsl:decimal format declaration, and until XSLT 2.0 published a revised spec, because of the historic dependency of the original XSLT 1.0 function on the JDK 1.1 specification. Michael Kay Saxonica From james.fuller.2007 at gmail.com Tue Feb 21 03:28:46 2012 From: james.fuller.2007 at gmail.com (James Fuller) Date: Tue, 21 Feb 2012 12:28:46 +0100 Subject: [xquery-talk] [ANN] new version of xquerydoc Message-ID: https://github.com/xquery/xquerydoc xquerydoc generates api docs from your xquery source code (using XQuery 1.0) whats new * markdown format * raw format (kind of like xqueryx ... more detailed) * tweaked html output * xproc step * updated docs * lots of tweaks for robustness, etc... We still have a ways to go to getting the quality of the output which is why I am refactoring the xslt transform for html version ... though I do wonder if I should maybe attempt with just pure xqdoc xml + css. I have just recently updated installers, but things are changing fast so to keep 'fresh' would recommend to clone the project via github. J From harvey at eccnet.com Tue Feb 21 11:41:48 2012 From: harvey at eccnet.com (Betty Harvey) Date: Tue, 21 Feb 2012 14:41:48 -0500 (EST) Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: References: Message-ID: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> How can you tell XQuery to output the character entity and not the actual character. I am creating an Excel spreadsheet and am trying to put linefeeds into a single cell. I do this all the time with XSLT conversions. Using the character in the XQuery puts a linefeed into the text. I want to output the . Excel needs this character entity on import in order to create linefeeds. The binary linefeed in the XML doesn't work for Excel. I have tried: let $newline := fn:string("$#10;") and xs:string Tried to trick it! let $newline := fn:concat("&", "#10;") This is easy to do in XSLT (disable-output-escaping="yes") but have searched and haven't been able to find an equivalent mechanism in XQuery. TIA! Betty /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Betty Harvey | Phone: 410-787-9200 FAX: 9830 Electronic Commerce Connection, Inc. | harvey at eccnet.com | Washington,DC XML Users Grp URL: http://www.eccnet.com | http://www.eccnet.com/xmlug /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ Member of XML Guild (www.xmlguild.org) From sokolov at ifactory.com Tue Feb 21 11:21:08 2012 From: sokolov at ifactory.com (Mike Sokolov) Date: Tue, 21 Feb 2012 14:21:08 -0500 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> Message-ID: <4F43EEA4.8070204@ifactory.com> Did you try outputting "&#10;" ? On 02/21/2012 02:41 PM, Betty Harvey wrote: > How can you tell XQuery to output the character entity and not the actual > character. > > I am creating an Excel spreadsheet and am trying to put linefeeds into a > single cell. I do this all the time with XSLT conversions. > > Using the character in the XQuery puts a linefeed into the text. I > want to output the . Excel needs this character entity on import in > order to create linefeeds. The binary linefeed in the XML doesn't work > for Excel. > > I have tried: > > let $newline := fn:string("$#10;") and xs:string > > Tried to trick it! > > let $newline := fn:concat("&", "#10;") > > > This is easy to do in XSLT (disable-output-escaping="yes") but have > searched and haven't been able to find an equivalent mechanism in XQuery. > > TIA! > > Betty > > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ > Betty Harvey | Phone: 410-787-9200 FAX: 9830 > Electronic Commerce Connection, Inc. | > harvey at eccnet.com | Washington,DC XML Users Grp > URL: http://www.eccnet.com | http://www.eccnet.com/xmlug > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ > Member of XML Guild (www.xmlguild.org) > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > From andrew.j.welch at gmail.com Tue Feb 21 11:27:55 2012 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Tue, 21 Feb 2012 19:27:55 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> Message-ID: On 21 February 2012 19:41, Betty Harvey wrote: > How can you tell XQuery to output the character entity and not the actual > character. Use the text output method -- Andrew Welch http://andrewjwelch.com From harvey at eccnet.com Tue Feb 21 11:58:43 2012 From: harvey at eccnet.com (Betty Harvey) Date: Tue, 21 Feb 2012 14:58:43 -0500 (EST) Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <4F43EEA4.8070204@ifactory.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> Message-ID: <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> Yes I did and it outputs "&#10;" which isn't recognizable as an character entity. I have tried just about every trick I can think of with no success. Betty > Did you try outputting "&#10;" ? > > On 02/21/2012 02:41 PM, Betty Harvey wrote: >> How can you tell XQuery to output the character entity and not the >> actual >> character. >> >> I am creating an Excel spreadsheet and am trying to put linefeeds into a >> single cell. I do this all the time with XSLT conversions. >> >> Using the character in the XQuery puts a linefeed into the text. I >> want to output the . Excel needs this character entity on import in >> order to create linefeeds. The binary linefeed in the XML doesn't work >> for Excel. >> >> I have tried: >> >> let $newline := fn:string("$#10;") and xs:string >> >> Tried to trick it! >> >> let $newline := fn:concat("&", "#10;") >> >> >> This is easy to do in XSLT (disable-output-escaping="yes") but have >> searched and haven't been able to find an equivalent mechanism in >> XQuery. >> >> TIA! >> >> Betty >> >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ >> Betty Harvey | Phone: 410-787-9200 FAX: 9830 >> Electronic Commerce Connection, Inc. | >> harvey at eccnet.com | Washington,DC XML Users Grp >> URL: http://www.eccnet.com | http://www.eccnet.com/xmlug >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ >> Member of XML Guild (www.xmlguild.org) >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk >> > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Betty Harvey | Phone: 410-787-9200 FAX: 9830 Electronic Commerce Connection, Inc. | harvey at eccnet.com | Washington,DC XML Users Grp URL: http://www.eccnet.com | http://www.eccnet.com/xmlug /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ Member of XML Guild (www.xmlguild.org) From andrew.j.welch at gmail.com Tue Feb 21 11:43:18 2012 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Tue, 21 Feb 2012 19:43:18 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> Message-ID: > 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 From dlee at calldei.com Tue Feb 21 11:46:46 2012 From: dlee at calldei.com (David Lee) Date: Tue, 21 Feb 2012 19:46:46 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> Message-ID: <220256FDE771B74FB662165BC562CF590D43FDAB@CH1PRD0802MB107.namprd08.prod.outlook.com> How about declare namespace saxon="http://saxon.sf.net/"; declare option saxon:output "method=text"; 'a b' ---------------------------------------- David A. Lee dlee at calldei.com http://www.xmlsh.org > -----Original Message----- > From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On > Behalf Of Andrew Welch > Sent: Tuesday, February 21, 2012 2:43 PM > To: Betty Harvey > Cc: xquery-discuss; Mike Sokolov > Subject: Re: [xquery-talk] Stop Conversion of Character Entities > > > 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 > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From andrew.j.welch at gmail.com Tue Feb 21 11:50:59 2012 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Tue, 21 Feb 2012 19:50:59 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <220256FDE771B74FB662165BC562CF590D43FDAB@CH1PRD0802MB107.namprd08.prod.outlook.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FDAB@CH1PRD0802MB107.namprd08.prod.outlook.com> Message-ID: On 21 February 2012 19:46, David Lee wrote: > How about > > > > > declare namespace saxon="http://saxon.sf.net/"; > declare option saxon:output "method=text"; > > 'a b' that outputs the actual character, what we're after are the 5 characters '&' '#' '1' '0' and ';' it's basically all about outputting an unescaped ampersand. -- Andrew Welch http://andrewjwelch.com From harvey at eccnet.com Tue Feb 21 12:23:40 2012 From: harvey at eccnet.com (Betty Harvey) Date: Tue, 21 Feb 2012 15:23:40 -0500 (EST) Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> Message-ID: <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> 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. | harvey at eccnet.com | Washington,DC XML Users Grp URL: http://www.eccnet.com | http://www.eccnet.com/xmlug /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ Member of XML Guild (www.xmlguild.org) From dlee at calldei.com Tue Feb 21 11:57:46 2012 From: dlee at calldei.com (David Lee) Date: Tue, 21 Feb 2012 19:57:46 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FDAB@CH1PRD0802MB107.namprd08.prod.outlook.com> Message-ID: <220256FDE771B74FB662165BC562CF590D43FE13@CH1PRD0802MB107.namprd08.prod.outlook.com> Sorry got confused on the requirements. Though t you wanted a literal NL in the output Still stuck ? ---------------------------------------- David A. Lee dlee at calldei.com http://www.xmlsh.org > -----Original Message----- > From: Andrew Welch [mailto:andrew.j.welch at gmail.com] > Sent: Tuesday, February 21, 2012 2:51 PM > To: David Lee > Cc: Betty Harvey; xquery-discuss; Mike Sokolov > Subject: Re: [xquery-talk] Stop Conversion of Character Entities > > On 21 February 2012 19:46, David Lee wrote: > > How about > > > > > > > > > > declare namespace saxon="http://saxon.sf.net/"; > > declare option saxon:output "method=text"; > > > > 'a b' > > that outputs the actual character, what we're after are the 5 > characters '&' '#' '1' '0' and ';' > > it's basically all about outputting an unescaped ampersand. > > > > -- > Andrew Welch > http://andrewjwelch.com From dlee at calldei.com Tue Feb 21 12:04:56 2012 From: dlee at calldei.com (David Lee) Date: Tue, 21 Feb 2012 20:04:56 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> Message-ID: <220256FDE771B74FB662165BC562CF590D43FE61@CH1PRD0802MB107.namprd08.prod.outlook.com> I guess Im confused as to what your problem is. Here is ML code I just ran

hello world

Result:

hello world

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 dlee at calldei.com http://www.xmlsh.org > -----Original Message----- > From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On > Behalf Of Betty Harvey > Sent: Tuesday, February 21, 2012 3:24 PM > To: Andrew Welch > Cc: xquery-discuss; Mike Sokolov > Subject: Re: [xquery-talk] 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. | > harvey at eccnet.com | Washington,DC XML Users Grp > URL: http://www.eccnet.com | http://www.eccnet.com/xmlug > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ > Member of XML Guild (www.xmlguild.org) > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From andrew.j.welch at gmail.com Tue Feb 21 12:05:05 2012 From: andrew.j.welch at gmail.com (Andrew Welch) Date: Tue, 21 Feb 2012 20:05:05 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> Message-ID: On 21 February 2012 20:23, Betty Harvey wrote: > I guess I should have said MarkLogic is the XQuery engine. ?I thought > there might be generic solution. Just change the saxon output method to use the marklogic way instead.... declare option xdmp:output "method=text"; -- Andrew Welch http://andrewjwelch.com From harvey at eccnet.com Tue Feb 21 12:43:53 2012 From: harvey at eccnet.com (Betty Harvey) Date: Tue, 21 Feb 2012 15:43:53 -0500 (EST) Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <220256FDE771B74FB662165BC562CF590D43FE61@CH1PRD0802MB107.namprd08.pro d.outlook.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FE61@CH1PRD0802MB107.namprd08.prod.outlook.com> Message-ID: <31263.207.245.177.19.1329857033.squirrel@www.eccnet.com> This is what I getting (simplified) in the output -- the linefeeds are being created: hello big world What I want is: hello big world 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 > >

hello world

> > > Result: > >

hello world >

> > > 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 > dlee at calldei.com > http://www.xmlsh.org > > >> -----Original Message----- >> From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On >> Behalf Of Betty Harvey >> Sent: Tuesday, February 21, 2012 3:24 PM >> To: Andrew Welch >> Cc: xquery-discuss; Mike Sokolov >> Subject: Re: [xquery-talk] 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. | >> harvey at eccnet.com | Washington,DC XML Users Grp >> URL: http://www.eccnet.com | http://www.eccnet.com/xmlug >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ >> Member of XML Guild (www.xmlguild.org) >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk > > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Betty Harvey | Phone: 410-787-9200 FAX: 9830 Electronic Commerce Connection, Inc. | harvey at eccnet.com | Washington,DC XML Users Grp URL: http://www.eccnet.com | http://www.eccnet.com/xmlug /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ Member of XML Guild (www.xmlguild.org) From dlee at calldei.com Tue Feb 21 12:24:50 2012 From: dlee at calldei.com (David Lee) Date: Tue, 21 Feb 2012 20:24:50 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <31263.207.245.177.19.1329857033.squirrel@www.eccnet.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FE61@CH1PRD0802MB107.namprd08.prod.outlook.com> <31263.207.245.177.19.1329857033.squirrel@www.eccnet.com> Message-ID: <220256FDE771B74FB662165BC562CF590D43FEA5@CH1PRD0802MB107.namprd08.prod.outlook.com> OK Back to the beginning First off I didnt know Excel understood XML character entities ...but trusting you what does this give you hello&#10;big&#10;world Alternatively have you thought of converting to CSV instead and let Excel read that ? ---------------------------------------- David A. Lee dlee at calldei.com http://www.xmlsh.org > -----Original Message----- > From: Betty Harvey [mailto:harvey at eccnet.com] > Sent: Tuesday, February 21, 2012 3:44 PM > To: David Lee > Cc: Andrew Welch; xquery-discuss; Mike Sokolov > Subject: Re: [xquery-talk] Stop Conversion of Character Entities > > This is what I getting (simplified) in the output -- the linefeeds are > being created: > > hello > big > world > > > What I want is: > > hello big world > > 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 > > > >

hello world

> > > > > > Result: > > > >

hello world > >

> > > > > > 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 > > dlee at calldei.com > > http://www.xmlsh.org > > > > > >> -----Original Message----- > >> From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On > >> Behalf Of Betty Harvey > >> Sent: Tuesday, February 21, 2012 3:24 PM > >> To: Andrew Welch > >> Cc: xquery-discuss; Mike Sokolov > >> Subject: Re: [xquery-talk] 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. | > >> harvey at eccnet.com | Washington,DC XML Users Grp > >> URL: http://www.eccnet.com | http://www.eccnet.com/xmlug > >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ > >> Member of XML Guild (www.xmlguild.org) > >> _______________________________________________ > >> talk at x-query.com > >> http://x-query.com/mailman/listinfo/talk > > > > > > > > _______________________________________________ > > talk at x-query.com > > http://x-query.com/mailman/listinfo/talk > > > > > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ > Betty Harvey | Phone: 410-787-9200 FAX: 9830 > Electronic Commerce Connection, Inc. | > harvey at eccnet.com | Washington,DC XML Users Grp > URL: http://www.eccnet.com | http://www.eccnet.com/xmlug > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ > Member of XML Guild (www.xmlguild.org) From harvey at eccnet.com Tue Feb 21 13:01:03 2012 From: harvey at eccnet.com (Betty Harvey) Date: Tue, 21 Feb 2012 16:01:03 -0500 (EST) Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <220256FDE771B74FB662165BC562CF590D43FEA5@CH1PRD0802MB107.namprd08.pro d.outlook.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FE61@CH1PRD0802MB107.namprd08.prod.outlook.com> <31263.207.245.177.19.1329857033.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FEA5@CH1PRD0802MB107.namprd08.prod.outlook.com> Message-ID: <54690.207.245.177.19.1329858063.squirrel@www.eccnet.com> 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 command. In XSLT I would: &#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 > > > hello&#10;big&#10;world > > Alternatively have you thought of converting to CSV instead and let Excel > read that ? > > ---------------------------------------- > David A. Lee > dlee at calldei.com > http://www.xmlsh.org > > >> -----Original Message----- >> From: Betty Harvey [mailto:harvey at eccnet.com] >> Sent: Tuesday, February 21, 2012 3:44 PM >> To: David Lee >> Cc: Andrew Welch; xquery-discuss; Mike Sokolov >> Subject: Re: [xquery-talk] Stop Conversion of Character Entities >> >> This is what I getting (simplified) in the output -- the linefeeds are >> being created: >> >> hello >> big >> world >> >> >> What I want is: >> >> hello big world >> >> 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 >> > >> >

hello world

>> > >> > >> > Result: >> > >> >

hello world >> >

>> > >> > >> > 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 >> > dlee at calldei.com >> > http://www.xmlsh.org >> > >> > >> >> -----Original Message----- >> >> From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On >> >> Behalf Of Betty Harvey >> >> Sent: Tuesday, February 21, 2012 3:24 PM >> >> To: Andrew Welch >> >> Cc: xquery-discuss; Mike Sokolov >> >> Subject: Re: [xquery-talk] 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. | >> >> harvey at eccnet.com | Washington,DC XML Users Grp >> >> URL: http://www.eccnet.com | http://www.eccnet.com/xmlug >> >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ >> >> Member of XML Guild (www.xmlguild.org) >> >> _______________________________________________ >> >> talk at x-query.com >> >> http://x-query.com/mailman/listinfo/talk >> > >> > >> > >> > _______________________________________________ >> > talk at x-query.com >> > http://x-query.com/mailman/listinfo/talk >> > >> >> >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ >> Betty Harvey | Phone: 410-787-9200 FAX: 9830 >> Electronic Commerce Connection, Inc. | >> harvey at eccnet.com | 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. | harvey at eccnet.com | Washington,DC XML Users Grp URL: http://www.eccnet.com | http://www.eccnet.com/xmlug /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ Member of XML Guild (www.xmlguild.org) From mike at saxonica.com Tue Feb 21 14:35:44 2012 From: mike at saxonica.com (Michael Kay) Date: Tue, 21 Feb 2012 22:35:44 +0000 Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <54690.207.245.177.19.1329858063.squirrel@www.eccnet.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FE61@CH1PRD0802MB107.namprd08.prod.outlook.com> <31263.207.245.177.19.1329857033.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FEA5@CH1PRD0802MB107.namprd08.prod.outlook.com> <54690.207.245.177.19.1329858063.squirrel@www.eccnet.com> Message-ID: <4F441C40.9020702@saxonica.com> There's no equivalent in XQuery to XSLT's d-o-e. Which is probably a good thing; d-o-e has caused no end of problems over the years; it breaks the architectural boundary between the transformer and serializer in a way that inevitably leads to grief. There are cases where it's needed - usually cases like this one, where it appears a receiving application is making distinctions between two lexical representations of the same data model that no self-respecting XML application should make. I think the correct workaround for this kind of problem is to output something like a processing-instruction and then do post-processing of the serialized output (or customization of the serializer pipeline) to turn this into what the application requires. Michael Kay Saxonica On 21/02/2012 21:01, Betty Harvey wrote: > 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 command. In XSLT I > would: > > &#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 >> >> >> hello&#10;big&#10;world >> >> Alternatively have you thought of converting to CSV instead and let Excel >> read that ? >> >> ---------------------------------------- >> David A. Lee >> dlee at calldei.com >> http://www.xmlsh.org >> >> >>> -----Original Message----- >>> From: Betty Harvey [mailto:harvey at eccnet.com] >>> Sent: Tuesday, February 21, 2012 3:44 PM >>> To: David Lee >>> Cc: Andrew Welch; xquery-discuss; Mike Sokolov >>> Subject: Re: [xquery-talk] Stop Conversion of Character Entities >>> >>> This is what I getting (simplified) in the output -- the linefeeds are >>> being created: >>> >>> hello >>> big >>> world >>> >>> >>> What I want is: >>> >>> hello big world >>> >>> 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 >>>> >>>>

hello world

>>>> >>>> >>>> Result: >>>> >>>>

hello world >>>>

>>>> >>>> >>>> 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 >>>> dlee at calldei.com >>>> http://www.xmlsh.org >>>> >>>> >>>>> -----Original Message----- >>>>> From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On >>>>> Behalf Of Betty Harvey >>>>> Sent: Tuesday, February 21, 2012 3:24 PM >>>>> To: Andrew Welch >>>>> Cc: xquery-discuss; Mike Sokolov >>>>> Subject: Re: [xquery-talk] 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. | >>>>> harvey at eccnet.com | Washington,DC XML Users Grp >>>>> URL: http://www.eccnet.com | http://www.eccnet.com/xmlug >>>>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ >>>>> Member of XML Guild (www.xmlguild.org) >>>>> _______________________________________________ >>>>> talk at x-query.com >>>>> http://x-query.com/mailman/listinfo/talk >>>> >>>> >>>> _______________________________________________ >>>> talk at x-query.com >>>> http://x-query.com/mailman/listinfo/talk >>>> >>> >>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ >>> Betty Harvey | Phone: 410-787-9200 FAX: 9830 >>> Electronic Commerce Connection, Inc. | >>> harvey at eccnet.com | 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. | > harvey at eccnet.com | Washington,DC XML Users Grp > URL: http://www.eccnet.com | http://www.eccnet.com/xmlug > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ > Member of XML Guild (www.xmlguild.org) > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > From harvey at eccnet.com Tue Feb 21 15:20:10 2012 From: harvey at eccnet.com (Betty Harvey) Date: Tue, 21 Feb 2012 18:20:10 -0500 (EST) Subject: [xquery-talk] Stop Conversion of Character Entities In-Reply-To: <4F441C40.9020702@saxonica.com> References: <11531.207.245.177.19.1329853308.squirrel@www.eccnet.com> <4F43EEA4.8070204@ifactory.com> <41049.207.245.177.19.1329854323.squirrel@www.eccnet.com> <62811.207.245.177.19.1329855820.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FE61@CH1PRD0802MB107.namprd08.prod.outlook.com> <31263.207.245.177.19.1329857033.squirrel@www.eccnet.com> <220256FDE771B74FB662165BC562CF590D43FEA5@CH1PRD0802MB107.namprd08.prod.outlook.com> <54690.207.245.177.19.1329858063.squirrel@www.eccnet.com> <4F441C40.9020702@saxonica.com> Message-ID: <64169.207.168.47.25.1329866410.squirrel@www.eccnet.com> Thanks Michael! This is what I was afraid of. My use-case is the ability to create a number of Excel spreadsheets (currently 156 and over time over a 1000) that users can run on-demand. Everything is working beautifully except for this nagging linefeed problem. Ultimately, I think they can live with it because they are getting a lot of functionality and visibility into the data that they didn't have before. I am going to ask the same question on the MarkLogic list just in case MarkLogic has a solution for this problem. Thanks again everyone for the suggestions - I will write back if I ever find a solution|-)! Betty > There's no equivalent in XQuery to XSLT's d-o-e. Which is probably a > good thing; d-o-e has caused no end of problems over the years; it > breaks the architectural boundary between the transformer and serializer > in a way that inevitably leads to grief. There are cases where it's > needed - usually cases like this one, where it appears a receiving > application is making distinctions between two lexical representations > of the same data model that no self-respecting XML application should > make. > > I think the correct workaround for this kind of problem is to output > something like a processing-instruction and then do > post-processing of the serialized output (or customization of the > serializer pipeline) to turn this into what the application requires. > > Michael Kay > Saxonica > > > On 21/02/2012 21:01, Betty Harvey wrote: >> 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 command. In XSLT I >> would: >> >> &#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 >>> >>> >>> hello&#10;big&#10;world >>> >>> Alternatively have you thought of converting to CSV instead and let >>> Excel >>> read that ? >>> >>> ---------------------------------------- >>> David A. Lee >>> dlee at calldei.com >>> http://www.xmlsh.org >>> >>> >>>> -----Original Message----- >>>> From: Betty Harvey [mailto:harvey at eccnet.com] >>>> Sent: Tuesday, February 21, 2012 3:44 PM >>>> To: David Lee >>>> Cc: Andrew Welch; xquery-discuss; Mike Sokolov >>>> Subject: Re: [xquery-talk] Stop Conversion of Character Entities >>>> >>>> This is what I getting (simplified) in the output -- the linefeeds are >>>> being created: >>>> >>>> hello >>>> big >>>> world >>>> >>>> >>>> What I want is: >>>> >>>> hello big world >>>> >>>> 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 >>>>> >>>>>

hello world

>>>>> >>>>> >>>>> Result: >>>>> >>>>>

hello world >>>>>

>>>>> >>>>> >>>>> 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 >>>>> dlee at calldei.com >>>>> http://www.xmlsh.org >>>>> >>>>> >>>>>> -----Original Message----- >>>>>> From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On >>>>>> Behalf Of Betty Harvey >>>>>> Sent: Tuesday, February 21, 2012 3:24 PM >>>>>> To: Andrew Welch >>>>>> Cc: xquery-discuss; Mike Sokolov >>>>>> Subject: Re: [xquery-talk] 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. | >>>>>> harvey at eccnet.com | Washington,DC XML Users Grp >>>>>> URL: http://www.eccnet.com | http://www.eccnet.com/xmlug >>>>>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ >>>>>> Member of XML Guild (www.xmlguild.org) >>>>>> _______________________________________________ >>>>>> talk at x-query.com >>>>>> http://x-query.com/mailman/listinfo/talk >>>>> >>>>> >>>>> _______________________________________________ >>>>> talk at x-query.com >>>>> http://x-query.com/mailman/listinfo/talk >>>>> >>>> >>>> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ >>>> Betty Harvey | Phone: 410-787-9200 FAX: 9830 >>>> Electronic Commerce Connection, Inc. | >>>> harvey at eccnet.com | 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. | >> harvey at eccnet.com | Washington,DC XML Users Grp >> URL: http://www.eccnet.com | http://www.eccnet.com/xmlug >> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ >> Member of XML Guild (www.xmlguild.org) >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk >> > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Betty Harvey | Phone: 410-787-9200 FAX: 9830 Electronic Commerce Connection, Inc. | harvey at eccnet.com | Washington,DC XML Users Grp URL: http://www.eccnet.com | http://www.eccnet.com/xmlug /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ Member of XML Guild (www.xmlguild.org) From djbpitt at pitt.edu Wed Feb 22 18:04:43 2012 From: djbpitt at pitt.edu (Birnbaum, David J) Date: Wed, 22 Feb 2012 21:04:43 -0500 Subject: [xquery-talk] "to" operator Message-ID: Dear x-query list, Using eXist 2.0-tech-preview-rev15878-20120213 (sandbox), I understand why: let $all := collection('/db/twitter')//tweet return $all[1 to 10] returns an error, since a numeric predicate isn't supposed to be a sequence of more than one atomic value. The error report is: err:FORG0006: effectiveBooleanValue: first item of '(1, 2, 3, 4, 5, 6, 7?' is not a node, and sequence length > 1 What I don't understand is why the following *doesn't* return an error: let $all := collection('/db/twitter')//tweet let $range := 1 to 10 return $all[$range] When I run this second FLWOR, I retrieve my first ten tweets. What am I misunderstanding? Thanks, David djbpitt at gmail.com From liam at w3.org Wed Feb 22 18:38:24 2012 From: liam at w3.org (Liam R E Quin) Date: Wed, 22 Feb 2012 21:38:24 -0500 Subject: [xquery-talk] "to" operator In-Reply-To: References: Message-ID: <1329964704.30988.12.camel@localhost.localdomain> On Wed, 2012-02-22 at 21:04 -0500, Birnbaum, David J wrote: [...] > Using eXist 2.0-tech-preview-rev15878-20120213 (sandbox), [...] > What I don't understand is why the following *doesn't* return an error: > > let $all := collection('/db/twitter')//tweet > let $range := 1 to 10 > return $all[$range] It does give an error in BaseX - Error: [FORG0006] (1 to 10) not allowed as condition type. Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ From wolfgang at exist-db.org Wed Feb 22 21:50:18 2012 From: wolfgang at exist-db.org (Wolfgang Meier) Date: Thu, 23 Feb 2012 06:50:18 +0100 Subject: [xquery-talk] "to" operator In-Reply-To: References: Message-ID: David, It certainly is a bug: both expressions should cause an error. A variant of this was reported as a bug a few days ago, so the problem is known. Thanks, Wolfgang Am 23.02.2012 03:05 schrieb "Birnbaum, David J" : > Dear x-query list, > > Using eXist 2.0-tech-preview-rev15878-20120213 (sandbox), I understand why: > > let $all := collection('/db/twitter')//tweet > return $all[1 to 10] > > returns an error, since a numeric predicate isn't supposed to be a > sequence of more than one atomic value. The error report is: > > err:FORG0006: effectiveBooleanValue: first item of '(1, 2, 3, 4, 5, 6, > 7?' > is not a node, and sequence length > 1 > > What I don't understand is why the following *doesn't* return an error: > > let $all := collection('/db/twitter')//tweet > let $range := 1 to 10 > return $all[$range] > > When I run this second FLWOR, I retrieve my first ten tweets. > > What am I misunderstanding? > > Thanks, > > David > djbpitt at gmail.com > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From james.fuller.2007 at gmail.com Sat Feb 25 04:14:00 2012 From: james.fuller.2007 at gmail.com (James Fuller) Date: Sat, 25 Feb 2012 13:14:00 +0100 Subject: [xquery-talk] functions in XQuery and XPath Data Model 3.0 Message-ID: as http://www.w3.org/TR/xpath-datamodel-30/#other-items states the xpath data model has matured and needs to add 'other types' ... which have no xml serializations following on from this statement, I am wondering if the XQuery WG has considered what could be returned in the following scenario: let $a := fn:position#0 return fn:string($a) it maybe nice to return the name of the function "fn:position" as a string ... conversely, let $a := fn:position#0 return fn:QName($a) would return the qname of the function. its probably a stretch to extend this to function arity eg. let $a := fn:position#0 return xs:integer($a) which would return a value of 0. it may also be useful to expand the description of what functions are in the data model via fully describing the term 'callable' here http://www.w3.org/TR/xpath-datamodel-30/#other-items. James Fuller From dlee at calldei.com Sat Feb 25 07:59:43 2012 From: dlee at calldei.com (David Lee) Date: Sat, 25 Feb 2012 15:59:43 +0000 Subject: [xquery-talk] functions in XQuery and XPath Data Model 3.0 In-Reply-To: References: Message-ID: <220256FDE771B74FB662165BC562CF590D4428C6@CH1PRD0802MB107.namprd08.prod.outlook.com> What would you have these functions return for anonymous function items? ---------------------------------------- David A. Lee dlee at calldei.com http://www.xmlsh.org > -----Original Message----- > From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On > Behalf Of James Fuller > Sent: Saturday, February 25, 2012 7:14 AM > To: talk at x-query.com > Subject: [xquery-talk] functions in XQuery and XPath Data Model 3.0 > > as http://www.w3.org/TR/xpath-datamodel-30/#other-items states the > xpath data model has matured and needs to add 'other types' ... which > have no xml serializations > > following on from this statement, I am wondering if the XQuery WG has > considered what could be returned in the following scenario: > > let $a := fn:position#0 > return > fn:string($a) > > it maybe nice to return the name of the function "fn:position" as a > string ... conversely, > > let $a := fn:position#0 > return > fn:QName($a) > > would return the qname of the function. > > its probably a stretch to extend this to function arity eg. > > let $a := fn:position#0 > return > xs:integer($a) > > which would return a value of 0. > > it may also be useful to expand the description of what functions are > in the data model via fully describing the term 'callable' here > http://www.w3.org/TR/xpath-datamodel-30/#other-items. > > James Fuller > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From mike at saxonica.com Sat Feb 25 10:04:56 2012 From: mike at saxonica.com (Michael Kay) Date: Sat, 25 Feb 2012 18:04:56 +0000 Subject: [xquery-talk] functions in XQuery and XPath Data Model 3.0 In-Reply-To: References: Message-ID: <4F4922C8.4000800@saxonica.com> On 25/02/2012 12:14, James Fuller wrote: > as http://www.w3.org/TR/xpath-datamodel-30/#other-items states the > xpath data model has matured and needs to add 'other types' ... which > have no xml serializations > > following on from this statement, I am wondering if the XQuery WG has > considered what could be returned in the following scenario: > > let $a := fn:position#0 > return > fn:string($a) Actually fn:position#0 isn't allowed - we don't allow function items to be formed from functions that access the dynamic context, because there's too much scope for confusion about which dynamic context is used. But if you substituted, say, root#1, we allow you to get the name of the function using function-name(root#1) and to get its arity using function-arity(root#1). That seems better to me that doing it by casting, which seems to rely on the purely accidental fact that all the properties of a function have distinct types. Michael Kay Saxonica > > it maybe nice to return the name of the function "fn:position" as a > string ... conversely, > > let $a := fn:position#0 > return > fn:QName($a) > > would return the qname of the function. > > its probably a stretch to extend this to function arity eg. > > let $a := fn:position#0 > return > xs:integer($a) > > which would return a value of 0. > > it may also be useful to expand the description of what functions are > in the data model via fully describing the term 'callable' here > http://www.w3.org/TR/xpath-datamodel-30/#other-items. > > James Fuller > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk > From james.fuller.2007 at gmail.com Sat Feb 25 11:05:14 2012 From: james.fuller.2007 at gmail.com (James Fuller) Date: Sat, 25 Feb 2012 20:05:14 +0100 Subject: [xquery-talk] functions in XQuery and XPath Data Model 3.0 In-Reply-To: <4F4922C8.4000800@saxonica.com> References: <4F4922C8.4000800@saxonica.com> Message-ID: On Sat, Feb 25, 2012 at 7:04 PM, Michael Kay wrote: > On 25/02/2012 12:14, James Fuller wrote: >> >> as http://www.w3.org/TR/xpath-datamodel-30/#other-items states the >> xpath data model has matured and needs to add 'other types' ... which >> have no xml serializations >> >> following on from this statement, I am wondering if the XQuery WG has >> considered what could be returned in the following scenario: >> >> let $a := fn:position#0 >> return >> fn:string($a) > > Actually fn:position#0 isn't allowed - we don't allow function items to be > formed from functions that access the dynamic context, because there's too > much scope for confusion about which dynamic context is used. sure, cut n paste madness > But if you substituted, say, root#1, we allow you to get the name of the > function using function-name(root#1) and to get its arity using > function-arity(root#1). That seems better to me that doing it by casting, > which seems to rely on the purely accidental fact that all the properties of > a function have distinct types. sure, function-name() and function-arity() are great. so I guess now a cast on a function will throw a err:XPTY0004 ? thx, J > > Michael Kay > Saxonica >> >> >> it maybe nice to return the name of the function "fn:position" as a >> string ... conversely, >> >> let $a := fn:position#0 >> return >> fn:QName($a) >> >> would return the qname of the function. >> >> its probably a stretch to extend this to function arity eg. >> >> let $a := fn:position#0 >> return >> xs:integer($a) >> >> which would return a value of 0. >> >> it may also be useful to expand the description of what functions are >> in the data model via fully describing the term 'callable' here >> http://www.w3.org/TR/xpath-datamodel-30/#other-items. >> >> James Fuller >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk >> > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk