Subject:XSD - noNamespaceSchemaLocation control Author:lucrecia chiartano Date:11 Jan 2006 09:21 AM
Hello,
Does anyone know if it is possible to validate the presence of the ‘xmlns:xsi’ and ‘xsi:noNamespaceSchemaLocation’ attributes on an xml, via schema?
Subject:XSD - noNamespaceSchemaLocation control Author:lucrecia chiartano Date:11 Jan 2006 11:02 AM
Thanks for your reply but I think I did not understood it well.
I'm validating with Xerces using the following Schema, that validates all the examples I have reported on my first mail.
What I would like is to write in this Schema an instruction (maybe like the xs:attribute??) that makes the validation fail against the last two cases.
Subject:XSD - noNamespaceSchemaLocation control Author:Tony Lavinio Date:11 Jan 2006 11:18 AM
How would the schema validate for a missing schema location, if
no schema location were specified?
Assuming that you imposed the schema validation from outside of
the document, instead of inside, you could write a schema that
checks for a specific value in a schema location, but if I
understand you correctly, then there isn't really a way to do
what you want.
What problem are you trying to solve? Are you tring to make sure
that a specific schema is referenced always in the file?
Subject:XSD - noNamespaceSchemaLocation control Author:lucrecia chiartano Date:11 Jan 2006 12:07 PM
This validation has to be executed by different people, all using the same Schema.
But for one of this validations, that binds the xml to it’s Schema outsides (so using not the two validation attributes we are talking about), they want to verify also that a precise path is used within the xml.