?
Solved

Handling Errors in XML Transformations

Posted on 2005-03-17
4
Medium Priority
?
379 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

770 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