XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Daniel PontzerSubject: Insert a carriage return or linefeed
Author: Daniel Pontzer
Date: 07 Apr 2008 10:54 AM
XQuery question:

This:
for $A in //Section/Word
return concat($A/@Name," ",$A/AddOffset)

Produces this:
IPP_LENGTH 0x000 BURP_LENGTH 0x004 NUMIPPS 0x008 ...

How do I put in line feeds or carriage returns and where would I find this documented?

Thanks,
Dan Pontzer

Postnext
Minollo I.Subject: Insert a carriage return or linefeed
Author: Minollo I.
Date: 07 Apr 2008 11:26 AM
You probably want to switch to a text serialization method:
declare option ddtek:serialize "method=text";

...and then output explicitly something like '
'

Details about how XQuery serializes results are available here:
http://www.w3.org/TR/2007/REC-xslt-xquery-serialization-20070123/

Posttop
Daniel PontzerSubject: Insert a carriage return or linefeed
Author: Daniel Pontzer
Date: 07 Apr 2008 12:56 PM
This works :

for $A in //Section/Word
return concat(codepoints-to-string(10),$A/@Name," ",$A/AddOffset)


 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.