Moved declaration of xml:space attribute from <text> to <page-sequence> in the XML Schema, to reflect changes from rev. 834020.

Moved validation of intermediate XML to testParserToIntermediateFormat method, so that any validation error is returned by Junit instead of being swallowed.


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@834135 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vincent Hennebert 2009-11-09 16:34:47 +00:00
parent 560e3f8153
commit 1bc82acecd
3 changed files with 4 additions and 5 deletions

View File

@ -20,8 +20,6 @@
targetNamespace="http://xmlgraphics.apache.org/fop/intermediate"
xmlns:mf="http://xmlgraphics.apache.org/fop/intermediate">
<xs:include schemaLocation="fop-intermediate-format-ng-datatypes.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xs:complexType name="contentType">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="viewport">
@ -68,7 +66,6 @@
<xs:list itemType="mf:lengthType"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute ref="xml:space"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>

View File

@ -20,6 +20,8 @@
targetNamespace="http://xmlgraphics.apache.org/fop/intermediate"
xmlns:mf="http://xmlgraphics.apache.org/fop/intermediate"
xmlns:nav="http://xmlgraphics.apache.org/fop/intermediate/document-navigation">
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xs:import namespace="http://xmlgraphics.apache.org/fop/intermediate/document-navigation"
schemaLocation="fop-intermediate-format-ng-nav.xsd"/>
<xs:import namespace="adobe:ns:meta/" schemaLocation="xmp-metadata.xsd"/>
@ -61,6 +63,7 @@
<xs:element ref="mf:page" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute ref="xml:space"/>
<xs:attributeGroup ref="mf:foreignAtts"/>
</xs:complexType>
</xs:element>

View File

@ -35,7 +35,6 @@ import javax.xml.transform.dom.DOMSource;
import org.custommonkey.xmlunit.XMLTestCase;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import org.apache.commons.io.IOUtils;
@ -95,7 +94,6 @@ public abstract class AbstractIntermediateTestCase extends XMLTestCase {
env.saveDOM(intermediate, new File(outputDir,
getName() + ".1" + getIntermediateFileExtension()));
}
validate(intermediate);
}
/** {@inheritDoc} */
@ -172,6 +170,7 @@ public abstract class AbstractIntermediateTestCase extends XMLTestCase {
* @throws Exception if the test fails
*/
public void testParserToIntermediateFormat() throws Exception {
validate(intermediate);
Source src = new DOMSource(intermediate);
Document doc = parseAndRenderToIntermediateFormat(src);
if (outputDir != null) {