Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Handling Errors in XML Transformations

Posted on 2005-03-17
4
Medium Priority
?
383 Views
Last Modified: 2013-11-19
Hello Friends,

Just a few quick questions:

1) How do we handle errors in the process of transforming XML using XSLT? Is there any API for that? Does that differ with implementation? (say JavaScript, ASP etc)

2) What is a validating parser and non-validating parser? Any examples please...

Thanks,
Srinivas
0
Comment
Question by:srinivas_vemla
  • 2
  • 2
4 Comments
 
LVL 15

Assisted Solution

by:dualsoul
dualsoul earned 200 total points
ID: 13573617
> 1) How do we handle errors in the process of transforming XML using XSLT? Is there any API for that? Does that differ with implementation? (say JavaScript, ASP etc)
almost any XSLT engine i know, throws exceptions if any error occurs during transformation, so you can handle it, and do something


> 2) What is a validating parser and non-validating parser? Any examples please.
Validating parser - will validate input XML against its DTD/Schema (if avaliable), and if xml doesn't confirm to its schema, it will throw approporiate exception, indicating that xml was invalid.

Non-validating parser - won't validate XML against schema, only parse it and that's all.

So, validating parser ensures well-formness and validity of XML. Non-validating only well-formness.
0
 
LVL 29

Accepted Solution

by:
bloodredsun earned 300 total points
ID: 13573663
1)Error handling differs with each API/Parser/Language but is not instrinsic to XSLT ,i.e. there is no error handling in XSLT itself but there can be in an API like Saxon or MSXML, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmconPerformingErrorHandlingwithXSLT.asp

2)Validating checks the dtd or schema while non-validating just checks the well-formedness of the xml file.
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13573797
Sorry dualsoul, refresh didn't bring you up!
0
 
LVL 15

Expert Comment

by:dualsoul
ID: 13578585
^) don't worry about it :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question