Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

I am so glad to have found a FM forum!

Here's my problem....

I created a report to format my data into a basic xml file. It looks like this:

Now I need to get that into a text file EXACTLY how it appears. None of the export options seem to do the trick. Even if I could just cut and paste the whole thing I would be (marginally) happy.

Thanks.

Vincent

Posted

There's 2 approaches. The first is to fake, somehow gather the above into a global text field, then Export Field Contents. There's several ways that could be done. It would't be too hard. But that's not very interesting to me, because I would use the 2nd approach, which is to use an XML export, with an xsl stylesheet to format the data.

If your 2 fields are named "lat" and "lng", and you only export those 2 fields. Then this is the xsl:

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

xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm">

Posted (edited)

I'm not sure exactly what you mean by "write all my html through reports." If you mean "can you write html via xml/xsl exports?" the answer is certainly yes. HTML and XML work well together, and in fact are "siblings", both offshoots of SGML (the near mythical mother of markup languages, seldom {well never} seen, and less understood by mere mortals such as ourselves).

If you look at the xsl I posted, you'll see that I just wrote in the extra and tags (and their end tags). There's other ways to do this, but this is simplest. You can do the same for HTML. Just put your

tags where desired.

The output method would be "html" instead of "xml" in that case.

(P.S. I should have said XHTML, strict. You cannot have any sloppy HTML in an xsl stylesheet. It will stop the processing cold if you have non-closed tags.

must be

, etc.. They did this on purpose. It was the only way to create a reliable markup language.)

Edited by Guest
Posted

Is this the difference between the regular and server versions of FM?

No, regular FMP can export XML and you can point it to the XSLT you've created to create the other XML file or the HTML.

You can do this server-side too by using FileMaker Server Advanced too, if you want that HTML created dynamically whenever somebody goes to a certain url.

  • Newbies
Posted (edited)

I'm beginning to see the light. What I meant by forming my html/xml straight is without having to assign a style sheet. If I can get a report of my data to look like on screen exactly the way I want my html/xml code then I should be able to print this to a file.

I started a few xml tutorials...I stopped working in IT in early 99 (Netscape Enterprise and SSJS) to teach high school so I haven't seen ANY of this. Now that I'm back in the biz I feel like a luddite.

If anyone could recommend a good xml/xsl tutorial that gears itself towards FM I would again be grateful.

Also Fenton, I would like to see if you are for hire.

Vince

Edited by Guest

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