You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2004/04/28 09:43:27 UTC

cvs commit: cocoon-lenya/src/webapp/lenya lenya.xmap resources.xmap

andreas     2004/04/28 00:43:27

  Modified:    src/webapp/lenya lenya.xmap resources.xmap
  Log:
  fixed core resource pipelines and moved them to lenya.xmap
  
  Revision  Changes    Path
  1.13      +49 -13    cocoon-lenya/src/webapp/lenya/lenya.xmap
  
  Index: lenya.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/lenya.xmap,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- lenya.xmap	24 Apr 2004 21:20:50 -0000	1.12
  +++ lenya.xmap	28 Apr 2004 07:43:27 -0000	1.13
  @@ -45,24 +45,60 @@
     </map:resources>
   
     <map:pipelines>
  +
  +
       <map:pipeline>
  -      <map:match pattern="menu/**">
  -        <map:read src="resources/misc/menu/{1}"/>
  +
  +      <!-- lenya/{file} -->
  +      <!--
  +      <map:match pattern="**">
  +        <map:act type="resource-exists">
  +          <map:parameter name="url" value="lenya/resources/{1}"/>
  +          <map:mount uri-prefix="" src="lenya/resources.xmap" check-reload="true" reload-method="synchron"/>
  +        </map:act>
  +      </map:match>
  +      -->
  +
  +      <!-- Lenya Core -->
  +
  +      <!-- matches lenya/**.js -->
  +      <map:match pattern="**.js">
  +        <map:read src="resources/{1}.js" mime-type="application/javascript" />
         </map:match>
   
  -      <map:match pattern="images/**">
  -        <map:read src="resources/images/{1}"/>
  +      <!-- matches lenya/**.jpg -->
  +      <map:match pattern="**.jpg">
  +        <map:read src="resources/{1}.jpg" mime-type="image/jpeg" />
  +      </map:match>
  +
  +      <!-- matches lenya/**.gif -->
  +      <map:match pattern="**.gif">
  +        <map:read src="resources/{1}.gif" mime-type="image/gif" />
  +      </map:match>
  +
  +      <!-- matches lenya/**.png -->
  +      <map:match pattern="**.png">
  +        <map:read src="resources/{1}.png" mime-type="image/png" />
  +      </map:match>
  +
  +      <!-- matches lenya/**.ext -->
  +      <map:match pattern="images/**.*">
  +        <map:read src="resources/images/{1}.{2}" mime-type="image/{4}" />
         </map:match>
   
         <map:match pattern="css/**.css">
  -        <map:act type="resource-exists" src="resources/css/{1}.xml">
  -          <map:generate src="resources/css/{../1}.xml"/>
  -          <map:transform src="resources/css/css.xsl">
  -            <map:parameter name="contextprefix" value="{request:contextPath}"/>
  -          </map:transform>
  -          <map:serialize type="text" mime-type="text/css"/>
  -        </map:act>
  -        <map:read src="resources/css/{1}.css" mime-type="text/css"/> 
  +        <map:select type="resource-exists">
  +          <map:when test="resources/css/{1}.xml">
  +            <map:generate src="resources/css/{1}.xml"/>
  +            <map:transform src="resources/css/css.xsl">
  +              <map:parameter name="contextprefix" value="{request:contextPath}"/>
  +            </map:transform>
  +            <map:serialize type="text" mime-type="text/css"/>
  +          </map:when>
  +          <map:otherwise>
  +            <map:read src="resources/css/{1}.css" mime-type="text/css"/> 
  +          </map:otherwise>
  +        </map:select>
         </map:match>
   
         <map:handle-errors>
  
  
  
  1.12      +1 -23     cocoon-lenya/src/webapp/lenya/resources.xmap
  
  Index: resources.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/resources.xmap,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- resources.xmap	14 Apr 2004 10:50:23 -0000	1.11
  +++ resources.xmap	28 Apr 2004 07:43:27 -0000	1.12
  @@ -23,28 +23,6 @@
     <map:pipelines>
       <map:pipeline>
         
  -      <!-- Lenya Core -->
  -
  -          <!-- matches lenya/css/**.css -->
  -          <map:match pattern="lenya/css/**.css">
  -            <map:read src="lenya/resources/css/{3}.css" mime-type="text/css" />
  -          </map:match>
  -
  -          <!-- matches lenya/javascript/**.js -->
  -          <map:match pattern="lenya/javascript/**.js">
  -            <map:read src="lenya/resources/javascript/{3}.js" mime-type="application/javascript" />
  -          </map:match>
  -
  -          <!-- matches lenya/images/**.jpg -->
  -          <map:match pattern="lenya/images/**.jpg">
  -            <map:read src="lenya/resources/images/{3}.jpg" mime-type="image/jpeg" />
  -          </map:match>
  -
  -          <!-- matches lenya/**.ext -->
  -          <map:match pattern="lenya/images/**.*">
  -            <map:read src="lenya/resources/images/{3}.{4}" mime-type="image/{4}" />
  -          </map:match>
  -
         <!-- Lenya Publications -->      
             <!-- matches pub-id/area/css/*.css -->
             <map:match pattern="*/*/css/*.css">
  
  
  

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


Re: cvs commit: cocoon-lenya/src/webapp/lenya lenya.xmap resources.xmap

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:

> Jean Pierre LeJacq wrote:
> 
>>
>>  application/x-javascript            js
>>  
>>
> 
> this also what Apache httpd is using. So I guess we should switch to that.

Done.

-- Andreas


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


Re: cvs commit: cocoon-lenya/src/webapp/lenya lenya.xmap resources.xmap

Posted by Michael Wechner <mi...@wyona.com>.
Jean Pierre LeJacq wrote:

>
>  application/x-javascript			js
>  
>

this also what Apache httpd is using. So I guess we should switch to that.

Michi

>I found this draft IETF standard:
>
>  http://www.websitedev.de/ietf/draft-hoehrmann-script-types-00.txt
>
>which seems to imply that application/javascript is correct but this
>is an expired draft.
>
>This reference indicates that Microsoft IIS supports
>application/x-javascript:
>
>  http://www.w3schools.com/media/media_mimeref.asp
>
>  
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org


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


Re: cvs commit: cocoon-lenya/src/webapp/lenya lenya.xmap resources.xmap

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Thu, 29 Apr 2004, Michael Wechner wrote:

> I am not sure. I have seen the following three versions:
>
> application/javascript
> text/javascript
> application/x-javascript
>
> and M$ is using another one
>
> text/jscript

The Debian /etc/mime.types specifies:

  application/x-javascript			js

I found this draft IETF standard:

  http://www.websitedev.de/ietf/draft-hoehrmann-script-types-00.txt

which seems to imply that application/javascript is correct but this
is an expired draft.

This reference indicates that Microsoft IIS supports
application/x-javascript:

  http://www.w3schools.com/media/media_mimeref.asp

-- 
JP



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


Re: cvs commit: cocoon-lenya/src/webapp/lenya lenya.xmap resources.xmap

Posted by Michael Wechner <mi...@wyona.com>.
I am not sure. I have seen the following three versions:

application/javascript
text/javascript
application/x-javascript

and M$ is using another one

text/jscript

maybe somebody can give a hint ...

Michi



Peter Shipley wrote:

> andreas@apache.org wrote:
>
>>   1.12      +1 -23     cocoon-lenya/src/webapp/lenya/resources.xmap
>>     Index: resources.xmap
>>   ===================================================================
>>   RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/resources.xmap,v
>
>
> <snip>
>
>>   -          <!-- matches lenya/javascript/**.js -->
>>   -          <map:match pattern="lenya/javascript/**.js">
>>   -            <map:read src="lenya/resources/javascript/{3}.js" 
>> mime-type="application/javascript" />
>>   -          </map:match>
>
>
> javascript should be served with a mime-type of text/javascript 
> shouldn't it ?
>
> regards
>
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-dev-help@cocoon.apache.org
>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org


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


Re: cvs commit: cocoon-lenya/src/webapp/lenya lenya.xmap resources.xmap

Posted by Peter Shipley <ps...@nomensa.com>.
andreas@apache.org wrote:
>   1.12      +1 -23     cocoon-lenya/src/webapp/lenya/resources.xmap
>   
>   Index: resources.xmap
>   ===================================================================
>   RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/resources.xmap,v

<snip>

>   -          <!-- matches lenya/javascript/**.js -->
>   -          <map:match pattern="lenya/javascript/**.js">
>   -            <map:read src="lenya/resources/javascript/{3}.js" mime-type="application/javascript" />
>   -          </map:match>

javascript should be served with a mime-type of text/javascript 
shouldn't it ?

regards

Peter

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