You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carl Otto Kjellkvist <ck...@student.vxu.se> on 2004/05/29 21:22:59 UTC

problem with wmls in Cocoon

Im trying to do a wml site in Cocoon, everything works fine. but when I have som input's and whant to set them in my URL, e.g xyz.wml?link=foo, then I have to use a wmls-script...
The problem is that the pipeline have to know this file and if I do so, the script file is shown in the browser :(

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<wml>
			<card id="index">
				<b>
				<p align="center">WSCC Publisher</p>
				</b>
				<p> 
				Title<INPUT  NAME="Title"  size="15"></INPUT><br/>				
				Intro:<input name="Intro" size="15"/><br/>
				Key:  <input name="Key" size="15"/><br/>
				</p>
				
				
				
<do type="accept" label="Calculate">
  <go href="check.wmls#go_url($(Title), $(Intro), $(Key))"/>
</do>
				
				

			</card>
		</wml>
	</xsl:template>
</xsl:stylesheet>

scriptfile..

extern function go_url(title, intro, key)
{

var the_url="pub.wml?Title=" + title + "&Intro=" + intro + "&Key=" + key;

WMLBrowser.go(the_url);
}
[/code]
sitemap...
[code]
			<map:match pattern="**.wmls">
				<map:read src="style/check.wmls" mime-type="wmls" />
			</map:match>

What am I doing wrong??


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


Re: problem with wmls in Cocoon

Posted by Joerg Heinicke <jo...@gmx.de>.
On 29.05.2004 21:22, Carl Otto Kjellkvist wrote:

> Im trying to do a wml site in Cocoon, everything works fine. but when I have som input's and whant to set them in my URL, e.g xyz.wml?link=foo, then I have to use a wmls-script...
> The problem is that the pipeline have to know this file and if I do so, the script file is shown in the browser :(

What you are doing is sending the request to check.wmls what obviously 
can not work. What you need to do is just building the correct URL, 
because of the inputs on client's side. I don't know how you can include 
scripts in WML, that's your part.

Joerg

> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> 	<xsl:template match="/">
> 		<wml>
> 			<card id="index">
> 				<b>
> 				<p align="center">WSCC Publisher</p>
> 				</b>
> 				<p> 
> 				Title<INPUT  NAME="Title"  size="15"></INPUT><br/>				
> 				Intro:<input name="Intro" size="15"/><br/>
> 				Key:  <input name="Key" size="15"/><br/>
> 				</p>
> 				
> 				
> 				
> <do type="accept" label="Calculate">
>   <go href="check.wmls#go_url($(Title), $(Intro), $(Key))"/>
> </do>
> 				
> 				
> 
> 			</card>
> 		</wml>
> 	</xsl:template>
> </xsl:stylesheet>
> 
> scriptfile..
> 
> extern function go_url(title, intro, key)
> {
> 
> var the_url="pub.wml?Title=" + title + "&Intro=" + intro + "&Key=" + key;
> 
> WMLBrowser.go(the_url);
> }
> [/code]
> sitemap...
> [code]
> 			<map:match pattern="**.wmls">
> 				<map:read src="style/check.wmls" mime-type="wmls" />
> 			</map:match>
> 
> What am I doing wrong??

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