i am developing a business component of xml and in java by using jaxp.
In which i want to validate an xml with schema
i have written a method which take xml file as a param and schema name as a param and i have done validation of xml based on schema.if xml document violates any rules
iam throwing exception related to violation.
But my problem is suppose i pass an xml which contains schema,but i pass other schema .Then it is validating according to that schema and iam throwing exception.
But i should get result as schema can not be found.
can any one give inputs/idea/ to resolve this issue