2015-10-30 9 views
1

Saxon/C documentation開始說;如何使用Saxon/C從PHP執行XQuery?

Saxon/C is currently on beta release: offering the Saxon-HE product for the C/C++ programming platform. APIs are offered currently to run XSLT 2.0 and XQuery 1.0 from C/C++ or PHP applications.

這意味着Saxon/C可以用來從PHP執行XQuery,但可以嗎?有關於XSLT的Saxon/C文檔,但不包含XQuery。

Can Saxon/C可以用來從PHP運行XQuery,如果有,是否有任何文檔?

編輯:我正在運行Windows版本的Saxon/C。

+0

http://www.saxonica.com/saxon-c/doc/html/classSaxonProcessor.html建議C++ API同時創建一個'newTransformer'和一個'newXQueryProcessor '。是否這兩個功能都暴露給PHP我不知道。 –

回答

1

在薩克森/ C的PHP API文檔有你需要的東西:

http://www.saxonica.com/saxon-c/php_api.xml

還檢查了實例在下載的zip文件的樣本目錄。請參閱文件xqueryExamples.php

+0

謝謝。我嘗試了'$ xproc = $ proc-> XQueryProcessor();'但它返回致命錯誤'調用未定義的方法SaxonProcessor :: XQueryProcessor()'。最新的Windows下載(beta v0.3.1)缺少文件'xqueryExamples.php'。 –

+0

我忘了在我的問題中提到我正在運行Saxon/C的Windows版本。 –

+0

看起來您正在將C++ API中的whats與PHP API中的內容混合在一起。請參閱示例文件:https://dev.saxonica.com/repos/archive/opensource/latest9.6/hec/samples/xqueryExamples.php – ond1