Re: [xsl] xml and xslt to html attribute problems

Subject: Re: [xsl] xml and xslt to html attribute problems
From: Richard Lewis <richard.lewis@xxxxxxxxx>
Date: Wed, 29 Oct 2003 09:30:08 +0000

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

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

	<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"/>
> </td>
> to get this html code
> <td>
>     Mygreatlongword
>     <br>
>     onabeautifulmorning
> </td>
> But I can´t use a <br> in the quotes in my xml file. Is there any other
> solution?
> Thanks Take care Michael

 XSL-List info and archive:

Current Thread