count()가 잘 안되서 지원이 안되는건줄 알았는데 엉뚱한 경로를 해놓고 헤매고 있었다..
FunctionResolver.prototype.addStandardFunctions = function() { this.functions["{}last"] = Functions.last; this.functions["{}position"] = Functions.position; this.functions["{}count"] = Functions.count; this.functions["{}id"] = Functions.id; this.functions["{}local-name"] = Functions.localName; this.functions["{}namespace-uri"] = Functions.namespaceURI; this.functions["{}name"] = Functions.name; this.functions["{}string"] = Functions.string; this.functions["{}concat"] = Functions.concat; this.functions["{}starts-with"] = Functions.startsWith; this.functions["{}contains"] = Functions.contains; this.functions["{}substring-before"] = Functions.substringBefore; this.functions["{}substring-after"] = Functions.substringAfter; this.functions["{}substring"] = Functions.substring; this.functions["{}string-length"] = Functions.stringLength; this.functions["{}normalize-space"] = Functions.normalizeSpace; this.functions["{}translate"] = Functions.translate; this.functions["{}boolean"] = Functions.boolean_; this.functions["{}not"] = Functions.not; this.functions["{}true"] = Functions.true_; this.functions["{}false"] = Functions.false_; this.functions["{}lang"] = Functions.lang; this.functions["{}number"] = Functions.number; this.functions["{}sum"] = Functions.sum; this.functions["{}floor"] = Functions.floor; this.functions["{}ceiling"] = Functions.ceiling; this.functions["{}round"] = Functions.round; }; |
[링크 : https://github.com/goto100/xpath/blob/master/xpath.js]