OASIS XML Localisation Interchange File Format (XLIFF) TC

  • 1.  Syntext and indentations

    Posted 12-06-2011 13:25
    Hi everyone, I'm using the open-source Syntext editor to edit the 2.0 draft files and I'm running into a problem: Syntext seems to be automatically trying to do some "pretty printing" when it saves the files. For example a section that is originally like this: <para><emphasis>Used in:</emphasis> <olink targetdoc="../elements/inline/ph.xml" targetptr="ph"> <code>&lt;ph&gt;</code></olink>.</para> (no line breaks) Ends up like this: <para><emphasis>Used in:</emphasis> <olink targetdoc="../elements/inline/ph.xml" targetptr="ph"> <code>&lt;ph&gt;</code> </olink> </para> (extra line breaks and indentation) This is a problem because it adds at least one space between <olink> and <code> and result in weirdly spaced links in the PDF/HTML output. Does anyone knows how to turn off this auto-indentation feature in Syntext? I haven't find the option, and I can't believe there is no way to not do this. Obviously I'm guessing Rodolfo could come up with a clever extra XSLT step to remove the extra white spaces between <olink> and <code> when doing the merge, but it would be better to avoid the problem altogether. Thanks, -yves


  • 2.  RE: [xliff] Syntext and indentations

    Posted 12-06-2011 15:08
    Hi Yves, As you probably know, space is irrelevant in XML. But the prescribed way to make it relevant is with xml:space ( http://www.w3.org/TR/xml11/#sec-white-space ). I'm not sure if Syntext honors xml:space, but in the distant past I've had success with other XML editors by adding a doctype subset and added xml:space (preserve) attributes. Also, if there's a default XSLT stylesheet Sytnext uses, you can set the <xsl:preserve-space elements="olink"> element. I'll try to goof with this a bit and see if I can get it to work in Sytext. - Bryan ________________________________________ From: xliff@lists.oasis-open.org [xliff@lists.oasis-open.org] On Behalf Of Yves Savourel [ysavourel@enlaso.com] Sent: Tuesday, December 06, 2011 5:25 AM To: 'XLIFF TC' Subject: [xliff] Syntext and indentations Hi everyone, I'm using the open-source Syntext editor to edit the 2.0 draft files and I'm running into a problem: Syntext seems to be automatically trying to do some "pretty printing" when it saves the files. For example a section that is originally like this: <para><emphasis>Used in:</emphasis> <olink targetdoc="../elements/inline/ph.xml" targetptr="ph"> <code>&lt;ph&gt;</code></olink>.</para> (no line breaks) Ends up like this: <para><emphasis>Used in:</emphasis> <olink targetdoc="../elements/inline/ph.xml" targetptr="ph"> <code>&lt;ph&gt;</code> </olink> </para> (extra line breaks and indentation) This is a problem because it adds at least one space between <olink> and <code> and result in weirdly spaced links in the PDF/HTML output. Does anyone knows how to turn off this auto-indentation feature in Syntext? I haven't find the option, and I can't believe there is no way to not do this. Obviously I'm guessing Rodolfo could come up with a clever extra XSLT step to remove the extra white spaces between <olink> and <code> when doing the merge, but it would be better to avoid the problem altogether. Thanks, -yves --------------------------------------------------------------------- To unsubscribe, e-mail: xliff-unsubscribe@lists.oasis-open.org For additional commands, e-mail: xliff-help@lists.oasis-open.org


  • 3.  RE: [xliff] Syntext and indentations

    Posted 12-06-2011 15:15
    Hi Bryan, Yves cannot change the XSL stylesheets, they are provided by OASIS. I suggested Yves to try XXE, a free XML editor that supports DocBook, and he agreed. If it doesn't help, I'll modify the pre-processor tool that generates unified specification. Regards, Rodolfo -- Rodolfo M. Raya rmraya@maxprograms.com Maxprograms http://www.maxprograms.com >


  • 4.  RE: [xliff] Syntext and indentations

    Posted 12-06-2011 15:32
    Hi Rodolfo, Sounds good. Thanks for the solution. But I'll still (for my own curiosity) experiment. If the XSLT solution is not viable because of the OASIS stylesheet limitation, there's nothing to stop me from adding a doctype subset (ah, one of the reasons I love XML, it has universal rules). Just for fun, I'll report my results. - Bryan ________________________________________ From: xliff@lists.oasis-open.org [xliff@lists.oasis-open.org] On Behalf Of Rodolfo M. Raya [rmraya@maxprograms.com] Sent: Tuesday, December 06, 2011 7:14 AM To: xliff@lists.oasis-open.org Subject: RE: [xliff] Syntext and indentations Hi Bryan, Yves cannot change the XSL stylesheets, they are provided by OASIS. I suggested Yves to try XXE, a free XML editor that supports DocBook, and he agreed. If it doesn't help, I'll modify the pre-processor tool that generates unified specification. Regards, Rodolfo -- Rodolfo M. Raya rmraya@maxprograms.com Maxprograms http://www.maxprograms.com >


  • 5.  RE: [xliff] Syntext and indentations

    Posted 12-06-2011 15:35
    Hi Bryan, The problem with Syntext is that it actually *adds* spaces by itself in order to try to pretty-print the saved file. That's just silly. Following Rodolfo's advice I've installed XXE and it seems to handle spaces properly. It does wrap the saved file, but do that in no-significant places (between attributes or where there are already spaces). It also handles XInclude, not as seamlessly as Syntext (it doesn't allow in-place editing), but it's good enough for our use. I'll keep working with it and report if I run in any significant trouble. Thanks, -yves


  • 6.  RE: [xliff] Syntext and indentations

    Posted 12-06-2011 15:54
    Great! I'll try XXE (and still, stubbornly, experiment with Syntext, just for fun). Thanks Yves and Rodolfo for solving this. - Bryan ________________________________________ From: xliff@lists.oasis-open.org [xliff@lists.oasis-open.org] On Behalf Of Yves Savourel [ysavourel@enlaso.com] Sent: Tuesday, December 06, 2011 7:31 AM To: xliff@lists.oasis-open.org Subject: RE: [xliff] Syntext and indentations Hi Bryan, The problem with Syntext is that it actually *adds* spaces by itself in order to try to pretty-print the saved file. That's just silly. Following Rodolfo's advice I've installed XXE and it seems to handle spaces properly. It does wrap the saved file, but do that in no-significant places (between attributes or where there are already spaces). It also handles XInclude, not as seamlessly as Syntext (it doesn't allow in-place editing), but it's good enough for our use. I'll keep working with it and report if I run in any significant trouble. Thanks, -yves --------------------------------------------------------------------- To unsubscribe, e-mail: xliff-unsubscribe@lists.oasis-open.org For additional commands, e-mail: xliff-help@lists.oasis-open.org