
<?xml-stylesheet href="../make-menu.xsl?cache=20260710" type="text/xsl"?>
<html>
  <head>
    <this-is section="technology" page="questions" subpage=""></this-is>
    <title>Saxonica: Technology FAQ</title>
    <meta name="title" content="Saxonica: Technology FAQ" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="description" content="contains introduction to XML, XSLT, XQuery, and Saxon" />
    <meta name="keywords" content="XML, XSLT, XQUERY, PUBLICATIONS, W3C" />
    <meta name="coverage" content="Worldwide" />
    <meta name="copyright" content="Copyright Saxonica Ltd" />
    <meta name="robots" content="index, follow" />
  </head>
  <body class="main">
    <h1>Answers to frequently asked questions</h1>
    <!--<div id="aside"> -->
    <h2>Technology</h2>
    <ul>
      <li><a href="#whyschema" class="title">Why should I want to use a schema-aware XSLT or XQuery
          processor?</a></li>
      <li><a href="#hard" class="title">I've heard XSLT is hard to learn. Is this true? </a></li>
      <li><a href="#xslt" class="title">Should I use XSLT or XQuery? Are the two languages in
          competition?</a></li>
    </ul>
    <h2>Product functionality</h2>
    <ul>
      <li><a href="#static" class="title">Does Saxon do static type-checking?</a></li>
      <li><a href="#xerces" class="title">Why didn't Saxon use the schema processor already
          available in Xerces?</a></li>
      <li><a href="#platforms" class="title">How do the products for different platforms relate to
        each other?</a></li>
    </ul>
    <h2>Commercial</h2>
    <ul>
      <li><a href="#free" class="title">Will Saxon continue to be available free of charge?</a></li>
      <li><a href="#open" class="title">What are the differences between the open-source and
          commercial versions?</a></li>
      <li><a href="#source" class="title">Is source code available for the schema-aware version of
          Saxon?</a></li>
      <li><a href="#comm" class="title">Does the commercial version of Saxon include all the
          open-source code?</a></li>
      <li><a href="#languages" class="title">Does Saxon support any languages other than
        English?</a></li>
      <li><a href="#ipr" class="title">Who owns the IPR in Saxon?</a></li>
      <li><a href="#cloud" class="title">What license do I need to run Saxon in the cloud?</a></li>
      <li><a href="#saas" class="title">Do I need individual licenses or a site license or a
        redistribution license if my company uses a SaaS model?</a></li>
    </ul>
    <!--</div>-->
    <a id="whyschema" class="anchor"></a>
    <h2>Why should I want to use a schema-aware XSLT or XQuery processor?</h2>
    <p>The short answer is that it makes it easier and faster to develop correct stylesheets and
      queries, especially when handling complex input or output vocabularies. By declaring the types
      of data that individual functions or templates are designed to manipulate, and by validating
      source and result data against a schema at each stage of processing, bugs are caught earlier
      in the development cycle. Incorrect queries and stylesheets typically produce an error message
      rather than simply producing incorrect output. Error messages are likely to refer to the exact
      point in the query or stylesheet where the error needs to be corrected, rather than simply
      reporting that the output of the query or stylesheet is invalid.</p>
    <p>For more information, see <a class="bodylink" target="_blank"
        href="https://www.stylusstudio.com/schema_aware.html">Michael Kay's article on the Stylus
        Studio web site</a>.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="hard" class="anchor"></a>
    <h2>I've heard XSLT is hard to learn. Is this true? </h2>
    <p>It really depends on your experience. If your background is in procedural programming, for
      example with Java or JavaScript then you may not be all that familiar with some of the ideas
      in XSLT.</p>
    <p><a class="bodylink" target="_blank" href="https://www.mulberrytech.com">Mulberry
        Technology's</a> paper <a class="bodylink" target="_blank"
        href="https://www.mulberrytech.com/papers/Intro2XSLT/Intro2XSLT.pdf">Introduction to XSLT
        Concepts</a> provides an excellent introduction.</p>
    <p>It is easy enough to get started by looking at some existing code, but there is so much power
      in XSLT that it is well worth investing some effort into studying it in more depth; you will
      be much more productive in your use of the language as a result.</p>
    <p>For an excellent beginner's guide, see <a class="bodylink" target="_blank"
        href="https://www.amazon.com/exec/obidos/ASIN/1590593243">Beginning XSLT 2.0</a> by Jeni
      Tennison.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="xslt" class="anchor"></a>
    <h2>Should I use XSLT or XQuery? Are the two languages in competition?</h2>
    <p>The two languages do have a high level of functional overlap, but each language has unique
      strengths. XSLT 2.0 is better than XQuery 1.0 at handling the rendition of narrative
        (<i>document-oriented</i>) XML (for example it offers facilities such as
        <code>format-number()</code> and <code>format-date()</code>), while XQuery makes it easier
      to perform some of the manipulations needed when handling more rigidly-structured data. Saxon
      is unique in allowing the two languages to be mixed in a single application.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="static" class="anchor"></a>
    <h2>Does Saxon do static type-checking?</h2>
    <p>Saxon does not do static type-checking in the sense that the term is used in the W3C language
      specifications (this refers to pessimistic type checking, in which any construct that
        <i>might</i> fail at run-time is rejected at compile time). This is an optional feature of
      the W3C specifications. Saxon does however perform <i>optimistic</i> static analysis of
      queries and stylesheets, in which an error is reported only for constructions that <i>must
        always</i> fail at run-time. The information derived from this static analysis is also used
      to optimize the run-time code. </p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="xerces" class="anchor"></a>
    <h2>Why didn't Saxon use the schema processor already available in Xerces?</h2>
    <p>Schema processing needs to be tightly integrated into a schema-aware XSLT or XQuery
      processor. By designing a new schema processor as an integral part of Saxon, it was possible
      to design data structures and interfaces that are optimized for use in this environment. For
      example, the schema processor and validator share the use of the Saxon NamePool for managing
      names and namespaces, and the validator is designed to slot into Saxon's SAX-like event
      processing pipeline used both for building source documents and for serializing output
      documents. This close integration also enables much better error reporting, something which is
      critical to the usability of a schema-aware XSLT or XQuery processor. Finally, Saxon has
      always prided itself on offering the highest-possible level of adherence to W3C
      specifications, and this would not be possible if such a critical component were outside
      Saxon's direct control.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="platforms" class="anchor"></a>
    <h2>How do the products for different platforms relate to each other?</h2>
    <p>Saxon is offered on four technology platforms: Java, .NET, C, and JavaScript.</p>
    <p>The first three (Java, .NET, and C) are derived from the same Java source code:</p>
    <ul>
      <li>Until version 10, Saxon for .NET was created by converting Java bytecode to the .NET
        equivalent (CIL) using using IKVMC, an open-source cross-compiler. IKVMC, however, only
        supported .NET Framework, which has now been discontinued. From version 11, therefore,
        SaxonCS was created using an entirely different approach: the Java source code is
        translated into C# using a custom transpiler developed by Saxonica (largely in
        XSLT).</li>
      <li>Saxon for the C platform (with language bindings for C++, PHP, and Python) was
        developed using the Excelsior JET tooling, which compiles Java "ahead of time" directly to
        machine code. (While this approach has proved successful and continues to work well, the
        tooling is no longer under active development and we will be looking at alternative
        mechanisms in the future.)</li>
      <li>Saxon for JavaScript platforms (browsers and node.js) uses a completely separate code
        base, though much of the design is common. There is some interoperability, in that the XSLT
        compiler in the Java product can be used to generate an executable representation of a
        stylesheet (a SEF file) which the JavaScript product can load and execute.</li>
    </ul>
    <p>Each of the products offers APIs adapted to the conventions of the relevant language (Java,
      C#, JavaScript, Python, etc.), and each takes advantage of the run-time capabilities of the
      respective platforms, and integrates with other components such as XML parsers appropriate to
      that platform.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="free" class="anchor"></a>
    <h2>Will Saxon continue to be available free of charge?</h2>
    <p>The open-source development model has been very successful for Saxon, and the company
      Saxonica was established in order to make it possible to continue it. Saxonica aims to develop
      added-value options to the base Saxon technology that will be offered commercially, alongside
      the open-source product which will continue to meet the needs of most users.</p>
    <p>In the twelve years since Saxonica was established, new releases of the open-source Saxon-HE
      product have continued to be released in parallel with the commercial Saxon-EE offering, and
      Saxon-HE users have benefited from many of the investments funded through Saxonica's
      commercial activities.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="open" class="anchor"></a>
    <h2>What are the differences between the open-source and commercial versions?</h2>
    <p>The open source product, Saxon-HE, offers conformance to W3C standards at the minimum
      conformance level. The functionality and performance are good enough to build some serious
      applications, but the commercial products (PE - professional edition, and EE - enterprise
      edition) offer added capability that can improve scaleability and reduce integration
      costs.</p>
    <p>The focus in Saxon-PE is on <b>extensibility</b>. Saxon-PE includes a range of functional
      extensions to the W3C base standards developed by Saxonica (for example, libraries for SQL
      database access and for manipulating binary data), and it provides APIs allowing XSLT, XQuery,
      and XPath code to make calls to user-written Java or C# methods.</p>
    <p>For Saxon-EE, the focus is on <b>scaleability</b>. The main differences are:</p>
    <ul>
      <li>Saxon-EE is <b>schema-aware</b>. This means it includes an XML Schema processor, and
        schema-aware XSLT 3.0 and XQuery 3.1 processors. The main benefit of schema-aware processing
        is that it makes it easier to find errors in large queries and stylesheets, leading to
        faster development and fewer bugs in deployed code. A schema-aware XSLT or XQuery processor
        takes advantage of the type information extracted when source documents are validated
        against a schema; this gives the potential for improved error reporting and improved
        performance. A schema-aware XSLT or XQuery processor also allows the result document to be
        validated as it is being written, so for example if the stylesheet or query generates
        incorrect XHTML, the error can be pinpointed to the place in the stylesheet or query that
        needs to be corrected.</li>
      <li>Saxon-EE provides <b>streamed processing</b> as defined in the XSLT 3.0 specification.
        This allows source documents in the gigabyte to terabyte range to be transformed without
        running out of memory.</li>
      <li>Saxon-EE allows stylesheets to be <b>exported</b> for execution elsewhere. This gives
        performance benefits when large stylesheets are used frequently; and it gives developers the
        ability to control how the code is used, protecting intellectual property and enabling
        change management. In addition, Saxon-EE allows critical parts of stylesheets or queries to
        be compiled as Java or .NET bytecode, giving a useful performance boost of typically 25-40%.
      </li>
    </ul>
    <p>For more information, see <a class="bodylink" href="../products/products.xml" target="_self"
        >Saxonica products</a>.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="source" class="anchor"></a>
    <h2>Is source code available for the schema-aware version of Saxon?</h2>
    <p>No, this software is being made available on a commercial basis, protected by a license key.
      If you need access to source code for commercial reasons, please contact Saxonica to discuss
      possible licensing terms.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="comm" class="anchor"></a>
    <h2>Does the commercial version of Saxon include all the open-source code?</h2>
    <p>Yes. The code from Saxon-HE is all present in Saxon-EE, without any modifications. Saxon-EE
      is built entirely by adding modules to Saxon-HE. Because the open source code is not modified,
      there is no need to publish separate Saxon-EE versions of these modules. In the terminology of
      the Mozilla Public License, Saxon-EE is a <i>larger work</i> rather than a modification.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="languages" class="anchor"></a>
    <h2>Does Saxon support any languages other than English?</h2>
    <p>All the interfaces for developers are in English, but there is some localisation support in
      transformation to enable dates and numbers to be formatted in other Western European
      languages. So end-user output can be localised, but developer output cannot. Number and date
      formatting is currently available for: English, Danish, German, French, French (Belgium),
      Italian, Dutch, Flemish (Belgium) and Swedish. </p>
    <p>Saxon includes APIs which allow support for additional languages to be developed. Should you
      wish to do so for a specific language, we are happy to provide advice and to incorporate the
      results into a future version of Saxon.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="ipr" class="anchor"></a>
    <h2>Who owns the IPR in Saxon?</h2>
    <p>The vast majority of the code was developed by Saxonica, and Saxonica therefore owns the
      copyright.</p>
    <p>The open-source Saxon code is developed and released under the Mozilla Public License version
      2.0, which you can obtain at <a class="bodylink" target="_blank"
        href="https://www.mozilla.org/MPL/2.0/">https://www.mozilla.org/MPL/2.0/</a>. The Mozilla
      license grants you a right to use the code, distribute it, and modify it, free of charge, for
      any purpose. Modifications to the code must be distributed under the same license as the
      original code. The Mozilla license is not viral: it allows you to incorporate Saxon in a
      commercial product without any requirement to make your own code open source.</p>
    <p>The additional code in Saxon-PE and Saxon-EE is proprietary to Saxonica.</p>
    <p>Prior to 2004, early versions of Saxon were produced by Michael Kay while working as an
      employee first of International Computers Limited (since merged into Fujitsu) and subsequently
      of Software AG. These early versions were released under the Mozilla Public License under the
      authority of those companies. Subsequent versions (including all commercial versions) of the
      software have all been released under the authority of Saxonica. </p>
    <p>Over the years, some individual contributions to the open source code have been accepted from
      third parties. These are acknowledged in the documentation: see <a
        href="../documentation/#!conditions/contributors" class="bodylink">List of contributors</a>.
      Currently Saxonica does not accept source code contributions without a formal assignment of
      copyright.</p>
    <p>Saxon incorporates some open source components developed independently by third parties: an
      example is the sort routine. These components are all listed, together with their license
      conditions, in the documentation: see <a
        href="../documentation/#!conditions/third-party-components" class="bodylink">Third party
        source components</a>. </p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="cloud" class="anchor"></a>
    <h2>What license do I need to run Saxon in the cloud?</h2>
    <p>It depends what you are doing.</p>
    <p>If you're running a web site or an application that delivers information to internal or
      external users, or that enables them to interact with you, then we try to treat it in the same
      way as if you were running the web site in-house. Pricing is a bit complicated because there's
      no simple formula that works for everyone, so the rule we apply is that the charge we make is
      related to the amount you are paying for the cloud service, just as it would be if you bought
      your own hardware to run it. Please ask us for a quote: we can be flexible.</p>
    <p>If you're using the cloud to deliver software-as-a-service, then we treat this as if you were
      shipping an application for customers to run on their own machines. That means you need to buy
      a redistribution license. The distinguishing feature for this scenario is that the application
      is yours, but the data belongs to your customer.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
    <a id="saas" class="anchor"></a>
    <h2>Do I need individual licenses or a site license or a redistribution license if my company
      uses a SaaS model?</h2>
    <p>It's difficult to give a blanket answer to questions about software-as-a-service (SaaS)
      deployments because they vary so much across platforms and architectures. We don't want to
      impose constraints on our customer's applications; the only distinction we make is for
      revenue-generating applications that process your customer's data.</p>
    <p>If you're running a web site or similar service that users aren't paying for, or if they are
      only paying for access to your content, then you only need a license to run the software on
      the computer that's hosting the site. For this, a site license or individual licenses are
      sufficient.</p>
    <p>However, if you're providing a service where your users are paying you to host an application
      that's processing their data, that's similar to the case where the users are running the
      application themselves, and needs a redistribution license.</p>
    <p>If you're unsure about your deployment, it's best to contact <email
      address="saxon-orders@saxonica.com" title="saxon-orders@saxonica.com"></email>.</p>
    <a href="#top" class="top-of-page"><p>Return to top of page</p></a>
  </body>
</html>
