Another "Is this expected behaviour?"

CSS XPP 9.4.1

I have an interesting issue - the XML I have been supplied with has "xxx</close><open>Zzz". The requirement (apart from changing typeface etc) is to add a period and a space so I end up with:

xxx</close>. <open>Zzz

I am generating the period and space in the close::after pseudo-element selector and most of the time it is working perfectly. However if the last word before the </close> is a very long word (and its in 2 columns to a short measure) then the last word will not hyphenate. If I only generate the period and add space manually, either before or after the <open> element then the long word hyphenates perfectly and as expected. However is does act as you would expect if the justification means finishing a line! Interestingly if I remove the space altogether the word xxx.Zzz will hyphenate.

One option would be to transform and add the space but I am very nervous about that is this could cause issues if the XML is inconsistent.

Interested to hear if anyone else has encountered a similar issue.

Chris

Parents
  • Chris,

    Another idea ...
    What if in close::after generate your dot and space through a macro that starts with a '!' using the -xpp-macro() construct in the content property?
    This would signal to the system that the current word has ended.
    I had quite some success with this in the past.
    Whether it will work in a CSS/content/-xpp-macro() construction remains to be seen...

    Curious if this will work or not...

    Oh and wait another thing you can try:
    - transform your macro with the ! and the . + space as a PI into the xml - that should be easy enough and it will never invalidate the xml
    - you can try with generating that PI before or after the </close> tag

    Now I am even more curious...

Reply
  • Chris,

    Another idea ...
    What if in close::after generate your dot and space through a macro that starts with a '!' using the -xpp-macro() construct in the content property?
    This would signal to the system that the current word has ended.
    I had quite some success with this in the past.
    Whether it will work in a CSS/content/-xpp-macro() construction remains to be seen...

    Curious if this will work or not...

    Oh and wait another thing you can try:
    - transform your macro with the ! and the . + space as a PI into the xml - that should be easy enough and it will never invalidate the xml
    - you can try with generating that PI before or after the </close> tag

    Now I am even more curious...

Children
No Data