472,805 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

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 2781
In article <bY********************@giganews.com>,
Mike <mm********@yahoo.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.com
Jul 20 '05 #2

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

Similar topics

49
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...
13
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...
81
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...
9
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...
11
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...
9
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...
84
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...
8
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...
1
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)...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

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.