Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:40 PM.


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