Implement XML::LibXML::Element->getNamespace
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read the XML::LibXML::Element method table and Perl shim, then inspect the existing Java localNS implementation. Add focused coverage for namespaced and unnamespaced elements, and validate with standard Perl and both PerlOnJava backends. Done means getNamespace returns a compatible XML::LibXML::Namespace and the four named WWW-OpenSearch test programs pass.
索引モデルが issue の本文から書いたものです。
説明
Summary
The bundled XML::LibXML compatibility implementation does not expose XML::LibXML::Element->getNamespace. WWW-OpenSearch 0.17 calls this method while parsing an OpenSearch description, so four of its test programs abort under PerlOnJava even though the same upstream suite passes under standard Perl with XML::LibXML installed.
Reproduction
use XML::LibXML;
my $doc = XML::LibXML->load_xml(
string => '<Description xmlns="http://a9.com/-/spec/opensearch/1.1/"/>',
);
print $doc->documentElement->getNamespace->value, "\n";
Expected: the namespace object's value is http://a9.com/-/spec/opensearch/1.1/.
Observed on both PerlOnJava backends:
Can't locate object method "getNamespace" via package "XML::LibXML::Element"
Root cause
WWW::OpenSearch::Description calls $element->getNamespace->value while parsing its description XML. In the bundled implementation, XML::LibXML::Element inherits the node method table, which registers localNS and getNamespaces but has no getNamespace entry. The Perl shim also has no singular getNamespace wrapper. The underlying Java implementation already has localNS, which constructs an XML::LibXML::Namespace object from the element's namespace URI and prefix; the missing method name prevents callers from reaching that existing behavior.
CPAN evidence
- Distribution:
WWW-OpenSearch0.17; archived CPAN run20261129-192130-74689. - PerlOnJava failed
t/09-opensearch.t,t/10-description.t,t/11-url.t, andt/13-request.tat the missing method call.t/00_compile.t,t/12-response.t, and the POD tests passed;t/01_live.twas skipped becauseOPENSEARCH_URLwas unset. - The standard-Perl oracle for that run passed all 9 test programs and 120 tests with XML::LibXML and prerequisites installed in its isolated environment. The live test remained skipped because no
OPENSEARCH_URLwas set. - A focused reproduction on PerlOnJava 5.44.1, source revision
1eb25df1f686dcc5b90e839de05d21a5d14aec0c, with Java 24.0.2 failed on both the JVM and interpreter backends with the method-not-found error above.
Acceptance criteria
XML::LibXML::Element->getNamespacereturns anXML::LibXML::Namespaceobject with behavior compatible with standard XML::LibXML, including its URI throughvalue.- Add project-owned focused coverage for namespaced and unnamespaced elements, validated with standard Perl and both PerlOnJava backends.
- Re-run
WWW-OpenSearch0.17 and confirm the four affected test programs complete and pass under PerlOnJava.
- 主要言語
- Perl
- スター
- 67
- フォーク
- 9
- 平均マージ
- 6時間 45分
- マージ済み PR(30日)
- 104
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fglock/PerlOnJava のほかの issue
-
area:cpan-port area:performance bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#2230 ·
メンテナーはふだん 1 日以内に返信
-
area:runtime documentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#1579 ·
メンテナーはふだん 1 日以内に返信
-
area:ownership area:performance area:runtime bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
fglock/PerlOnJava#2232 ·
メンテナーはふだん 1 日以内に返信
-
area:backend area:cpan-port area:runtime bug
難易度 4/5 3〜5日 初心者へのやさしさ 72/100
fglock/PerlOnJava#2231 ·
メンテナーはふだん 1 日以内に返信
-
area:parser area:runtime area:unicode bug
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
fglock/PerlOnJava#2228 ·
メンテナーはふだん 1 日以内に返信
fglock/PerlOnJava の issue をすべて見る
似ている issue
-
[doc] perlsub wrongly says that `"sub { ... }" creates a new subroutine each time it is executed'オープンdocumentation Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
docs(api): /api/v3/external_sources spec is missing lc and section_title対応中かも @subhwastaken が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
openfoodfacts/openfoodfacts-server#15626 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 67/100
LMS-Community/slimserver#1742 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
brucemiller/LaTeXML#2894 ·