Subject: [xsl] New to XML - probably not yet worthy of your time. From: Reuben Bell <Reuben.Bell@xxxxxxxxxxxxxxxx> Date: Wed, 4 Jul 2001 12:08:07 +0100 |
as a web developer, who is begining to learn xml, I was wondering it anyone could help me with the following little problem,. My code -> <xsl:for-each select="gallery/pic"> <tr> <td colspan="2"><b><xsl:value-of select="info/title"/></b></td> </tr> <tr> <td colspan="2"> <script> cursrc = '<xsl:value-of select="info/link"/>' document.write ('<a href="'+cursrc+'">Relevant Site</a>') </script> </td> </tr> <tr> <td><script> cursrc = '<xsl:value-of select="image/src"/>' //alert (cursrc) truecursrc = "gfx/" + cursrc document.write ('<IMG width="386" SRC="'+truecursrc+'"/>') </script></td> <td valign="top" class="blacknormtext"><xsl:value-of select="info/description"/></td> </tr> </xsl:for-each> as you can see.,.. this xsl doc quite frankly sucks... I would like to just put the value into the src somehow but dont know how. thanks for any help, also... what is the USE of XML? and what (in your opinion) is the best Server Side release of it (i heard someone mention 'cocanut' or something - it was late)? Thanks so much, Reuben Bell, Web Developer Rufus Leonard 57a Farringdon RD London WC12 1ED -----Original Message----- From: David Carlisle [mailto:davidc@xxxxxxxxx] Sent: Wednesday, July 04, 2001 11:56 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] RE: A simple solution (Was: Re: One for tomorrow :-) ) I'm using <xsl:value-of select="following-sibling::*[not(substring(.,string-length(.))=',')][positio n()=4]" /> To hopefully retrieve 12 POINT STREET, [position()=4] (or equivalently [4]) would select the 4th node that was in the list generated by following-sibling::*[not(substring(.,string-length(.))=',')] ie the 4th sibling (just counting those not ending with a comma) (by the way are you sure you really want to polute your generated HTML with all those <font> elements, they are deprecated in HTML4 and XHTML) David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list **************************************************************************** This email transmission is confidential and intended for the addressee only. If you are not the intended recipient, please notify Rufus Leonard IT Support by telephoning +44 (0)20 7404 4490 before deleting this message from your computer. The views and opinions expressed in this email message are the author's own and may not reflect the views and opinions of Rufus Leonard. **************************************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] converting old <a> .css p, David Carlisle | Thread | RE: [xsl] New to XML - probably not, Daniel Newman |
Re: [xsl] converting old <a> .css p, David Carlisle | Date | [xsl] XSL-FO, roger . day |
Month |