[s-xml-devel] Re: Webpage example doesn't work

Andy Chambers achambers.home at googlemail.com
Tue Oct 16 23:14:01 UTC 2007


On 10/16/07, I wrote:
> Hi,
>
> One of the print-xml examples on the webpage doesn't work for me.
>
> ? (print-xml '(p "Interesting stuff at " ((a href
> "http://slashdot.org") "SlashDot")))
> <P>Interesting stuff at <A HREF="http://slashdot.org">SlashDot</A></P>
> NIL
>
> When I try to run the example above, I get
>
> There is no applicable method for the generic function
>   #<STANDARD-GENERIC-FUNCTION GET-PREFIX (1)>
> when called with arguments
>   (NIL).
>    [Condition of type SIMPLE-ERROR]
>
> All the other examples work.  It looks to be something to do with the
> namespaces stuff that's been added relatively recently but I haven't
> been able to figure it out yet.

It seems if you define a get-prefix method specializing on NIL, the
example works as expected

(defmethod get-prefix ((namespace (eql nil)))
  "")

While we're on the subject of namespaces, how is this mechanism
supposed to work?  Is there an :sxml syntax for assigning namespaces
to elements?

Cheers,
Andy



More information about the s-xml-devel mailing list