element Address: Schemas validity error : Element '{urn:tempuri:Contact}Address': No matching global element declaration available, but demanded by the strict wildcard.
I get the same error when I run xmllint on these files from the commandline. It seems to me this is more of a libxml2/Schema question than a Perl question... although I haven't yet found a good description of the issue, it seems to me that it may be a limitation of libxml2 and therefore XML::LibXML that it does not respect the xsi:schemaLocation attribute, see e.g. this bug report.
As for the design of these Schemas, I'm not sure if having both address.xsd and email.xsd provide potentially conflicting definitions for the namespace urn:tempuri:Contact is the best solution, you might want to consider one namespace per toplevel element?
Running the test outside Perl works correctly with strict validation turned on. I did have to add (with ease) those schemas programmatically though.
What validator are you using here, could you share more information on how you achieved this?
There are other ways to successfully achieve validation by altering the personal.xsd file to statically import the other 2 schemas.
Could you explain why that's not an option? E.g. which of the files in your example can't you modify and why? On the one hand, I understand the need to just be able to plug various schemas in and have them imported automatically, on the other, being able to plug any other schema into the current one kind of defeats the purpose of validation ;-) If it were me, I might set up a workaround in which I write a script that modifies personal.xsd and adds the appropriate <import> statements to pull in the other schemas, giving me control over which Schemas I want to allow. It's all XML after all, and programmatic modification isn't a problem.
In reply to Re^5: Validating an XML file with multiple schemas
by haukex
in thread Validating an XML file with multiple schemas
by mart0000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |