Newbies ang9003 Posted October 17, 2006 Newbies Posted October 17, 2006 I am using the simple_table XSLT stylesheet to generate a report. Here is the problem This is a sample of the XML: <?xml version="1.0" encoding="UTF-8" ?>0 And, here is a sample of the XSLT: ?xml version="1.0" encoding="UTF-8"?> xmlns:fmp="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fmp"> ******** etc***************************** Then***************** Staff Report (by Allocations of QI Funds) I am expecting this as my title - Staff Report (by Allocations of QI Funds) 10/17/2006, instead I get Staff Report (by Allocations of QI Funds) 'M/d/yyyy' Any ideas? I need to get the date and even the Time on the report. Thanks
comment Posted October 17, 2006 Posted October 17, 2006 I am no expert on XSLT, but it seems to me you are asking for the date FORMAT (an attribute of the DATABASE element), and that is exactly what you're getting. I believe that in order to get actual date/time, you will need to place them in a field and include that field in your export.
Newbies ang9003 Posted October 18, 2006 Author Newbies Posted October 18, 2006 Thanks for the reply... I understand that the following, that is, NAME, RECORDS, DATEFORMAT, LAYOUT, and TIMEFORMAT, are attributes of the DATABASE element. My question is, how can I populate the DATEFORMAT and TIMEFORMAT attributes???
comment Posted October 18, 2006 Posted October 18, 2006 It doesn't work like that, I'm afraid. An XSLT stylesheet does not populate anything. It transforms existing data. If the data is not there (in the XML source), the stylesheet will not create it for you. The DATEFORMAT attribute is not data; all it says is how a date needs to be interpreted - IF there is a date in the document (and FileMaker itself cheerfully ignores it when importing - but that's another story...).
BobWeaver Posted October 19, 2006 Posted October 19, 2006 Just to add to what Comment said, there will not be any date-of-export or other date/timestamp in the xml that Filemaker produces. You will have to specifically export a field with the date in it and then process that with your xslt.
comment Posted October 19, 2006 Posted October 19, 2006 This would be possible with XSLT 2.0 - but it seems that even FMP 8.5 is still using XSLT 1.0.
Recommended Posts
This topic is 6610 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