Skip to content

Commit

Permalink
Register XPath namspaces before evaluating for-each
Browse files Browse the repository at this point in the history
  • Loading branch information
jbowtie committed Jan 15, 2014
1 parent 98f8a3a commit 52847d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xslt/instruction.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ func (i *XsltInstruction) Apply(node xml.Node, context *ExecutionContext) {
case "for-each":
scope := i.Node.Attr("select")
e := xpath.Compile(scope)
context.RegisterXPathNamespaces(i.Node)
nodes, _ := context.EvalXPathAsNodeset(node, e)
if i.sorting != nil {
i.Sort(nodes, context)
Expand Down

0 comments on commit 52847d5

Please sign in to comment.