Jump to content

  •  

Photo

Errors Importing XML -- XSD, no XSL


  • Please log in to reply
3 replies to this topic

#1 burro  newbie

burro
  • Newbies
  • PipPip
  • 2 posts
  • FM Application:11 Advance

Posted 17 August 2010 - 09:08 AM

Hi,

I am totally ignorant regarding XML/XSL/XSD, and I am trying to import (create a new table from) XML into FileMaker for the first time.

I have an XML file (containing data), and an XSD file (apparently containing the potential fields for the XML data file). I do not have an XSL file.

When I try to import the XML file by itself, I get the error, "XML/XSL information is not enough to proceed with import/export."

FMP11 gives an option to work from an associated XSL file, but I do not have one.

What can I do?

Is there a way to use the XSD file to create a blank table in FileMaker?

Is there a way for someone as ignorant as myself to use the XSD file to create a generic XSL file?

I've attached a sample XML file and its associated XSD file.

Many thanks.

Attached Files


  • 0

#2 comment  consultant

comment
  • Members
  • 24,324 posts
  • Time Online: 335d 20h 41m 32s

Posted 17 August 2010 - 09:41 AM

You must have an XSL stylesheet to transform the XML source into Filemaker's own XML grammar. The stylesheet cannot be generic, because it must describe (a) the fields that Filemaker must import (or create, if importing into a new table) and (:) the path to the data feeding those fields.

The first step for you is to decide exactly what you want to import, into where. A short glance at your file shows there are two types of records at the top level, UnitStackConfigurationData and MonitoringLocationData, and it doesn't seem like they belong in the same table.
  • 0

#3 burro  newbie

burro
  • Newbies
  • PipPip
  • 2 posts
  • FM Application:11 Advance

Posted 18 August 2010 - 09:25 PM

Thank you.

Can an XSD file be used to generate an XSL file that includes all possible fields described by the XSD file?

(I do not yet know the fields that are (or can be)included in the data.)

This is a general question, because there are at least two other XSD files to be turned into data files -- and many associated XML data files to be routinely imported.

I believe that UnitStackConfigurationData and MonitoringLocationData could be in the same table, since they both describe the set-up of the monitoring equipment. On the other hand, there would be no harm in separating the tables, in case that turns out beneficial. So I would separate them.
  • 0

#4 comment  consultant

comment
  • Members
  • 24,324 posts
  • Time Online: 335d 20h 41m 32s

Posted 19 August 2010 - 02:25 AM

Can an XSD file be used to generate an XSL file that includes all possible fields described by the XSD file?


That is an interesting question. I suppose the answer is yes, with a lot a work and dubious results. Yes, because XSD is XML, and as such can be transformed (using XSL) into practically anything; lot of work, because you need to carefully pick only elements and attributes that contain real data; and dubious results, because the XSL file for Filemaker grammar would only include a list of field names - with no context.

For example, your XSD document has 16 different elements named "BeginDate". To make such list useful, you would want to show these in their hierarchical context, e.g.:)

MonitoringPlan/MonitoringLocationData/UnitData/ComponentData/AnalyzerRangeData/BeginDate

The truth is that you already have such document - and that is the XSD. XSD is human-readable (perhaps subject to a few minutes of getting used to it) and you can use it directly to study the schema and select the data you need to import.


I believe that UnitStackConfigurationData and MonitoringLocationData could be in the same table


I doubt that, because UnitStackConfigurationData has only 4 "fields" (StackPipeID; UnitID; BeginDate; EndDate), while MonitoringLocationData can have a lot more.
  • 0




FMForum Advertisers