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.

CDML to XSLT conv. with "Inline" and "Include"

Featured Replies

I had some images for a web page header pulled in by a CDML inline-action and it worked wonderfully. I used an Include file to make the headers on everypage the same. Now that it has been converted to XSLT it doesn't work, even though the xsl is valid and well-formed. The URL is 209.114.248.9 - you'll see roughly what the header looks like on the index page, but when you click Day-Timer (usr=Admin, pwd=joetrox2), the first search page comes up nicely except for the header images...

Any ideas? Help?

Unfortunately, the CDML2XSLT converter has two drawbacks:

1) for FMP-Include, it really incorporates the part to be included into the XSLT file and therefore destroys the original sense of FMP-Include, namely the possibility of providing a library of frequently used parts like headers, navigation bars, record navigation and so on.

2) it can not convert nested FMP-InlineActions or FMP-InlineAction e.g. used within a <a href=".....&[FMP-InlineAction: ...]& ...">.

Well, I don't expect that the converter can do everything, and the developers at FM really have done an excellent job at it, and I'm amazed how good it works.

For problem 1) I first comment out all FMP-Includes in the CDML before conversion, e.g. [FMP-Include: filename] --> <!-- include: filename -->. In the XSLT code of the main file, I add a <xsl:include href="filename"/> at the very beginning. The XSLT code in the include file "filename" contains a <xsl:template name="somename"> ... with the XSLT code that will be included. In the main file I replace the <xsl:comment>[CDATA[ filename ...</xsl:comment> with a <xsl:call-template name="somename"> .

Problem 2) has to be solved manually, e.g. by inspection of the converted XSLT code. The inner FMP-InlineAction will have to be taken outside (i.e. must be preprocessed), e.g. by programming XSLT code corresponding to this action and storing the result in a variable (<xsl:variable name="somename">code for inlineactioon</xsl:variable>). The variable can the used within other tags with a <xsl:value-of select="$somename"/>.

In my opinion, XSLT offers many big advantages over CDML : variables provide much more flexibility, subroutines ("templates") to which parameters can be passed allow for code reuse. And one begins to program ideas that were not possible before, e.g. querying two databases within the same document and mixing the results ...

Martin

  • Author

Thanks Martin, I'll try your suggestions. I've been slowly figuring it out by using the site assistant to create the base functionality then adding back the pieces.

I agree, XSLT does have big advantages over CDML. I'm excited at the possibilities, just not excited at learning another language right now! :-) (later would be better!)

Tony

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.