Ians Posted November 2, 2012 Posted November 2, 2012 Hello everyone, I've had a look around in the forum, but found there is no "XSL generator" as such so I was wondering if someone could help / guide me on generating a XSL sheet to export XML from FMP. I work at a Video Post Production house, where we have a proprietary tape archive database that can export a timecode list as CSV, the capturing software we use imports apart from some more exotic formats XML. It seems quite simple enough after ones first try maybe, but I just don't know where to start. I've attached a example DB and an example XML capture list from the capturing software. Any help would be grand Regards Ian Batch List Generator.zip
comment Posted November 2, 2012 Posted November 2, 2012 I'd like to help, but I haven't installed v.12 yet. Do you want to import the example XML, or export XML in the same format?
Ians Posted November 2, 2012 Author Posted November 2, 2012 Hello comment, I'd like to export XML in the same format, I've renamed my field's to the same as in the XML example. basically it's just 6 text fields. Here's a screen grab
comment Posted November 2, 2012 Posted November 2, 2012 Could you export your data as XML, using FPMXMLRESULT grammar and no stylesheet, and post it here (preferably zipped)? The other question is about the TAPENAMELIST that precedes the RECORDLIST: if you really need this, it will take some extra work to collect them from the exported records.
Ians Posted November 2, 2012 Author Posted November 2, 2012 Here you are. The TAPENAMELIST could be "hardwired" ie. VTR15 Batch List.zip
comment Posted November 2, 2012 Posted November 2, 2012 Try the attached. Note: 1. The TAPENAMELIST contains only one TAPENAME, taken from the first exported record. 2. The order of the exported fields is important; if you change this, you need to change the COL numbers in the stylesheet to match them back to their corresponding attributes. ExportStreamZ.xsl.zip
Ians Posted November 2, 2012 Author Posted November 2, 2012 Thanks a lot I'm trying it out, I just noticed that <RECORDLIST> should be: <RECORDLIST fps="25" timecodewrapping="nowrap"> Can I just add that myself? If I wanted to make the value of fps variable, What could I add to achieve this, assign a attribute from say COL [7]?
Ians Posted November 2, 2012 Author Posted November 2, 2012 Perfect it works a treat, many thanks for your help If you could just enlighten me on assigning attributes (or point me to where) I'd be also very grateful
comment Posted November 2, 2012 Posted November 2, 2012 Try: http://www.w3schools.com/xsl/el_attribute.asp
comment Posted November 3, 2012 Posted November 3, 2012 Just for good measure, I have modified the stylesheet to list all unique tape names included in the exported set. It uses a Xalan processor-specific function, so it's kinda difficult to test using third-party software. Compressed file.zip
Ians Posted November 7, 2012 Author Posted November 7, 2012 Thanks for the tip about the W3 site it looks very helpful, is there also a kind of "you definitely need this structure for FMP XML import / export" tutorial somewhere? Thanks also for the modified style sheet, in fact the original stylesheet is perfect as the batches will always come from the same tape each time.
comment Posted November 7, 2012 Posted November 7, 2012 is there also a kind of "you definitely need this structure for FMP XML import / export" tutorial somewhere? There used to be one in Filemaker Advisor, but I can no longer find it. I suggest you study the file exported as FMPXMLRESULT with no stylesheet. That is your starting point when exporting and also the desired end result when importing. Thanks also for the modified style sheet, in fact the original stylesheet is perfect Ah, but the challenge!
Ians Posted November 7, 2012 Author Posted November 7, 2012 Thanks again for your valuable help and advice, It's people like you one always feels indebted to
Recommended Posts
This topic is 4467 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 accountSign in
Already have an account? Sign in here.
Sign In Now