[jdom-interest] Newbie: - JDOM validation with Schema.

Mead, Paul PMead at sanwaint.com
Mon Dec 11 07:16:37 PST 2000


I have read the Java and XML book and got JDOM loaded up. It works very well
for non-validating scenarios as below.

   try {
            SAXBuilder builder = new SAXBuilder(false);
            Document doc = builder.build(new File("foo.xml"));  
	etc

I thought I would try a validation test using an XML Schema 

   try {
            SAXBuilder builder = new SAXBuilder(true);
            Document doc = builder.build(new File("foo.xml"));  
	etc

The problem now comes from setting up the namespaces in the foo.xml and
foo.xsd so that things actually work. There is no example in the book, and
any examples I have found on the web all seem to point to non-existant URIs,
or ones that require some sort of log-in (W3C). 

Has anyone got a really simple example of xml/xsd files that actually work
'out of the box',or can point me to a source area?

I guess validation always requires the namespace definitions to be read in,
is there any way to set this up so that all the files are local??

Any help greatly appreciated.

Paul


__________________________________________________________________________________

IMPORTANT: This email is confidential and may also be legally privileged. If you have received this email in error, you are on notice of its status. If you are not the intended recipient, please notify us immediately by reply email or by telephoning Sanwa International plc's IT Helpdesk on +44 (20) 7330 0444. Then delete this email from your system. You should not copy it or use it for any purpose or disclose its contents to any other person.

Any views contained herein, express or implied, are those of the author and may not necessarily reflect those of Sanwa International plc. Sanwa International plc reserves the right to monitor all emails within its network. Email may be susceptible to virus infection, data corruption, interception and unauthorised amendment. Sanwa International plc does not accept liability for any such infection, corruption, interception or amendment or the consequences thereof.



More information about the jdom-interest mailing list