473,378 Members | 1,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

ValidationType.Auto and reading schema attribute

Hi,

I would like my default ValidationType to be Auto.

Now let's say I have both a DTD and an XSD file for this XML file being
validated. While it's ValidationType.Auto, it will validate the DTD,
but will not even attempt to read/validate the namespace or even check
if schema file exists.

I suppose it's a resolver problem; anyone have any insight on how I can
have it check the schema File while Auto (without setting
ValidationType.Schema)?

..NET 1.1

Jun 20 '06 #1
3 1527
Validation can not perform DTD and XSD validation at the same time. If you
have ValidationType set to Auto, and have a DTD declaraion, you will only
get DTD validation. It will not look for the XSD schema file.

Zafar

"jhowey" <jo****@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi,

I would like my default ValidationType to be Auto.

Now let's say I have both a DTD and an XSD file for this XML file being
validated. While it's ValidationType.Auto, it will validate the DTD,
but will not even attempt to read/validate the namespace or even check
if schema file exists.

I suppose it's a resolver problem; anyone have any insight on how I can
have it check the schema File while Auto (without setting
ValidationType.Schema)?

.NET 1.1

Jun 21 '06 #2
Is there a way i can override the class so I can reverse it (ie; look
for Schema first)?

Zafar Abbas wrote:
Validation can not perform DTD and XSD validation at the same time. If you
have ValidationType set to Auto, and have a DTD declaraion, you will only
get DTD validation. It will not look for the XSD schema file.

Zafar

"jhowey" <jo****@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi,

I would like my default ValidationType to be Auto.

Now let's say I have both a DTD and an XSD file for this XML file being
validated. While it's ValidationType.Auto, it will validate the DTD,
but will not even attempt to read/validate the namespace or even check
if schema file exists.

I suppose it's a resolver problem; anyone have any insight on how I can
have it check the schema File while Auto (without setting
ValidationType.Schema)?

.NET 1.1


Jun 21 '06 #3
In .NET 2.0, You can chain multiple readers and hence wrap a dtd validating
reader with a schema validating reader to get the same file to pass through
DTD/Schema validation at the same time.
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.DTD;
XmlReader dtdValidatingReader = XmlReader.Create(xmlFile, settings);

settings.ValidationType = ValidationType.Schema;
XmlReader xsdValidatingReader = XmlReader.Create(dtdValidatingReader,
settings);
while(xsdValidatingReader.Read()) { }

Thanks,
Priya

"jhowey" <jo****@gmail.com> wrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Is there a way i can override the class so I can reverse it (ie; look
for Schema first)?

Zafar Abbas wrote:
Validation can not perform DTD and XSD validation at the same time. If
you
have ValidationType set to Auto, and have a DTD declaraion, you will only
get DTD validation. It will not look for the XSD schema file.

Zafar

"jhowey" <jo****@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
> Hi,
>
> I would like my default ValidationType to be Auto.
>
> Now let's say I have both a DTD and an XSD file for this XML file being
> validated. While it's ValidationType.Auto, it will validate the DTD,
> but will not even attempt to read/validate the namespace or even check
> if schema file exists.
>
> I suppose it's a resolver problem; anyone have any insight on how I can
> have it check the schema File while Auto (without setting
> ValidationType.Schema)?
>
> .NET 1.1
>

Jun 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave Mc | last post by:
First off I apologize for the length of this post. Given the following for XML <?xml version="1.0" encoding="Windows-1252"?> <Product Name="Product1" xmlns:d2p1="InspectionFile">...
4
by: Gordon Dickens | last post by:
I have target xml to generate from schema. All of the XML instances have the same global element i.e. <base>. I would like to combine all of the schemas into a single schema where I could...
11
by: csomberg | last post by:
SQL 2000 I thought I would throw this out there for some feedback from others. I'd like to know if you feel using MS auto-increment field is a good solution these days or should one grow their...
0
by: chris.millar | last post by:
I am using the ReadXMLSchema method of system.data.dataset to read a schema into a dataset. I have an XML file that I build up and wish to do a .Update against a database. The dataset doesn't...
6
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a...
0
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema...
1
by: SteveB | last post by:
I'm porting an application from Apache Xerces to .Net and am having a couple of small problems with deserialization. The XML that I'm reading comes from a variety of sources, and there are two...
0
by: djgerbavore | last post by:
I'm trying to read in a XSD file and not all my elements are showing up in my XMLSchema object. For example the following is an example xsd file i created in XMLSpy <?xml version="1.0"...
0
by: rautsmita | last post by:
hello friends , i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.