You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2011/03/03 18:02:19 UTC

DO NOT REPLY [Bug 50865] New: hyphenation in multi-languages document is only working for the master language

https://issues.apache.org/bugzilla/show_bug.cgi?id=50865

           Summary: hyphenation in multi-languages document is only
                    working for the master language
           Product: Fop
           Version: all
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: page-master/layout
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: eric@yojik.eu


Hi,

I have a docbook document in 2 languages: The document itself is in English,
but there are many parts in Russian. I can have hyphenation for the English
language but not with the Russian parts (the languages may be mixed in some
paragraphs.)

I use oXygen (the latest), and xmlmind (the latest) on Linux.

I tried many ways to get what I wanted: the Russian parts are taggued as
foreignphrases and lang=ru. I tried to only set the lang attribute, but with no
result.

Is there a way to have the hyphenation working with 2 languages?

Thanks for your help,

Eric

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50865] hyphenation in multi-languages document is only working for the master language

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50865

Glenn Adams <gl...@skynav.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #5 from Glenn Adams <gl...@skynav.com> 2012-04-08 05:05:39 UTC ---
please provide minimal input FO file, output PDF file(s), and all console
output demonstrating problem

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50865] hyphenation in multi-languages document is only working for the master language

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50865

--- Comment #2 from Glenn Adams <gl...@skynav.com> 2011-03-03 15:27:44 EST ---
I believe this is an interpretation (and thus implementation) error, rather
than a spec error.

Every #PCDATA character in FO is modeled as an anonymous, individual
fo:character, whether explicitly wrapped in fo:character or not (see 1.1.2):

"As part of the step of objectifying, the characters that occur in the result
tree are replaced by fo:character nodes."

Since the "language" property applies to fo:character (along with the other
common hyphenation properties), and since it is inherited, then during property
refinement, the appearance of the language property on an ancestor, e.g.,
fo:wrapper, fo:inline, etc., applies for the purpose of determining the
language of these anonymous fo:character FOs.

So, in fact, "ignoring fo:character" is the fundamental error here. You can't
ignore fo:character for hyphenation properties that might be specified on
inline, wrapper, etc.

G.

(In reply to comment #1)
> The problem is most likely caused by the FO specification, which makes
> hyphenation
> properties, including the language relevant for hyphenation, only effective on
> fo:block, which corresponds to DocBook paragraph level elements (ignoring
> fo:character here). The ForeignPhrase DocBook element appears to be an inline
> element, therefore changing the language here is ignored. You can check for
> yourself by generating and examining the FO output for your DocBook source.
> For further reference, see http://www.w3.org/TR/xsl/
> 
> I'll leave this report open because honoring the language on fo:inline,
> fo:wrapper and perhaps other inline flow elements would make an useful
> extension.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50865] hyphenation in multi-languages document is only working for the master language

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50865

--- Comment #6 from Glenn Adams <ga...@apache.org> 2012-04-24 05:34:21 UTC ---
(In reply to comment #5)
> please provide minimal input FO file, output PDF file(s), and all console
> output demonstrating problem

Streit, I am still awaiting your input as requested above. if I see no further
input by April 30, I will close this bug due to lack of requested information.
Regards, Glenn

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50865] hyphenation in multi-languages document is only working for the master language

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50865

Glenn Adams <gl...@skynav.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50865] hyphenation in multi-languages document is only working for the master language

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50865

Andreas L. Delmelle <ad...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|PC                          |All
         OS/Version|Linux                       |All

--- Comment #3 from Andreas L. Delmelle <ad...@apache.org> 2011-03-03 16:10:56 EST ---
(In reply to comment #2)
> I believe this is an interpretation (and thus implementation) error, rather
> than a spec error.
> 
> Every #PCDATA character in FO is modeled as an anonymous, individual
> fo:character, whether explicitly wrapped in fo:character or not (see 1.1.2):
> 
> "As part of the step of objectifying, the characters that occur in the result
> tree are replaced by fo:character nodes."

Yep, that sounds about right.

org.apache.fop.fo.FOText is already bound to the correct Common Hyphenation
properties. Since they are inherited, regardless of whether they /apply/ to a
parent fo:inline or fo:wrapper, those specified values are available to the
layout engine through FOText.getCommonHyphenation(). 
The real defect seems to be that they are simply not taken into account when
hyphenation is triggered in LineLayoutManager. Its hyphenationProperties member
is only set once, in initialize(), and taken from the Block associated to its
parent BlockLayoutManager...

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50865] hyphenation in multi-languages document is only working for the master language

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50865

--- Comment #4 from Glenn Adams <gl...@skynav.com> 2012-04-07 01:43:54 UTC ---
resetting P2 open bugs to P3 pending further review

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50865] hyphenation in multi-languages document is only working for the master language

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50865

--- Comment #1 from J.Pietschmann <j3...@yahoo.de> 2011-03-03 15:12:25 EST ---
The problem is most likely caused by the FO specification, which makes
hyphenation
properties, including the language relevant for hyphenation, only effective on
fo:block, which corresponds to DocBook paragraph level elements (ignoring
fo:character here). The ForeignPhrase DocBook element appears to be an inline
element, therefore changing the language here is ignored. You can check for
yourself by generating and examining the FO output for your DocBook source.
For further reference, see http://www.w3.org/TR/xsl/

I'll leave this report open because honoring the language on fo:inline,
fo:wrapper and perhaps other inline flow elements would make an useful
extension.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.