jeremias 2005/01/05 13:14:23 Added: test/layoutengine/testcases basic1.xml padding1.xml test/layoutengine testcase2fo.xsl testcase2checks.xsl Log: Two initial very (!) simple checks for layout engine testing together with supporting stylesheets. Revision Changes Path 1.1 xml-fop/test/layoutengine/testcases/basic1.xml Index: basic1.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2005 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- $Id: basic1.xml,v 1.1 2005/01/05 21:14:22 jeremias Exp $ --> <testcase> <info> <p> This test checks very basic operations. </p> </info> <fo> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> <fo:layout-master-set> <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:block>test1</fo:block> <fo:block>line1<fo:block/>line2</fo:block> </fo:flow> </fo:page-sequence> </fo:root> </fo> <checks> <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block/@ipd = '360000'"/> </checks> </testcase> 1.1 xml-fop/test/layoutengine/testcases/padding1.xml Index: padding1.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2005 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- $Id: padding1.xml,v 1.1 2005/01/05 21:14:22 jeremias Exp $ --> <testcase> <info> <p> This test checks very simple padding operations. </p> </info> <fo> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> <fo:layout-master-set> <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:block margin="0pt" padding-start="5pt">test1</fo:block> </fo:flow> </fo:page-sequence> </fo:root> </fo> <checks> <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block/@ipd = '355000'"/> </checks> </testcase> 1.1 xml-fop/test/layoutengine/testcase2fo.xsl Index: testcase2fo.xsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2005 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- $Id: testcase2fo.xsl,v 1.1 2005/01/05 21:14:22 jeremias Exp $ --> <!-- This stylesheet extracts the FO part from the testcase so it can be passed to FOP for layout. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="testcase"> <xsl:apply-templates select="fo/*" mode="copy"/> </xsl:template> <xsl:template match="node()|@*" mode="copy"> <xsl:copy> <xsl:apply-templates select="@*|node()" mode="copy"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 1.1 xml-fop/test/layoutengine/testcase2checks.xsl Index: testcase2checks.xsl =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2005 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- $Id: testcase2checks.xsl,v 1.1 2005/01/05 21:14:22 jeremias Exp $ --> <!-- This stylesheet extracts the checks from the testcase so the list of checks can be built in Java code. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="testcase"> <checks> <xsl:apply-templates select="checks/*" mode="copy"/> </checks> </xsl:template> <xsl:template match="node()|@*" mode="copy"> <xsl:copy> <xsl:apply-templates select="@*|node()" mode="copy"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]