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?