This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Included schemas not loaded while validating in java-unix env. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Included schemas not loaded while validating in java-unix env." Watch "Included schemas not loaded while validating in java-unix env." New topic
Author

Included schemas not loaded while validating in java-unix env.

Devesh H Rao
Ranch Hand

Joined: Feb 09, 2002
Posts: 687

Hi,

I have a validator code in java which validates a xml against a schema.
The problem that i am facing is in the 3 schemas, the first schema references the second and the second references the third.

The validating code runs fine on Windows but on AIX env the first schema is loaded but the "included" schema is not loaded and when i run the validation i get the following error

"org.xml.sax.SAXParseException: Schema error: Element ** not found in the Schema."

can anyone help me out in here

Thanks
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Did you forget to replace the Windows path separators (backward slash) with the UNIX version (forward slash)?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Devesh H Rao
Ranch Hand

Joined: Feb 09, 2002
Posts: 687

Originally posted by Lasse Koskela:
Did you forget to replace the Windows path separators (backward slash) with the UNIX version (forward slash)?


If this was the case even the first schema wouldnt have been loaded.

i am not able to make out what the problem is coz the first schema is loaded properly, the error is thrown only when a referenced element is to be validated which is defined in the included schema and not the main schema.

The included schemas are in the same directory as the main schema and hence the include URL is relative and dosent contain "\" or "/" for that matter to mess up the file protocol in UNIX v/s windows.

Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Included schemas not loaded while validating in java-unix env.
 
Similar Threads
JiBX schema-codegen with xml schema import
xerces2_6_2 validating with dtd and schema. please help!
Schema for Web service types ?
Passed SCDJWS
XML validation