xml - is xsi:schemaLocation actually used? -


i using xmllint tool check xml files against xsd schemas. appear tool invoked as

xmllint --noout --schema foo.xsd bar.xml 

... , not include option retrieve xsd file xml file's xsi:schemalocation attribute. moreover, in relevant w3.org specs 1 reads:

the presence of these hints [i.e. xsi:schemalocation ] not require processor obtain or use cited schema documents, , processor free use other schemas obtained suitable means, or use no schema @ all.

so fair in practice xsi:schemalocation attribute amounts (soft) documentation? since not practice allow incoming xml documents tell application how validate them don't see benefit.

xsd location hints, schemalocation , nonamespaceschemalocation, used in production environments (i've never seen it), indeed.

i see convenience method tooling used during development phases. considered interoperable way indicate xsds should used validation, intellisense, etc.

say build bunch of xml files (samples), means better illustrate (document) bunch of xsd files. used see, people use schema location hints (relative uris), zip whole set (xsd, xml, etc.) , ship archive consumers. way, there more chances "interoperable" regardless of development tools people using. example, ms visual studio maintains internal , proprietary storage holds schemas go particular xml file; "metadata" not portable other tools same way xsi schema location hints are.

i've seen "advanced" uses of schema location hints, why @ least in our tooling spend lots of cycles in reading these hints , dynamically adjust intellisense , validation messages...


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -