When transforming documents in XSLT, various errors, such as incorrect syntax, type errors, and escaping of white spaces, may occur. White spaces in the XML document cause errors while parsing the document.
You can classify errors occurring during transformation as:
Static: Occurs due to missing or incorrect syntax or incorrect structuring of stylesheet elements. You need to inform the end user about static errors before transforming the document, because these errors cannot be rectified during run time.
Dynamic: Occurs during run time. The XSLT processor either terminates the process or continues processing the document by taking actions to recover from the error. The action taken can either rectify the error or ignore the error and continue transforming the document.
Type: Occurs if there is any mismatch in the data type, because of which the processor does not receive data in the required format. For example, using a string in the place of a numeric value leads to a type error. Type errors can be static or dynamic.
Serialization: Occurs when serializing the result tree to the output format. For example, if the specified encoding value cannot be used to serialize the result tree in the required output format, a serialization error occurs.
No comments:
Post a Comment