Project

Profile

Help

How to connect?
Download (3.24 KB) Statistics
| Branch: | Tag: | Revision:

he / latest9.9 / hec / saxonc-doc / doc / technical.xml @ 9714e9a6

1
<article id="technical" title="Technical Information">
2
   <h1>Technical Information</h1>
3

    
4
   <p>Saxon/C is built by cross compiling the Java code of Saxon 9.9.1.5 using the Excelsior JET
5
      15.3 Enterprise edition (MP1). This generates platform specific machine code, which we
6
      interface with C/C++ using the Java Native Interace (JNI).</p>
7

    
8
   <p><b>Embedded systems</b>: It is also possible to build Saxon/C for embedded systems, for
9
      example on a Linux/ARM System. If such a build is required please contact Saxonica to discuss
10
      further: <a href="mailto:support@saxonica.com">support@saxonica.com</a>.</p>
11

    
12
   <p>The PHP interface is in the form of a C/C++ PHP extension to Saxon/C created using the Zend
13
      module API. Supports PHP5 and PHP7.</p>
14

    
15
   <p>The Python interface is in the form of a Cython module interfaced with the C/C++ Saxon/C API.
16
      Currently supports Python3.</p>
17

    
18
   <p>The XML parser used is the one supplied by the Excelsior JET runtime which is cross compiled
19
      from the openJDK 8u181. There are currently no links to libxml.</p>
20

    
21

    
22

    
23
   <h2>Limitations</h2>
24

    
25
   <p>The following limitations apply to the 1.2.1 release:</p>
26
   <ul>
27
      <li>No support for the XDM function type in the XDM data model.</li>
28
      <li>The bytecode generation feature available in Saxon-EE on Java is not available in
29
         Saxon-EE/C.</li>
30
      <li>It is currently not possible to create and export to file a precompiled schema component
31
         model (SCM).</li>
32
      <li>The XQuery Update feature is not support</li>
33
   </ul>
34

    
35
   <h2>Feedback/Comments:</h2>
36

    
37
   <p>Please use the help forums and bug trackers for Saxon/C at <a
38
         href="https://saxonica.plan.io/projects/saxon-c" target="_blank">saxonica.plan.io</a> if
39
      you need help or advice. Or send email to <a href="mailto:support@saxonica.com"
40
         >support@saxonica.com</a>.</p>
41

    
42

    
43
   <section id="debugging" title="Debugging">
44
      <h1>Debugging</h1>
45

    
46
      <p>Exceptions and errors are captured and maintained silently in Saxon/C, but can be accessed.
47
         This is due to the restrictions in JNI: "There is no uniform and general way to throw and
48
         catch exceptions in native languages compared to Java. The JNI therefore requires you to
49
         check for possible exceptions after calling JNI functions".</p>
50

    
51
      <p>Any exceptions or errors found in a Saxon/C method can be retrieved by the method call
52
               <code>getErrorMessage(<i>n</i>)</code>, where <i>n</i> is an index number referring
53
         to the <i>n</i>th error message. The method <code>getErrorCount()</code> gets the total
54
         number of errors reported, which helps to loop through the errors if there is more than one
55
         of them. For example, see the following PHP code snippet:</p>
56

    
57
      <samp><![CDATA[<?php
58
  ...
59
  $result = $query->runQueryToString();
60
  if($result == NULL) {
61
    $errCount = $query->getExceptionCount();
62
    if($errCount > 0 ){
63
      for ($i = 0; $i &lt; $errCount; $i++) {
64
        $errC = $query->getErrorCode(intval(i));
65
        $errMessage = $query->getErrorMessage(intval(i));
66
        if($errC != NULL) {
67
          echo 'Error found: '. $errC.' :'.$errMessage;
68
        }
69
        $query->exceptionClear();
70
      }
71
    }
72
  }
73
  ...
74
?>]]></samp>
75

    
76
   </section>
77

    
78
</article>
(10-10/10)