EDN Admin
Well-known member
Hi all;
Please look at the file www.windward.net/temp/EmbeddedSchema.xml which has an embedded schema. When we feed it to XmlReaderSettings settings = new XmlReaderSettings {ProhibitDtd = false};
settings.ValidationType = ValidationType.Schema;
settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessInlineSchema |
XmlSchemaValidationFlags.ReportValidationWarnings |
XmlSchemaValidationFlags.AllowXmlAttributes;
using (XmlReader reader = XmlFileOpen.XmlReaderCreate(xmlUrl, settings, ConnectMode, credentials.FullName, credentials.Password))
{
while (reader.Read())
// nada
;
}
We get:System.Xml.Schema.XmlSchemaValidationException occurred
Message=An element or attribute information item has already been validated from the namespace. It is an error if xsi:schemaLocation, xsi:noNamespaceSchemaLocation, or an inline schema occurs for that namespace.
Source=System.Xml
LineNumber=460
LinePosition=5
SourceUri=file:///C:/test/Report.xml
StackTrace:
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(XmlSchemaValidationException e, XmlSeverityType severity)
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String msg, XmlSeverityType severity)
at System.Xml.Schema.XmlSchemaValidator.AddSchema(XmlSchema schema)
at System.Xml.XsdValidatingReader.ProcessInlineSchema()
at System.Xml.XsdValidatingReader.Read()
at WindwardArrow.net.windward.arrow.datasource.xml.XmlDataSourceInfo.CanConnect() in C:srcjenova11.1MergeWindwardArrownetwindwardarrowdatasourcexmlXmlDataSourceInfo.cs:line 515
InnerException:
Ive read up a bunch on embedded schemas but while I found lots of examples, I cant find anything that lays out what is allowed and all ways this can be done. Im assuming that the namespace needs to be specified in the root node but I tried that and it didnt work.
Any suggestions?
thanks - dave
Who will win The Windward International Collegiate Programming Championships?
View the full article
Please look at the file www.windward.net/temp/EmbeddedSchema.xml which has an embedded schema. When we feed it to XmlReaderSettings settings = new XmlReaderSettings {ProhibitDtd = false};
settings.ValidationType = ValidationType.Schema;
settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessInlineSchema |
XmlSchemaValidationFlags.ReportValidationWarnings |
XmlSchemaValidationFlags.AllowXmlAttributes;
using (XmlReader reader = XmlFileOpen.XmlReaderCreate(xmlUrl, settings, ConnectMode, credentials.FullName, credentials.Password))
{
while (reader.Read())
// nada
;
}
We get:System.Xml.Schema.XmlSchemaValidationException occurred
Message=An element or attribute information item has already been validated from the namespace. It is an error if xsi:schemaLocation, xsi:noNamespaceSchemaLocation, or an inline schema occurs for that namespace.
Source=System.Xml
LineNumber=460
LinePosition=5
SourceUri=file:///C:/test/Report.xml
StackTrace:
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(XmlSchemaValidationException e, XmlSeverityType severity)
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String msg, XmlSeverityType severity)
at System.Xml.Schema.XmlSchemaValidator.AddSchema(XmlSchema schema)
at System.Xml.XsdValidatingReader.ProcessInlineSchema()
at System.Xml.XsdValidatingReader.Read()
at WindwardArrow.net.windward.arrow.datasource.xml.XmlDataSourceInfo.CanConnect() in C:srcjenova11.1MergeWindwardArrownetwindwardarrowdatasourcexmlXmlDataSourceInfo.cs:line 515
InnerException:
Ive read up a bunch on embedded schemas but while I found lots of examples, I cant find anything that lays out what is allowed and all ways this can be done. Im assuming that the namespace needs to be specified in the root node but I tried that and it didnt work.
Any suggestions?
thanks - dave
Who will win The Windward International Collegiate Programming Championships?
View the full article