From: Bonnet E. <eb...@ge...> - 2003-02-06 17:44:28
|
Attached are the files I am using : I guess you will have to change the access path for the schema location. The message is "Document is invalid: no grammar found". My code is : String generated=3D"BookXsdGenerated.xml"; Validator validator =3D new Validator(new FileReader(generated)); this.assertTrue(validator.isValid()); the pb occurs on the validator.isValid -> parser triggers an exception. I am wondering if it is not an access pb. The SAME code is working properly with other xml files with the same structure but which are using a dtd validation. Emmanuel Jeff Martin a =E9crit : > I've never used XSD so I'm not sure what should happen, but the > validator calls the parse method on the xml parser. Xerces2 is supposed > to support XSD validation and I assume that you just need to have a > resolvable xmlns attribute in the root element and it should barf when > you try an parse the file. > > Can you give us an example? > > On Thu, 2003-02-06 at 16:36, Bonnet Emmanuel wrote: > > Hi All, > > I have trouble using the XmlUnit Validator with a > > Xml file that must be validated with a XSD. > > I use the following code > > > > Validator validator =3D new Validator(new FileReader(file)); > > this.assertTrue(validator.isValid()); > > > > > > And file contains the full reference to its XSD. > > Do you have any idea about that ? > > > > Regards, > > Emmanuel > > > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld =3D Something 2 See= ! > > http://www.vasoftware.com > > _______________________________________________ > > Xmlunit-general mailing list > > Xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmlunit-general > -- > Jeff Martin <je...@mk...> > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld =3D Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Xmlunit-general mailing list > Xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlunit-general -- ------------------------------------------------------------------- Emmanuel BONNET Mail : eb...@ge... GENIGRAPH URL : http://www.genigraph.fr Tertial II 216, Route de St Simon Tel : +33 (0)5.34.60.92.84 31100 TOULOUSE - FRANCE Fax : +33 (0)5.34.60.92.89 ------------------------------------------------------------------- |