October 17, 200619 yr Newbies 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
October 17, 200619 yr 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.
October 18, 200619 yr Author Newbies 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???
October 18, 200619 yr 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...).
October 19, 200619 yr 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.
October 19, 200619 yr This would be possible with XSLT 2.0 - but it seems that even FMP 8.5 is still using XSLT 1.0.
Create an account or sign in to comment