This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Formatting output as Java source


Try

 <xsl:value-of select="../parent::node()/@name"/>
	<xsl:text>.setBackground(new java.awt.Color</xsl:text>
    	<xsl:text>(<xsl:value-of select="color/@red"/>,</xsl:text>
     	<xsl:text/><xsl:value-of select="color/@green"/>,<xsl:text/>
     	<xsl:text/><xsl:value-of select="color/@blue"/>));<xsl:text/>

(untested)

Francis.

Juergen Baier wrote:
> 
> Hi,
> 
> I have a XML document which is a description of an user interface. I
> want to generate Java source code. The problem is, the XSLT for a single
> Java line goes over many lines:
> 
> <xsl:value-of select="../parent::node()/@name"/>.setBackground(new
> java.awt.Color
>    (<xsl:value-of select="color/@red"/>,
>     <xsl:value-of select="color/@green"/>,
>     <xsl:value-of select="color/@blue"/>));
> 

-- 
Francis Norton.

Defy Convention? Deify Convention!


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]