xsd - How do XML files find the XML Schema? -


i interested in knowing more process allows xml files locate schema validates it. i'm asking after testing 3 different xml headers (below) , noticing schema correctly validates variant.

xml header 1:

<root xmlns="http://www.website.com/yolo"        xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"  > 

xml header 2:

<root xmlns="http://www.website.com/yolo"        xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"        xsi:schemalocation="         http://www.website.com/yolo http://www.website.com/yolo            " > 

xml header 3:

<root xmlns="http://www.website.com/yolo"        xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"        xsi:schemalocation="         http://www.website.com/yolo /u/me/folder/yolo.xsd             " > 

the xsd spec not constrain methods used xsd validators locate schema document; define xsi:schemalocation hint allow validators read schema location information xml instance itself, validators accept schema bindings @ invocation time. validator should provide documentation of how finds schemas; should consult documentation.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -