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.

Help with xslt transformation

Featured Replies

  • Newbies

Hi all,

New to xml to filemaker pro transformation and import. Help would be much appreciated.

I am trying to import the following xml:

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

Monterey

Herbson's Pices

1

12-01-2002

23.54

ABC1231Oregano23.5423.54

2

01-06-2003

15.45

23_45d2Rosemary5.0010.00

t4565Thyme1.095.45

New York

A Pealing Desserts

1

11-15-2002

115.00

ABC1235Lemon Zests23.00115.00

I have an xslt file that correctly imports the customers into a customers table. I'm having problems importing the orders records which needs to include the attribute value in element.

When I run the following xslt, the customer id value in column 1 is always 2:

<?xml version='1.0' encoding='UTF-8' ?>

0

Output:

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

0

2

ORD2

12-01-2002

23.54

2

ORD3

01-06-2003

15.45

2

ORD4

11-15-2002

115.00

Either one of these should work:

However, you have a problem in the source XML document: XML is case-sensitive. Using "id" for one customer and "ID" for another is not easy to handle.

  • Author
  • Newbies

Auuughh. The dreaded upper/lower case problem. Thanks for spotting that.

The other error you pointed out fixed the problem.

I still have a question: What is the difference between:

/customers/customer/@id AND

ancestor::customer/@id

Why aren't they equivalent?

You are in a loop at the order level. In order to get the info for the customer of the CURRENT order, you need to look UP. The expression "/customers/customer/@id" starts at the root level, and looks DOWN - and returns data from the first customer it finds.

  • Author
  • Newbies

Thanks for your reply. That makes sense to me.

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.