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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
- Stylus Studio Code Samples & Utilities (364)
-> + create an xml document with ex... (2)
-> + Default xml converter from com... (2)
-> + Transforming Data With XSLT (5)
-> + Error when creating pdf file (5)
-> + Got Shkespear XML Doc from web... (3)
-> + VFP 8 (2)
-> + CSV import (7)
-> + Generating X12 from XML (4)
-> + How to handle variable input &... (2)
-> + Grab html to xml (2)
-> + XML To X12 conversion using in... (3)
-> + XSLT mapping help required (2)
-> + convert XML to JAVA (2)
-> - Insert a carriage return or li... (3)
-> ->Insert a carriage return ...
-> ->Insert a carriage return ...
-> + Automatation for comparing two... (2)
-> - Filter records (1)
-> + BIT Fields (3)
-> + Restricted Mixed Content (4)
-> - Freelance Project - Mapping di... (1)
-> + flat file to xml conversion (10)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio Announcements (113)
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)


   
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.