Xsd Validation Error

syprosesheask

New Member
i have a problem with the nested xsd files. I have this 3 files: Company.xsd Product.xsd and Person.xsd.Company.xsd\[code\]<?xml version="1.0"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.company.org" xmlns="http://www.company.org" elementFormDefault="qualified"><xsd:include schemaLocation="Person.xsd"/><xsd:include schemaLocation="Product.xsd"/><xsd:element name="Company"> <xsd:complexType> <xsd:sequence> <xsd:element name="Person" type="PersonType" maxOccurs="unbounded"/> <xsd:element name="Product" type="ProductType" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType></xsd:element> \[/code\]Product.xsd\[code\]<?xml version="1.0"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xsd:complexType name="ProductType"> <xsd:sequence> <xsd:element name="Type" type="xsd:string"/> </xsd:sequence></xsd:complexType> </xsd:schema>\[/code\]Person.xsd\[code\]<?xml version="1.0"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xsd:complexType name="PersonType"> <xsd:sequence> <xsd:element name="Name" type="xsd:string"/> <xsd:element name="SSN" type="xsd:string"/> </xsd:sequence></xsd:complexType> </xsd:schema>\[/code\]I try to validate this simple XML file:\[code\]<?xml version="1.0" encoding="UTF-8"?><Company><Person> <Name>Test</Name> <SSN>test</SSN></Person><Product> <name>Test</name></Product></Company>\[/code\]but i had this error: cvc-elt.1: Cannot find the declaration of element 'Company'.Do you know why??Can someone help me??
 
Back
Top