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.
A.xsd:
<include schemaLocation="B.xsd"></include>
B.xsd:
<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.