RE: 1st argument for primitive "literal" of wrong type

Subject: RE: 1st argument for primitive "literal" of wrong type
From: Avi Kivity <Avi@xxxxxxxxxxxxx>
Date: Tue, 24 Aug 1999 14:31:57 +0300
On Tuesday, August 24, 1999 13:11, Philippe CASIDY
[SMTP:pcasidy@xxxxxxxxxxx] wrote:
> Hello,
> 
> I am quite a newbie with DSSSL, so I need someone's help ;-)
> 
> I have the following declaration in my DTD:
> 
> <!ENTITY % adress.attributes
>   "
>     Contact   CDATA #IMPLIED
>     Company   CDATA #IMPLIED
>     Telephone CDATA #IMPLIED
>   "
> ....
> 
> <!ELEMENT Adress   - O (#PCDATA)>
> <!ATTLIST Adress  %adress.attributes>
> 
> >
> 
> 
> and my dsl looks like this:
> 
> (element Adress
>   (make paragraph
>     quadding: 'start
>     (sosofo-append
>       (literal "Adresse : ")
>       (literal (attribute-string "Contact")  )
>     )
>   )
> )
> 
> When I process it with jade, I have the following message :
> 
> /usr/local/bin/jade:fact.dsl:33:6:E: 1st argument for primitive "literal"
> of wrong type: "#f" not a string
> 

There was no contact, so attribute-string returned #f. IMPLIED really means
"optional".
One way to solve it would be

(literal (or (attribute-string "Contact") "No contact specified"))

(or) returns the first argument which is not #f.

---
"The only words which have meaning are the last ones spoken"



 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread