Project

Profile

Help

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

he / latest10 / hec / saxonc-doc / doc / phpapi.xml @ 61000456

1
<?xml version="1.0" encoding="UTF-8"?>
2
<section id="saxon_c_php_api" title="Saxon/C PHP API">
3

    
4
   <h1>Saxon/C PHP API</h1>
5

    
6
   <nav>
7
      <ul/>
8
   </nav>
9

    
10
   <section id="saxon_c_php_saxonprocessor" title="Saxon\SaxonProcessor">
11
      <h1>Saxon\SaxonProcessor Class</h1>
12

    
13
      <table>
14
         <thead>
15
            <tr>
16
               <td>Return</td>
17
               <td>Function name and Description</td>
18
            </tr>
19
         </thead>
20

    
21
         <tr>
22
            <td/>
23
            <td>
24
               <em>
25
                  <a class="bodylink code" href="../saxon_c_php_saxonprocessor">SaxonProcessor()</a>
26
               </em>
27
               <br/>
28
               <em>Default Constructor. Create an unlicensed Saxon Processor</em>
29
            </td>
30
         </tr>
31
         <tr>
32
            <td/>
33
            <td><a class="bodylink code" href="../saxon_c_php_saxonprocessor"
34
               >SaxonProcessor</a>(boolean $license)<br/>
35
               <em>Constructor. Indicates whether the Processor requires features of Saxon that need
36
                  a license file. If false, the method will creates a Configuration appropriate for
37
                  Saxon HE (Home edition). If true, the method will create a Configuration
38
                  appropriate to the version of the software that is running Saxon-PE or
39
                  Saxon-EE</em>
40
            </td>
41
         </tr>
42
         <tr>
43
            <td/>
44
            <td><a class="bodylink code" href="../saxon_c_php_saxonprocessor"
45
               >SaxonProcessor</a>(boolean $license, string $cwd) <br/>
46
               <em>Constructor. Indicates whether the Processor requires features of Saxon that need
47
                  a license file. The cwd arugment is used to manually set the current working
48
                  directory used for executions of source files</em>
49
            </td>
50
         </tr>
51
         <tr>
52
            <td>
53
               <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>
54
            </td>
55
            <td>createAtomicValue($primitive_type val)<br/>
56
               <em>Create an Xdm Atomic value from any of the main primitive types (i.e. bool, int,
57
                  float, double, string)</em>
58
            </td>
59
         </tr>
60
         <tr>
61
            <td>Saxon\<a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
62
            </td>
63
            <td>parseXmlFromString(string $value) <br/>
64
               <em>Create an <a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
65
                  object. The $value is a lexical representation of the XML document</em>
66
            </td>
67
         </tr>
68
         <tr>
69
            <td>Saxon\<a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
70
            </td>
71
            <td>parseXmlFromFile(string $fileName) <br/>
72
               <em>Create an <a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
73
                  object. Value is a string type and the file name to the XML document. File name
74
                  can be relative or absolute. IF relative the cwd is used to resolve the file.</em>
75
            </td>
76
         </tr>
77
         <tr>
78
            <td>void </td>
79
            <td>setcwd(string $cwd) <br/>
80
               <em>Set the current working directory used to resolve against files</em>
81
            </td>
82
         </tr>
83
         <tr>
84
            <td>Saxon\<a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
85
            </td>
86
            <td>parseXmlFromFile(string $fileName) <br/>
87
               <em>Create an <a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
88
                  object. Value is a string type and the file name to the XML document. File name
89
                  can be relative or absolute. IF relative the cwd is used to resolve the file.</em>
90
            </td>
91
         </tr>
92
         <tr>
93
            <td>void </td>
94
            <td>setResourceDirectory(string $dir) <br/>
95
               <em>Set the resources directory of where Saxon can locate data folder</em>
96
            </td>
97
         </tr>
98
         <tr>
99
            <td>void </td>
100
            <td>setConfigurationProperty(string $name, string $value) <br/>
101
               <em>Set a configuration property specific to the processor in use. Properties
102
                  specified here are common across all the processors. See <a class="bodylink code"
103
                     href="http://www.saxonica.com/documentation/index.html#!configuration/config-features"
104
                     >Configuration Features</a></em>
105
            </td>
106
         </tr>
107
         <tr>
108
            <td>Saxon\<a class="bodylink code" href="../saxon_c_php_xsltprocessor">XsltProcessor</a>
109
            </td>
110
            <td>newXsltProcessor() <br/>
111
               <em>Create an <a class="bodylink code" href="../saxon_c_php_xsltprocessor"
112
                     >XsltProcessor</a> in the PHP environment. An <a class="bodylink code"
113
                     href="../saxon_c_php_xsltprocessor">XsltProcessor</a> is used to compile and
114
                  execute XSLT sytlesheets</em>
115
            </td>
116
         </tr>
117
         <tr>
118
            <td>Saxon\<a class="bodylink code" href="../saxon_c_php_xslt30processor"
119
                  >Xslt30Processor</a>
120
            </td>
121
            <td>newXslt30Processor() <br/>
122
               <em>Create an <a class="bodylink code" href="../saxon_c_php_xslt30processor"
123
                     >Xslt30Processor</a> in the PHP environment specifically designed for XSLT 3.0
124
                  processing. An <a class="bodylink code" href="../saxon_c_php_xslt30processor"
125
                     >Xslt30Processor</a> is used to compile and execute XSLT 3.0 sytlesheets. Use
126
                  this class object (<a class="bodylink code" href="../saxon_c_php_xslt30processor"
127
                     >Xslt30Processor</a>) instead of the <a class="bodylink code"
128
                     href="../saxon_c_php_xsltprocessor">XsltProcessor</a> for XSLT 3.0
129
                  processing.</em>
130
            </td>
131
         </tr>
132
         <tr>
133
            <td>Saxon\<a class="bodylink code" href="../saxon_c_php_xqueryprocessor"
134
                  >XQueryProcessor</a>
135
            </td>
