Re: [NTG-context] xml attribute conditional

2011-12-14 Thread Jon Crump
Hans, Thanks for this. It's almost what I need. I truly appreciate the effort, and it does give me some ideas about things to try. However, if I change your example buffer slightly (for clarity) to this: arab foo arab bar english eggs english ham

Re: [NTG-context] xml attribute conditional

2011-12-14 Thread Hans Hagen
On 14-12-2011 19:33, Jon Crump wrote: @xml:id==string.sub('#N020-18', 2) -> (ll.at and ll.at['xml:id'])==string.sub('#N020-18', 2) ! Missing number, treated as zero. lua error with sub .. not sure what you want t o test here indeed an error will prevent the multipass file to be saved (fe

Re: [NTG-context] xml attribute conditional

2011-12-14 Thread Jon Crump
>> @xml:id==string.sub('#N020-18', 2) -> >>     (ll.at and ll.at['xml:id'])==string.sub('#N020-18', 2) ! Missing >> number, treated as zero. > > > lua error with sub .. not sure what you want t o test here > > indeed an error will prevent the multipass file to be saved (feature) > > > Hans Thanks

Re: [NTG-context] xml attribute conditional

2011-12-13 Thread Hans Hagen
On 13-12-2011 20:21, Jon Crump wrote: @xml:id==string.sub('#N020-18', 2) -> (ll.at and ll.at['xml:id'])==string.sub('#N020-18', 2) ! Missing number, treated as zero. lua error with sub .. not sure what you want t o test here indeed an error will prevent the multipass file to be saved (fe

Re: [NTG-context] xml attribute conditional

2011-12-13 Thread Jon Crump
Hans et alia, Thanks for helping out with the right xpath expression. That was indeed the problem: div elements in the ancestor axis that had no xml:id attribute. Unfortunately, this doesn't solve my root problem. I have a tei/xml marked up text with English and Arabic sections. For each ref tag

Re: [NTG-context] xml attribute conditional

2011-12-13 Thread Hans Hagen
On 13-12-2011 00:48, Jon Crump wrote: 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

[NTG-context] xml attribute conditional

2011-12-12 Thread Jon Crump
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