What does elementFormDefault and when should it be used?
So, I found some definitions for elementFormDefault values:
qualified - elements and attributes are in the target namespace schema
unskilled - elements and attributes do not have a namespace
So, from this definition, I would think that if the circuit is set to qualified, then why should you type prefix with namespace? And what are the scenarios in which you will have at least one set for the unconditional? I tried Googling, but all I had was a couple of W3C pages that were extremely hard to understand.
This is the file I'm working with right now, why do I need to declare the type as target:TypeAssignments when I declare targetNamespace the same as xmlns:target ?
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:target="http://www.levijackson.net/web340/ns" targetNamespace="http://www.levijackson.net/web340/ns" elementFormDefault="qualified"> <element name="assignments"> <complexType> <sequence> <element name="assignments" type="target:TypeAssignments" minOccurs="1" maxOccurs="unbounded"/> </sequence> </complexType> </element> <complexType name="TypeAssignments"> <sequence> <element name="assignment" type="target:assignmentInfo" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> <complexType name="assignmentInfo"> <sequence> <element name="name" type="string"/> <element name="page" type="target:TypePage"/> <element name="file" type="target:TypeFile" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="id" type="string" use="required"/> </complexType> <simpleType name="TypePage"> <restriction base="integer"> <minInclusive value="50" /> <maxInclusive value="498" /> </restriction> </simpleType> <simpleType name="TypeFile"> <restriction base="string"> <enumeration value=".xml" /> <enumeration value=".dtd" /> <enumeration value=".xsd" /> </restriction> </simpleType> </schema>
xml xml-namespaces xsd xml-validation xsd-validation
Levi Sep 22 '09 at 23:16 2009-09-22 23:16
source share