[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: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 29 Oct 2003 11:00:59 +0200
html attr
Hi,

> Hello, I want to use sth. like

What is "sth"?
 
>     <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?

No. That is malformed XML, you can't have unescaped LESS-THAN SIGN character in attribute value. Change your source document to 

  <topic>
    <name>Mygreatlongword<br>onabeautifulmorning</nam>

or use a LINE FEED in your source

  <topic name="Mygreatlongword&#xA;onabeautifulmorning">

and write or copy/paste a recursive template that replaces the LINE FEED with a br element. See the FAQ on how to do this.

Cheers,

Jarno - Cycloon: Nemesis

 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.