cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beyaRecords - The home Urban music <...@beya-records.com>
Subject LogicSheet problems
Date Thu, 25 Dec 2003 18:03:22 GMT
Hi,
I have defined a logic sheet parameter which I call in my xsp file, but  
i am getting an error which I do not understand. Can anybody draw some  
light on this problem?

I am using cocoon 2.0.4, and tomcat 4.1.24 on os x 10.3

1. The code for the xsl is:

<?xml version="1.0"?>

<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:beyarecords="http://apache.org/xsp/beyarecords/2.0"
	version="1.0">
	
	<xsl:template match="xsp:page">
		<xsp:page>
			<xsp:apply-templates select="@*"/>
			
				<!-- Include java date class -->
				<xsp:structure>
					<xsp:include>java.util.Date</xsp:include>
				</xsp:structure>
				
				<!-- Instatiate date time -->
				<xsp:logic>
					Date now = new Date();
				</xsp:logic>
				
			<xsp:apply-templates/>
		</xsp:page>		
	</xsl:template>
	
	<!-- Data time function -->
	<xsl:template match="beyarecords:datetime">
		<xsp:expr>now</xsp:expr>	
	</xsl:template>
	
	
	<!-- Ending sequence. Don't know what this does mind! -->
	
	
	<xsl:template match="@*|node()" >
	
		<xsl:copy>	
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	
	</xsl:template>
	
	
	<xsl:template match="text()">
		<xsl:value-of select="."/>
	</xsl:template>
	
</xsl:stylesheet>

2. The xsp code is:

<?xml version="1.0"?>

<xsp:page language="java"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:beyarecords="http://apache.org/xsp/beyarecords/2.0"
 >

	<page>	
		<title>beyaRecords - the home of Urban music </title>		
	
		<content>
	
			<paragraph>
				Welcome to beyaRecords, the home of all that is Urban.
			</paragraph>
	
			 <paragraph>
				<beyarecords:datetime/>
			 </paragraph>
		 </content>
	
		
	</page>

</xsp:page>

3. built in logicsheet code is:

          <builtin-logicsheet>
           <parameter name="prefix" value="beyarecords"/>
           <parameter name="uri"  
value="http://apache.org/xsp/beyarecords/2.0"/>
           <parameter name="href"  
value="file:///library/tomcat/webapps/cocoon/beyarecords/style/ 
beyarecords.xsl"/>
         </builtin-logicsheet>

regards


Uzo
On 25 Dec 2003, at 14:08, H.vanderLinden@MI.unimaas.nl wrote:

> Hi,
>
> I'm trying to implement a form with woody widgets and either flow or  
> action
> handling. I got as far as properly displaying my form, but nothing  
> happens
> on clicking the submit button. I can't get enough information out of  
> the
> documentation or the examples to modify the register sample to  
> something
> like this:
>
> On submit:
>
> If (username.equals("test") && !password.equals(username)) {
> 	// do some success action and/or
> 	// go to some success form/pipeline
> }
> else {
> 	// display error message on the form itself and/or
> 	// go to some failure form/pipeline
> }
>
> Can someone post some snippets that makes the register sample do this?  
> And
> _PLEASE_ change the name of the various forms, functions, actions,  
> pipelines
> so they don't all have the same name.
> In the form1 example it's very confusing to try and figure out which  
> "form1"
> is called.
>
> Thanks.
>
> Bye, Helma
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


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


Mime
View raw message