Uploaded image for project: 'Commons JXPath'
  1. Commons JXPath
  2. JXPATH-115

Issue with attribute::

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.3
    • None

    Description

      Checking test (Issue172_CountAttributeNode) I came with the following fix for the code in AttributeContext line 72
      from


      if (!(nodeTest instanceof NodeNameTest))

      { return false; }

      QName name = ((NodeNameTest) nodeTest).getNodeName();

      ------
      '
      to
      — (outside method)
      private static final QName WILDCARD = new QName("", "*");
      — (in method)

      final QName name ;
      if (nodeTest instanceof NodeTypeTest)
      {
      if (((NodeTypeTest) nodeTest).getNodeType() == Compiler.NODE_TYPE_NODE)
      name = WILDCARD;
      else return false;
      }
      else if (nodeTest instanceof NodeNameTest) {
      name = ((NodeNameTest) nodeTest).getNodeName();
      }
      else
      {
      return false;
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            vivodamichele@hotmail.com Michele Vivoda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: