RE: [xsl] newbie question on formatting

Subject: RE: [xsl] newbie question on formatting
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Wed, 31 Dec 2003 08:39:04 +0000
Hello Renzo,

I think the easiest way would be something like the solution that you yourself have provided, even if you think that it does not feel right. There is nothing to say, though, that it needs to be an element named "link", you could have an element named "mail" instead.

If you want to use
<element>my name is foobar</element>
and turn it into
<p>my name is <a href="mailto:foobar@xxxxxxxxxx";>foobar</a></p>
then you have to tokenize the string value of the element, and you have to be sure that the name will always be that last in the string or have some other means of finding out which token will be the name.

Also, in this example, the name of the recipient and the mail adress is the same (foobar), but I would expect that they can differ:
<a href="mailto:foobar@xxxxxxxxxxxxxx";>foobar</a>

Then the solution below, which is close to your example, is much better:


The xsl could then write the "mailto:"; if that is required, depending on the output (html, pdf, etc.).

If you still want the tokenization solution, you have to look this up - there are some solutions that provide easier ways to make tokenization than from scratch - for example fsxl

Hope this is some help
Regards and happy new year,
Ragulf Pickaxe :)

MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.

XSL-List info and archive:

Current Thread