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
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">
<xs:list itemType="mf:lengthType"/>
</xs:simpleType>
</xs:attribute>
- <xs:attribute ref="xml:space"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
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"/>
<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>
import org.custommonkey.xmlunit.XMLTestCase;
import org.w3c.dom.Document;
-
import org.xml.sax.SAXException;
import org.apache.commons.io.IOUtils;
env.saveDOM(intermediate, new File(outputDir,
getName() + ".1" + getIntermediateFileExtension()));
}
- validate(intermediate);
}
/** {@inheritDoc} */
* @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) {