I was working on a project where the user is required to
provide his or her own XSL file to generate his or her own HTML page based on
an XML file we provide. In this situation, the need to verify that the XSL file
will display appropriate results and not an empty page is required. Because the
requirement forced us to only display the HTML page when all the tags used in
the XSL file exists in the XML file, is why I realized that we need to create a
class library to catch this type of error.
The general steps of this article will be:
1.
Create a Class library project
2.
Create three methods: 1 public and 2 private
3.
Create a property which returns a Hash table containing the invalid
Nodes in XSL file
4.
Test the class library