You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ad...@apache.org on 2008/06/28 14:11:40 UTC
svn commit: r672499 - in /xmlgraphics/fop/trunk/test/layoutengine:
basic-checks.xml testcase2checks.xsl
Author: adelmelle
Date: Sat Jun 28 05:11:40 2008
New Revision: 672499
URL: http://svn.apache.org/viewvc?rev=672499&view=rev
Log:
Added basic-checks.xml: file currently only contains one default check.
Modified testcase2checks.xsl: the added basic-checks.xml will be inserted before the checks particular to the testcase.
Added:
xmlgraphics/fop/trunk/test/layoutengine/basic-checks.xml (with props)
Modified:
xmlgraphics/fop/trunk/test/layoutengine/testcase2checks.xsl
Added: xmlgraphics/fop/trunk/test/layoutengine/basic-checks.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/basic-checks.xml?rev=672499&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/basic-checks.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/basic-checks.xml Sat Jun 28 05:11:40 2008
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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$ -->
+<!--
+ This file contains basic checks that are performed for every tescase
+-->
+<checks>
+ <true xpath="/*" />
+</checks>
Propchange: xmlgraphics/fop/trunk/test/layoutengine/basic-checks.xml
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/trunk/test/layoutengine/testcase2checks.xsl
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/testcase2checks.xsl?rev=672499&r1=672498&r2=672499&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcase2checks.xsl (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcase2checks.xsl Sat Jun 28 05:11:40 2008
@@ -19,15 +19,19 @@
<!-- 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:variable name="basic-checks" select="document('basic-checks.xml')/checks/*" />
+
+<xsl:template match="testcase">
+ <xsl:apply-templates select="checks" />
+</xsl:template>
+
+<xsl:template match="checks">
+ <checks>
+ <xsl:copy-of select="$basic-checks" />
+ <xsl:copy-of select="*" />
+ </checks>
+</xsl:template>
+
+<xsl:template match="text()" />
- <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: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org
Re: svn commit: r672499 - in /xmlgraphics/fop/trunk/test/layoutengine: basic-checks.xml testcase2checks.xsl
Posted by Andreas Delmelle <an...@telenet.be>.
On Jun 28, 2008, at 14:11, adelmelle@apache.org wrote:
> Author: adelmelle
> Date: Sat Jun 28 05:11:40 2008
> New Revision: 672499
>
> URL: http://svn.apache.org/viewvc?rev=672499&view=rev
> Log:
> Added basic-checks.xml: file currently only contains one default
> check.
> Modified testcase2checks.xsl: the added basic-checks.xml will be
> inserted before the checks particular to the testcase.
FWIW: this little something I just thought of might prove handy to
catch cases where the case-specific checks would fail because an
empty document was produced (usually indicating that an Exception
occurred somewhere). Can save some time in looking up why exactly the
check fails...
As a consequence, we can now add simple testcases containing no
checks of their own, say if we simply need to check there was /any/
output at all.
Cheers
Andreas