From 2c97049c16bd99dc7226b879c171246e34ec219c Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 16 Jan 2012 18:33:00 +0100 Subject: beta 2012.01.16 18:33 --- tex/context/base/lxml-lpt.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tex/context/base/lxml-lpt.lua') diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua index 11922cf18..607101ae9 100644 --- a/tex/context/base/lxml-lpt.lua +++ b/tex/context/base/lxml-lpt.lua @@ -1105,9 +1105,9 @@ end expressions.child = function(e,pattern) return applylpath(e,pattern) -- todo: cache end -expressions.count = function(e,pattern) +expressions.count = function(e,pattern) -- what if pattern == empty or nil local collected = applylpath(e,pattern) -- todo: cache - return (collected and #collected) or 0 + return pattern and (collected and #collected) or 0 end -- external @@ -1116,7 +1116,7 @@ expressions.oneof = function(s,...) -- slow local t = {...} for i=1,#t do if s == t[i] then return true end end return false end expressions.error = function(str) - xml.errorhandler("unknown function in lpath expression",tostring(str or "?")) + xml.errorhandler(format("unknown function in lpath expression: %s",tostring(str or "?"))) return false end expressions.undefined = function(s) -- cgit v1.2.3