I solved that last problem (had to do a test to see if a sosofo was
empty), but now I'm onto this challenge...
dbnavig.dsl generates the following at the top of my example pages
(reformated):
<DIV CLASS="NAVHEADER">
Chapter 1. Foreword
<HR ALIGN="LEFT" WIDTH="100%">
</DIV>
This looks just fine when there is text such as "Chapter 1.
Foreward", but when there isn't, I obviously get:
<DIV CLASS="NAVHEADER">
<HR ALIGN="LEFT" WIDTH="100%">
</DIV>
And it looks pretty dumb to have a horizontal rule across the top of
my page without anything to separate. How do I conditionally remove
this HR?
The HTML is generated by the following:
(make element gi: "DIV"
attributes: '(("CLASS" "NAVHEADER"))
(nav-context elemnode)
(make empty-element gi: "HR"
attributes: (list
(list "ALIGN" "LEFT")
(list "WIDTH" %gentext-nav-tblwidth%))))
and I tried replacing it with:
(make element gi: "DIV"
attributes: '(("CLASS" "NAVHEADER"))
(nav-context elemnode)
(if (string=? (nav-context elemnode) "") (empty-sosofo)
(make empty-element gi: "HR"
attributes: (list
(list "ALIGN" "LEFT")
(list "WIDTH" %gentext-nav-tblwidth%)))))
But this doesn't make it happy because (nav-context elemnode) is not
a string, it's an object. So I get the following error:
jade:HTML.dsl\dbnavig.dsl:828:4:E: 1st argument for primitive
"string=?" of wrong type: "#<unknown object 26537360>" not a string
The only other test I know is node-list-empty? and that doesn't seem
to apply to objects either.
What's the correct way to compare (nav-context elemnode) against ""?
Thanks!
Gre7g.
=================================================================
Gre7g Luterman [EMAIL PROTECTED] http://www.templeofluna.com/
Stay informed: http://www.templeofluna.com/keeper/mailinglist.htm
Into each wound, a little salt must fall...