One more question: I am trying to run tests in jOD sources version 1.2. I've won in battle with RELAX NG, just used jing-20091111 and changed JDOMUtils to
public static String isValid(final Document doc, final String > schemaLanguage, final URL schemaLocation) throws SAXException { > ByteArrayInputStream ins; > StreamSource strsou = null; > // System.out.println("-=-=- schemaLanguage: '"+schemaLanguage+"', > schemaLocation: '"+schemaLocation+"'"); > try { > ins = new ByteArrayInputStream(output(doc).getBytes("UTF8")); > strsou = new StreamSource(ins); > } catch (UnsupportedEncodingException e) { > throw new IllegalStateException("unicode not found ", e); > } > XMLSyntaxSchemaFactory factory = new XMLSyntaxSchemaFactory(); > // final Schema schema = > SchemaFactory.newInstance(schemaLanguage).newSchema(schemaLocation); > try { > // don't use JDOMSource since it's as inefficient as this plus > we can't control the > // output. > // schema.newValidator().validate(new StreamSource(ins)); > > factory.newSchema(schemaLocation).newValidator().validate(strsou); > return null; > } catch (Exception e) { > return ExceptionUtils.getStackTrace(e); > } > } Now only one test fails: at org.jopendocument.dom.spreadsheet.SheetTest.testName(SheetTest.java:127) junit.framework.AssertionFailedError: expected same:<<table:table > xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" > table:name="users" table:style-name="ta1" table:print="false"> > <office:forms > xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" > xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" > form:automatic-focus="false" form:apply-design-mode="false" /> > <table:table-column table:style-name="co6" > table:default-cell-style-name="Default" /> > <table:table-column table:style-name="co7" > table:default-cell-style-name="Default" /> > <table:table-column table:style-name="co8" > table:default-cell-style-name="Default" /> > <table:table-column table:style-name="co9" > table:default-cell-style-name="Default" /> > <table:table-row table:style-name="ro1"> > <table:table-cell table:number-columns-repeated="4" /> > </table:table-row> > </table:table>> was not:<<table:table > xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" > table:name="newSheet"><table:table-column > table:default-cell-style-name="Default" > /><table:table-row><table:table-cell /></table:table-row></table:table>> > at junit.framework.Assert.fail(Assert.java:57) > at junit.framework.Assert.failNotSame(Assert.java:325) > at junit.framework.Assert.assertSame(Assert.java:288) > at junit.framework.Assert.assertSame(Assert.java:296) > at junit.framework.TestCase.assertSame(TestCase.java:465) > at org.jopendocument.dom.spreadsheet.SheetTest.testName(SheetTest.java:127) > ... Is this something which necessarily should be fixed? I should try to run tests with unchanged jOD-src-package... -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.