Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


This topic is 7261 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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

Posted

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

This topic is 7261 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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