136
            <td>newXQueryProcessor() <br/>
137
               <em>Create an <a class="bodylink code" href="../saxon_c_php_xqueryprocessor"
138
                     >XQueryProcessor</a> in the PHP environment. An <a class="bodylink code"
139
                     href="../saxon_c_php_xqueryprocessor">XQueryProcessor</a> is used to compile
140
                  and execute XQuery queries</em>
141
            </td>
142
         </tr>
143
         <tr>
144
            <td>Saxon\XPathProcesssor </td>
145
            <td>newXPathProcessor() <br/>
146
               <em>Create an <a class="bodylink code" href="../saxon_c_php_xpathprocessor"
147
                     >XPathProcessor</a> in the PHP environment. An <a class="bodylink code"
148
                     href="../saxon_c_php_xpathprocessor">XPathProcessor</a> is used to compile and
149
                  execute XPath expressions</em>
150
            </td>
151
         </tr>
152
         <tr>
153
            <td>Saxon\<a class="bodylink code" href="../saxon_c_php_schemavalidator"
154
                  >SchemaValidator</a>
155
            </td>
156
            <td>newSchemaValidator() <br/>
157
               <em>Create a <a class="bodylink code" href="../saxon_c_php_schemavalidator"
158
                     >SchemaValidator</a> in the PHP environment. A <a class="bodylink code"
159
                     href="../saxon_c_php_schemavalidator">SchemaValidator</a> provides capabilities
160
                  to load and cache XML schema definitions. You can also valdiate source documents
161
                  with egistered XML schema definitions</em>
162
            </td>
163
         </tr>
164
         <tr>
165
            <td>string </td>
166
            <td>version() <br/>
167
               <em>Report the Java Saxon version</em>
168
            </td>
169
         </tr>
170
         <tr>
171
            <td>void </td>
172
            <td>registerPHPFunctions(string $library) <br/>
173
               <em>Enables the ability to use PHP functions as XSLT functions. Accepts as parameter
174
                  the full path of the Saxon/C PHP Extension library. This is needed to do the
175
                  callbacks</em>
176
            </td>
177
         </tr>
178
      </table>
179

    
180
   </section>
181

    
182
   <section id="saxon_c_php_xsltprocessor" title="Saxon\XsltProcessor">
183
      <h1>Saxon\XsltProcessor Class</h1>
184

    
185
      <table>
186
         <thead>
187
            <tr>
188
               <td>Return</td>
189
               <td>Function name and Description</td>
190
            </tr>
191
         </thead>
192

    
193
         <tr>
194
            <td>
195
               <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>
196
            </td>
197
            <td>runQueryToValue() <br/>
198
               <em>compile and evaluate the query. Result returned as an <a class="bodylink code"
199
                     href="../saxon_c_php_xdmvalue">XdmValue</a> object. If there are failures then
200
                  a null is returned</em>
201
            </td>
202
         </tr>
203
         <tr>
204
            <td>string </td>
205
            <td>runQueryToString() <br/>
206
               <em>compile and evaluate the query. Result returned as string. If there are failures
207
                  then a null is returned</em>
208
            </td>
209
         </tr>
210
         <tr>
211
            <td>void </td>
212
            <td>runQueryToFile(string $outfilename) <br/>
213
               <em>compile and evaluate the query. Save the result to file</em>
214
            </td>
215
         </tr>
216
         <tr>
217
            <td>void </td>
218
            <td>setQueryContent(string $str) <br/>
219
               <em>query supplied as a string</em>
220
            </td>
221
         </tr>
222
         <tr>
223
            <td>void </td>
224
            <td>setQueryItem(<a class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a>
225
               $item) <br/> ** </td>
226
         </tr>
227
         <tr>
228
            <td>void </td>
229
            <td>setQueryFile($string $filename) <br/>
230
               <em>query supplied as a file</em>
231
            </td>
232
         </tr>
233
         <tr>
234
            <td>void </td>
235
            <td>setContextItemFromFile(string $fileName) <br/>
236
               <em>Set the initial context item for the query. Supplied as filename</em>
237
            </td>
238
         </tr>
239
         <tr>
240
            <td>void </td>
241
            <td>setContextItem(Xdm $obj) <br/>
242
               <em>Set the initial context item for the query. Any one of the objects are accepted:
243
                     <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>, <a
244
                     class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a>, <a
245
                     class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a> and <a
246
                     class="bodylink code" href="../saxon_c_php_xdmatomicvalue"
247
                  >XdmAtomicValue</a>.</em>
248
            </td>
249
         </tr>
250
         <tr>
251
            <td>void </td>
252
            <td>setQueryBaseURI(string $uri) <br/>
253
               <em>Set the static base URI for a query expressions compiled using this XQuery
254
                  Processor. The base URI is part of the static context, and is used to resolve any
255
                  relative URIS appearing within a query</em>
256
            </td>
257
         </tr>
258
         <tr>
259
            <td>void </td>
260
            <td>declareNamespace(string $prefix, string $namespace) <br/>
261
               <em>Declare a namespace binding as part of the static context for XPath expressions
262
                  compiled using this XQuery processor</em>
263
            </td>
264
         </tr>
265
         <tr>
266
            <td>void </td>
267
            <td>setParameter(string $name, <a class="bodylink code" href="../saxon_c_php_xdmvalue"
268
                  >XdmValue</a> $value) <br/>
269
               <em>Set the parameters required for XQuery Processor</em>
270
            </td>
271
         </tr>
272
         <tr>
273
            <td>void </td>
274
            <td>setProperty(string $name, string $value) <br/>
275
               <em>Set properties for Query.</em>
276
            </td>
277
         </tr>
278
         <tr>
279
            <td>void </td>
280
            <td>clearParameters() <br/>
281
               <em>Clear parameter values set</em>
282
            </td>
283
         </tr>
284
         <tr>
285
            <td>void </td>
286
            <td>clearProperties() <br/>
287
               <em>Clear property values set</em>
288
            </td>
