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.

Featured Replies

I am trying to import data from an .xml file generated by a program from the google aps library called xlm-dir-listing.

I am not having any success at import i think because the .xml data does not conform to the fmpxmlresult.dtd

How do i transform the xml-dir-listing output .xls data to conform to the Filemaker dtd requirements before triggering the import?

Any thoughts on how i can get this to work?

TIA

Kris

You need an XSLT stylesheet to transform the source file into FMPXMLRESULT grammar. It's hard to be more specific without seeing the source and knowing what you want to import from it, and to where.

  • Author

output from the utility is

where file can be nested many times in the directory.

Here is the utility output dtd and the data goes into fields in a table of the same name except the sort and reverse attributes are not stored.

<?xml version="1.0" encoding="ISO-8859-1"?>

name CDATA #REQUIRED

lastModified CDATA #REQUIRED

date CDATA #REQUIRED

size CDATA #REQUIRED

absolutePath CDATA #REQUIRED

sort CDATA #IMPLIED

reverse CDATA #IMPLIED>

name CDATA #REQUIRED

lastModified CDATA #REQUIRED

date CDATA #REQUIRED

size CDATA #REQUIRED

absolutePath CDATA #REQUIRED>

so my basics question here is...ready?

How does a style sheet work to accomplish the goal? I thought that xml parser calls the stylesheet to make the output look nice and that it would not affect the underlying data structure. obviously i am wrong. can you point me to a resource that explains this?

Edited by Guest

How does a style sheet work to accomplish the goal? I thought that xml parser calls the stylesheet to make the output look nice and that it would not affect the underlying data structure. obviously i am wrong. can you point me to a resource that explains this?

Oh, my - you're about to discover a new continent. I'd suggest you start with these:

http://en.wikipedia.org/wiki/XSLT

http://www.w3schools.com/Xsl/xsl_intro.asp

http://my.advisor.com/doc/12009

You'll find countless additional resources on the web and/or in bookstores. XSLT is a widely used technology, and its implementation in Filemaker is only a tiny fraction of what's out there.

the data goes into fields in a table of the same name except the sort and reverse attributes are not stored.

That only answers half of my question. The document you describe has a "Russian doll" structure: each element (file or directory) can have any number of parent elements. There is no similar STRUCTURE in Filemaker (though the DATA MODEL can be recreated using recursive relationships).

I believe it wouldn't be too difficult to import each element as a record, then use the absolutePath attribute to link to the immediate parent record. Is that what you have in mind? IOW, what's your purpose here?

BTW, the dtd is helpful but if you have an actual example of the output, please post that too (preferably as a zipped attachment).

  • Author

I went through the w3c xml, xml dom, xml namespaces tutorial and have learned alot.

I see now how misinformed by previous questions were. Sorry.

I am currently working through the xslt tutorial and hope to at least understand any solution you might provide.

Here is the severely truncated output xml file.

The database has one table and 4 fields..

Filename, date_time, path, and size that correspond to the file attributes

Could i just xslt remove the directories?

MusicList.zip

Edited by Guest

You still haven't told us what's the purpose. Anyway, you might want to try the following: drop your 'MusicList.xml' file onto Filemaker, and when asked, tell it to use the attached 'filedir.xsl' stylesheet (as a file).

Archive.zip

  • Author

The purpose is to produce a catalog of files in an fmp database as repeatably and easily as possible. Ill try the solution and let you know.

Thanks

  • Author

your xsl file works perfect. thanks. When i think i understand what you did ill post again so you can get a laugh.

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.