title: Load entities in XSLT 2?
body: <p>I'm using an XSLT 2.0 program to process some MathML documents.  In those MathMLs, there are entities like <code>&amp;ApplyFunction;</code> and <code>&amp;InvisibleTimes;</code>, that give me "entity not defined" errors.  Is there a way I can process documents with these entities without loading the MathML schema? (Because Saxon-HE cannot use <code>xsl:import-schema</code>…)</p>
  
  <p>And just to be clear, I don't need to use the entities in my XSLT; I need to process XMLs that have them.</p>
  
  <p>There's an entity file for MathML like this:</p>
  
  <pre><code>&lt;!ENTITY AElig            "&amp;#x000C6;" &gt;&lt;!--LATIN CAPITAL LETTER AE --&gt;
  &lt;!ENTITY AMP              "&amp;#38;#38;" &gt;&lt;!--AMPERSAND --&gt;
  &lt;!ENTITY Aacute           "&amp;#x000C1;" &gt;&lt;!--LATIN CAPITAL LETTER A WITH ACUTE —&gt;
  ...
  </code></pre>
  
  <p>Maybe I can somehow make use of that?</p>
  
  <p>UPDATE: multiple people has mentioned that the input documents should have the correct DTD.  So here's an minimal example:</p>
  
  <p>The XSLT:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xsl:stylesheet version="2.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:xs="http://www.w3.org/2001/XMLSchema"
                  xmlns:m="http://www.w3.org/1998/Math/MathML"&gt;
    &lt;xsl:output method="text"/&gt;
  
    &lt;xsl:template match="/"&gt;
      &lt;xsl:text&gt;aaa&lt;/xsl:text&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The MathML with DTD declaration:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN"
      "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd"&gt;
  &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
    &lt;mrow&gt; 
      &lt;mi&gt; sin &lt;/mi&gt; 
      &lt;mo&gt; &amp;ApplyFunction; &lt;/mo&gt; 
      &lt;mi&gt; x &lt;/mi&gt; 
    &lt;/mrow&gt; 
  &lt;/math&gt;
  </code></pre>
  
  <p>Now Saxon gives me this error:</p>
  
  <pre><code>I/O error reported by XML parser processing file:/path/to/mathml.xml: unknown protocol: classpath
  </code></pre>