• 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

Attempting to valiiate docbook with SAX/w3c schema

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I wrote a simple java SAX xml parsing app, and I want to validate a docbook document using the w3c schema. I wrote a simple (identical) docbook instance file that validates using the dtd.

Here is the xml doc:



this is the output from the parser:



In the actual schema listed in the schema location, the only namespace is:

<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>

I tried adding that ns to my doc, no luck.

A quick search around indicates that RELAX-NG is the new thing for docbook, and w3c is not widely used (for docbook), so I should just dump it altogether, but I was curious why it doesn't work.
thanks!!
jason
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To me the error message appears to be trying to say, in a roundabout way, that Xerces doesn't support Relax NG validation. And indeed when I googled "xerces relaxng" the first link that came back was www.relaxng.org and some text about a Xerces parser configuration which does support Relax NG.

So I would start there. You might have to use a different parser instead of Java's default built-in parser.
reply
    Bookmark Topic Watch Topic
  • New Topic