Jeremias, On Mon, Feb 07, 2005 at 10:29:10AM +0100, Jeremias Maerki wrote: > Simon, > > can you tell me which parser and XSLT processor combination gave you > these problems? I'd like to reproduce the problem so I can be sure I fix > them correctly. Thanks.
Sun's SDK 1.4.2, crimson and Xalan Java 2.5.2: error endorsed dirs: Xerces-J 2.4.0, Xalan Java 2.5.2: succes endorsed dirs, FOP's libraries: Xerces-J 2.2.1, Xalan Java 2.4.1: error Error: There was 1 error: 1) text-decoration1.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1)java.lang.RuntimeException: Expected XPath expression to evaluate to 'line-through', but got 'li' (XPath: //flow/block[3]/lineArea/inlineparent[1]/text) Regards, Simon > On 06.02.2005 13:54:54 Simon Pepping wrote: > > Hi Jeremias, > > > > I have errors with the layoutengine test files, for example: > > > > text-decoration1.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1)java.lang.RuntimeException: > > Expected XPath expression to evaluate to 'line-through', but got 'li' > > (XPath: //flow/block[3]/lineArea/inlineparent[1]/text) > > > > This is due to the fact that the text may be split over more than one > > text area. Indeed, whether I get the error depends on which parser > > version I use; different parsers may produce different arrangements of > > text over text areas. > > > > If you change the test to: > > > > <eval expected="line-through" > > xpath="//flow/block[3]/lineArea/inlineparent[1]"/> > > > > the error disappears. I think XObject.str() applies the XPath string > > function, which returns the string-value of the first node. If you > > evaluate the parent node 'inlineparent', you get the string-value of > > all of its children, which is usually what you want to have. > > > > There are many such cases in the test files. I think you should modify > > all cases where you test on the content of a text area. > > > Jeremias Maerki > -- Simon Pepping home page: http://www.leverkruid.nl