Anuviel Posted July 6, 2009 Posted July 6, 2009 (edited) I am exporting via xsl style sheet with the following code: <?xml version='1.0' encoding='utf-8'?> exclude-result-prefixes="fmp" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> seller-id gtin isbn mfg-name mfg-part-number asin seller-sku title description main-image additional-images weight features listing-price msrp keywords product-set-id store-code category-id Fields I chose for the export are all calculation fields, they are not on the layout from which I do the export (only one is, they are all from same table though, if that matters). When I export I get an empty file, no data exported from the fields. The only data that shows is the column headers I hard-coded into xsl. Cannot figure out why nothing is being exported. Do I need to put all of the calc fields on the layout? I put one to test that and no data from that field got exported as well? Edited July 6, 2009 by Guest Empty fields in XSL are & # 09 for tab and & # xD for CR.
Anuviel Posted July 6, 2009 Author Posted July 6, 2009 In the script or in the xsl - this question is getting to me...?
comment Posted July 6, 2009 Posted July 6, 2009 In the xsl - I can't even read your script, but that doesn't matter.
Anuviel Posted July 6, 2009 Author Posted July 6, 2009 Hm, I can see it ok in my code window (xsl), as far as fully understanding it, not quite there but hoping to be shortly. This script (the xsl) is actually one, I believe, you recommended in a previous post of mine. I do not know much about xsl, even less when it comes to it in FM so I do not know what command I need to add to it to export the data from the fields. I am using it to generate a tab delimited file with headers. Basically I am creating a simple form which will generate a file which can then be used to update online data via import / export but it has to be in certain format...
Anuviel Posted July 6, 2009 Author Posted July 6, 2009 I got the xsl code from here: http://fmforums.com/forum/showtopic.php?tid/183442... You pointed me to it in this post http://fmforums.com/forum/showtopic.php?tid/209686/fromactivity/mytopics/ I had it working but obviously I messed somewhere along the line and now cannot figure out what I did wrong. Thank you.
comment Posted July 6, 2009 Posted July 6, 2009 Well, I am not sure what exactly you are trying to do, but in the original stylesheet there is a line that says: which means 'take the value of the current node and put it in the result tree'. Hint: XSL is pretty hard to get right even when you know what you're doing. The probability of stumbling upon the correct code by trial-and-error is very low.
Anuviel Posted July 6, 2009 Author Posted July 6, 2009 Here is the file and the xsl I am using. Note the file is desgined for Buy.com and the export it creates has to conform to their feed specs. IE. No carriage returns in data, extra tabs and so on so basically I created one calc field for every input field -> the calc will hopefully filter out all error input from users... Buy.zip
Anuviel Posted July 6, 2009 Author Posted July 6, 2009 HM, I added that line to the xsl and now the data is coming. Was this all that had to be added? (not really getting it but am trying to...)
comment Posted July 6, 2009 Posted July 6, 2009 I believe those calculations could be done in the stylesheet - but I am afraid a discussion of that would exceed the scope of what's possible in a forum. There are many XSLT tutorials and books out there, if you want to delve deeper.
Anuviel Posted July 6, 2009 Author Posted July 6, 2009 Thanks., I will check. I selected to do them in FM as I do not know enough of XSLT to do it in there. Now that data is coming I will hopefully finish this project soon. Thanks for the advice. :D
Recommended Posts
This topic is 5618 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