You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ling Kok Choon <ko...@brel.com> on 2001/06/28 08:26:11 UTC

[C2]problems with Javascript & Flash5

Hi,

------------------------------------------------------
First Problem : Javascript, CSS and Flash
------------------------------------------------------

  I have built a web application with Cocoon2, which include Javascript, CSS and Flash. But the 
Javascript, CSS and flash do not run well. I am not sure where is the problem, so i have 
included some of the code here, and please me to point out my mistakes.

the sitemap.xmap
----------------
.....
.....

<map:match pattern="pic/**.swf">
   <map:read src="pic/{1}.swf" mime-type="application/futuresplash"/>
</map:match>
  
<map:match pattern="style/**.css">
   <map:read src="courses/full_time/diploma_bioie/style/{1}.css" mime-type="text/css"/>
</map:match>
   
<map:match pattern="style/**.js">
   <map:read src="style/{1}.js" mime-type="text/js"/>
</map:match>  

.......
.......

Q1 : Is it the right way to match the Flash, CSS and Javascript file ?
Q2 : What is the different between  match pattern "pic/**.jpg" and "pic/*.jpg" and "pic/*.jpg*"?



XSL file
--------

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>

....
....

<xsl:template match="/">

<xsl:processing-instruction name="cocoon-format">type="text/html"</xsl:processing-instruction>
....
....
	<HTML>
	<HEAD><TITLE>Home of the Engineer</TITLE>

<!-- Here is how i call the CSS file -->
        
	<Link href="style/thefont.css" rel="stylesheet" type="text/css"/>


<!-- Here is how i call the Javascript file -->		
	<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" src="../style/menuStyle.js">
	&nbsp;
	</SCRIPT>

        <SCRIPT language="JavaScript1.2" src="../style/HM_Loader.js">
        &nbsp;
        </SCRIPT>
        </HEAD> 
	
        ......
        ......

<!-- Here is how i call the Flash file -->		 

        <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"        		   
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=2,0,0,0"
        		ID="biomedical" WIDTH="780" HEIGHT="69">
        		<PARAM NAME="movie" VALUE="../pic/biomedical(flash).swf"/>
        		<PARAM NAME="loop" VALUE="false"/>
        		<PARAM NAME="quality" VALUE="autohigh"/>
        		<PARAM NAME="bgcolor" VALUE="#FFFFFF"/>

Q3 : Is it the right way to call the Flash, CSS and Javascript file in a xsl file?



------------------------------------------------------
Second Problem : Batch Processing with Cocoon2
------------------------------------------------------

The objective is to pre-compile / pre-generate the html file and save it to the web server, the 
purpose is to reduce the responce time.

Q4: How to capture and store the generated html file ?




Thank you.


From, Kok Choon.
--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 06/28/01
Time: 14:26:11

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>