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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.