OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: more re xml/docbook/dsssl - dbtable error


Regarding this error:

dbtable.dsl:224:13:E: 2nd argument for primitive "ancestor" of wrong
type: "#<unknown object 138562344>" not a singleton node list

I have been investigating the error further and learned a few things:

* /print/dbtable.dsl is barely different from 1.56 and 1.78 - just
removing Adam's JadeTeX workaround
* /common/dbtable.dsl is identical in 1.56 and 1.78 except for the
version numbers and dates

The error tends to happen on lines which have this sort of construction:

(ancestor (normalize "tgroup") nd)

Apparently, it thinks "nd" is a non-singleton node-list (not sure if
it's empty or length>1).  Nothing in the function seems to be redefining
the length of the node-list, so it must be being passed to the function
in a bad state.

This construction is used in common/dbtable/find-group and
cell-column-number.  Interestingly, the call to cell-column-number uses
this construction to create a variable "row", then never uses it in the
function.  I was able to comment out that line without any apparent ill
effects.  These functions are called from multiple locations in
/print/dbtable.dsl, creating entry ("nd") as

* For find-group:
(let* ((entry (ancestor-member cell (list (normalize "entry") (normalize
"entrytbl"))))

* For cell-columnn-number:
 (lastentry        (node-list-last (node-list-filter-out-pis (children
row))))
 [had trouble tracing origins of preventry and entry]

At first blush, these definitions of "nd" seem to be creating a valid
singleton node list.  The one using "node-list-last" seems especially
guaranteed to return a singleton.  I don't see why find-group and
cell-column-number are getting fed a non-singleton node list.

Is there anything I can do to fix this?  My tables at the moment tend to
be pretty simple - no use of row spanning, column spanning, or entrytbl.
Lots of the machinery in [print]|[common]/dbtable.dsl seems to be for
handling these three complexities.  Can I significantly simplify
dbtable.dsl by ripping out this handling?

And, most importantly, why does this error happen for an XML version of
the DocBook document but not the near-identical SGML version?  The only
functional difference I see is that I'm declaring a doctype for the SGML
and just processing without a DTD in XML.

what do I do now?

-k

---------------------------------------

This is a problem which has been reported before, but I found no
solutions so I'll ask it again:

I'm using a DocBook XML document, OpenJade, and the DSSSL stylesheets
for RTF output.  They work OK, but I get an error when processing
tables:

dbtable.dsl:224:13:E: 2nd argument for primitive "ancestor" of wrong
type: "#<unknown object 138562344>" not a singleton node list

The generated RTF contains formal table titles but no table content when
viewed in emacs.  The generated document is viewable in WordPad, but
makes MS Word freeze.

The document is included below.  I have tried this with stylesheets
v1.56, v1.78, and a frankenstein monster of 1.56 with 1.78's
dbtable.dsl.  All resulted in the same error message.

What can I do to fix this?  Change the way I write tables?  Change my
stylesheets?

thanks

-k

-----------------------------------------------------------------------
Previous mentions of this problem:

* http://lists.oasis-open.org/archives/docbook-apps/200111/msg00180.html

This was with v1.56 and Norm suggested upgrading to a more recent
version.

* http://sources.redhat.com/ml/docbook-apps/2004-q1/msg00354.html

This was with v1.77 and there was no reply.

------------------------------------------------------------------------

The document.  (I have also tried with formal tables and saw the same
result.)

<?xml version="1.0" encoding="utf-8"?>
<sect1 lang="en">
   <title>Table Test</title>
   <informaltable colsep="1" frame="all" pgwide="1" rowsep="1">
      <tgroup cols="3">
         <colspec colnum="1" colwidth="1"/>
         <colspec colnum="2" colwidth="3"/>
         <colspec colnum="3" colwidth="1"/>
         <thead>
            <row>
               <entry>0.46922</entry>
               <entry>0.58279</entry>
               <entry>0.33395</entry>
            </row>
         </thead>
         <tbody>
            <row>
               <entry>0.064781</entry>
               <entry>0.4235</entry>
               <entry>0.43291</entry>
            </row>
         </tbody>
         <tfoot>
            <row>
               <entry>0.98833</entry>
               <entry>0.51551</entry>
               <entry>0.22595</entry>
            </row>
         </tfoot>
      </tgroup>
   </informaltable>
</sect1>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]