cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Didier VILLEVALOIS <dvilleval...@techmetrix.net>
Subject RE: Xsl to Java
Date Mon, 22 May 2000 15:12:09 GMT
Hi Matthew,
Thanks in deed for your answer!!

I mean by "to Java" that i want to generate Java code. The fact is I want
mix Java code and xsl processing code, in the spirit of XSP.

At the end, i'd like to have a Java class with my own logic interleaved with
the XSL processing logic. This is a key point in a workflow
component-oriented framework.

Here is an example of what i'd like to do: (namespaces decl omited)

<?xml version="1.0"?>
<xsl:stylesheet>
	...

	<xsl:template match="newOrder">
		OrderLines lines = new OrderLines();
		<xsl:for-each match="orderLine">
			lines.add(
				<xsl:value-of select="@productID"/>,
				<xsl:value-of select="@quantity"/>);
		</xsl:for-each>
		Order order = OrderManager.getOrderManager().createOrder(
			<xsl:value-of select="@customerID"/>,
			lines);
		if (order != null)
		{
			<newOrder>
				<xsl:attribute
name="orderID">order.getOrderID()</xsl:attribute>
			</newOrder>
		}
	</xsl:template>

	...
</xsl:stylesheet>

As I looked to it, I'm not sure the class you showed me may help. Am I wrong
?

Thanks for your help!! Didier.

-----Message d'origine-----
De: Matthew Cordes [mailto:mcorde61@maine.edu]
Date: lundi 22 mai 2000 15:53
À: cocoon-users@XML.APACHE.ORG
Objet: Re: Xsl to Java


Hey Dider, 

What do you mean to java?


Xalan's StylesheetRoot (
http://xml.apache.org/xalan/apidocs/org/apache/xalan/xslt/StylesheetRoot.htm
l
) is a binary representation of a stylesheet that can be reused without
needing to be reparsed.  I use them in a servlet I have which caches 
stylesheets for other servlets to reduce reads from disk.

-matt


On Mon, May 22, 2000 at 11:52:26AM +0200, Didier VILLEVALOIS wrote:
> It don't looks like because there is a complex interpretation algebra in
the
> sources of Xalan. Furthermore i can't find any xsl stylesheets in the
> sources.
> 
> Thought I'll ask to the xalan-dev mailing list!!
> 
> Other ideas ?
> 
> -----Message d'origine-----
> De: Robin Green [mailto:greenrd@hotmail.com]
> Date: lundi 22 mai 2000 12:47
> À: cocoon-users@xml.apache.org
> Objet: Re: Xsl to Java
> 
> Didier VILLEVALOIS <dvillevalois@techmetrix.net> wrote:
> >Will next versions of Xalan compile stylesheets to Java?
> 
> I think Xalan already does, internally. Try asking
xalan-dev@xml.apache.org
> 
> 
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org

Mime
View raw message