You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/02/22 16:59:28 UTC

[jira] Created: (DOXIA-225) DocBookParser swallows significant whitespace

DocBookParser swallows significant whitespace
---------------------------------------------

                 Key: DOXIA-225
                 URL: http://jira.codehaus.org/browse/DOXIA-225
             Project: Maven Doxia
          Issue Type: Bug
          Components: Module - Docbook Simple
            Reporter: Benjamin Bentmann
         Attachments: significant-whitespace.patch

The same as DOXIA-222 just for another XML parser. The patch is defensive and copies the fix from XhtmlBaseParser around just like the orginal code was copy&paste. However, I believe it would make sense to move this implementation of {{handleText()}} into {{AbstractXmlParser}} such that the various XML parsers get this behaviour out-of-the-box. Those that need different handling can still override the method.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DOXIA-225) DocBookParser swallows significant whitespace

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/DOXIA-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl closed DOXIA-225.
-------------------------------

         Assignee: Lukas Theussl
       Resolution: Fixed
    Fix Version/s: 1.0-beta-1

Applied in r630310, thanks!

However, I prefer to leave the text handling to the implementation, at least for now. Sure, we could reduce some code duplication but I don't know if the current behavior is sensible as a default. I don't remember the exact reason but I introduced the splitting only to make the identity tests pass (http://svn.apache.org/viewvc?view=rev&revision=583455), but in principle I don't see why a parser should emit separate text events for each new line.

> DocBookParser swallows significant whitespace
> ---------------------------------------------
>
>                 Key: DOXIA-225
>                 URL: http://jira.codehaus.org/browse/DOXIA-225
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - Docbook Simple
>            Reporter: Benjamin Bentmann
>            Assignee: Lukas Theussl
>             Fix For: 1.0-beta-1
>
>         Attachments: significant-whitespace.patch
>
>
> The same as DOXIA-222 just for another XML parser. The patch is defensive and copies the fix from XhtmlBaseParser around just like the orginal code was copy&paste. However, I believe it would make sense to move this implementation of {{handleText()}} into {{AbstractXmlParser}} such that the various XML parsers get this behaviour out-of-the-box. Those that need different handling can still override the method.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira