]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Moved declaration of xml:space attribute from <text> to <page-sequence> in the XML...
authorVincent Hennebert <vhennebert@apache.org>
Mon, 9 Nov 2009 16:34:47 +0000 (16:34 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Mon, 9 Nov 2009 16:34:47 +0000 (16:34 +0000)
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

src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
src/documentation/intermediate-format-ng/fop-intermediate-format-ng.xsd
test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java

index c0bdd281b4288e8b91e16f0e7fb9977429a9199e..4e0b7d1151137bd41d5f28e3a3c905c78813dd0b 100644 (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>
index 93aacb62dffdc8de66dc4749d7b19bc144162ec6..9de37a81ab1ea9c35b5c06f68f8c24ce6c6a8f36 100644 (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>
index c246488e1d119adbef81a4c03ab0dc29b57533e9..826a5c777bb880f761b175b4c2f2e36feed3fb64 100644 (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) {