You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Rajkumar, Joseph" <ra...@orionsci.com> on 2000/04/11 19:11:06 UTC

How to do this in xsl

Hi Folks

     I would appreciate if someone could point me as to how to do this:
data.xml

<node>
   <data>name</data>
   <link>name.xml</link>
</node>

    I have lots of these nodes in the data.xml file, and I want to
create
the html file like this:
<A HREF="http://www.myhost.com/cgi-bin?file=name.xml">name</A>

Thanks
Joseph Rajkumar

PS: If this is not the mailing list for such questions, please let me
know
which is the appropriate mailing list for asking these kinds of "how to
in xsl"
questions. Regards


Re: How to do this in xsl

Posted by Matthew Cordes <mc...@maine.edu>.
I don't think you need the ./ 's, thus it could be 

	<xsl:template name="node">
		<a href="http://www.myhost.com/cgi-bin?file={link}"><xsl:value-of
		select="name"/></a>
	</xsl:template>

-matt

On Tue, Apr 11, 2000 at 08:30:56PM +0300, Taras Shumeyko wrote:
> >      I would appreciate if someone could point me as to how to do this:
> > data.xml
> >
> > <node>
> >    <data>name</data>
> >    <link>name.xml</link>
> > </node>
> >
> >     I have lots of these nodes in the data.xml file, and I want to
> > create
> > the html file like this:
> > <A HREF="http://www.myhost.com/cgi-bin?file=name.xml">name</A>
> 
>   <xsl:template name="node">
>     <a href="http://www.myhost.com/cgi-bin?file={./link}"><xsl:value-of
> select="./name"/></a>
>   </xsl:template>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Re: How to do this in xsl

Posted by Taras Shumeyko <no...@humgat.kiev.ua>.
>      I would appreciate if someone could point me as to how to do this:
> data.xml
>
> <node>
>    <data>name</data>
>    <link>name.xml</link>
> </node>
>
>     I have lots of these nodes in the data.xml file, and I want to
> create
> the html file like this:
> <A HREF="http://www.myhost.com/cgi-bin?file=name.xml">name</A>

  <xsl:template name="node">
    <a href="http://www.myhost.com/cgi-bin?file={./link}"><xsl:value-of
select="./name"/></a>
  </xsl:template>