cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

next and previous sibling tests (verso-recto spreads)

naglists
1-Newbie

next and previous sibling tests (verso-recto spreads)

I do not honestly fully remember why we need this / how it works. The
use-case has to do with an element with two parts each of which are always
output on facing pages ... verso then recto. (Not sure if that's
technically a "spread" or not, but you get the idea.) Something like a
diagram on verso and a parts list on recto. (We don't do parts lists, but
that's a classic example, I think.)

Anyhow, we need to one thing if another element follow vs. if we are the
last element in a chapter, say. So we test nextsib() and if = "self" then
we do one thing. If it is null or a section or something, we do something
different. Trailing blank footer text? Like I said ... can't remember
exactly.

function nextsib(win,oid) {
return oid_name(oid_next($oid));
}
function previoussib(win,oid) {
return oid_name(oid_prev($oid));
}


<att>
<specval attname="my_fosi::nextsib" attloc="system-func"&lt;br"/>attval="#EQ#\my_description\">
<fillval attname="my_fosi::nextsib" attloc="system-func" fillcat="savetext"&lt;br"/>fillchar="conrule">
<charsubset>
<savetext textid="nextsib.txt" placemnt="after">
<savetext textid="footer.txt"&lt;br"/>conrule="<rectofooter.fmt>,</rectofooter.fmt>" placemnt="after">
</charsubset>
</att>
<att>
<specval attname="my_fosi::nextsib" attloc="system-func"&lt;br"/>attval="#NE#\my_description\">
<fillval attname="my_fosi::nextsib" attloc="system-func" fillcat="savetext"&lt;br"/>fillchar="conrule">
<charsubset>
<savetext textid="nextsib.txt" placemnt="after">
<savetext textid="footer.txt"&lt;br"/>conrule="<versofooter.fmt>,</versofooter.fmt>" placemnt="after">
</charsubset>
</att>

--
Paul Nagai
0 REPLIES 0
Announcements