12 Dec
2011
12 Dec
'11
11:48 p.m.
All, I have a conditional expression that checks to see if the current node has any ancestor whose xml:id attribute matches a string \xmldoifelse{#1}{ancestor::div[@xml:id='apr_engl']} What I need is a test to see if the current node has any ancestor whose xml:id attribute _contains_ a substring. Something like this: \xmldoifelse{#1}{ancestor::div[ @xml:id contains('_engl')]} trying this: \xmldoifelse{#1}{ancestor::div[ contains(@xml:id, '_engl')]} got me this error: ! LuaTeX error < local expr = xml.expressions...>:3: bad argument #1 to 'contains' (string expected, got nil) any suggestions? Jon