Skip to content

[core] XPath support requires specific toString implementations #569

@jsotuyod

Description

@jsotuyod

The current XPath support requires the node's to provide a toString implementation in line with what we would like to call the name in XPath expressions.

We currently force nodes to define a toString by making it abstract on AbstractNode. The name is not appropriate, and it would be easy to generate a non-useful implementation by the IDE.

We should probably add a new, more-specific, String getXPathNodeName() method on AbstractNode, and use that instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in:pmd-internalsAffects PMD's internalsin:xpathRelating to xpath support at large, eg Jaxen / Saxon, custom functions, attribute resolution

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions