capture failed validation errors

W

wolf_y

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.
 
J

Joe Kesselman

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.
 
S

spiff

Hi!

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

Regards
 
H

Henry S. Thompson

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: (e-mail address removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
 
P

Peter Flynn

wolf_y said:
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
 
W

wolf_y

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.
 
S

Stylus Studio

wolf_y said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,301
Latest member
BuyPureganics

Latest Threads

Top