473,569 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1546
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.c om> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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.c om> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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.
XmlReaderSettin gs settings = new XmlReaderSettin gs();
settings.Valida tionType = ValidationType. DTD;
XmlReader dtdValidatingRe ader = XmlReader.Creat e(xmlFile, settings);

settings.Valida tionType = ValidationType. Schema;
XmlReader xsdValidatingRe ader = XmlReader.Creat e(dtdValidating Reader,
settings);
while(xsdValida tingReader.Read ()) { }

Thanks,
Priya

"jhowey" <jo****@gmail.c om> wrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.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.c om> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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
1411
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"> <InspectionSite Name="Site1"> <Fiducial> <Name>Loc1Fid1</Name> <ModelFileName>Loc1Fid1Model.mim</ModelFileName> <FidSearchRegion>
4
2383
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 generate any of the specific instances. sample schema one: <?xml version="1.0" encoding="UTF-8"?> <xs:schema...
11
2773
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 own ? Thanks, Me.
0
1451
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 have a schema and takes the following form: xml: <?xml version="1.0" encoding="utf-8"?> <DataSetEntities...
6
2569
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 schema for it with Visual Studio, I get the error "Failed to create a schema for this data file because:
0
11256
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 information for the". I am using Cassini as the web server on my PCand I can still run my site from within VWD. Does anyone know what I have done to cause...
1
2077
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 inconsistencies that Xerces is able to handle that XmlSerializer seems not to be able to deal with. 1) Some of the boolean values that I'm dealing...
0
861
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" encoding="UTF-8"?> <!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) (Programmer INC) --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"...
0
2619
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 the particle of the base this xsd file is valid as per w3c standard i am also providing error in detail and geometry.xsd file geometry.xsd <?xml...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.