KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
By definition: The noNamespaceSchemaLocation attribute references an XML Schema document that does not have a target namespace. How will this attribute ever alter the result of parsing? For example, take this XML: <?xml version="1.0"?> <name xmlns="http://www.example.com/name" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.com/name schema/schema.xsd" title="Mr."> <first>John</first> <middle>M</middle> <last>Doe</last> </name> referring to this schema: <?xml version="1.0"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:target="http://www.example.com/name" targetNamespace="http://www.example.com/name" elementFormDefault="qualified"> <element name="name"> <complexType> <sequence> <element name="first" type="string"/> <element name="middle" type="string"/> <element name="last" type="string"/> </sequence> <attribute name="title" type="string"/> </complexType> </element> </schema> I removed these namespace declarations from the schema: xmlns:target="http://www.example.com/name" targetNamespace="http://www.example.com/name" without even using the noNamespaceSchemaLocation attribute in the referencing XML, no error was thrown. Why do we even need this attribute in the first place?
Tags (comma-separated)
Save Edits
Cancel