It's not clear exactly what question you're asking, so I'll guess the question is "why does schema document 1 not validate, when schema document 2 does validate?"
I can't answer that, because I'm unable to reproduce your results. Both of your schema documents raise errors in the form in which you provide them.
Schema document 1 refers, in the definition of element (http://www.company.org, Name), local to complex type (http://www.company.org, PersonType), to a type named (http://www.person.org, test). But the namespace http://www.person.org has not been imported, so references to components in that namespace are not legal.
The specification type="test"
is interpreted as reference to (http://www.person.org, test) because when "test" is interpreted as a QName, its namespace name is taken to be the default namespace, if there is one. Here, the default namespace (declared on the xsd:schema element) is http://www.person.org.
If -- this is sheer speculation on my part -- you want to refer to the type whose name is (http://www.company.org, test), which is declared on lines 7-10 of schema document 1, then you need to bind a namespace prefix to namespace http://www.company.org and use that prefix. It would work, for example, to change the declaration of Name to
<xsd:element name="Name" type="tns:test"
xmlns:tns="http://www.company.org"/>
or (using the default namespace, in order to avoid having to think of a prefix):
<xsd:element name="Name" type="test"
xmlns="http://www.company.org"/>
Note that the simple type declared on lines 7-10 has the expanded name (http://www.company.org, test) -- I don't know what you mean by saying "'test' has no namespace", but you may want to check your assumptions.
Schema document 2 raises an error because the schema location you specify on the xsd:include on line 6 produces, when dereferenced, a document which is not an XSD schema document (it's an HTML page).
I hope this helps.