473,473 Members | 2,100 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Designing an XML Input Doc for Application

Assume an app has a set of input rules in an xml doc named rules.xml. A
user generates another xml doc (or fragment) named data.xml. What are
some ways I can validate data.xml with rules.xml without relying on a
external script to do the validation. I suppose you could use an
internal script (XHTML with Javascript), but can it be done with a DTD
Spec and XPath?

Thanks,

Mar 27 '06 #1
2 1036
Write the rules as an XML Schema, assuming Schema is rich enough to
support them.

Otherwise, the application gets to do its own validation, or gets to
invoke an external enhanced-validation tool of some sort.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Mar 27 '06 #2


joeslide wrote:
Assume an app has a set of input rules in an xml doc named rules.xml. A
user generates another xml doc (or fragment) named data.xml. What are
some ways I can validate data.xml with rules.xml without relying on a
external script to do the validation. I suppose you could use an
internal script (XHTML with Javascript), but can it be done with a DTD
Spec and XPath?


You need a validating parser and use that to validate data.xml against
rules.xml (assuming rules.xml is a schema in a schema language the
parser supports).
For W3C XML schemas an instance document (e.g. data.xml) can indicate
schemas with the xsi:schemaLocation attribute (or
xsi:noNamespaceSchemaLocation).
Some parsers have command line interfaces, some are integrated into XML
editors, some have APIs to be used from various programming languages.
If you do the validation from the command line or with an XML editor
then you don't need script respectively your own program to perform the
validation.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Mar 27 '06 #3

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

Similar topics

6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
2
by: Sky Sigal | last post by:
Hello: I'm currently messing around, and need as much feedback/help as I can get, trying to find the most economical/graceful way to build usercontrols that rely on styling to look any good... ...
5
by: Anthony J Biondo Jr. | last post by:
I am trying to design an application that supports multiple languages. I have seen examples using an XML file and writing a custom function to import the strings and I have seen examples of...
2
by: Mahesh Kumar.R | last post by:
I'm into designing an application in winforms but in near future my client may request the same thing in webforms. so (1) what are all the design guidelines and ways are there to migrate easily in...
3
by: mystilleef | last post by:
Hello, I need to design a plug-in system for a project. The goal is to allow third party developers interact with an application via plug-ins in a clean and robust manner. At this point I am...
1
by: fullxml | last post by:
Hello NG, I have a feeling that this question might not be right for this NG but I got pointers in the past regarding where to look to find the solution so again I have hope someone will point...
8
by: pransri2006 | last post by:
Hi guys! I think all of u know about the designing of compilers. Can any body tell me about the designing of the compilers. And also tell me the difference between the compilers and Interpreter...
6
by: Zim Babwe | last post by:
VS 2005 Windows Application I need to have users enter product information, then contact information, then some other financial information. Currently I have a form that the user enters info...
11
by: Gunter Schelfhout | last post by:
I'm starting to write a QT-program on Linux but I'm not very experienced yet. (hang on, it will be on topic) What is the best way to go to design the lower level classes? Should I use the standard...
0
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,...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.