This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help with a small customization at <ulink> on HTMLstylesheets.


/ Jorge Luiz Godoy Filho <godoy@conectiva.com> was heard to say:
| I'd also have some clue on how to default to '_top' if the target
| attribute isn't defined.

That's the problem. When target isn't specified, you get a list that
contains a non-string and that's not legal in attributes:

(I assume you modified the DTD to allow the target attribute on
ulink?)

Try something like this:

(element ulink 
  (make element gi: "A"
	attributes: (list
		     (list "HREF" (attribute-string (normalize "url")))
		     (list "TARGET" (if (attribute-string (normalize "target"))
                                        (attribute-string (normalize "target"))
                                        "_top")))
        (if (node-list-empty? (children (current-node)))
            (literal (attribute-string (normalize "url")))
            (process-children))))

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | There is nothing which human
http://www.oasis-open.org/docbook/ | courage will not undertake, and
Chair, DocBook Technical Committee | little that human patience will
                                   | not endure.--Dr. Johnson


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]