Return-Path: Delivered-To: apmail-maven-doxia-dev-archive@www.apache.org Received: (qmail 15518 invoked from network); 29 Jul 2007 21:52:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jul 2007 21:52:20 -0000 Received: (qmail 2163 invoked by uid 500); 29 Jul 2007 21:52:20 -0000 Delivered-To: apmail-maven-doxia-dev-archive@maven.apache.org Received: (qmail 2127 invoked by uid 500); 29 Jul 2007 21:52:20 -0000 Mailing-List: contact doxia-dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: doxia-dev@maven.apache.org Delivered-To: mailing list doxia-dev@maven.apache.org Received: (qmail 2118 invoked by uid 99); 29 Jul 2007 21:52:20 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2007 14:52:20 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [130.225.212.6] (HELO mail2.nbi.dk) (130.225.212.6) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2007 21:52:13 +0000 Received: from [127.0.0.1] (afs.nbi.dk [130.225.212.29]) by mail2.nbi.dk (Postfix) with ESMTP id 19AD53C016 for ; Sun, 29 Jul 2007 23:51:51 +0200 (CEST) Message-ID: <46AD0CBB.3070406@apache.org> Date: Sun, 29 Jul 2007 23:55:07 +0200 From: Lukas Theussl Organization: Apache Software Foundation User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: doxia-dev@maven.apache.org Subject: Re: svn commit: r560737 [1/2] - in /maven/doxia/doxia/trunk/doxia-modules: doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/ doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/ doxia-module-xhtml/src/main/java/org/ap References: <9ae367340707291331ybe5b704t3d04fda2db080c50@mail.gmail.com> In-Reply-To: <9ae367340707291331ybe5b704t3d04fda2db080c50@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Vincent Siveton wrote: > Hi Dennis, > > 2007/7/29, Dennis Lundberg : > >>A couple of thoughts on the changes to xdoc, and in some cases also xhtml: >> >>- From what I can tell the output of EOL chars in XdocSink and XhtmlSink >>has changed with this commit. Was that intended? After this commit only >>"simple" tags and end tags get an EOL. > > > Actually intended but need to be improved. See below. > > >>- Changing the tests to ignore EOL chars might be dangerous if we care >>about where the EOLs are put. > > > A lot of modules use EOL or \n inside. We need to review them to be > more consistent and use only system EOL. > About testing, the new AbstractSinkTest class has this convenience > method but like you said, we need to take care about EOL in the > future. See DOXIA-59. I think that cases where EOLs are significant should be tested separately as it's usually an exceptional case. It would be quite inconvenient if we had to specify correct EOLs for all the base test methods in AbstractSinkTest. But no principal objection, if someone wants to do it. For now, only the apt module uses the new test classes. One thing that bothered me in the apt module is actually an issue with the parser, not the sink. It's the reason for point 1 at DOXIA-134: eg the two lines of apt markup line 1 line 2 fire only one sink event when parsed: sink.text( "line 1 line 2" ), I think it should be two separate events, ie sink.text ( "line 1" ); sink.text( "line 2" ), so that EOL's are preserved. WDYT? > > >>- I think we should try to pretty print the sink output to the best of >>our capabilities. > > > Totally agree with you. I think we need to use the > PrettyPrintXMLWriter class from Plexus utils (or other) to correctly > indent the output.I didn't want to change it with this commit, to be > sure to not have side effects. Thoughts? We have already such an implementation for xdoc: XmlWriterXdocSink. I think it was originally a copy of the XdocSink, just re-written to take an XMLWriter in the constructor, but it hasn't been updated and is not equivalent to XdocSink anymore. cheers, -Lukas