Jump to content

XML Export


Bruce Reichert

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

Recommended Posts

  • Newbies

I am trying to create via export an xml document (my first try at xml anything) to a developer using flash from FMP7.

I can export data OK in text and text exports. I export in grammar and it works.

When I do the export as XML (and it lets me go all the way through), all I get is my stylesheet with no data. (Style Sheet attached)

Obviously I am missing something.

Any clues?

XMLExport.txt

Link to comment
Share on other sites

  • Newbies

The database holds the "inventory" of units available in an industrial complex. The person on the other end of this knows flash and knows how to make flash work through xml input (which is intended to come from the FMP database.

What I am trying to give is an export of that database that formats itself as follows:

<?xml version1.0" encoding="iso-8589-1?>

etc.....

Building="3"Level="1"Unit="5"Prototype="Retail"TotalSpace="3186s.f."WareHouseSpace="s.f."OfficeSpace="s.f."UsableSpace="3186s.f."CommonSpace="0s.f."Price="$1433700"Status="Available"/>

Link to comment
Share on other sites

  • Newbies

I think I am not understanding. When I tried to do an export from my database using the stylesheet you defined, it went through what looked like an export, but when I opened the document it was just the stylesheet (as I had gotten with the original stylesheet).

Aparently I am totally missing something in understanding how this is supposed to work.

By the way the xsl stylesheet that I used was from the book "Using FilMaker 7" by Steve Lane, Bob Bowers, Scott Love, and Chris Moyer (page 648) and appears to be an older format.

Link to comment
Share on other sites

First, I see that there IS a root element, which you left out of your original post, . I still don't really see why you'd have . It seems redundant, if there's nothing else except in the file.

But XML means "extensible," i.e., you can create most any structure you want, as long as it follows the rules. What they've done is to stick all the real data into "attributes." That's where you have "name-value" pairs, expressed as:

something="something data". The "element" they are in is . It just functioning as a container (looks a lot like "record").

Data in xml can be in either separate elements, or as attributes inside an element. Either is accessible, the later using the "element/@attribute name" syntax. Since they're using this form the best way to build the xsl would be to create the element and attributes with xsl elements, like this:

I don't have time right now to actually do the xsl, but perhaps tomorrow.

Link to comment
Share on other sites

Aha! I discovered why your xsl ended up being the result of the export. It's because you were missing the "www" in:

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

That address must be correct.

I deleted my earlier post. The attached example does a few attributes like you want; you can do the same for the rest. I don't know whether is for each record, or whether it only happens once. Just move it if needed.

Project_List.zip

Link to comment
Share on other sites

This topic is 6548 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.