Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Complex validation of business rules possible with XML Schema? Any other validation "languages"?

Reply
Thread Tools

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

 
 
Mike
Guest
Posts: n/a
 
      11-21-2003
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



 
Reply With Quote
 
 
 
 
Patrick TJ McPhee
Guest
Posts: n/a
 
      11-21-2003
In article <(E-Mail Removed)>,
Mike <(E-Mail Removed)> 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
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
rules for Cisco PIX 525 firewall rules KAS Cisco 2 10-02-2005 07:12 PM
Rules for complex declarations masood.iqbal@lycos.com C Programming 0 01-23-2005 09:26 AM
Highly optimized business-rule validation of very large XML documents possible? Mike XML 4 11-23-2003 09:58 PM



Advertisments