473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

capture failed validation errors

Firstoff, I'm a SAS programmer, new to XML, and was assigned the task
of designing a process to validate customer submitted XML files. As
the frontend of a database loading process we plan to use XMLSpy When
a file fails validation, we want to return it with sufficient
information for accurate correction. I just learned from Altova's tech
support that it's not possible to capture such information at this time
(planned for a future release).

So, I'm seeking suggestions on how we can accomplish it. I perused the
http://www.w3.org/ site but didn't find information.

Feb 9 '06 #1
8 1371
> So, I'm seeking suggestions on how we can accomplish it.

This isn't well standardized, but: Look at the docs for your parser and
see if you can register an Error Listener. That may, or may not, return
enough information for you to return the detailed fix advice.

If not, you may need to change parsers to find one that does give you
the info you need.
Feb 10 '06 #2
Hi!

Using the API you could get the error message given by XMLSpy. However,
currently XMLSpy only reports one error after another.

Regards

Feb 10 '06 #3
The W3C XML Schema public home page [1] lists a number of validators,
several of which (at least xerces and XSV, to my certain knowledge)
produce error output -- in XSV's case in the form of XML documents
which can be further styled with XSLT.

ht

[1] http://www.w3.org/XML/Schema.html
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Feb 10 '06 #4
wolf_y wrote:
Firstoff, I'm a SAS programmer, new to XML, and was assigned the task
of designing a process to validate customer submitted XML files. As
the frontend of a database loading process we plan to use XMLSpy When
a file fails validation, we want to return it with sufficient
information for accurate correction. I just learned from Altova's tech
support that it's not possible to capture such information at this time
(planned for a future release).

So, I'm seeking suggestions on how we can accomplish it. I perused the
http://www.w3.org/ site but didn't find information.


Just run a standalone validating parser and either send them the output
(which may be difficult to understand if they don't understand XML) or
pass the output through a script to replace the error messages with your
own. See http://xml.silmaril.ie/authors/parsers/

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Feb 10 '06 #5
Thanks for a number of on-target responses that increased my
understanding enough to take the issue to the stakeholders. I'm new to
the project and uncertain about some conditions. For instance, I don't
know how committed we are to XMLSpy so alternative parsers may be
unacceptable.

I researched API's on Altova's site and see that, if XMLSpy is the
chosen parser, I'll have to involve one of the programming groups that
can access and utilize the error reporting hooks.

Feb 14 '06 #6
If you have any questions or problems with the API I could also help.

Feb 15 '06 #7
wolf_y wrote:
Thanks for a number of on-target responses that increased my
understanding enough to take the issue to the stakeholders. I'm new to
the project and uncertain about some conditions. For instance, I don't
know how committed we are to XMLSpy so alternative parsers may be
unacceptable.


Hi -

Stylus Studio, a competing XML vendor, recently published our take on
the XMLSpy parser (i.e. AltovaXML) - it may or may not be of interest
to you -- but here it is anyway.

Our Report is published here:
http://www.stylusstudio.com/altovaxml.html
User Comments: http://www.stylusstudio.com/altovaxml_comments.html

Sincerely,
The Stylus Studio Team
http://www.stylusstudio.com

Feb 15 '06 #8
Sure, if you like to read stuff compiled by marketing... :-)

Feb 16 '06 #9

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

Similar topics

3
by: mo | last post by:
The code I've pasted below is taken directly from Microsoft's site at http://support.microsoft.com/default.aspx?scid=kb;EN-US;308157 As far as I can tell the error is raised on this line: conn...
2
by: Sudip Chakraborty | last post by:
Is there a way to see constraint validation errors while loading xml into a DataSet ? I'm interested in the line number in the xml file which is causing the error. I've enclosed the relevant stack...
12
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation...
9
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be...
1
by: Dhruba Bandopadhyay | last post by:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm....
2
by: Jeremy Chapman | last post by:
This is odd behavior. In my aspnet 2.0 app (basic app, nothing out of the ordinary here), if I am using my iPAQ handheld device and I hit the refresh button on my page, I get an error "Validation...
6
by: sck10 | last post by:
Hello, I have applications that produce the following error when they have been open to long without activity. Is there any way to force a re-load of the page or go to another page if the page...
3
by: sck10 | last post by:
Hello, I have a web project (VS 2008 c#). I have a page that opens, but when I try to call an assembly (managed c++) on a submit event, I get the following error on the web server, but not on...
0
by: skozyk | last post by:
I kept getting the following error: "Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.