473,246 Members | 1,848 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,246 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 1522
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...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.