Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I'm working on an XML export from a Products table using a simple XSLT stylesheet with FileMaker Pro/Server v13.

 I've been asked to make one change to the export to include the date the file was generated in YYYY-MM-DD format. For example it currently starts like this:

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

<contacts>

  <contact>

 and they would like it to now start like this:

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

<contacts Date="2015-06-02">

  <contact>

My XSLT skills are pretty basic - can anyone show me how to include the date via XSLT? Do I need to create a field just for this purpose or can XSLT do this for me without needing to reference a FileMaker field?

 

thanks,

Steve

Filemaker's XSLT engine can do this for you without requiring a Filemaker field, with the help of an EXSLT extension function. It would be helpful to see your existing stylesheet to give more precise instructions, but it's probably only a matter of replacing:

<contacts>

with:

<contacts Date="{substring-before(date:date-time(), 'T')}">

and adding the extension's namespace declaration to the stylesheet element, so that it looks like:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fmp="http://www.filemaker.com/fmpxmlresult"
xmlns:date="http://exslt.org/dates-and-times"
exclude-result-prefixes="fmp date">

 

  • Author

Thank you so much - that's awesome and it worked perfectly. I wasn't sure if you could generate the current date string via XSLT or whether I would need to add a field for this.

Many thanks again.

 

Filemaker's XSLT engine can do this for you without requiring a Filemaker field, with the help of an EXSLT extension function. It would be helpful to see your existing stylesheet to give more precise instructions, but it's probably only a matter of replacing:

<contacts>

with:

<contacts Date="{substring-before(date:date-time(), 'T')}">

and adding the extension's namespace declaration to the stylesheet element, so that it looks like:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fmp="http://www.filemaker.com/fmpxmlresult"
xmlns:date="http://exslt.org/dates-and-times"
exclude-result-prefixes="fmp date">

 

Filemaker's XSLT engine can do this for you without requiring a Filemaker field, with the help of an EXSLT extension function. It would be helpful to see your existing stylesheet to give more precise instructions, but it's probably only a matter of replacing:

<contacts>

with:

<contacts Date="{substring-before(date:date-time(), 'T')}">

and adding the extension's namespace declaration to the stylesheet element, so that it looks like:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fmp="http://www.filemaker.com/fmpxmlresult"
xmlns:date="http://exslt.org/dates-and-times"
exclude-result-prefixes="fmp date">

 

Filemaker's XSLT engine can do this for you without requiring a Filemaker field, with the help of an EXSLT extension function. It would be helpful to see your existing stylesheet to give more precise instructions, but it's probably only a matter of replacing:

<contacts>

with:

<contacts Date="{substring-before(date:date-time(), 'T')}">

and adding the extension's namespace declaration to the stylesheet element, so that it looks like:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fmp="http://www.filemaker.com/fmpxmlresult"
xmlns:date="http://exslt.org/dates-and-times"
exclude-result-prefixes="fmp date">

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.