Jump to content
Server Maintenance This Week. ×

Help with XML Stylesheet


Carl Smith

This topic is 5044 days old. Please don't post here. Open a new topic instead.

Recommended Posts

A third party wants to supply their data in XML form and I need to create a stylesheet to complement this in order to import into my Filemaker 11 database.

Attached is a demo file.

I have very little experience of using XML and the way the file itself appears is not in the way that I familiar with.

If anyone out there can help me a.s.a.p. I would be most grateful.

data.zip

Link to comment
Share on other sites

From what I can make out this file includes records for x3 tables (e.g. those fields between the "entry" tags, the "variation" tags and the "saleprice" tags) with the "Code" field being the parent key. So I guess that its possible that x3 stylesheets may be necessary.

Link to comment
Share on other sites

Yes, 3 tables, 3 import steps, 3 xsl stylesheets. The Variation and SalePrice would be small xsl files. Since they were good enough to include those as separate nodes in the xml, and include the Code, they'd be tied to their Entry via the Code via a FileMaker relationship on Code.

This is the xsl for the Entry. I only did 2 fields, but they're all the same, all one level (which is a little clunky, for Artists, but OK).

Since they included a namespace in the xml, we have to included it in the xsl (then exclude it from the result). "eng" is just made up, to identify its elements.


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



xmlns:eng="http://tempuri.org/EngravingDataSet.xsd" exclude-result-prefixes="eng">



	

		

			0

			

			

			

				

				

			

			

				

					

						

							

								

							

						

						

							

								

							

						

						

				

			

		

	







For Variation:





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



xmlns:eng="http://tempuri.org/EngravingDataSet.xsd" exclude-result-prefixes="eng">



	

		

			0

			

			

			

				

				

			

			

				

					

						

							

								

							

						

						

							

								

							

						

						

				

			

		

	

Link to comment
Share on other sites

Yes. It is quite possible that these are 1-to-1, 1 Variation per Code, 1 SalePrice per code. The structure of the xml does not tell us, and the xsd file they refer to is not there (which is OK as far as the xml goes, but makes it hard to see whether the above is true or not).

Link to comment
Share on other sites

This topic is 5044 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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