RE: FM 7.2 XSLT and unicode characters
At 05:55 AM 5/8/2006, Wim Hooghwinkel \(Scriptware\) wrote: I can't get the character entitie displayed correct in FrameMaker, it either becomes a variable (with the unicode value or (when mapped in the rules file) a wrong character? Wim, Make sure your r/w rules specify FrameMaker character codes rather than Unicode character codes. See the online character sets manual for specific values. --Lynne Lynne A. Price Text Structure Consulting, Inc. Specializing in structured FrameMaker consulting, application development, and training [EMAIL PROTECTED]http://www.txstruct.com voice/fax: (510) 583-1505 cell phone: (510) 421-2284 ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
RE: FM 7.2 XSLT and unicode characters
Thnak you. one question: if you say - does this mean that the whole target XML will be in ASCII or only the 'changed' parts? What effect would this have on other unicode characters that we don't want to convert? And: can such a XSLT also be used on export of XML to transform the ASCII back to Unicode without loss of data? Met vriendelijke groet / kind regards, Wim Hooghwinkel [EMAIL PROTECTED] DTP and XML Management Scriptware bv http://www.scriptware.nl tel : +31 (0)23 548 48 84 fax : +31 (0)23 548 48 85 http://www.scriptware.nl [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: John Root [mailto:[EMAIL PROTECTED] Sent: Saturday, May 06, 2006 9:43 PM To: Wim Hooghwinkel (Scriptware); Framers List Subject: Re: FM 7.2 XSLT and unicode characters Hi Wim, There is no if-else functionality in XSL. Instead, you use xsl:choose with a series of nested xsl:when elements and an optional final xsl:otherwise. i.e.: Do something Do something else Perform some default action If I understand correctly what you're trying to do, you'd want your intermediate transform to output ASCII or whatever encoding you require by using an xsl:output element as a child of xsl:stylesheet: You would use a standard copy type scenario but include a template for text that calls the transform function. So your transform would look something like this: http://www.w3.org/1999/XSL/Transform";> /xsl:otherwise> Hope this helps, John On 5/5/06 2:43 AM, "Wim Hooghwinkel (Scriptware)" <[EMAIL PROTECTED]> wrote: > Hello all, > > I am trying to create a XSLT template to transform uncode characters to ansii > on import of XML in FM. This concerns the unicode characters for CE/EE > languages that can not be read by FM. > > As I don't have any experience with XSLT, could anyone point me in the right > direction? Probably need a kind of if-else construction or variables to use > the 'transate' function. > > How does FM react when an XSLT refers to Javascript? > > > Met vriendelijke groet / kind regards, > > Wim Hooghwinkel [EMAIL PROTECTED] > DTP and XML Management ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
RE: FM 7.2 XSLT and unicode characters
Thank you, very helpfull. Whe you say: translate Unicode characters to character entities (e.g., č) I can't get the character entitie displayed correct in FrameMaker, it either becomes a variable (with the unicode value or (when mapped in the rules file) a wrong character? Met vriendelijke groet / kind regards, Wim Hooghwinkel [EMAIL PROTECTED] DTP and XML Management Scriptware bv http://www.scriptware.nl tel : +31 (0)23 548 48 84 fax : +31 (0)23 548 48 85 http://www.scriptware.nl [EMAIL PROTECTED] [EMAIL PROTECTED] ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
Re: FM 7.2 XSLT and unicode characters
Wim, I would take a look at the XSLT 2.0 'character-map' statement. See http://www.w3.org/TR/xslt20/#dt-character-map for details. It was designed to handle this sort of problem. You will need to run the XSLT transform using an XSLT 2.0-compliant processor. Note that FrameMaker 7.2 provides an XSLT 1.0-compliant processor. This is reasonable, since XSLT 2.0 has not yet been finalized by the W3C. Using xsl:choose to test for the presence of multiple Unicode characters is problematic. When any single xsl:choose test evaluates to 'true', subsequent tests are not invoked. Also, you are likely to want to translate Unicode characters to character entities (e.g., č), and the translate() function will only map to single replacement characters. Javascript should not cause any problems, as long as XML special characters in the Javascript are escaped in the result of the transformation. (e.g., '<' must be represented as '<'). -Alan Wim Hooghwinkel (Scriptware) wrote: Hello all, I am trying to create a XSLT template to transform uncode characters to ansii on import of XML in FM. This concerns the unicode characters for CE/EE languages that can not be read by FM. As I don't have any experience with XSLT, could anyone point me in the right direction? Probably need a kind of if-else construction or variables to use the 'transate' function. How does FM react when an XSLT refers to Javascript? Met vriendelijke groet / kind regards, Wim Hooghwinkel [EMAIL PROTECTED] DTP and XML Management -- Alan Houser, President Group Wellesley, Inc. 412-363-3481 www.groupwellesley.com ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
Re: FM 7.2 XSLT and unicode characters
Hi Wim, There is no if-else functionality in XSL. Instead, you use xsl:choose with a series of nested xsl:when elements and an optional final xsl:otherwise. i.e.: Do something Do something else Perform some default action If I understand correctly what you're trying to do, you'd want your intermediate transform to output ASCII or whatever encoding you require by using an xsl:output element as a child of xsl:stylesheet: You would use a standard copy type scenario but include a template for text that calls the transform function. So your transform would look something like this: http://www.w3.org/1999/XSL/Transform";> /xsl:otherwise> Hope this helps, John On 5/5/06 2:43 AM, "Wim Hooghwinkel (Scriptware)" <[EMAIL PROTECTED]> wrote: > Hello all, > > I am trying to create a XSLT template to transform uncode characters to ansii > on import of XML in FM. This concerns the unicode characters for CE/EE > languages that can not be read by FM. > > As I don't have any experience with XSLT, could anyone point me in the right > direction? Probably need a kind of if-else construction or variables to use > the 'transate' function. > > How does FM react when an XSLT refers to Javascript? > > > Met vriendelijke groet / kind regards, > > Wim Hooghwinkel [EMAIL PROTECTED] > DTP and XML Management ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.