Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

I need help understanding XSL


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

Recommended Posts

Posted

I have little problem understanding how to use XSL.

This is what I have done:

I created filemaker database with few fields and 3 records, then I created XSL file and did File->Export records->XML->XMLDSO and applied my XSL to it. I got file that looks like HTML, but with .xml extention, IE complains to it's syntax if I try to open it in IE. Am I suppose to rename it to HTML?

And to create an online system that talks to running database, how do I get it to work with XSL? I don't want to keep exporting records.

I'm attaching files that I have created.

Version: v6.x

Platform: Windows XP

xml.zip

Posted

When you export, you can specify what you want to name the file. Even if you export XML, you can still name it foo.htm, instead of foo.xml. If IE is complaining about the syntax, you may have an error in the XSL transformation. Its difficult to help without more information about your XSL and the error you're getting.

Regarding your desire to publish a web application based on FileMaker, the following thread may be helpful:

http://www.fmforums.com/threads/showflat.php/Cat/0/Number/93508/page/0/view/collapsed/sb/5/o/all/

The following tools will enable you to communicate with FileMaker from a web scripting language:

PHP: Use the FX class written by Chris Hansen:

www.iviking.org

ASP: Use the FMP class:

http://mariano.petersonpages.com/demo/asp/FMPasp_v0-2.zip

Perl: Take a look at this example on how to use Perl with FileMaker:

http://mariano.petersonpages.com/demo/perl/fmp_perl.zip

Posted

I have choice of XML or PHP, and we have couple of sites done in CDML. I thought I would try both and see what works better for me.

Naming file with .html extention helped - opens in IE fine now, thanks.

I still have question - will I always have to export records for use with XML? That doesn't sound good, for example - you don't have to export records to run CDML. I'm sure there is a way to do it, but I cannot figure out how.

Thank you

Posted

You should really take a look at this:

http://www.fmforums.com/threads/showflat.php/Cat/0/Number/93508/page/0/view/collapsed/sb/5/o/all/#93577

Be sure to read the section, "A word about XML, XSL, and FileMaker".

As far as having a choice between XML and PHP, you probably end up using both (and you probably mean XSL, not XML -- XML is just a data format for carrying data, like a .TAB or .CSV file, where as XSL is a language for transforming XML into something more visually appealing, like HTML). Using XML/XSL alone to create a FileMaker based web application is very limiting and will cause you a lot of problems. XSL is not a scripting language, but more of a style setting and transformation language.

PHP is a scripting language. It provides powerful scripting capabilities not present in XSL. Chris Hansen has written an excellent tool (FX.php, available freely at www.iviking.org) that allows PHP to communicate with FileMaker. Using the FX class for PHP, your PHP can send commands to FileMaker (new, delete, edit, etc) and retrieve data from FileMaker in real time as well. You should really take a look at this tool, as it circumvents the problem you described of having to periodically export XML files.

By the way, the FX class communicates with FileMaker via HTTP and XML, and uses XSL to manipulate the XML as it builds an instance of the FX class. However, you don't need to know any XML or XSL at all to use the FX class quite successfully. This is just an example of what I meant regarding using both technologies, as opposed to one or the other.

Posted

Thank you, thank you

I still don't understand exctly what I will have to do, but I will try and return if it won't work out.

Thank you very much for your help.

Posted

Look at your XSL template names. PhoneNumber at the top, "PhoneNmber" further down. Typos, they'll get you every time. XSL is case-sensitive also, another "gotcha."

The result was that the PhoneNmber template did not match, the number was still output (XSL's default is to output text if no template matches tell it not to). But the number didn't get its <TD> tags, leaving it loose inside the <TR>, so it's an HTML error.

You might also want to "exclude" the FileMaker namespace from the HTML result. See the last phrase in this stylesheet tag:

<xsl:stylesheet version="1.0"

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

xmlns:fmp="http://www.filemaker.com/fmpdsoresult"

exclude-result-prefixes="fmp">

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