Menu

OxmlSax doesn't recognize CRLF as text

Anonymous
2016-06-27
2016-06-27
  • Anonymous

    Anonymous - 2016-06-27

    Hi, I have an Fb2 document, it's not strict Xml, but anyway I think in this case it should behave in another way:

    Take:

    <p>text<strong>
    </strong>more text</p>
    

    Between <strong> and </strong> there is fisically a CRLF that is, in fact, text, and it should trigger the OnCharacters event with #13#10 as text, but it doesn't. I've tried any combination of linebreak and whitespacehandling, in this last property I think resides the bug: if you set whitespacehandling to default, trim, you don't get any CRLF as text, if you set it to preservealways you get it always, but if you set it to preserveintextonly I don't see any difference with trim, and in any case, neither dies it work in the exposed problem.

    I mean that it doesn't trigger the oncharacters even when it should, if whitespacehandling is set to preservealways you get it but also you get it at any other CRLF in the file, real text or not.

    Thank you very much for this great utility and regards.

     

    Last edit: Anonymous 2016-06-27
  • Ondrej Pokorny

    Ondrej Pokorny - 2016-06-27

    Use wsPreserveAll.

     
    • Anonymous

      Anonymous - 2016-06-27

      Thanks, but with wsPreserveAll you get all the CRLFs of the file, real text or not, so you can not filter it.

       
      • Ondrej Pokorny

        Ondrej Pokorny - 2016-06-27

        You have to filter it on your own. OXml cannot know when you want the linebreak to be passed or not.

         
  • Anonymous

    Anonymous - 2016-06-27

    Ok, thanks, I was afraid of that.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.