289
         </tr>
290
         <tr>
291
            <td>void </td>
292
            <td>exceptionClear() <br/>
293
               <em>Clear any exception thrown</em>
294
            </td>
295
         </tr>
296
         <tr>
297
            <td>string </td>
298
            <td>getErrorCode(int $i) <br/>
299
               <em>Get the ith error code if there are any errors</em>
300
            </td>
301
         </tr>
302
         <tr>
303
            <td>string </td>
304
            <td>getErrorMessage(int $i) <br/>
305
               <em>Get the ith error message if there are any error</em>
306
            </td>
307
         </tr>
308
         <tr>
309
            <td>int </td>
310
            <td>getExceptionCount() <br/>
311
               <em>Get number of error during execution or evaluate of query</em>
312
            </td>
313
         </tr>
314

    
315
      </table>
316
   </section>
317

    
318
   <section id="saxon_c_php_xslt30processor" title="Saxon\Xslt30Processor">
319
      <h1>Saxon\Xslt30Processor Class</h1>
320

    
321
      <table>
322
         <thead>
323
            <tr>
324
               <td>Return</td>
325
               <td>Function name and Description</td>
326
            </tr>
327
         </thead>
328

    
329
         <tr>
330
            <td>void </td>
331
            <td>addPackages(array packageFileNames) <br/>
332
               <em>File names to XsltPackages stored on filestore are added to a set of packages,
333
                  which will imported later for use when compiling.</em>
334
            </td>
335
         </tr>
336
         <tr>
337
            <td>void </td>
338
            <td>applyTemplatesReturningFile(string $stylesheetFileName) <br/>
339
               <em>Invoke the stylesheet by applying templates to a supplied input sequence, Saving
340
                  the results to file. The stylesheet file name argument can be supplied here. If
341
                  null then the most recently compiled stylsheet is used.</em>
342
            </td>
343
         </tr>
344
         <tr>
345
            <td>string </td>
346
            <td>applyTemplatesReturningString(string $stylesheetFileName) <br/>
347
               <em>Invoke the stylesheet by applying templates to a supplied input sequence. The
348
                  result is returned as a serialized string. The stylesheet file name argument can
349
                  be supplied here. If null then the most recently compiled stylsheet is used.</em>
350
            </td>
351
         </tr>
352
         <tr>
353
            <td>PyXdmValue </td>
354
            <td>applyTemplatesReturningValue(string $stylesheetFileName) <br/>
355
               <em>Invoke the stylesheet by applying templates to a supplied input sequence. the
356
                  result is returned as an <a class="bodylink code" href="../saxon_c_php_xdmvalue"
357
                     >XdmValue</a> object. The stylesheet file name argument can be supplied here.
358
                  If null then the most recently compiled stylsheet is used.</em>
359
            </td>
360
         </tr>
361
         <tr>
362
            <td>void </td>
363
            <td>compileFromAssociatedFile(string xmlFileName)<br/>
