This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Formatting output as Java source
- To: xsl-list at mulberrytech dot com
- Subject: Re: Formatting output as Java source
- From: Francis Norton <francis at redrice dot com>
- Date: Fri, 08 Sep 2000 11:03:41 +0100
- References: <39B89B85.81FBD656@propack-data.com>
- Reply-To: xsl-list at mulberrytech dot com
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