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

Re: xml and xslt to html attribute problems

Subject: Re: xml and xslt to html attribute problems
From: Michael Olszynski <m.olszynski@xxxxxxxxxxxxx>
Date: Wed, 29 Oct 2003 10:58:05 +0100
xsl html attributes
@ Richard: Yes I´ll have multiple <br> in on line, but I guess I can´t use your code. Or can I? I don´t know how powerful substring can be with a loop around the @name. Eitherway it´s a very good idea!

@Emannuil: <topic name="Mygreatlongword&lt;br&gt;onabeautifulmorning"> won´t work, because my html output will be <td>Mygreatlongword&lt;br&gr;onabeautifulmorning </td>

@Jarno: Thanks for your hint. The &#xA; is working fine. You recommended me to read the FAQ how to replace the linefeed. Which FAQ? Do you have a hyperlink on that?

Thanks in advance,

Take care Michael

Richard Lewis wrote:


Will there always be exactly one <br> in the topic/@name attribute?

If so, you could use the XPath substring-before() and substring-after() functions:

	<xsl:value-of select="substring-before(@name, '<br>')" />
	<br />
	<xsl:value-of select="substring-after(@name, '<br>')" />

Don't forget also that <br /> is an empty element and, according to XHTML specs it must have a closing slash ;-)

Another thing would be to have multiple attributes in the <topic> element...


Hello, I want to use sth. like

<topic name="Mygreatlongword<br>onabeautifulmorning">

with following xslt code

<td>    <xsl:value-of select="@name"/>

to get this html code


But I can´t use a <br> in the quotes in my xml file. Is there any other

Thanks Take care Michael

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

-- Michael Olszynski Dipl.-Ing.(FH) Software Engineer

___ |X__________________________________________________________

eXXcellent solutions gmbh
In der Wanne 55

D-89075 ulm

e | m.olszynski@xxxxxxxxxxxxx
t | +49 [0]731-55026-39
f | +49 [0]731-55026-99
i | www.exxcellent.de

Geschäftsführer: Dr. Martina Maier, Wilhelm Zorn, Gerhard Gruber
Sitz der Gesellschaft: Ulm, Registergericht: Ulm HRB 4309

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

Current Thread


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.
First Name
Last Name
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.