[英]How to use the collection()-function with saxonche
我正在嘗試使用新的saxonche -Python 模塊( https://pypi.org/project/saxonche/ )來使用collection() -函數。 我希望它返回當前目錄中的所有 XML 文檔。 相反,它只返回None 。 我的代碼看起來像:from saxonche imp ...
[英]How to use the collection()-function with saxonche
我正在嘗試使用新的saxonche -Python 模塊( https://pypi.org/project/saxonche/ )來使用collection() -函數。 我希望它返回當前目錄中的所有 XML 文檔。 相反,它只返回None 。 我的代碼看起來像:from saxonche imp ...
[英]Saxonc python extension issue with macOs
我正在嘗試在 mac OS 中安裝 python 的 saxonC 擴展以使用 xsl 進行 xml 轉換,當我運行“python3 saxon-setup.py build_ext -if”時出現以下錯誤,如此處文檔中所述: https://www .saxonica.com/saxon-c/do ...
[英]XPDY0002 The context item for axis step $nodeset is absent
我收到XPDY0002 上下文項不存在錯誤。 我已經看到了與此相關的其他問題,但我並不真正理解答案,也不知道如何將它們應用到我的 python 代碼中。 這個問題似乎出現在這個奇怪的 xslt 1.0 設置中,我有一個節點集、恆等變換和常規 match="/"。 我的示例是我未編寫的更為復雜的樣式表 ...
[英]saxonc's transform_to_file() produces no output file when supplying xdm_node
這似乎由 @alinaOS 在SaxonC 11.1 transform_to_file Produces No Output File中回答,但沒有回答他們的問題。 這里可能更合適。 我的解決方法也不起作用(請參閱saxonc 的 transform_to_file(),循環執行,不轉換但給出無意 ...
[英]saxonc's transform_to_file(), executed in a loop, doesn't transform but gives non-sensical errors or partial output
我的轉換樣式表文件包含: 我的python代碼: import os import xml.etree.ElementTree as ET from saxonpy import PySaxonProcessor def main(): print('starting code...' ...
[英]XSLT transformation using a xdm_node returns an error - Using Saxon-HE 9.9.1.5C with Python 3.9
我在 Python 中遇到 Saxon HE 問題。當我解析 XML 文件時,我得到一個 PyXdmNode 類型的返回值。 之后我想進行 XSLT 轉換並使用方法 transform_to_value(xdm_node=... )。 當我這樣做時,出現以下錯誤: ...文件“saxonc.pyx ...
[英]SaxonC EE 11.2 "TransformFromFile()" produces empty output
我的 C++ 代碼: 這在我使用“Xslt30Processor::TransformFiletoFile()”時起作用,但不知何故卻不起作用。 ...
[英]SaxonC EE 11.2's "SaxonProcessor::newXslt30Processor()" returns a Debug Assertion Failed : "vector subscript out of range"
我在 Saxon EE 中使用 C API 中的 cpp 和 hpp 文件,我只是編譯並運行了這些行: 它在我創建 XSLT30Processor 時顯示錯誤。 我也沒有使用許可證。 我調試了它,在它調用 JNI 方法之前我能到達的最遠的地方是 Xslt30Processor.cpp 的第 36 ...
[英]No DTD validation and XInclude resolution when using Saxon C HE with Python
我對 Python 的 Saxon C HE 版本有疑問。成功安裝后,我嘗試了一些示例,其中我執行了 XSLT 轉換。 這些都奏效了。 但是,當我解析一個 XML 文件時,在解析過程中沒有執行 DTD 驗證,也沒有解析 XIncludes。 我已經嘗試了很多東西,但是我不可能解決這個問題。 我希望有 ...
[英]SaxonC 11.1 transform_to_file Produces No Output File
在 Python3 中使用 SaxonC-HE 11.1 將 XML 轉換為新文件似乎不會產生任何文件。 這是py代碼: 關聯的 XML 文件內容為: 在.xml : 測試.xsl transform_to_file方法……什么都沒有。 沒有創建輸出文件(我已經查看了整個驅動器的 o ...
[英]Install Saxon-C on Linux 64 ARM
我下載了: https : //www.saxonica.com/saxon-c/libsaxon-HEC-setup64-v1.2.1.zip 解壓並嘗試運行:./libsaxon-HEC-setup64-v1.2.1 我收到關於文件不可執行的錯誤:-bash: ./libsaxon-HEC- ...
[英]Saxon php xml schema validation with entity reference
I'm developing a php application with saxon c api EE edition which need to validate xml files against xsd schema. 我在進行驗證時收到以下錯誤。 org.xml.sax.SAXParse ...
[英]Using conditional includes/static parameters in Saxon/C?
我正在嘗試將 XSLT 條件包含/靜態參數與 Saxon/C HE 一起使用,但出現以下錯誤:Error Parameter $some_param cannot be supplied dynamically because it is declared as static 為了重現,我 ...
[英]Building Python extension for Saxon/C fails: “Unable to find vcvarsall.bat”
摘要:設置失敗,Python Conda Windows 上的 saxon-c 結果來自:saxon-setup.py build_ext -if(參見下面的源代碼清單) I'm inexperienced with compilers/compilation (.pyx.cpp.c.dll e ...
[英]Saxon/C PHP extension name (ext-saxon/c vs ext-saxonc)
我在 PHP-FPM docker 圖像中構建了 Saxon/C PHP 擴展。 當前的擴展名是ext-saxon/c ,而PhpStorm和composer希望擴展名是ext-saxonc 。 是否可以在 Saxon 構建過程或 PhpStorm 中更改/覆蓋它? 當我在 PhpStorm 中 ...
[英]Saxon-C CentOS8 Compile
我正在嘗試在 CentOS8 上評估 Saxon-C 1.2.1 HE,並且安裝似乎沒有問題。 通過cd samples/cppTests && build64-linux.sh嘗試示例雖然會導致無數編譯錯誤,但如下所示: ../../Saxon.C.API/SaxonProce ...
[英]XSLT: Json to given xml format
問題:我有一個給定的 JSON 輸出,需要將其轉換為具有給定格式的 xml 以將其用於另一個輸入。 JSON 文檔: report.json XML 輸出的外觀: 我聽說我應該使用 Saxon XSLT 處理器進行 XSLT 轉換,但我不知道如何(沒有 XSLT 經驗)。 我能想到的 ...
[英]Making saxon-c available in Python
我剛剛讀到 Saxon 現在可用於 Python,這非常有趣而且很好,但是任何人都可以編寫有關如何使其可用於 Python/Anaconda/WingIDE 或類似軟件的教程嗎? 我習慣於使用 pip 或 conda 安裝,並指向一個包/輪子以在我的環境中集成,但我從未從頭開始,因為感覺我在這里做的 ...
[英]Using Saxon/C with Perl
Saxon 網站說可以從 Perl 調用 Saxon/C,但我找不到任何示例。 我發現與撒克遜人的接口的唯一一件事是一個舊的 Perl 模塊(XML::Saxon::XSLT2),它使用 Inline::Java 並且顯然非常慢。 但我找不到任何使用 Saxon/C 的東西。 有沒有人在這方面取得 ...
[英]Why Apache dont activate Saxon/C extension?
我已經通過本文檔逐步安裝了 Saxon/C 擴展:http: http://zf4.biz/blog/installing-the-saxon-c-php-extension 我必須為 PHP5 安裝它,所以這個文檔很棒。 一切正常,如果我使用這個“php -m | grep saxon -i”命 ...