[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: newbie question on formatting

Subject: RE: newbie question on formatting
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Wed, 31 Dec 2003 08:39:04 +0000
foobar string formatting
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:

<item>
<name>foobar</name>
<mail>foobar@xxxxxxxxxxxxxx</mail>
<style>bold</style>
</item>

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 http://sourceforge.net/projects/fxsl

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

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.