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.

Need style sheet tune up

Featured Replies

In one of Fenton's posts regarding exporting text using an XML style sheet, he said:

... this does not solve the basic problem of what to put in between the fields, and what between the records. If you do not specify anything, xsl will just mush it all together ...

I've now come upon a case where "mush is all together" is exactly what I need -- but I don't know style sheets at all. I've attached the one I'm currently using.

Can someone give me a tip on how to modify it so that nothing is added between exported text fields. I need the resulting file to be one long text string.

Thanks in advance for any help.

XMLstyle.txt

OK, you want "mush"? Simply remove all the separators. The following will add nothing, between fields or between records. The output is ASCII text. You could put otherwise, ie., utf-8 (like the stylesheet itself).

<?xml version="1.0" encoding="utf-8"?>

xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" >

  • Author

Thanks, Fenton. That did the job.

But, I am curious about one thing. Why is a reference to FileMaker's website needed in the stylesheet?

xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" >

I wasn't able to spot any meaningful (to me) explanation on XML tutorial sites.

"xmlns" means xml "namespace". It is a way to assert ownership over and identify "your" xml elements. Since anyone can create pretty much anything (which follows the few rules) as an xml element, namespaces were conceived as way to positively identify yours.

It really only would come to play in cases where there were duplicate hence conflicting element names; which would be rare, but is possible. Just look at FileMaker's elements, , , . You can see how someone else might use the same in an xml document. Or, the usual example, a furniture supplier's

In any case, FileMaker includes its namespace in its exported xml:

So, you must include it in your xsl stylesheet declaration. You then define some abbreviation to use to identify the elements; this can be anything, but we commonly use "fm" or "fmp". Then you add the option, exclude-result-prefixes="fm", in order to remove them from the output, since no one else wants them.

Yeah, it's kind of confusing. There's more to it I suppose, but that's what I know :-]

  • Author

An excellent explanation.

Thanks very much.

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.