diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-01-16 18:33:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-01-16 18:33:00 +0100 |
commit | 2c97049c16bd99dc7226b879c171246e34ec219c (patch) | |
tree | b0608851e05083bd413fa35f8c65e8536dafd013 /tex/context/base/lxml-lpt.lua | |
parent | 5b13bdfca0e081ef26d49ba405b7fb62d7724c24 (diff) | |
download | context-2c97049c16bd99dc7226b879c171246e34ec219c.tar.gz |
beta 2012.01.16 18:33
Diffstat (limited to 'tex/context/base/lxml-lpt.lua')
-rw-r--r-- | tex/context/base/lxml-lpt.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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) |