Subject: call of non-function object From: shennessy@xxxxxxxxxx Date: Thu, 23 Jul 98 11:22:42 -0800 |
------=_NextPart_000_0018_01BDB62C.359CB2C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Please could someone offer an explanation of the problem that Jade is = reporting? jade:sgml2odsp.dsl:1004:69:E: call of non-function object "#<unknown = object 16869264>" Your humble newbie schemer. Sean <!-- ;;[work in progress] ;; SGML Source Markup ;; ;;<ref-fig refid=3D"f-90e09903"> ;; ;; XYWrite Result Markup.. ;; ;;=AEX99=AF[Fig. 7]f-90e09903=AEX99/=AF ;; ;; find node with element (figure graphic) attribute "id" ;; to match element ref-fig attribute "refid" ;;=20 --> (element REF-FIG (let (=20 (atRefId (attribute-string "REFID" (current-node))) );eoletgroup (make paragraph (literal %gX99%) (literal "[") (literal (number->string($find-figure-graphic-with-id$ atRefId ))) (literal "]") (literal atRefId) (literal %gX99C%) (literal %gNewLine%) (process-children) );eompara );eolet ) <!-- ;; Given the SGML markup. ;; <figure> ;; <graphic id=3D"f-93d00854"> ;; <caption>naked picture of my cat</caption> ;; </figure> ;; ;; Visit each one of the "figure" element nodes ;; compare the attribute-string "ID" of the child "graphic" element ;; if match is found return element number of figure element. --> (define ($find-figure-graphic-with-id$ %test-value%) ;; build a list of nodes containing all the "figure" elements in the = grove. ;; and iterate through each of the figure nodes. (let loop ( (enl ( select-elements ( ancestors (current-node) ) = (normalize "figure") ) ) ) ;; not sure about this ;; compare each node in turn against the test value THIS NEXT "IF" IS = WHAT JADE DOES NOT LIKE.. (if ( string=3D? ( (attribute-string "ID" ( (select-elements (children = ( enl ) ) (normalize "graphic") ) ) ) ) %test-value%)=20 ($get-elem-num-str$ enl) ;;#t return this (loop (node-list-rest enl)) ;;#f );;eoif );;eoletloop );;eodefine <!-- ;; uses element-number which returns occurrence of a gi in current = node-list --> (define ($get-elem-num-str$ %this-node%) (number->string(element-number(%this-node%))) ) //EOT ------=_NextPart_000_0018_01BDB62C.359CB2C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type> <META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000 size=3D2>Please could someone offer an = explanation of the=20 problem that Jade is reporting?</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2>jade:sgml2odsp.dsl:1004:69:E: call = of=20 non-function object "#<unknown object = 16869264>"</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>Your humble newbie = schemer.</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT><FONT = size=3D2>Sean</FONT></DIV> <DIV><FONT size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2><!--<BR>;;[work in = progress]<BR>;; SGML=20 Source Markup<BR>;;<BR>;;<ref-fig=20 refid=3D"f-90e09903"><BR>;;<BR>;; XYWrite Result=20 Markup..<BR>;;<BR>;;®X99¯[Fig. = 7]f-90e09903®X99/¯<BR>;;<BR>;;=20 find node with element (figure graphic) attribute "id"<BR>;; = to match=20 element ref-fig attribute "refid"<BR>;; <BR>--><BR>(element = REF-FIG<BR> (let ( <BR> (atRefId (attribute-string=20 "REFID" (current-node)))<BR> );eoletgroup</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2> (make = paragraph<BR> (literal=20 %gX99%)<BR> (literal "[")<BR> (literal = (number->string($find-figure-graphic-with-id$ atRefId = )))<BR> =20 (literal "]")<BR> (literal = atRefId)<BR> =20 (literal %gX99C%)<BR> (literal %gNewLine%)<BR> =20 (process-children)<BR> );eompara<BR> );eolet<BR>)</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><!--<BR>;; Given the SGML markup.<BR>;; <figure><BR>;; = <graphic=20 id=3D"f-93d00854"><BR>;; <caption>naked picture of my = cat</caption><BR>;; </figure><BR>;;<BR>;; Visit each one of = the=20 "figure" element nodes<BR>;; compare the attribute-string=20 "ID" of the child "graphic" element<BR>;; if match = is found=20 return element number of figure element.<BR>--><BR>(define=20 ($find-figure-graphic-with-id$ %test-value%)<BR> ;; build a list of = nodes=20 containing all the "figure" elements in the grove.<BR> ;; = and=20 iterate through each of the figure nodes.<BR> (let loop ( (enl (=20 select-elements ( ancestors (current-node) ) (normalize = "figure") ) )=20 ) ;; not sure about this</DIV> <DIV> ;; compare each node in turn against the test value = THIS NEXT=20 "IF" IS WHAT JADE DOES NOT LIKE..<BR> (if ( string=3D? ( = (attribute-string "ID" ( (select-elements (children ( enl ) )=20 (normalize "graphic") ) ) ) ) %test-value%) <BR> =20 ($get-elem-num-str$ enl) ;;#t return this<BR> (loop = (node-list-rest=20 enl)) ;;#f<BR> );;eoif<BR> );;eoletloop<BR>);;eodefine</DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 = size=3D2><!--<BR></FONT>;;=20 uses element-number which returns occurrence of a gi in current=20 node-list<BR>--><BR>(define ($get-elem-num-str$=20 %this-node%)<BR> (number->string(element-number(%this-node%)))<BR= >)<BR></FONT></DIV> <DIV><FONT color=3D#000000 size=3D2><A=20 href=3D"file://EOT">//EOT</A><BR></FONT></DIV></BODY></HTML> ------=_NextPart_000_0018_01BDB62C.359CB2C0--
Attachment:
smime.p7s
Description: Binary data
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: jade SGML output, W. Eliot Kimber | Thread | Re: call of non-function object, Toby Speight |
jade SGML output, Louis-Dominique Dube | Date | Automatic image scaling, Kendall Clark |
Month |