T
Till Soerensen
I would like to validate a xml file against a xsd file on my hard disc.
Ok, I could specify the location of the XSD Schema in the instance of the xml file as follows:
<Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///D:/tmp/Personschema.xsd">
It works.
But I would like to specify the location of the xsd relative to the xml file.
That means if I move both xml AND xsd schema to another folder the xml file becomes invalid resp.
the validation fails because of a missing xsd file.
On the other hand if i change the Schema location as follows:
<Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Personschema.xsd">
The XSD file is not longer valid itself because "Personschema.xsd" is not a valid URI.
So is there another method to specify the Schema location relatively to the xml file ?
Till
Ok, I could specify the location of the XSD Schema in the instance of the xml file as follows:
<Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///D:/tmp/Personschema.xsd">
It works.
But I would like to specify the location of the xsd relative to the xml file.
That means if I move both xml AND xsd schema to another folder the xml file becomes invalid resp.
the validation fails because of a missing xsd file.
On the other hand if i change the Schema location as follows:
<Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Personschema.xsd">
The XSD file is not longer valid itself because "Personschema.xsd" is not a valid URI.
So is there another method to specify the Schema location relatively to the xml file ?
Till