Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mixed content not handled correctly #3

Open
lb42 opened this issue May 9, 2022 · 2 comments
Open

mixed content not handled correctly #3

lb42 opened this issue May 9, 2022 · 2 comments
Assignees

Comments

@lb42
Copy link

lb42 commented May 9, 2022

A run like thus

<run top="755" left="194" width="486" height="16" size="15" rendition="#f17">
 <i xmlns="">by a</i> CLIENT<i xmlns=""> whom  the</i> LADY<i xmlns=""> and</i> GENTLEMAN<i xmlns=""> join.</i>
</run>

becomes

 <run top="755" left="194" width="486" height="16" size="15" rendition="#f17">
 <hi rend="italics">by a whom  the and join.</hi> CLIENT LADY GENTLEMAN
 </run>

when processed by pt3.xsl

@dariok dariok self-assigned this May 21, 2022
@lb42
Copy link
Author

lb42 commented Jun 13, 2022

The problem is with the template for *:i which includes
<xsl:apply-templates select="node() | following-sibling::*[self::*:i]/node()"/>
the effect of which is to destroy the order of the components inside mixed content. As a temporary fix, I changed this to simply <xsl:apply-templates select="node()"/> . This means we may have multiple consecutive <hi> elements which should be combined of course.

@lb42
Copy link
Author

lb42 commented Jun 13, 2022

A similar problem shows up when we have an italic sequence which spans two runs@ like this:
< l level="0" left="208" top="773" size="17" bottom="790" right="687"> <run top="773" left="208" width="460" height="18" size="17" rendition="#f21"> <i xmlns="">Latour.</i> I now ask you to get out of my house.<i xmlns=""> (In </i></run> <run top="773" left="649" width="38" height="18" size="17" rendition="#f21"><i xmlns="">fury)</i> </run></l>

This becomes

<l level="0" left="208" top="773" size="17" bottom="790" right="687"> <run top="773" left="208" width="460" height="18" size="17" rendition="#f21"><hi rend="italics" >Latour. (In </hi> I now ask you to get out of my house.</run><run top="773" left="649" width="38" height="18" size="17" rendition="#f21"><hi rend="italics" >fury)</hi></run></l>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants