Category Archives: XML Developer

[Newbie] Output contains space around each value — how do I delete the space?

At 2010-04-03 10:05 -0400, Costello, Roger L. wrote: > I have an XQuery that extracts all the data in a bookstore XML > document and formats the output as slash-delimited values. Here’s my XQuery: > > ——————————————————- > declare namespace saxon = “http://saxon.sf.net/”; > declare option saxon:output “indent=no”; > declare option saxon:output “method=text”; > > let $source := doc(“bookstore.xml”) > > return > ( > string($source/bookstore/@storename), > ” > “, > for $i in $source// book return > ( > string($i/title), > “/”, > string($i/author[1]), > “/”, > string($i/date), > “/”, > string($i/ISBN), > “/”, > string($i/ publisher ), > “/”, > string($i/cost[@currency='USD']), > ” > ” > ) > ) > ——————————————————- > > The XQuery does almost exactly what I desire.

Read this article:
[Newbie] Output contains space around each
value — how do I delete the space?

[Newbie] Can XQuery produce non-XML output?

Hi Folks, Every time I run an XQuery , the output has an XML declaration at the top, even if the output is not XML, e.g., The ABC Book Store The Origin of Wealth / Eric D. Beinhocker / 2006 / 1-57851-777-X / Harvard Business School Press / 29.95 DOM Scripting / Jeremy Keith / 2005 / 1-59059-533-5 / friends of ed / 34.99 Guns, Germs, and Steel / Jared Diamond / 2005 / 0-393-06131-0 / W

Read more here:
[Newbie] Can XQuery produce non-XML output?

XQuery and ACID transactions WAS Re: from Where 2.0

> If the XML community is slow and refuses to understand the > needs of the database community, and the need to evolve > faster, what can I say, many database people left already > XML, and I guess many more will leave the boat. In Prague it was said quite nicely: the value of standards is in its implementations (or something like that). I believe Sharon Adler was the first to mention this.

Read more:
XQuery and ACID transactions WAS Re: from Where 2.0

XQuery and immortality WAS ACID transactions WAS Re: from Where 2.0

> Michael R is saying, I think, that > transaction facilities (and scripting) should only be added to the > standards > once they have been proven in products. Michael (K), thanks for the translation ! :-) Michael (R), I am sorry, despite the perfectly understandable English, I don’t understand the logic. I read, and reread the sentence above, and despite the rewriting, the content still doesn’t makes sense to me

Continue reading here:
XQuery and immortality WAS ACID transactions WAS Re:
from Where 2.0

Re: from Where 2.0

> > Any success stories in this community with storing and processing > > geolocation data ? > > eXist has a support for spatial data : > http://exist-db.org/devguide_indexes.html#N10E2D Perhaps an EXPath library similar in concept to eXist’s geospatial XQuery module would be a nice idea. We already provide some 44 generic geospatial specific functions.

See original here:
Re: from Where 2.0

Fwd: [ERR] from Where 2.0

Could the administrator of the mailing list please delete this address ? thanks ! Dana Begin forwarded message: > From: http://x-query.com/mailman/listinfo/talk > Date: March 30, 2010 7:15:36 PM PDT > To: http://x-query.com/mailman/listinfo/talk > Subject: [ERR] from Where 2.0 > > Transmit Report: > > To: http://x-query.com/mailman/listinfo/talk, 2010/03/31 11:15:33, 452, This mailbox is > temporarily disabled.

Continued here:
Fwd: [ERR] from Where 2.0

RE: XHTML with embedded XQuery: how to deal with the DOCTYPE declaration? How to deal with the default XHTML namespaces?

> > When using MarkLogic’s built-in HTTP server, I typically do > the following: > > xquery version “1.0-ml”; > > let $r := xdmp:set-response-content-type(“text/html; > charset= utf-8 “) return ( ‘ “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> ‘, > > > ) I’m surprised that should work; I would have expected the “

Excerpt from:
RE: XHTML with embedded XQuery: how to deal with
the DOCTYPE declaration? How to deal with the default XHTML
namespaces?

RE: XHTML with embedded XQuery: how to deal with the DOCTYPE declaration? How to deal with the default XHTML namespaces?

As with Kelly’s MarkLogic example, you would set the doctype in eXist using the following in your XQuery ‘s prolog: declare option exist:serialize “method=xhtml media -type=text/html omit-xml-declaration=no indent=yes doctype-public=-// W3C // DTD  XHTML 1.0 Transitional//EN doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”; This is documented on the XQuery wikibook at: http://en.wikibooks.org/ wiki /XQuery/eXist_Crib_sheet#output_XHTML_document Feel free to add other processors to the XQuery wikibook. Joe On Sat, Mar 27, 2010 at 6:19 PM, Kelly Stirman wrote: > When using MarkLogic’s built-in HTTP server, I typically do the following: > > xquery version “1.0-ml”; > > let $r := xdmp:set-response-content-type(“text/html; charset= utf-8 “) > return ( > ‘ ‘, > > > ) > > You can treat the doctype declaration as a string and return a sequence to the browser, including the doctype and the xhtml node. This seems like a valid approach for any XQuery processor, though it does seem like “ugly” XQuery.

Follow this link:
RE: XHTML with embedded XQuery: how to deal with
the DOCTYPE declaration? How to deal with the default XHTML namespaces?

XHTML with embedded XQuery: how to deal with the DOCTYPE declaration? How to deal with the default XHTML namespaces?

> > I am creating an XHTML document and embedding XQuery in it: > > QUESTION #1 > > When I execute the XHTML document (containing XQuery) I get > an error message regarding the DOCTYPE declaration: XQuery syntax is a bit like XML, but it isn’t real XML, don’t imagine that anything that’s OK in XML is OK in XQuery.

Read more:
XHTML with embedded XQuery: how to deal with the
DOCTYPE declaration? How to deal with the default XHTML namespaces?