Skip to content

Commit

Permalink
AllNode make as unexported type: allNode
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengchun committed Sep 7, 2017
1 parent 2392934 commit 58d12fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func axisPredicate(root *axisNode) func(NodeNavigator) bool {
case "attribute":
typ = AttributeNode
case "self", "parent":
typ = AllNode
typ = allNode
default:
switch root.Prop {
case "comment":
Expand All @@ -37,11 +37,11 @@ func axisPredicate(root *axisNode) func(NodeNavigator) bool {
// case "processing-instruction":
// typ = ProcessingInstructionNode
case "node":
typ = AllNode
typ = allNode
}
}
predicate := func(n NodeNavigator) bool {
if typ == n.NodeType() || typ == AllNode || typ == TextNode {
if typ == n.NodeType() || typ == allNode || typ == TextNode {
if root.LocalName == "" || (root.LocalName == n.LocalName() && root.Prefix == n.Prefix()) {
return true
}
Expand Down
4 changes: 2 additions & 2 deletions xpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const (
// CommentNode is a comment node, such as <!-- my comment -->
CommentNode

// AllNode is any types of node.
AllNode
// allNode is any types of node, used by xpath package only to predicate match.
allNode
)

// NodeNavigator provides cursor model for navigating XML data.
Expand Down

0 comments on commit 58d12fe

Please sign in to comment.