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
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Jay BakerSubject: Extra CRLF and Tab at the beginning of the output... and extra CRLF at the end.
Author: Jay Baker
Date: 06 Dec 2006 02:58 PM
There is an extra carriage return and an extra tab at the beginning of the output for the attached XSL/XML project. There is also an extra carriage return at the end of the output.

This is happening in Stylus Studio 501j (regardless of which processor I use) and also happens when I test it in BIE. I have tried removing the entire core of the transformation script (everything within the 'xsl:template' tag, except for 1 'xsl:value-of'), but the extra characters still appear at the beginning and end of the output.

Can someone please tell me why is this happening (and how to fix it)?

Thanks in advance.


Documentxsl-test.xsl
XSLT

Documentxsl-test.xml
XML

Postnext
James DurningSubject: Extra CRLF and Tab at the beginning of the output... and extra CRLF at the end.
Author: James Durning
Date: 07 Dec 2006 10:52 AM
I'm guessing the processor is applying templates to the text nodes inside the <gldata> node at the beginning and end. Easiest way to solve, add this template:

<xsl:template match="gldata">
<xsl:apply-templates select="FacilityData"/>
</xsl:template>

Let us know if this works.

Postnext
Jay BakerSubject: Extra CRLF and Tab at the beginning of the output... and extra CRLF at the end.
Author: Jay Baker
Date: 07 Dec 2006 11:56 AM
Originally Posted: 07 Dec 2006 11:49 AM
Unfortunately, that didn't work... this is the output (after applying the recommended change):


Test Group
9
WI P00 1221
SNF
Test West

3994
10-31-2006


40
10106-00000
USD
A
0

4947.17
CRAmount


9883.95
DRAmount



3995
10-31-2006


30
10107-00000
USD
A
0

4234.62
CRAmount


2345.45
DRAmount



Can you suggest anything else that I can try?

Note: the output should look like this:
MX09CH1006 10/31/2006 60 1010700000 0 0 0.00 4234.62
MX09CH1006 10/31/2006 60 1010700000 0 0 2345.45 0.00
MX09CA1006 10/31/2006 60 1010600000 0 0 0.00 4947.17
MX09CA1006 10/31/2006 60 1010600000 0 0 9883.95 0.00

Posttop
Jay BakerSubject: Extra CRLF and Tab at the beginning of the output... and extra CRLF at the end.
Author: Jay Baker
Date: 07 Dec 2006 12:02 PM
Okay, I've got it working now...

<xsl:template match="gldata">
<!-- Process Charges -->
<xsl:for-each select="FacilityData/transaction[TransactionType=30]">
<xsl:for-each select="TransactionDetail">
<!-- Process Credits -->

I put the FacilityData node into the first xsl:for-each, and left the xsl:template (gldata) as the root element (per your recommendation).

Thanks for the assistance.

 
Topic Page 1 2 3 4 5 6 7 8 9 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.