<?xml version='1.0'?>
<userlogin xmlns="urn:faster:userlogin"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <login>mick</login> <password>brown</password> </userlogin>
Above is my schema instance.
Here is my schema as you can see it does 2 includes .
<?xml version="1.0"?>
<xsd:schema targetNamespace="urn:faster:userlogin"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:faster:userlogin"> <xsd:include schemaLocation="C:\Faster\App\Demo\DataTypes\login.xsd" /> <xsd:include schemaLocation="C:\Faster\App\Demo\DataTypes\password.xsd" /> <xsd:complexType name="userloginType"> <xsd:all> <xsd:element name='login' type='login' /> <xsd:element name='password' type='password' /> </xsd:all> </xsd:complexType> <xsd:element name="userlogin" type="userloginType" /> </xsd:schema>
Here are the 2 included schemas
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:simpleType name="login"> <xsd:restriction base="xsd:NCName"> <xsd:enumeration value="tom"/> <xsd:enumeration value="dick"/> <xsd:enumeration value="harry"/> <xsd:minLength value="3"/> </xsd:restriction> </xsd:simpleType> </xsd:schema>
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:simpleType name="password"> <xsd:restriction base="xsd:NCName"> <xsd:enumeration value="cruise"/> <xsd:enumeration value="cheney"/> <xsd:enumeration value="truman"/> <xsd:minLength value="6"/> </xsd:restriction> </xsd:simpleType> </xsd:schema>
The schema always seems to flag an error on the login field regardless of the validation rules.
Can anyone help?
<userlogin xmlns="urn:faster:userlogin"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <login>mick</login> <password>brown</password> </userlogin>
Above is my schema instance.
Here is my schema as you can see it does 2 includes .
<?xml version="1.0"?>
<xsd:schema targetNamespace="urn:faster:userlogin"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:faster:userlogin"> <xsd:include schemaLocation="C:\Faster\App\Demo\DataTypes\login.xsd" /> <xsd:include schemaLocation="C:\Faster\App\Demo\DataTypes\password.xsd" /> <xsd:complexType name="userloginType"> <xsd:all> <xsd:element name='login' type='login' /> <xsd:element name='password' type='password' /> </xsd:all> </xsd:complexType> <xsd:element name="userlogin" type="userloginType" /> </xsd:schema>
Here are the 2 included schemas
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:simpleType name="login"> <xsd:restriction base="xsd:NCName"> <xsd:enumeration value="tom"/> <xsd:enumeration value="dick"/> <xsd:enumeration value="harry"/> <xsd:minLength value="3"/> </xsd:restriction> </xsd:simpleType> </xsd:schema>
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:simpleType name="password"> <xsd:restriction base="xsd:NCName"> <xsd:enumeration value="cruise"/> <xsd:enumeration value="cheney"/> <xsd:enumeration value="truman"/> <xsd:minLength value="6"/> </xsd:restriction> </xsd:simpleType> </xsd:schema>
The schema always seems to flag an error on the login field regardless of the validation rules.
Can anyone help?