XSD Element
Element
The following example is a snippet referenced from an XML schema named "family.xsd". It shows a declaration for the "person" element. By using the
Now, we want to extend the "person" element with a "children" element. We can do this in this case even if the author of the above schema did not declare any "children" element.
Look at this schema file, named "children.xsd":
targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"> maxOccurs="unbounded"/>
The following XML file (named "Myfamily.xml") uses components from two different schemas, "family.xsd" and "children.xsd":
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.microsoft.com family.xsd http://www.w3schools.com children.xsd"> The XML file above is valid because the schema "family.xsd" allows us to extend the "person" element with optional elements after the "lastname" element.