Jump to content
Server Maintenance This Week. ×

Adding an XSLT file


Simon K

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

Recommended Posts

Hi everyone,

I have a very short xml file see below - it seems a really good one to start with - I know I have to have an xslt file to work with this to convert it to fmpxmlresult grammar.

Are there any guides on how to write the xslt?

Many thanks

XML example as follows:

Link to comment
Share on other sites

P.S. You don't really need the "count()" stuff, for the number of records. Nor do you need the fancy MODID or RECORDID attribute counts. FileMaker is happy to import them if they're blank, or whatever number, as long as the attribute is there. So, a simpler alternative xsl for the same thing,

Oh, one thing. The <?xml version="1.0"?> element, with the optional encoding attribute, must be absolutely the 1st thing in the file, no spaces before it or nothin'.

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

0

Edited by Guest
Link to comment
Share on other sites

No, I'll attach a file. If you look carefully at the example code I pasted into the post, you will see that the PHP engine of the forum has screwed it up. If I enclose it with a "code" tag (1st post), then it drops the "?>" end of the xml declaration. If I don't enclose it with a a "code" tag, it translates the ">" at the end of the "for-each" line into "&g t;". Either of these would stop it from validating or working as an xsl file. That is why I suggested attaching your xml file. Except for the simplest xml, it is impossible to post it directly without it getting subtly screwed up. Which doesn't help a beginner much.

Download the attached file instead.

PCML_2.xsl.zip

Link to comment
Share on other sites

Hi Fenton,

Have been having a go with this - doing pretty well (up to a point!)

Did actually make a manual import work - ie up to the point where you had to match the XML fields up to target fields so fantastic.

BUT

absolutely no luck in a script with an import

message is as follows:

"XML Parsing error

An exception occured

Type: NetAccessorException

Message: Could not open file {0}

Line no 0

columnn no 0"

And this was after it had worked on a manual import?

Any clues?

Cheers

Simon

Link to comment
Share on other sites

Hi guys

Fenton, thank you for all your help earlier.

No matter what I try to do to solve the probem (including stopping and restarting server, closing databases etc)

...When I try and do a direct import or a scripted import all I get is the error message:

"XML Parsing error

An exception occured

Type: NetAccessorException

Message: Could not open file {0}

Line no 0

columnn no 0"

Do you or anybody else have any clue what to do about this - I am sure that the everything else would work - if it could only deal with this error

Many thanks

Simon

Link to comment
Share on other sites

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