XML validation error using nested XSD schema - Type not declared?

Your DataNumeric node in your instance document does not belong to the namespace Doc.DataNumeric.

Your node in your instance document does not belong to the namespace Doc.DataNumeric. You need to apply the namespace at the inner level: 37.8 ... Hope this helps.

It does because the DataNumeric is of type tDataNumeric which has a namespace xmlns:DataNumeric="Doc. DataNumeric" – Shahid Sep 22 at 9:20 Yes but in your instance document the node does not belong to the the DataNumeric schema. It is defined in your DataItem.

Xsd schema. So you can't apply the namespace at that level. Check the instance I posted.It will validate.

– hugh Sep 22 at 10:34 You can use multiple target namespaces when using imported/included xsd schemas. In this case the default namespace of the document is null but the DataNumeric uses a targetNamespace of Doc. DataNumeric which is defined in the imported schema.

The problem was in the code which I have now posted as fix/answer. Thanks .. – Shahid Sep 22 at 12:36.

I have found the problem after a frustrating day and a half of iterations. Changing: FileStream fs = new FileStream(xsdPath, FileMode. Open); XmlReader reader = XmlReader.

Create(fs); XmlSchemaSet xss = new XmlSchemaSet(); xss. Add("", reader); to XmlSchemaSet xss = new XmlSchemaSet(); xss. Add("", xsdPath); solved the problem.

However I am still looking for the answer to WHY? Both are valid ways of adding a schema to the schema set (i.e. 2 overloads).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions