0 Replies Latest reply: Mar 1, 2011 5:32 AM by Sriragavan Loganathan RSS

Accessign XML schema types from another XML schema file

Sriragavan Loganathan Newbie

Hi All,


I am accessing XML schema file from EJB to validate XML files.


The XML schema files are having its own hierarchy.

e.g. A.xsd includes B.xsd, B.xsd includes C.xsd


During the deployment time, the XSD files are placed under the JBoss deploy folder next to the EJB JAR files.


From the EJB I am referencing the top most parent XSD file, i.e. A.xsd, creating the InputStream and then creating the schema (javax.xml.validation.Schema). During the schema creating throws an exception can not resolve a type defined in the C.xsd.


The child schema files are properly included in the parent schema files as follows.



<include schemaLocation="B.xsd"></include>



<include schemaLocation="C.xsd"></include>


Even though all the XSD files are in the same folder, A.xsd is not able access the type defined in C.xsd.


I don't want to use absolute path to specify file locations.


Is there any way to relatively define the file locations?


Thanks & regards.