Pull requests

#24 Merged
Repository
shlomif/perl-XML-LibXML perl-XML-LibXML
Branch
default

unique_key method for Namespace objects

Author
  1. garfieldnate
Reviewers
Description

Added a unique_key method for Namespace objects which is compatible with the unique_key method for Node objects. Now we don't have to check the type of object returned by xpath methods before we can call unique_key. Tests and documentation included. The unique_key method simply returns a concatenation of the namespace prefix and URI, with a vertical bar separating them. This is consistent with the behavior of _isEqual, which checks for both prefix and URI equality between two namespaces. Note that unique_key.t now relies on the Namespace constructor working, which isn't tested anywhere else. Might be good for the TODO list.

Comments (0)