473,785 Members | 2,482 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem validating w3c XML Schema Module with XmlValidatingRe ader


Hi-

I've created an XHTML extension module which validates correctly using the W3C online schema validator, but fails when
I use the .net 1.1 validator. It seems to be choking on an included W3C file:

http://www.w3.org/MarkUp/SCHEMA/xhtml-notations-1.xsd

The problem seems to be on this line:

<xs:notation name="cdata" public="-//W3C//NOTATION XML 1.0: CDATA//EN" />

My code does something like this:

XmlTextReader reader = new XmlTextReader(n ew StreamReader(te stfile.OpenRead ()));
XmlValidatingRe ader vreader = new XmlValidatingRe ader(reader);
vreader.Validat ionType=System. Xml.ValidationT ype.Schema;
vreader.Schemas .Add("http://www.w3.org/1999/xhtml", "http://localhost/TestModule.xsd" );

The exception (thrown at the last line) is this:

System.Xml.Sche ma.XmlSchemaExc eption : Public attribute '-//W3C//NOTATION XML 1.0: CDATA//EN' is invalid URI. An
error occurred at http://www.w3.org/MarkUp/SCHEMA/xhtml-notations-1.xsd, (31, 4).

Any idea on what might cause that?

Thanks,

-Mike
Nov 12 '05 #1
2 1499
Hi-

One additional bit of information: according to the definition of the "public" attribute, it has to conform to ISO-8879.
As far as I can tell, "-//W3C//NOTATION XML 1.0: CDATA//EN" is a valid value. Could this be a bug in the validator? Or
is there something else going on here?

Thanks,

-Mike


On Mon, 25 Apr 2005 17:47:27 GMT, Mike Bridge <mi**@bridgecan ada.com> wrote:

Hi-

I've created an XHTML extension module which validates correctly using the W3C online schema validator, but fails when
I use the .net 1.1 validator. It seems to be choking on an included W3C file:

http://www.w3.org/MarkUp/SCHEMA/xhtml-notations-1.xsd

The problem seems to be on this line:

<xs:notation name="cdata" public="-//W3C//NOTATION XML 1.0: CDATA//EN" />

My code does something like this:

XmlTextReader reader = new XmlTextReader(n ew StreamReader(te stfile.OpenRead ()));
XmlValidatingRe ader vreader = new XmlValidatingRe ader(reader);
vreader.Validat ionType=System. Xml.ValidationT ype.Schema;
vreader.Schemas .Add("http://www.w3.org/1999/xhtml", "http://localhost/TestModule.xsd" );

The exception (thrown at the last line) is this:

System.Xml.Sche ma.XmlSchemaExc eption : Public attribute '-//W3C//NOTATION XML 1.0: CDATA//EN' is invalid URI. An
error occurred at http://www.w3.org/MarkUp/SCHEMA/xhtml-notations-1.xsd, (31, 4).

Any idea on what might cause that?

Thanks,

-Mike


Nov 12 '05 #2
This is an issue with the schema validator in .net 1.1, which is fixed in
..net framework v2.0 beta2.

Thanks.

"Mike Bridge" <mi**@bridgecan ada.com> wrote in message
news:bm******** *************** *********@4ax.c om...

Hi-

I've created an XHTML extension module which validates correctly using the W3C online schema validator, but fails when I use the .net 1.1 validator. It seems to be choking on an included W3C file:
http://www.w3.org/MarkUp/SCHEMA/xhtml-notations-1.xsd

The problem seems to be on this line:

<xs:notation name="cdata" public="-//W3C//NOTATION XML 1.0: CDATA//EN" />
My code does something like this:

XmlTextReader reader = new XmlTextReader(n ew StreamReader(te stfile.OpenRead ())); XmlValidatingRe ader vreader = new XmlValidatingRe ader(reader);
vreader.Validat ionType=System. Xml.ValidationT ype.Schema;
vreader.Schemas .Add("http://www.w3.org/1999/xhtml", "http://localhost/TestModule.xsd" );
The exception (thrown at the last line) is this:

System.Xml.Sche ma.XmlSchemaExc eption : Public attribute '-//W3C//NOTATION XML 1.0: CDATA//EN' is invalid URI. An error occurred at http://www.w3.org/MarkUp/SCHEMA/xhtml-notations-1.xsd, (31, 4).
Any idea on what might cause that?

Thanks,

-Mike

Nov 12 '05 #3

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

Similar topics

3
2606
by: paul | last post by:
Hi, My code won't validate the xml document. I'm using vb.net. In the IDE I can use the schema to validate the XML. But when I use XmlValidatingReader in code it does not pick any restrictions. eg. in the following schema I want one and only one 'Header' element, and I want a 'Message' element to be within a Messages element as 'Messages' is a collection of 'Message'. If I change these in the IDE (when I've pulled them into the project)
5
4075
by: Adam Child | last post by:
Hi All, I'm trying to validate an xml document. I'm having trouble setting the default namespace of the xml document. If I hard encode the namespace in the xml file then everything works fine. But I can't do this because it breaks our old tools which validate the xml to a dtd (error saying the dtd doens't allow xmlns attribute on the root element). So I'm trying to add the default namespace to the xml file by code. As follows:
1
1836
by: Ryan | last post by:
I have a very complex XDR schema that uses namespaces: xmlns="urn:schemas-microsoft-com:xml-data" xmlns:b="urn:schemas-microsoft-com:BizTalkServer" xmlns:d="urn:schemas-microsoft-com:datatypes" Do I need to build a custom validator in order to validate XML documents against this schema? How does the XML parser know how to validate against the extra namespaces?
2
2630
by: Raghu R | last post by:
From: "R. Raghuraman" <raghuraman@infosys.com> Subject: Problem with XMLValidatingReader? Date: 01 April 2004 11:46 Hi, I have a large xml file to process (~ 70 mb). I am trying to use XMLValidating reader. The first step was to try out the example in quickstart samples with minor modifications . My intention is to validate the file against a DTD before processing and to collect all validation errors in a single pass.
4
1907
by: Tomas Rivas | last post by:
I am trying to validate an xml file and schema and when I am trying to validate I am getting the following error. I have been trying to come out with a solution but I have failed so far. The document validates ok in xmlSpy but it fails in VS2003. Is there any article or fix for this? Thnaks in advance. Error: ======
2
2641
by: Joris Janssens | last post by:
I'm trying to write a program for validating XHTML 1.1-documents against the XHTML 1.1 DTD (which is actually the same as validating an XML-file) but I always get a "(404) Not found" error. This is the program itself : ******************************************************************** using System; using System.Xml; using System.Xml.Schema;
5
1414
by: Geoff | last post by:
I am using an XMLValidatingReader to validate an XML file received via a web service. I want to verify that the incoming file matches the XML schema. When testing the validation routine, the XMLValidatingReader correctly flags mis-matched tags such as <abc>some content</xyz> but does not catch other errors. For example, it doesn't catch tags that are not part of the schema, doesn't catch missing tags where the schema has minoccurs="1", and...
1
1764
by: Nathan Alden | last post by:
I have an XSD defined as the following: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="Application"> <xs:complexType> <xs:sequence> <xs:element name="ReceivedDate" type="xs:string"/> </xs:sequence>
0
1417
by: Matt | last post by:
I have a problem when I select node elements from an xml file and validata each node againts the schema. I use XmlValidatingReader and it complains about elements not being declared. I have defined a schema for details of a particular service request. Below is a schema similar to the one that I defined: <?xml version="1.0" standalone="yes" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"...
0
10324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10090
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9949
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7499
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5380
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.