SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
The XPath API
Saxon on .NET
Extensibility
Saxon Extensions
Sample Saxon Applications
| Introduction
| Knight's Tour
| JAXP Transformation Examples
| SaxonServlet
| The Book List Stylesheet
| Shakespeare Example
| The Bible
| JDOM Example
» | Example applications for .NET
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# Example applications for .NET

The `/samples/cs` directory contains four sample applications written in C#, designed to illustrate use of the Saxon API available in the `Saxon.Api` namespace. These are:

- XsltExamples, which shows a variety of ways of invoking XSLT transformations from C#

- XQueryExamples, which similary shows different ways of running XQuery

- XPathExample, a simple application using XPath to find words within a data file such as `othello.xml`

- SchemaExample, which shows how to compile and verify a schema, and use it to validate an instance document and generate a typed document instance in the XDM data model.

The main value of these samples is in reading the source code rather than in actually running them; however, running them is also a good check that your installation has been set up correctly. a quick look at the comments in the source should enable you to see how they are executed. Note that they all require the environment variable `SAXON_HOME` to be set to the directory where Saxon is installed: this is used to find the sample data files.