• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validating an xml with a Schema

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm brand new to Schema validation so bear with me. I just learned that you can validate an XML document using the javax.xml.validation package in Java5. So now I'm trying it in a unit test. I'm trying to validate some generated XSL-FO with a schema I found here. I'm getting an error on the following line:

...where xslfoSchema is an input stream containing the contents of the schema that I downloaded. The error says:
Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs ocumentation'. Saw '-- This schema was automatically generated by Syntext Dtd2Schema --'.
and the element in question is this one found in the document:


I'm thinking that this shouldn't happen but I don't know enough about XSDs to figure it out. Could someone help me?
reply
    Bookmark Topic Watch Topic
  • New Topic