Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
| Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 28th, 2004, 06:58 AM
Registered User
 
Join Date: Sep 2004
Location: , , Germany.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML validation with Schema/DTD using JAXP

Hi, I'm having some trouble with JAXP and Schema validation. Basically I want to parse in XML files that can us a DTD or Schema (for example web.xml, depending on the version it is a DTD or Schema). The main problem is that the XML file refers to external entities that must be resolved so that the file can be parsed on a different system then it was written on. For DTDs this is not that difficult as one can use the public ID. For Schemas things are a bit more tricky though as one only gets the system ID (value of the schemaLocation attribute) in the entity resolver. As this can be anything and is only a hint it doesn't has much use. The other possibility is to use give the parser some XSDs in advance (http://java.sun.com/j2ee/1.4/docs/tu.../JAXPDOM8.html). The downside of this however is that validation is forced to use the Schema even though it normally would use a DTD. A further problem is that J2EE 1.4 uses different XSD files which all share the same namespace and Xerces doesn't like that.

Any ideas on how to do this right?

thanks,
Hendrik


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated tool to convert XML from DTD to DTD lsantos2000 XSLT 2 October 17th, 2007 08:21 AM
Convert DTD to schema boknoy XML 1 March 28th, 2007 03:51 AM
Convert DTD to Schema bcogney XML 7 March 25th, 2007 06:39 PM
XML schema validation problems BrendonMelville XML 3 February 15th, 2006 06:02 PM
XML Schema Validation without internet esp5a XML 1 September 5th, 2003 06:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.