For example, let us say we have the following schema (listed in http://www.w3.org/TR/xmlschema-0/#NS)
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:po="http://www.example.com/PO1" targetNamespace="http://www.example.com/PO1" elementFormDefault="unqualified" attributeFormDefault="unqualified"> <element name="purchaseOrder" type="po:PurchaseOrderType"/> <element name="comment" type="string"/> <complexType name="PurchaseOrderType"> <sequence> <element name="shipTo" type="po:USAddress"/> <element name="billTo" type="po:USAddress"/> <element ref="po:comment" minOccurs="0"/> <!-- etc. --> </sequence> <!-- etc. --> </complexType> <complexType name="USAddress"> <sequence> <element name="name" type="string"/> <element name="street" type="string"/> <!-- etc. --> </sequence> </complexType> <!-- etc. --> </schema> Can you explain what the purpose of each of the attributes in the "schema" node mean? I have been trying to wrap my head around it, but I don't get it. Please correct me if I am wrong:
I assume xmlns="http://www.w3.org/2001/XMLSchema" refers to elements & attributes that have no prefix.
xmlns:po="http://www.example.com/PO1" seems like it means that anything prefixed with po, refers to this url (example.com/p01).
I don't understand what targetNamespace is for. I also don't understand what qualified or unqualified means.