Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Getting <CR> on xml export from windows Server

Featured Replies

When I'm exporting an xml from a script thats running on a Windows server it's adding <CR><CR> after each line.

It's not doing that when I export it local on OS X. I'm using the same XSL.

Any clue?

Thanks

 

 

I don't believe whitespace should have any effect on an XML file, so....

Is this actually causing an issue further down the line?

  • Author

I don't think it's going to cause an issue. But I'm more concerned with the change in behavior?

I would aspect to see the same thing regardless of platform.

Could we see your XSLT stylesheet (preferably reduced to the minimum necessary to produce the problem)?

  • Author

Attached is the Stylesheet.

ShippingACK.xsl

Is it possible that the result has CRLF as the newline character (as you would expect on Windows), and you are viewing it in an application that presents this as double line spacing?

 

  • Author

I'm sure that very possible. I've used Text Wrangler,  TextMate and Sublime and all show the same issue.

Well, you need to view the actual code. Does TextWranger have the option to hex dump a file, like BBEdit does?

  • Author

It does have the hex dump.. But that not telling me much.

 

Here are the two files.. One from Mac the other from windows

 

 

MacVersion.xml

Windows.xml

The Win file you posted does have two CR and a LF characters between the lines. To be 100% sure of the source of the problem, could you perform the transformation and zip the result before doing anything else (not even opening the file)?

Edited by comment

(after examining the original file)

The file definitely has an extra carriage return. The actual sequence is 0D 0D 0A - that is, two carriage returns followed by a line feed.

I have seen a similar problem reported a few times before. Very few times - no more than 3 or 4 such reports over the last 10 years. I suspect this happens only on some Windows systems - though it's hard to be sure because so few people use XML/XSLT export. It would be interesting to see if the problem can be reproduced on other Windows systems.

Anyway, this is clearly a bug and I suggest you report it. I am not going to suggest a workaround, since the flaw is harmless in your case.

  • Author

Thanks Comment

I will submit for review.

 

 

  • 3 weeks later...

I made an addition/update to my article about an XML with XSLT export issue with Windows:

https://filemakerhacks.com/2012/09/23/export-field-contents-as-utf-8/

Quote

Several have found that Windows FileMaker has a problem with this method (XML/XSLT) and is exporting an extra carriage return between “lines”. This is an alternative method of using One Field Several Records and Export (as tab delimited). Using the single field or variable, loop to push the ‘lines’ (returns in field) to a temporary table and Export.

then I added a demo file.

It is a *known* issue in Windows only (per TS in FM Community forum). my demo only addresses the "Export Field Contents" and not XML with other XSLT (on Windows).

beverly

  • 3 years later...

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.