Subject: RE: Interesting problem From: "Didier PH Martin" <martind@xxxxxxxxxxxxx> Date: Mon, 16 Aug 1999 12:49:47 -0400 |
Hi Joerg, Didier said: ------------------------------------------------------ > A very interesting problem has been posted on the XSL list. How would we > resolve it in DSSSL. I'll take the best solution from both world and publish > it. > > Suppose I had the following XML fragment: > > <entry> > <key>foo</key> > <description>A sample link</description> > </entry> > > Suppose I would like to create the following output using XT: > > <a href="http://www.frob.org/search?type=simple&key=foo">A sample > link</a> > > How would I go about this? My problem is how to create the `href' > attribute of the output element `a', in particular how to concat the > constant string "http://www.frob.org/search?type=simple&key=" and the > content of the `key' input element. Jeorg said: ------------------------------------------------------- If I got the question right, the following untested code fragment should do the trick using jade's sgml extension FOs. (element (entry key) (empty-sosofo)) (element entry (make element gi: "a" attributes: `(("href" ,(string-append "http://www.frob.org/search?type=simple&key=" (data (select (children (current-node) "key")))))) (process-children))) But I think the real question has been how to do that without "make element", hasn't it? Didier says: ------------------------------------------------------- All solutions are good, but you are right, we need also solutions not based on the make "element". This is an OpenJade solution but not a standard DSSSL solution. Thanx Jeorg for your solution (but I am sure you have others in mind - just from your comment, I can sense that ;-) regards Didier PH Martin mailto:martind@xxxxxxxxxxxxx http://www.netfolder.com DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Interesting problem, Joerg Wittenberger | Thread | RE: Interesting problem, Russell Steven Shawn |
RE: Interesting problem, Didier PH Martin | Date | Re: Interesting problem, Toby Speight |
Month |