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.

Exporting XML via XSL

Featured Replies

Has anyone experienced XML that has multiple "data" lines for each "col"? How do you get the XSL to take that into consideration?

For example:


      

      	

      		Client 1

      	

      	

      		CLIE1

      	

        

      		Jim Bob

      		Billy Sue

      	

      	

      		Client 2

      	

      	

      		CLIE2

      	

        

      		Billy Ray

      		Susie Q

      	



I can get the XSL to display Jim Bob, but skips Billy Sue and proceeds to the next client, Client 2 and displays Billy Ray, but not Susie Q.

Anyone else have this problem? What was your work-around?

Multiple DATA elements are what you get if you export related records, such as in a portal. What you do about it depends on whether you're Importing or Exporting. If exporting, as it appears the above is, you'd use either another or an . You'd want to know which COL (field) you expected possible multiples (perhaps it wouldn't matter; but no use making the xsl look where there isn't).

       

           

              	

					

					

					

						

					

			 		

            

    	
        

            

That will get the repetitive data in the multiple DATA elements for one related field. The trouble is that you often want to get more than one related field at once. A method I've used is to decide which is the "determining" field; ie., which field will have data; much like counting related records. Then get that field, and the other related fields. If you cannot be sure that one of the fields has data, then you can export an ID which you know does. You can use it in the . You don't have to output the value.



You have to go back "up" 2 levels (), then down again, to get the other related fields. Because the next field in the FileMaker portal is going to be in the next COL, but at the same position as the data you're getting. Notice I'm using a variable to get the position of the DATA element being currently processed, then using that to say which DATA to get.





				

					

					

						

						

						

				

				

(P.S. You can also use multiple for this. It's a little more abstract, so I don't use it as much; but perhaps I should.)

  • Author

fenton:

Thanks for the insight. I found using the variable helpful.

Do you know of a template available that builds this into a table? That's what I'm after. The HTML table that I've just created has all values for each data set run together in the same cell.

I'm new at the XML / XSL game and am trying hard to learn what I'm doing. Any templates that I can study will help me get over the learning curve!

Thanks again!

--Matt

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.