From: <bo...@us...> - 2011-03-16 15:33:14
|
Revision: 492 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=492&view=rev Author: bodewig Date: 2011-03-16 15:33:08 +0000 (Wed, 16 Mar 2011) Log Message: ----------- Test for mailing list thread that suggests Validator required xsd as prefix Modified Paths: -------------- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/jaxp13/test_Validator.java Added Paths: ----------- trunk/xmlunit/src/tests/resources/Book.xsd2 Property Changed: ---------------- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/jaxp13/test_Validator.java Modified: trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/jaxp13/test_Validator.java =================================================================== --- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/jaxp13/test_Validator.java 2011-03-16 15:19:40 UTC (rev 491) +++ trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/jaxp13/test_Validator.java 2011-03-16 15:33:08 UTC (rev 492) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2008, Jeff Martin, Tim Bacon +Copyright (c) 2008,2011, Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -58,6 +58,13 @@ assertTrue(v.isSchemaValid()); } + public void testGoodSchemaIsValidWithCustomPrefix() throws Exception { + Validator v = new Validator(); + v.addSchemaSource(new StreamSource(new File(test_Constants.BASEDIR + + "/src/tests/resources/Book.xsd2"))); + assertTrue(v.isSchemaValid()); + } + public void testGoodSchemaHasNoErrors() throws Exception { Validator v = new Validator(); v.addSchemaSource(new StreamSource(new File(test_Constants.BASEDIR Property changes on: trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/jaxp13/test_Validator.java ___________________________________________________________________ Added: svn:mergeinfo + /branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/jaxp13/test_Validator.java:337,346,353,491 /branches/xmlunit-1.x/tests/org/custommonkey/xmlunit/jaxp13/test_Validator.java:346 Copied: trunk/xmlunit/src/tests/resources/Book.xsd2 (from rev 491, branches/xmlunit-1.x/tests/etc/Book.xsd2) =================================================================== --- trunk/xmlunit/src/tests/resources/Book.xsd2 (rev 0) +++ trunk/xmlunit/src/tests/resources/Book.xsd2 2011-03-16 15:33:08 UTC (rev 492) @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<foo:schema xmlns:foo="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://www.publishing.org" + xmlns="http://www.publishing.org" + version="1.0" + elementFormDefault="qualified"> + + <foo:element name="Book" type="BookType"/> + + <foo:complexType name="BookType"> + <foo:sequence> + <foo:element name="Title" type="foo:string" minOccurs="1" maxOccurs="1"/> + <foo:element name="Author" type="foo:string" minOccurs="1" maxOccurs="unbounded"/> + <foo:element name="Date" type="foo:string" minOccurs="1" maxOccurs="1"/> + <foo:element name="ISBN" type="foo:string" minOccurs="1" maxOccurs="1"/> + <foo:element name="Publisher" type="foo:string" minOccurs="1" maxOccurs="1"/> + </foo:sequence> + </foo:complexType> +</foo:schema> + Property changes on: trunk/xmlunit/src/tests/resources/Book.xsd2 ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |