Applying Stylesheets to XML Documents

By now you should be convinced of the benefits of using XSLT stylesheets. The next step is to apply them in your J# applications. To do this, you have to answer certain questions:

  • Where will you get the XML document from?

  • Which transformation do you want to apply to it?

  • What do you want done with the output XML document?

These three questions match up with the three documents involved in an XSLT-based transformation (source XML, XSLT stylesheet, output XML). In this section, we’ll examine how the .NET Framework answers these questions. In one example, you’ll also see how to apply transformations to data held in ADO.NET DataSet objects.

As test data for this section, we’ll use the sample CakeCatalog.xml file and ...

Get Microsoft® Visual J#™ .NET (Core Reference) now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.