473,563 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Complex validation of business rules possible with XML Schema? Any other validation "languages" ?

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 that must be validated,
and I'm not sure if XML Schema can handle this or not. For example, a
certain attribute of a child element might only be valid depending on a
corresponding (but different) attribute in a parent or sibling element.

1. Can XML Schema handle complex validation rules such as this?
2. Can processing instructions be used (with supporting code) to handle
validation rules that are too complex for XML Schema?
3. Are there any other general-purpose XML "languages" for describing
complex validation rules for XML documents?

In general, how efficient is validation with XML Schema - does it require
the entire document to be loaded into memory at once?

Thanks for any help,

Mike

Jul 20 '05 #1
1 2838
In article <bY************ ********@gigane ws.com>,
Mike <mm********@yah oo.com> wrote:

% The data in question has particular business rules that must be validated,
% and I'm not sure if XML Schema can handle this or not. For example, a
% certain attribute of a child element might only be valid depending on a
% corresponding (but different) attribute in a parent or sibling element.

% 1. Can XML Schema handle complex validation rules such as this?

Not directly.

% 2. Can processing instructions be used (with supporting code) to handle
% validation rules that are too complex for XML Schema?

The `XML Schema' way of doing this is to define annotations which can be
handled by your processor.

% 3. Are there any other general-purpose XML "languages" for describing
% complex validation rules for XML documents?

Look at RELAX NG. It can do grouping with attributes (i.e., if this attribute
is present, that one must be, or if that one is present, this must not be).
I don't know enough to say whether it can do structural validation based
on attribute values (ie, this element must be present if that attribute
is set to `bob'), but it might.

% In general, how efficient is validation with XML Schema - does it require
% the entire document to be loaded into memory at once?

It seems common to apply XML Schemas to DOM trees, and that typically
involves reading the entire document. I've typically used non-XML
validation mechanisms when dealing with large amounts of data.
--

Patrick TJ McPhee
East York Canada
pt**@interlog.c om
Jul 20 '05 #2

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

Similar topics

49
2818
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville Vainio http://www.students.tut.fi/~vainio24
13
3070
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled across "null" string. I know that I will get an "undefined" when I try to retrieve something from the DOM which doesn't exist. I have used null...
81
7236
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there be any advantage in having strcat and strcpy return a pointer to the "end" of the destination string rather than returning a
9
3309
by: bubbakittee | last post by:
I am designing a package of functions to be used by people with very little programming experience (if any) and very little patience. I don't want to scare them with programmerish words like "double" and "int". I think "Number" and "Integer" would be more palatable. If I were writing in C/C++ I would just
11
3064
by: Joseph S. | last post by:
Hi all, how do I avoid typing the keyword "$this->" every time I need to reference a member of a class inside the class? (coming from a world of cozy auto-complete enabled Java / .Net IDEs I find it a bit annoying) TIA, JS
9
16981
by: Roger Withnell | last post by:
I am building a website in Russian. What options do I have to make the "Browse" button display in other languages? Thanking you in anticipation. Posted Via Usenet.com Premium Usenet Newsgroup Services
84
8522
by: aarklon | last post by:
Hi all, I found an interesting article here:- http://en.wikipedia.org/wiki/Criticism_of_the_C_programming_language well what do you guys think of this article....??? Is it constructive criticism that needs to be appreciated always...???
8
2686
by: ssecorp | last post by:
I first learned about OO from Java. I much prefer to program in Python though. However I am consufed about 2 things. 1. Why do I have to pass self into every method in a class? Since I am always doing why cant this be automated or abstracted away? Are the instances where I won't pass self? I imagine there is some tradeoff involved...
1
1194
by: per9000 | last post by:
We have a big application written without thought of supporting multiple languages with lots of strings in a default "english". Now the client wants to support any language (with a latin alphabet) and we need to redo a lot. I'm sort of thinking that we are not the first ones to end up in this kind of situation and I'd like to know if there...
0
7659
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
7580
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
8103
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
7634
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
5481
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
5208
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
3634
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...
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
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...

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.