364
               <em>Get the stylesheet associated via the xml-stylesheet processing instruction (see
365
                     <a href="http://www.w3.org/TR/xml-stylesheet/"
366
                     >http://www.w3.org/TR/xml-stylesheet/</a>) with the document document specified
367
                  in the source parameter, and that match the given criteria. If there are several
368
                  suitable xml-stylesheet processing instructions, then the returned Source will
369
                  identify a synthesized stylesheet module that imports all the referenced
370
                  stylesheet module.</em>
371
            </td>
372
         </tr>
373
         <tr>
374
            <td>void </td>
375
            <td>compileFromFile(string $fileName) <br/>
376
               <em>Compile a stylesheet suplied as by file name</em>
377
            </td>
378
         </tr>
379
         <tr>
380
            <td>void </td>
381
            <td>compileFromString(string $str) <br/>
382
               <em>Compile a stylesheet received as a string.</em>
383
            </td>
384
         </tr>
385
         <tr>
386
            <td>void </td>
387
            <td>compileFromValue(<a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a> $node)<br/>
388
               <em>Compile a stylesheet received as an <a class="bodylink code"
389
                     href="../saxon_c_php_xdmnode">XdmNode</a>.</em>
390
            </td>
391
         </tr>
392
         <tr>
393
            <td>void </td>
394
            <td>compileFromFileAndSave(string $fileName, string outputFileName) <br/>
395
               <em>Compile a stylesheet suplied as by file name and save as an exported file
396
                  (SEF)</em>
397
            </td>
398
         </tr>
399
         <tr>
400
            <td>void </td>
401
            <td>compileFromStringAndSave(string $str, string outputFileName) <br/>
402
               <em>Compile a stylesheet received as a string and save as an exported file
403
                  (SEF).</em>
404
            </td>
405
         </tr>
406
         <tr>
407
            <td>void </td>
408
            <td>compileFromValueAndSave(<a class="bodylink code" href="../saxon_c_php_xdmnode"
409
                  >XdmNode</a> $node, string outputFileName)<br/>
410
               <em>Compile a stylesheet received as an <a class="bodylink code"
411
                     href="../saxon_c_php_xdmnode">XdmNode</a> and save as an exported file
412
                  (SEF).</em>
413
            </td>
414
         </tr>
415
         <tr>
416
            <td>void </td>
417
            <td>callFunctionReturningFile(string $FunctionName, array arguments, string
418
               outputfileName) <br/>
419
               <em>Call a public user-defined function in the stylesheet. Here we wrap the result in
420
                  an XML document, and sending this document to a specified file. Arguments:
421
                  function name and array of <a class="bodylink code" href="../saxon_c_php_xdmvalue"
422
                     >XdmValue</a> objects - he values of the arguments to be supplied to the
423
                  function. These will be converted if necessary to the type as defined in the
424
                  function signature, using the function conversion rules. * </em></td>
425
         </tr>
426
         <tr>
427
            <td>
428
               <em> string </em>
429
            </td>
430
            <td>
431
               <em> callFunctionReturningString(string $FunctionName, array arguments) <br/> *Call a
432
                  public user-defined function in the stylesheet. Here we wrap the result in an XML
433
                  document, and serialized this document to string value. Arguments: function name
434
                  and array of <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>
435
                  objects - he values of the arguments to be supplied to the function. These will be
436
                  converted if necessary to the type as defined in the function signature, using the
437
                  function conversion rules.</em>
438
            </td>
439
         </tr>
440
         <tr>
441
            <td>PyXdmValue </td>
442
            <td>callFunctionReturningValue(string $FunctionName, array arguments) <br/>
443
               <em>Call a public user-defined function in the stylesheet. Here we wrap the result in
444
                  an XML document, and return the document as an XdmVale. Arguments: function name
445
                  and array of <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>
446
                  objects - he values of the arguments to be supplied to the function. These will be
447
                  converted if necessary to the type as defined in the function signature, using the
448
                  function conversion rules.</em>
449
            </td>
450
         </tr>
451
         <tr>
452
            <td>void </td>
453
            <td>callTemplateReturningFile(string $stylesheetFileName, string $templateName, string
454
               outputfileName) <br/>
455
               <em>Invoke a transformation by calling a named template. The result is stored in the
456
                  supplied outputfile name. If the templateName argument is null then the
457
                  xsl:iitial-template is used. Parameters supplied using
458
                  setInitialTemplateParameters are made available to the called template.</em>
459
            </td>
460
         </tr>
461
         <tr>
462
            <td>string </td>
463
            <td>callTemplateReturningString(string $stylesheetFileName, string $templateName) <br/>
464
               <em>Invoke a transformation by calling a named template and return result as a
465
                  string. If the templateName argument is null then the xsl:iitial-template is used.
466
                  Parameters supplied using setInitialTemplateParameters are made available to the
467
                  called template.</em>
468
            </td>
469
         </tr>
470
         <tr>
471
            <td>PyXdmValue </td>
472
            <td>callTemplateReturningValue(string $stylesheetFileName, string $templateName) <br/>
473
               <em>Invoke a transformation by calling a named template and return result as an <a
474
                     class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>. If the
475
                  templateName argument is null then the xsl:iitial-template is used. Parameters
476
                  supplied using setInitialTemplateParameters are made available to the called
477
                  template.</em>
478
            </td>
479
         </tr>
480
         <tr>
481
            <td>void </td>
482
            <td>transformFileToFile(string $sourceFileName, string $stylesheetFileName, string
483
               outputfileName) <br/>
484
               <em>Perform a one shot transformation. The result is stored in the supplied
485
                  outputfile name.</em>
486
            </td>
487
         </tr>
488
         <tr>
489
            <td>
490
               <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>
491
            </td>
492
            <td>transformFileToValue(string $fileName) <br/>
493
               <em>Perform a one shot transformation. The result is returned as an <a
494
                     class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a></em>
495
            </td>
496
         </tr>
497
         <tr>
498
            <td>
499
               <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>
500
            </td>
501
            <td>transformFileToString(string $fileName) <br/>
502
               <em>Perform a one shot transformation. The result is returned as a stringe</em>
503
            </td>
504
         </tr>
505
         <tr>
506
            <td>void </td>
507
            <td>transformToFile() <br/>
508
               <em>Perform the transformation based upon cached stylesheet and source document.
509
                  Result is saved to the supplied file name</em>
510
            </td>
511
         </tr>
512
         <tr>
513
            <td>string </td>
514
            <td>transformToString() <br/>
515
               <em>Perform the transformation based upon cached stylesheet and source document.
516
                  Result is returned as a serialized string</em>
517
            </td>
518
         </tr>
519
         <tr>
520
            <td>PyXdmValue </td>
521
            <td>transformToValue() <br/>
522
               <em>Perform the transformation based upon cached stylesheet and any source document.
523
                  Result returned as an <a class="bodylink code" href="../saxon_c_php_xdmvalue"
524
                     >XdmValue</a> object. If there are failures then a null is returned</em>
525
            </td>
526
         </tr>
527
         <tr>
528
            <td>void </td>
529
            <td>setInitialTemplateParameters(array parameters, bool tunnel) <br/>
530
               <em>Set parameters to be passed to the initial template. These are used whether the
531
                  transformation is invoked by applying templates to an initial source item, or by
532
                  invoking a named template. The parameters in question are the xsl:param elements
533
                  appearing as children of the xsl:template element. The tunnel argument if set to
534
                  true these values are to be used for setting tunnel parameters.</em>
535
            </td>
536
         </tr>
537
         <tr>
538
            <td>void </td>
539
            <td>setInitialMatchSelection() <br/>
540
               <em>The initial value to which templates are to be applied (equivalent to the
541
                  'select' attribute of xsl:apply-templates)</em>
542
            </td>
543
         </tr>
544
         <tr>
545
            <td>void </td>
546
            <td>setInitialMatchSelectionAsFile <br/>
547
               <em>The initial filename to which templates are to be applied (equivalent to the
548
                  'select' attribute of xsl:apply-templates) * </em></td>
549
         </tr>
550
         <tr>
551
            <td>
552
               <em> void </em>
553
            </td>
554
            <td>
555
               <em> setGlobalContextItem <br/> *Set the source document from an <a
556
                     class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a> for the
557
                  transformation.</em>
558
            </td>
559
         </tr>
560
         <tr>
561
            <td>void </td>
562
            <td>setGlobalContextFromFile <br/>
563
               <em>Set the source from file for the transformation.</em>
564
            </td>
565
         </tr>
566
         <tr>
567
            <td>void </td>
568
            <td>setOutputFile(string $fileName) <br/>
569
               <em>Set the output file name of where the transformation result is sent</em>
570
            </td>
571
         </tr>
572
         <tr>
573
            <td>void </td>
574
            <td>setParameter(string $name, <a class="bodylink code" href="../saxon_c_php_xdmvalue"
575
                  >XdmValue</a> $value) <br/>
576
               <em>Set the parameters required for XSLT stylesheet</em>
577
            </td>
578
         </tr>
579
         <tr>
580
            <td>void </td>
581
            <td>setProperty(string $name, string $value) <br/>
582
               <em>Set properties for the stylesheet.</em>
583
            </td>
584
         </tr>
585
         <tr>
586
            <td>void </td>
587
            <td>setJustInTimeCompilation(bool $value) <br/>
588
               <em>ay whether just-in-time compilation of template rules should be used.</em>
589
            </td>
590
         </tr>
591
         <tr>
592
            <td>void </td>
593
            <td>setResultAsRawValue(bool $value) <br/>
594
               <em>Set true if the return type of callTemplate, applyTemplates and transform methods
595
                  is to return <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>,
596
                  otherwise return <a class="bodylink code" href="../saxon_c_php_xdmnode"
597
                     >XdmNode</a> object with root Document node.</em>
598
            </td>
599
         </tr>
600
         <tr>
601
            <td>void </td>
602
            <td>clearParameters() <br/>
603
               <em>Clear parameter values set</em>
604
            </td>
605
         </tr>
606
         <tr>
607
            <td>void </td>
608
            <td>clearProperties() <br/>
609
               <em>Clear property values set</em>
610
            </td>
611
         </tr>
612
         <tr>
613
            <td>void </td>
614
            <td>exceptionClear() <br/>
615
               <em>Clear any exception thrown</em>
616
            </td>
617
         </tr>
618
         <tr>
619
            <td>string </td>
620
            <td>getErrorCode(int $i) <br/>
621
               <em>Get the ith error code if there are any errors</em>
622
            </td>
623
         </tr>
624
         <tr>
625
            <td>string </td>
626
            <td>getErrorMessage(int $i) <br/>
627
               <em>Get the ith error message if there are any error</em>
628
            </td>
629
         </tr>
630
         <tr>
631
            <td>int </td>
632
            <td>getExceptionCount() <br/>
633
               <em>Get number of error during execution or evaluate of stylesheet</em>
634
            </td>
635
         </tr>
636

    
637
      </table>
638
   </section>
639

    
640
   <section id="saxon_c_php_xqueryprocessor" title="Saxon\XQueryProcessor">
641
      <h1>Saxon\XQueryProcessor Class</h1>
642

    
643
      <table>
644
         <thead>
645
            <tr>
646
               <td>Return</td>
647
               <td>Function name and Description</td>
648
            </tr>
649
         </thead>
650

    
651
         <tr>
652
            <td>
653
               <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>
654
            </td>
655
            <td>runQueryToValue() <br/>
656
               <em>compile and evaluate the query. Result returned as an <a class="bodylink code"
657
                     href="../saxon_c_php_xdmvalue">XdmValue</a> object. If there are failures then
658
                  a null is returned</em>
659
            </td>
660
         </tr>
661
         <tr>
662
            <td>string </td>
663
            <td>runQueryToString() <br/>
664
               <em>compile and evaluate the query. Result returned as string. If there are failures
665
                  then a null is returned</em>
666
            </td>
667
         </tr>
668
         <tr>
669
            <td>void </td>
670
            <td>runQueryToFile(string $outfilename) <br/>
671
               <em>compile and evaluate the query. Save the result to file</em>
672
            </td>
673
         </tr>
674
         <tr>
675
            <td>void </td>
676
            <td>setQueryContent(string $str) <br/>
677
               <em>query supplied as a string</em>
678
            </td>
679
         </tr>
680
         <tr>
681
            <td>void </td>
682
            <td>setQueryItem(<a class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a>
683
               $item) <br/> ** </td>
684
         </tr>
685
         <tr>
686
            <td>void </td>
687
            <td>setQueryFile($string $filename) <br/>
688
               <em>query supplied as a file</em>
689
            </td>
690
         </tr>
691
         <tr>
692
            <td>void </td>
693
            <td>setContextItemFromFile(string $fileName) <br/>
694
               <em>Set the initial context item for the query. Supplied as filename</em>
695
            </td>
696
         </tr>
697
         <tr>
698
            <td>void </td>
699
            <td>setContextItem(Xdm $obj) <br/>
700
               <em>Set the initial context item for the query. Any one of the objects are accepted:
701
                     <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>, <a
702
                     class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a>, <a
703
                     class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a> and <a
704
                     class="bodylink code" href="../saxon_c_php_xdmatomicvalue"
705
                  >XdmAtomicValue</a>.</em>
706
            </td>
707
         </tr>
708
         <tr>
709
            <td>void </td>
710
            <td>setQueryBaseURI(string $uri) <br/>
711
               <em>Set the static base URI for a query expressions compiled using this XQuery
712
                  Processor. The base URI is part of the static context, and is used to resolve any
713
                  relative URIS appearing within a query</em>
714
            </td>
715
         </tr>
716
         <tr>
717
            <td>void </td>
718
            <td>declareNamespace(string $prefix, string $namespace) <br/>
719
               <em>Declare a namespace binding as part of the static context for XPath expressions
720
                  compiled using this XQuery processor</em>
721
            </td>
722
         </tr>
723
         <tr>
724
            <td>void </td>
725
            <td>setParameter(string $name, <a class="bodylink code" href="../saxon_c_php_xdmvalue"
726
                  >XdmValue</a> $value) <br/>
727
               <em>Set the parameters required for XQuery Processor</em>
728
            </td>
729
         </tr>
730
         <tr>
731
            <td>void </td>
732
            <td>setProperty(string $name, string $value) <br/>
733
               <em>Set properties for Query.</em>
734
            </td>
735
         </tr>
736
         <tr>
737
            <td>void </td>
738
            <td>clearParameters() <br/>
739
               <em>Clear parameter values set</em>
740
            </td>
741
         </tr>
742
         <tr>
743
            <td>void </td>
744
            <td>clearProperties() <br/>
745
               <em>Clear property values set</em>
746
            </td>
747
         </tr>
748
         <tr>
749
            <td>void </td>
750
            <td>exceptionClear() <br/>
751
               <em>Clear any exception thrown</em>
752
            </td>
753
         </tr>
754
         <tr>
755
            <td>string </td>
756
            <td>getErrorCode(int $i) <br/>
757
               <em>Get the ith error code if there are any errors</em>
758
            </td>
759
         </tr>
760
         <tr>
761
            <td>string </td>
762
            <td>getErrorMessage(int $i) <br/>
763
               <em>Get the ith error message if there are any error</em>
764
            </td>
765
         </tr>
766
         <tr>
767
            <td>int </td>
768
            <td>getExceptionCount() <br/>
769
               <em>Get number of error during execution or evaluate of query</em>
770
            </td>
771
         </tr>
772

    
773
      </table>
774

    
775
   </section>
776

    
777

    
778
   <section id="saxon_c_php_xpathprocessor" title="Saxon\XPathProcessor">
779
      <h1>Saxon\XPathProcessor Class</h1>
780

    
781
      <table>
782
         <thead>
783
            <tr>
784
               <td>Return</td>
785
               <td>Function name and Description</td>
786
            </tr>
787
         </thead>
788

    
789
         <tr>
790
            <td>void </td>
791
            <td>setContextItem(string $fileName) <br/>
792
               <em>Set the context item from a <a class="bodylink code"
793
                     href="../saxon_c_php_xdmitem">XdmItem</a></em>
794
            </td>
795
         </tr>
796
         <tr>
797
            <td>void </td>
798
            <td>setContextFile(string $fileName) <br/>
799
               <em>Set the context item from file</em>
800
            </td>
801
         </tr>
802
         <tr>
803
            <td>boolean </td>
804
            <td>effectiveBooleanValue(string $xpathStr) <br/>
805
               <em>Evaluate the XPath expression, returning the effective boolean value of the
806
                  result.</em>
807
            </td>
808
         </tr>
809
         <tr>
810
            <td>
811
               <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a>
812
            </td>
813
            <td>evaluate(string $xpathStr) <br/>
814
               <em>Compile and evaluate an XPath expression, supplied as a character string. Result
815
                  is an <a class="bodylink code" href="../saxon_c_php_xdmvalue">XdmValue</a></em>
816
            </td>
817
         </tr>
818
         <tr>
819
            <td>
820
               <a class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a>
821
            </td>
822
            <td>evaluateSingle(string $xpathStr) <br/>
823
               <em>Compile and evaluate an XPath expression whose result is
824
                  expected to be a single item, with a given context item. The expression is
825
                  supplied as a character string, and the result returned as an <a
826
                          class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a>.
827
                  Return NULL if the expression returns an empty sequence. If the expression
828
                  returns a sequence of more than one item, any items after the first are ignored.</em>
829
            </td>
830
         </tr>
831
         <tr>
832
            <td>void </td>
833
            <td>declareNamespace(string $prefix, string $namespace) <br/>
834
               <em>Declare a namespace binding as part of the static context for XPath expressions
835
                  compiled using this <a class="bodylink code" href="../saxon_c_php_xpathprocessor"
836
                     >XPathProcessor</a></em>
837
            </td>
838
         </tr>
839
         <tr>
840
            <td>void </td>
841
            <td>setBaseURI(string $uri) <br/>
842
               <em>Set the static base URI for XPath expressions compiled using this XQuery
843
                  Processor. The base URI is part of the static context, and is used to resolve any
844
                  relative URIS appearing within a query</em>
845
            </td>
846
         </tr>
847
         <tr>
848
            <td>void </td>
849
            <td>setParameter(string $name, <a class="bodylink code" href="../saxon_c_php_xdmvalue"
850
                  >XdmValue</a> $value) <br/>
851
               <em>Set the parameters required for XQuery Processor</em>
852
            </td>
853
         </tr>
854
         <tr>
855
            <td>void </td>
856
            <td>setProperty(string $name, string $value) <br/>
857
               <em>Set properties for Query.</em>
858
            </td>
859
         </tr>
860
         <tr>
861
            <td>void </td>
862
            <td>clearParameters() <br/>
863
               <em>Clear parameter values set</em>
864
            </td>
865
         </tr>
866
         <tr>
867
            <td>void </td>
868
            <td>clearProperties() <br/>
869
               <em>Clear property values set</em>
870
            </td>
871
         </tr>
872
         <tr>
873
            <td>void </td>
874
            <td>exceptionClear() <br/>
875
               <em>Clear any exception thrown</em>
876
            </td>
877
         </tr>
878
         <tr>
879
            <td>string </td>
880
            <td>getErrorCode(int $i) <br/>
881
               <em>Get the ith error code if there are any errors</em>
882
            </td>
883
         </tr>
884
         <tr>
885
            <td>string </td>
886
            <td>getErrorMessage(int $i) <br/>
887
               <em>Get the ith error message if there are any error</em>
888
            </td>
889
         </tr>
890
         <tr>
891
            <td>int </td>
892
            <td>getExceptionCount() <br/>
893
               <em>Get number of error during execution or evaluate of stylesheet and query,
894
                  respectively</em>
895
            </td>
896
         </tr>
897

    
898

    
899
      </table>
900

    
901

    
902
   </section>
903

    
904
   <section id="saxon_c_php_schemavalidator" title="Saxon\SchemaValidator">
905
      <h1>Saxon\SchemaValidator Class</h1>
906

    
907
      <table>
908
         <thead>
909
            <tr>
910
               <td>Return</td>
911
               <td>Function name and Description</td>
912
            </tr>
913
         </thead>
914

    
915
         <tr>
916
            <td>void </td>
917
            <td>setSourceNode(<a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
918
               $node) <br/>
919
               <em>The instance document to be validated. Supplied as an Xdm Node</em>
920
            </td>
921
         </tr>
922
         <tr>
923
            <td>void </td>
924
            <td>setOutputFile(string $fileName) <br/>
925
               <em>The instance document to be validated. Supplied file name is resolved and
926
                  accessed</em>
927
            </td>
928
         </tr>
929
         <tr>
930
            <td>void </td>
931
            <td>registerSchemaFromFile(string $fileName) <br/>
932
               <em>Register the Schema which is given as file name.</em>
933
            </td>
934
         </tr>
935
         <tr>
936
            <td>void </td>
937
            <td>registerSchemaFromString(string $schemaStr) <br/>
938
               <em>Register the Schema which is given as a string representation.</em>
939
            </td>
940
         </tr>
941
         <tr>
942
            <td>void </td>
943
            <td>validate() <br/>
944
               <em>Validate an instance document supplied as a Source object. Assume source document
945
                  has already been supplied through accessor methods</em>
946
            </td>
947
         </tr>
948
         <tr>
949
            <td>void </td>
950
            <td>validate(string $fileName) <br/>
951
               <em>Validate an instance document supplied as a Source object. $filename - The name
952
                  of the file to be validated. $filename can be null</em>
953
            </td>
954
         </tr>
955
         <tr>
956
            <td>
957
               <a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
958
            </td>
959
            <td>validateToNode() <br/>
960
               <em>Validate an instance document supplied as a Source object with the validated
961
                  document returned to the calling program. Assume source document has already been
962
                  supplied through accessor methods</em>
963
            </td>
964
         </tr>
965
         <tr>
966
            <td>
967
               <a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
968
            </td>
969
            <td>validateToNode(string $fileName) <br/>
970
               <em>Validate an instance document supplied as a Source object with the validated
971
                  document returned to the calling program. $filename - The name of the file to be
972
                  validated. $filename can be null</em>
973
            </td>
974
         </tr>
975
         <tr>
976
            <td>
977
               <a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
978
            </td>
979
            <td>getValidationReport <br/>
980
               <em>Get the valdiation report produced after valdiating the soucre document. The
981
                  reporting feature is switched on via setting the property on the <a
982
                     class="bodylink code" href="../saxon_c_php_schemavalidator"
983
                  >SchemaValidator</a>: validator.setProperty('report', 'true'). Return <a
984
                     class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a></em>
985
            </td>
986
         </tr>
987
         <tr>
988
            <td>void </td>
989
            <td>setParameter(string $name, <a class="bodylink code" href="../saxon_c_php_xdmvalue"
990
                  >XdmValue</a> $value) <br/>
991
               <em>Set the parameters required for XQuery Processor</em>
992
            </td>
993
         </tr>
994
         <tr>
995
            <td>void </td>
996
            <td>setProperty(string $name, string $value) <br/>
997
               <em>Set properties for Schema Validator.</em>
998
            </td>
999
         </tr>
1000
         <tr>
1001
            <td>void </td>
1002
            <td>clearParameters() <br/>
1003
               <em>Clear parameter values set</em>
1004
            </td>
1005
         </tr>
1006
         <tr>
1007
            <td>void </td>
1008
            <td>clearProperties() <br/>
1009
               <em>Clear property values set</em>
1010
            </td>
1011
         </tr>
1012
         <tr>
1013
            <td>void </td>
1014
            <td>exceptionClear() <br/>
1015
               <em>Clear any exception thrown</em>
1016
            </td>
1017
         </tr>
1018
         <tr>
1019
            <td>string </td>
1020
            <td>getErrorCode(int $i) <br/>
1021
               <em>Get the ith error code if there are any errors</em>
1022
            </td>
1023
         </tr>
1024
         <tr>
1025
            <td>string </td>
1026
            <td>getErrorMessage(int $i) <br/>
1027
               <em>Get the ith error message if there are any error</em>
1028
            </td>
1029
         </tr>
1030
         <tr>
1031
            <td>int </td>
1032
            <td>getExceptionCount() <br/>
1033
               <em>Get number of error during execution of the validator</em>
1034
            </td>
1035
         </tr>
1036

    
1037

    
1038
      </table>
1039

    
1040
   </section>
1041

    
1042
   <section id="saxon_c_php_xdmvalue" title="Saxon\XdmValue">
1043
      <h1>Saxon\XdmValue Class</h1>
1044

    
1045
      <table>
1046
         <thead>
1047
            <tr>
1048
               <td>Return</td>
1049
               <td>Function name and Description</td>
1050
            </tr>
1051
         </thead>
1052

    
1053
         <tr>
1054
            <td>
1055
               <a class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a>
1056
            </td>
1057
            <td>getHead() <br/>
1058
               <em>Get the first item in the sequence</em>
1059
            </td>
1060
         </tr>
1061
         <tr>
1062
            <td>
1063
               <a class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a>
1064
            </td>
1065
            <td>itemAt(int $index) <br/>
1066
               <em>Get the n'th item in the value, counting from zero</em>
1067
            </td>
1068
         </tr>
1069
         <tr>
1070
            <td>int </td>
1071
            <td>size() <br/>
1072
               <em>Get the number of items in the sequence</em>
1073
            </td>
1074
         </tr>
1075
         <tr>
1076
            <td/>
1077
            <td>addXdmItem(<a class="bodylink code" href="../saxon_c_php_xdmitem">XdmItem</a> $item) <br/>
1078
               <em>Add item to the sequence at the end.</em>
1079
            </td>
1080
         </tr>
1081
      </table>
1082

    
1083
   </section>
1084

    
1085
   <section id="saxon_c_php_xdmitem" title="Saxon\XdmItem">
1086
      <h1>Saxon\XdmItem Class</h1>
1087
      <p>extends <a href="../saxon_c_php_xdmvalue">Saxon\XdmValue</a></p>
1088
      
1089
      <table>
1090
         <thead>
1091
            <tr>
1092
               <td>Return</td>
1093
               <td>Function name and Description</td>
1094
            </tr>
1095
         </thead>
1096
         
1097
         <tr>
1098
            <td>string </td>
1099
            <td>getStringValue() <br/>
1100
               <em>Get the string value of the item. For a node, this gets the string value of the
1101
                  node. For an atomic value, it has the same effect as casting the value to a
1102
                  string. In all cases the result is the same as applying the XPath string()
1103
                  function.</em>
1104
            </td>
1105
         </tr>
1106
         <tr>
1107
            <td>boolean </td>
1108
            <td>isNode() <br/>
1109
               <em>Determine whether the item is a node value or not.</em>
1110
            </td>
1111
         </tr>
1112
         <tr>
1113
            <td>boolean </td>
1114
            <td>isAtomic() <br/>
1115
               <em>Determine whether the item is an atomic value or not.</em>
1116
            </td>
1117
         </tr>
1118
         <tr>
1119
            <td>
1120
               <a class="bodylink code" href="../saxon_c_php_xdmatomicvalue">XdmAtomicValue</a>
1121
            </td>
1122
            <td>getAtomicValue() <br/>
1123
               <em>Provided the item is an atomic value we return the <a class="bodylink code"
1124
                     href="../saxon_c_php_xdmatomicvalue">XdmAtomicValue</a> otherwise return
1125
                  null</em>
1126
            </td>
1127
         </tr>
1128
         <tr>
1129
            <td>
1130
               <a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
1131
            </td>
1132
            <td>getNodeValue() <br/>
1133
               <em>Provided the item is a node value we return the <a class="bodylink code"
1134
                     href="../saxon_c_php_xdmnode">XdmNode</a> otherwise return null</em>
1135
            </td>
1136
         </tr>
1137
      </table>
1138

    
1139
   </section>
1140

    
1141
   <section id="saxon_c_php_xdmNode" title="Saxon\XdmNode">
1142
      <h1>Saxon\XdmNode Class</h1>
1143
      <p>extends <a href="../saxon_c_php_xdmitem">Saxon\XdmItem</a></p>
1144
      
1145
      <table>
1146
         <thead>
1147
            <tr>
1148
               <td>Return</td>
1149
               <td>Function name and Description</td>
1150
            </tr>
1151
         </thead>
1152
         
1153
         <tr>
1154
            <td>string </td><td>getStringValue() <br/>
1155
               <em>Get the string value of the item. For a node, this gets the string value of the
1156
                  node.</em>
1157
            </td></tr>
1158
         <tr>
1159
            <td>int </td><td>getNodeKind() <br/>
1160
               <em>Get the kind of node</em>
1161
            </td></tr>
1162
         <tr>
1163
            <td>string </td><td>getNodeName <br/>
1164
               <em>et the name of the node, as a EQName</em>
1165
            </td></tr>
1166
         <tr>
1167
            <td>boolean </td><td>isAtomic() <br/>
1168
               <em>Determine whether the item is an atomic value or a node. This method will return
1169
                  FALSE as the item is not atomic</em>
1170
            </td></tr>
1171
         <tr>
1172
            <td>int </td><td>getChildCount() <br/>
1173
               <em>Get the count of child node at this current node</em>
1174
            </td></tr>
1175
         <tr>
1176
            <td>int </td><td>getAttributeCount() <br/>
1177
               <em>Get the count of attribute nodes at this node</em>
1178
            </td></tr>
1179
         <tr>
1180
            <td><a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
1181
            </td><td>getChildNode(int index) <br/>
1182
               <em>Get the n'th child node at this node. If the child node selected does not exist
1183
                  then return null</em>
1184
            </td></tr>
1185
         <tr>
1186
            <td><a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
1187
            </td><td>getParent() <br/>
1188
               <em>Get the parent of this node. If parent node does not exist then return null</em>
1189
            </td></tr>
1190
         <tr>
1191
            <td><a class="bodylink code" href="../saxon_c_php_xdmnode">XdmNode</a>
1192
            </td><td>getAttributeNode(int $index) <br/>
1193
               <em>Get the n'th attribute node at this node. If the attribute node selected does not
1194
                  exist then return null</em>
1195
            </td></tr>
1196
         <tr>
1197
            <td>string </td><td>getAttributeValue(int $index) <br/>
1198
               <em>Get the n'th attribute node value at this node. If the attribute node selected
1199
                  does not exist then return null</em>
1200
            </td></tr>
1201
      </table>
1202
   </section>
1203

    
1204
   <section id="saxon_c_php_xdmatomicvalue" title="Saxon\XdmAtomicValue">
1205
      <h1>Saxon\XdmValue Class</h1>
1206
      <p>extends <a href="../saxon_c_php_xdmitem">Saxon\XdmItem</a></p>
1207
      
1208
      <table>
1209
         <thead>
1210
            <tr>
1211
               <td>Return</td>
1212
               <td>Function name and Description</td>
1213
            </tr>
1214
         </thead>
1215
         
1216
         <tr>
1217
            <td>string </td><td>getStringValue <br/>
1218
               <em>Get the string value of the item. For an atomic value, it has the same effect as
1219
                  casting the value to a string. In all cases the result is the same as applying the
1220
                  XPath string() function.</em>
1221
            </td></tr>
1222
         <tr>
1223
            <td>boolean </td><td>getBooleanValue <br/>
1224
               <em>Get the value converted to a boolean using the XPath casting rules</em>
1225
            </td></tr>
1226
         <tr>
1227
            <td>double </td><td>getDoubleValue <br/>
1228
               <em>Get the value converted to a double using the XPath casting rules. If the value
1229
                  is a string, the XSD 1.1 rules are used, which means that the string "+INF" is
1230
                  recognised</em>
1231
            </td></tr>
1232
         <tr>
1233
            <td>long </td><td>getLongValue <br/>
1234
               <em>Get the value converted to an integer using the XPath casting rules</em>
1235
            </td></tr>
1236
         <tr>
1237
            <td>boolean </td><td>isAtomic <br/>
1238
               <em>Determine whether the item is an atomic value or a node. Return TRUE if the item
1239
                  is an atomic value</em>
1240
            </td></tr>
1241
      </table>
1242
   </section>
1243

    
1244
</section>
(8-8/11)