Comment about 2.2.2 The luhn() Function (XForms 1.1)

Dear Working Group,

I noticed that one of the examples for the luhn function was expressed 
as luhn(.). I guess this is made explicit as an example since this is 
the most common use case. E.g. constraint="luhn(.)". Why not leave the 
argument for the function optional and say that in case it is laking 
then the context node are used (as XPath does for local-name(), 
string-length() and others).

This would leave the definition to something like:
/boolean/ *luhn*(string?)

If the string parameter conforms to the pattern restriction of the 
xforms:ID-card-number <http://www.w3.org/TR/xforms11/#id-card-type> 
type, then this function applies the |luhn| formula described in [ISO 
7812-1:2000] <http://www.w3.org/TR/xforms11/#ref-iso-7812> and returns 
true if the number satisfies the formula. Otherwise, false is returned. 
If the string argument is omitted it defaults to the context node 
converted to a string.

It would really help implementors if there was at least one example 
showing an argument where luhn return true.

Editorial: XPath and XSLT uses the term argument for arguments where 
XForms seems to call them parameters (not in all function definitions 
but in most of them).

Best regards,
David

-- 
--------------------------------------------
David Landwehr (david.landwehr@solidapp.com)
Chief Executive Officer, SolidApp
Web: http://www.solidapp.com
Office: +45 48268212
Mobile: +45 24275518
--------------------------------------------

Received on Tuesday, 7 March 2006 20:39:09 UTC