Re: Formatting output as Java source

Subject: Re: Formatting output as Java source
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Fri, 08 Sep 2000 11:03:41 +0100
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


Current Thread