473,699 Members | 2,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A query regarding validation of xml-schemas

Dear Sir,
My problem is that i am required to validate a given schema
against the standard DTDs provided by w3.org- namely xmlschema.dtd and
datatypes.dtd.
Presently, I load the given schema into an ActiveXObject and use
the function validate(). The function validate() does some sort of
validation of the given schema aginst the standard dtds mentioned
above and throws error in case the validation fails.
But there are many cases which this function validate() does not
check for .. like for example, the function does not check whether the
value of the maxOccurs attribute is always greater than or equal to
the minOccurs attribute. Similarly there are many issues that the
function validate() does not address.
I would like to know whether there is any available function which
checks for all the cases and decides if the schema conforms to the
standard dtds provided by w3.org.
or are we supposed to create our own functions to check for these
extra cases not addressed by function validate().
I would greatly appreciate it if you could mail me the answer to this
query.
Thankyou.
regards,
Divya Alice George
Jul 20 '05 #1
1 1547
"Divya Alice George" <di****@yahoo.c om> wrote in message
news:65******** *************** ***@posting.goo gle.com
Dear Sir,
There is more than one in this group. ;-)
[...]
But there are many cases which this function validate() does not
check for .. like for example, the function does not check whether the
value of the maxOccurs attribute is always greater than or equal to
the minOccurs attribute.
You cannot accomplish such a thing with a DTD, it is technically
impossible. Thus it is not the fault of the validate() method not to
find this kind of error.
Being valid does not imply that the XML file makes sense.
or are we supposed to create our own functions to check for these
extra cases not addressed by function validate().
Have a look at the SOM (Schema Object Model), it may help you a bit
further. At least it may keep you from implementing high level checking
from scratch, reducing the task to a few "for each ... in ..." loops.
I would greatly appreciate it if you could mail me the answer to this
query.


SELECT 'No'

Martin

P.S.: I don't think it is to much asked to check one thread in one
newsgroup, even through groups.google.
Jul 20 '05 #2

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

Similar topics

1
2847
by: Mike | last post by:
Note: My XML experience to date has (unfortunately) been limited to reading and thinking, rather than implementation. Anyway, I am in the process of trying to figure out the most efficient way to validate and transform some very large (potentially over 100MB) XML documents. This is related to another question I will post next, but for now, I want to focus on one particular topic. The data in question has particular business rules...
0
4106
by: Brian | last post by:
I am having alot of trouble getting a XML document validated with a schema. I got a sample document and schema off of w3schools.com, which passed an online xml validator: http://tools.decisionsoft.com/schemaValidate.html. I cannot, however, get them validated programmatically. The documents are:
0
1711
by: motoman | last post by:
i have the following code (see below), i run my validation and get unexpected results. Public ID: null System ID: file:///C:/DATA/Sandpit/Eclipse/workspace/dtdValidation/memory.xml Line number: 4 Column number: 44 Message: Element type "memories" must be declared. Public ID: null
1
1434
by: Bart Van der Donck | last post by:
Jomo (jomo@dynamicdeveloper.co.uk) wrote: > How do I generate a request from an HTML search form > (or button/hyperlink) to search/query an XML data file, > using CGI scripts, and have the results displayed within > an HTML page? Here is a (unix) starting point to play around with. It uses Perl's XML::Simple (http://search.cpan.org/dist/XML-Simple/).
2
2148
by: wumingshi | last post by:
Hi, When validating an XML instance, sometimes the schema is not enough to expression the validation rules. Additional validation rules may be expressed in an application-specific way. For example, using XPath or Java method. So is there a concept and/or standard for post-schema validation or application validation? Is there any hook in XML standards that allow me to hook up with my customized validation? Additionally and more...
9
2333
by: rbronson1976 | last post by:
Hello all, I have a very strange situation -- I have a page that validates (using http://validator.w3.org/) as "XHTML 1.0 Strict" just fine. This page uses this DOCTYPE: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> When I change the DOCTYPE to (what should be the equivalent):
2
2683
by: Dnna | last post by:
I have a table which is bound to an Internet Explorer XML data island. I'm using ASP.NET's client-side validators for an input field in the table. The problem is that if the input fields are in a table that is bound to the island (such that the rows are dynamically generated by IE from the XML data island), the validators do not work. If the table is not bound, the validators do work, but then I don't have the table iterating through...
2
7568
by: Marcin Cenkier | last post by:
Hi, I want to validate a DOM document, and if I build DOM from a stream using documentBuilder.parse() validation using validator.validate(DOMSource) works, but if I create the same document manually then validation throws an exception: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ....
1
4304
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all I´m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in Linux there is an error. The code that fails is the following: SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); I´m sure that code is ok. In fact, I´ve found that in several...
1
11526
by: NamelessNumberheadMan | last post by:
I can't seem to get Struts 2 validations to work. I have been converting from Strust 1 to Struts 2. So far I've refactored all the code (for this particular module) on the back end, rewrote the jsp using Struts 2 notations, and wired up the xml (aside from the abc-validation.xml). Everything runs just fine. If there is an error not generated by user input (i.e. file format problem) I can get that message to come out, so I know my error messages...
0
8685
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8612
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
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
8905
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,...
1
6532
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
5869
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
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...
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
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.