<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="about" page="gettingstarted" subpage="gettingstarteddotnet"/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: Getting started with Saxon on the .NET platform</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Getting started with Saxon on the .NET platform"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Getting started with Saxon on the .NET platform</h1>
      <ol>
         <li content="para">
            <p>Download the software (you will typically start with the open-source version) from
<a href="http://sourceforge.net/project/showfiles.php?group_id=29872"
                  class="bodylink">SourceForge</a>.
It is designed to be used with .NET version 2.0 from Microsoft and has also been used successfully
with .NET version 3.5. It has not been tested with the Mono platform.</p>
         </li>
         <li content="para">
            <p>The software comes as a .exe installer <code>SaxonHEn-n-n-nNsetup.exe</code>. Double-click it to run the installer.
It installs the executable files into a user-selected directory, sets a registry entry to point to this location,
and registers the relevant DLLs in the Global Assembly Cache.</p>
         </li>
         <li content="para">
            <p>As a first-time user, you will probably want to install the sample applications.
These are packaged together with a copy of this documentation and Saxon-B source code
in the file <code>saxon-resources9-n.zip</code>. This can be downloaded from either the
SourceForge or Saxonica sites. (It is the same file in both cases). Unzip the contents
of this file into the same directory.</p>
         </li>
         <li content="para">
            <p>Make sure that .NET version 2.0 or higher is installed on your machine. This is available as
a free download from Microsoft.</p>
         </li>
         <li>
            <p>If you are using a commercial edition of Saxon (that is, Saxon-PE or Saxon-EE), you will need
to obtain a file containing a licence key.</p>
            <ol>
               <li content="para">
                  <p>Apply for a free 30-day license key by going to
<a href="http://www.saxonica.com/" class="bodylink">www.saxonica.com</a> and clicking on "Evaluation Copy". 
Be sure to specify that you want a license key for the .NET platform.</p>
               </li>
               <li content="para">
                  <p>The license
key file will be sent by email within 24 hours. This file, called <code>saxon-license.lic</code>,
should be placed in the directory containing the Saxon .dll files: for example 
<code>c:/Program Files/Saxonica/SaxonHE9.3N/bin</code>
                  </p>
               </li>
            </ol>
         </li>
         <li content="para">
            <p>Saxon doesn't come with a graphical user interface: it's designed to be integrated into
other tools and applications. You will therefore start by using it from the operating system
command line. On Windows, you may want to install a text editor such as <a href="http://www.ultraedit.com/" class="bodylink">UltraEdit</a>
that offers a more friendly command line than the standard DOS console provided by Microsoft.</p>
         </li>
      </ol>
      <p><i>Note: from Saxon 9.2, license files are compatible between the Java and .NET platforms.
License files issued for earlier Saxon releases on .NET (named <code>saxon-license.xml</code>)
are still recognized for the time being.</i></p>
      <p>You can now run one of the sample stylesheets or queries that comes with the 
<code>saxon-resources</code> download.
Assuming you installed into <code>c:\saxon</code>, make this your current directory, and type:</p>
      <p><i>for XSLT (all on one line):</i></p>
      <div class="codeblock"
           style="border: solid thin; background-color: #B1CCC7; padding: 2px">
         <pre>
            <code>bin\Transform -t -s:samples\data\books.xml 
     -xsl:samples\styles\books.xsl -o:c:\temp.html</code>
         </pre>
      </div>
      <p><i>for XQuery (all on one line):</i></p>
      <div class="codeblock"
           style="border: solid thin; background-color: #B1CCC7; padding: 2px">
         <pre>
            <code>bin\Query -t -s:samples\data\books.xml 
       -q:samples\query\books-to-html.xq -o:c:\temp.html</code>
         </pre>
      </div>
      <p>Now open <code>c:\temp.html</code> in your browser to check that it worked.</p>
      <p>For more complete details on installing Saxon on the .NET platform, 
see <a class="bodylink" href="../../about/installationdotnet.xml">Installing (.NET)</a></p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="../whatis.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>