Implement XML::LibXML::Element->getNamespace
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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 分钟
- 30 天内合并 PR
- 104
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 一周以上 新手友好度 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 一周以上 新手友好度 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 ·