haysclark / as3-xpath

1 stars 0 forks source link

Problem Using Functions #21

Closed haysclark closed 10 years ago

haysclark commented 10 years ago

From Gavyn.El...@gmail.com on May 28, 2009 20:23:50

What steps will reproduce the problem? 1. Simply use "fn:count(//love_element)" What is the expected output? What do you see instead? I am suppose to get back a total number of nodes What version of the product are you using? On what operating system? 1.0.0 vista Home Please provide any additional information below. Error: There is no namespace mapped to the prefix 'fn'.

Original issue: http://code.google.com/p/xpath-as3/issues/detail?id=21

haysclark commented 10 years ago

From Gavyn.El...@gmail.com on May 28, 2009 20:47:18

My mistake the error is

Error: Some parsing went awry

haysclark commented 10 years ago

From Gavyn.El...@gmail.com on May 28, 2009 21:13:08

Basically just trying to call a count function to count how many of the node I am looking for are there. If you have made this use a different namespace instead of fn:count let me know because i am not sure how or if its possible in your current version.

haysclark commented 10 years ago

From Gavyn.El...@gmail.com on May 28, 2009 21:20:28

I retract my issue as 'count()' is the prompt term

haysclark commented 10 years ago

From peterj...@gmail.com on June 02, 2009 04:33:31

In XPath 2.0, built-in functions are held in a namespace with fn prefix, but this is not the case in XPath 1.0; they are not in any namespace.

I'm in two minds about whether to support "forwards-compatibility" in this regard, by placing the built-in functions in both the default namespace and "fn". But I am going to change this issue to an enhancement request, to do just that, so it is tracked.

Owner: peterjoel
Labels: -Type-Defect Type-Enhancement

haysclark commented 10 years ago

From peterj...@gmail.com on August 17, 2009 03:41:58

Labels: -Priority-Medium Priority-Low

haysclark commented 10 years ago

From peterj...@gmail.com on August 28, 2012 07:20:40

The possible 'fix' would be a forwards-compatibility mode with XPath 2.0. I'm not sure that this is worth the effort.

I would look at contributions which added that, but I don't have time myself, considering the small use-case.

Status: WontFix