Subject: Re: JADE--SGML Backend--attributes From: Daniel Speck <dspeck@xxxxxxx> Date: Wed, 24 Mar 1999 09:08:42 -0500 |
Pascal Le-Carrour wrote: > Is there any smart way to get the content of a tag (of input SGML) in a attributes value (of the output SGML) ? Yes, there is a function (data) that returns the concatenated data content of an element as a string. You just need to specify this as the value of the attribute in the (make element ...) rule. For the code you provide below I would substitute: (element MY_TAG ... (make element gi: "td" (make element gi: "a" attributes: (list (list "href" (string-append "mailto:" (data)))) (process-children))) ) > For instance, here is the code to generate the HREF attribute of a A Tag from the content of MY_TAG tag. > This code also generates the content of the A tag with the content of MY_TAG tag. > > (element MY_TAG > ... > (make element gi: "TD" > (make sequence > (make formatting-instruction > data: "<A HREF=\"mailto:" > ) > (process-children) > (make formatting-instruction > data: "\">" > ) > (process-children) > (make formatting-instruction > data: "</A>" > ) > ) > ) > ... > ) -- Daniel Speck Bureau of National Affairs, Inc. Voice: +1 202.452.6596 1231 25th Street, NW Fax: +1 202.331.5178 Washington, DC 20037 e-mail: dspeck@xxxxxxx DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: JADE--SGML Backend--attributes, Annegret Fiebig | Thread | RE: JADE--SGML Backend--attributes, Pascal Le-Carrour |
Re: JADE--SGML Backend--attributes, Annegret Fiebig | Date | Re: postscript, Richard Kunze |
Month |