RE: [xsl] New to XML - probably not yet worthy of your time.

Subject: RE: [xsl] New to XML - probably not yet worthy of your time.
From: "Piers Haken" <piersh@xxxxxxxxxxx>
Date: Fri, 6 Jul 2001 05:00:20 -0700
This is definitely a FAQ, but anyway...

You don't need the script to write the attributes there's two ways of
doing it:

Here's what you did:
		cursrc = '<xsl:value-of select="info/link"/>'
		document.write ('<a href="'+cursrc+'">Relevant

Here's one way, using <xsl:attribute/> :

	<a>Relevant Site<xsl:attribute name="href">
			<xsl:value-of select="info/link"/>

Here's another, using attribte templates (it's the same thing really,
just a shortcut):

	<a href="{info/link}">Relevant Site</a>

Also, I'd recommend using a template instead of xsl:for-each.

Hope that helps.

Piers Haken
Chief Software Engineer, Friskit Inc.

-----Original Message-----
From: Reuben Bell [mailto:Reuben.Bell@xxxxxxxxxxxxxxxx] 
Sent: Wednesday, July 04, 2001 4:08 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] New to XML - probably not yet worthy of your time.

as a web developer, who is begining to learn xml,

I was wondering it anyone could help me with the following little

My code ->
	<xsl:for-each select="gallery/pic">
		<td colspan="2"><b><xsl:value-of
		<td colspan="2">
		cursrc = '<xsl:value-of select="info/link"/>'
		document.write ('<a href="'+cursrc+'">Relevant
		cursrc = '<xsl:value-of select="image/src"/>'
		//alert (cursrc)
		truecursrc = "gfx/" + cursrc
		document.write ('<IMG width="386"
		<td valign="top" class="blacknormtext"><xsl:value-of

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
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
  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 
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)


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:

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:

 XSL-List info and archive:

Current Thread