Ians Posted October 29, 2014 Posted October 29, 2014 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
comment Posted October 29, 2014 Posted October 29, 2014 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?
Ians Posted October 29, 2014 Author Posted October 29, 2014 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)
comment Posted October 29, 2014 Posted October 29, 2014 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.
Ians Posted October 29, 2014 Author Posted October 29, 2014 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?
comment Posted October 29, 2014 Posted October 29, 2014 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>
Ians Posted October 29, 2014 Author Posted October 29, 2014 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>
comment Posted October 29, 2014 Posted October 29, 2014 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.
Ians Posted October 30, 2014 Author Posted October 30, 2014 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
comment Posted October 30, 2014 Posted October 30, 2014 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.
Ians Posted October 30, 2014 Author Posted October 30, 2014 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.
Recommended Posts
This topic is 3943 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 accountSign in
Already have an account? Sign in here.
Sign In Now