October 29, 201411 yr Hello all, I'm grafting an XSL to generate text in Final Cut Pro 7, it works fine except I need the carriage return " " Like so <value>Client: Agency: Product: Clock Number: Title: Duration: Aspect: Audio Type: Language:</value> Trouble is that the result is: "& #13;" I've read in Filemakers "Developing FileMaker XSLT stylesheets" PDF (Page 69) that I need to use the function: fmxslt:break_encode(String value) and to disable-output-escaping attribute of the <xsl:value-of> and <xsl:text> elements set to “yes” (disable-output-escaping="yes"). Could someone please explain to me with an example of how I could formulate this. Regards Ian
October 29, 201411 yr I am not sure I understand the context here. Is this part of your XSLT stylesheet? <value>Client: Agency: Product: Clock Number: Title: Duration: Aspect: Audio Type: Language:</value> And you are using this to export your records from Filemaker Pro? If yes to both, what is the actual output you are hoping to get out of this?
October 29, 201411 yr Author It's yes to both This will/does generate a text slate in a FCP timeline at the moment it returns: "A CompanyA AgencyA ProductA Clock Number" instead of: A Company A Agency A Product A Clock Number Because the resulting XML has "& #13;" instead of " ". Hence I need to I need to use the function: fmxslt:break_encode(String value)
October 29, 201411 yr What is the output method of your stylesheet (if it's not too big, why don't you just post the whole of it). BTW, there is no fmxslt:break_encode() function in this (exporting) environment. The fmxslt extension functions are only available in CWP. --- Ahm, one more thing: why do you expect: A Company A Agency A Product A Clock Number ... and so on, when your code says Client Agency Product ... Those are literal text strings, not field values.
October 29, 201411 yr Author Sorry yes I was using it as an example. One thing before I post it, how do I generate the box to place the code in?
October 29, 201411 yr Select the text and click the code <> button. However, before you do that, see if this works for you: <xsl:text>Client: Agency: Product: Clock Number: Title: Duration: Aspect: Audio Type: Language:</xsl:text>
October 29, 201411 yr Author This is my Calc field in FMP Client & " " & Agency This is my XSL: <name>Text</name> <effectid>Text</effectid> <effectcategory>Text</effectcategory> <effecttype>generator</effecttype> <mediatype>video</mediatype> <parameter> <parameterid>str</parameterid> <name>Text</name> <value> <xsl:for-each select="fmp:COL[1]"> <xsl:value-of select="fmp:DATA"/> </xsl:for-each> </value> </parameter> <parameter> This is the result XML: <effectcategory>Text</effectcategory> <effecttype>generator</effecttype> <mediatype>video</mediatype> <parameter> <parameterid>str</parameterid> <name>Text</name> <value>Swiss Tourism&#13;Online Video 46 AG</value> </parameter> <parameter> This is what it should look like: <effectcategory>Text</effectcategory> <effecttype>generator</effecttype> <mediatype>video</mediatype> <parameter> <parameterid>str</parameterid> <name>Text</name> <value>Swiss Tourism Online Video 46 AG</value> </parameter> <parameter>
October 29, 201411 yr Instead of: <value> <xsl:for-each select="fmp:COL[1]"> <xsl:value-of select="fmp:DATA"/> </xsl:for-each> </value> use: <value> <xsl:value-of select="fmp:COL[1]/fmp:DATA" disable-output-escaping="yes"/> </value> BTW, you don't need the calculation field for this. You can achieve the same result by: <value> <xsl:value-of select="fmp:COL[1]/fmp:DATA"/> <xsl:text disable-output-escaping="yes">&#13;</xsl:text> <xsl:value-of select="fmp:COL[2]/fmp:DATA"/> </value> where COL[1] is Client and COL[2] is Agency.
October 30, 201411 yr Author Hey perfect, it works great. I did start with the separate COL[1] and COL[2] format, but I found it more flexible to use a calc field in FMP Thanks a lot Ian
October 30, 201411 yr I found it more flexible to use a calc field in FMP My policy is to push everything that serves only the export out to the XSLT stylesheet.
October 30, 201411 yr Author Maybe I should have said in this instance, I've done a couple of other XSLT stylesheets where it would have been impossible to use just one calc field.
Create an account or sign in to comment