You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by DA...@Nationwide.com on 2004/02/18 15:09:11 UTC

Re: IFRAME behavior

Hi,

What's happening is that your pattern is not doing what it looks like. 
While the src attribute is the same as the pattern ("frame/*.jpg"), it 
won't match because your src attribute actually expands out to 
blah/blah/frame/myname.jpg.  In order to get it to match, you'll need to 
change your pattern to "**frame/*.jpg".  That will match any URL within 
your context that has 'frame' in the path and is asking for a jpg file. 
Your adjusted sitemap should be:

<map:match pattern="**frame/*.jpg">
        <map:generate type="serverpages" src="xsp/svg.xsp">
                <map:parameter name="artistID" value="{2}"/>
        </map:generate>
        <map:serialize type="svg2jpeg"/>  
</map:match>

Note the {1} has also been changed to {2}.

BTW, this really has nothing to do with the IFRAME itself.

HTH!

Thanks!
David Day




beyaNet Consultancy <be...@ntlworld.com>




02/18/2004 04:24 AM
Please respond to users

 
T
To:     users@cocoon.apache.org
cc: 

bcc: 
Subject:        IFRAME behaviour


Hi,
I have a page structure that works on the following principal:

<tr>
                 <!-- Menu Bar -->
                 <td>menu items go here</td>

                 <!-- Iframe - dynamic content -->
                 <td><iframe></td>
</tr>

In the iframe a document is loaded which makes image calls like so:

<image src="frame/myname.jpg" /> which should match a map in my sitemap 
defined as:

                                                 <map:match 
pattern="frame/*.jpg">
                                                  <map:generate 
type="serverpages" src="xsp/svg.xsp">
 <map:parameter name="artistID" value="{1}"/>
                                                  </map:generate>
 <map:serialize type="svg2jpeg"/>  
                                                 </map:match>

For hours I could not get any images to load until I referenced the 
image calls as <image src="../../frame/myname.jpg" />. My question is, 
as every document loaded in a cocoon environment has to pass through 
the sitemap before it does anything, why doesn't <image 
src="frame/myname.jpg" /> work?

many thanks in advance



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


Re: IFRAME behavior

Posted by beyaNet Consultancy <be...@ntlworld.com>.
David,
thanks very much for that advice.


cheers


Andrew
On 18 Feb 2004, at 14:09, DAYD3@Nationwide.com wrote:

> Hi,
>
> What's happening is that your pattern is not doing what it looks like.
> While the src attribute is the same as the pattern ("frame/*.jpg"), it
> won't match because your src attribute actually expands out to
> blah/blah/frame/myname.jpg.  In order to get it to match, you'll need 
> to
> change your pattern to "**frame/*.jpg".  That will match any URL within
> your context that has 'frame' in the path and is asking for a jpg file.
> Your adjusted sitemap should be:
>
> <map:match pattern="**frame/*.jpg">
>         <map:generate type="serverpages" src="xsp/svg.xsp">
>                 <map:parameter name="artistID" value="{2}"/>
>         </map:generate>
>         <map:serialize type="svg2jpeg"/>
> </map:match>
>
> Note the {1} has also been changed to {2}.
>
> BTW, this really has nothing to do with the IFRAME itself.
>
> HTH!
>
> Thanks!
> David Day
>
>
>
>
> beyaNet Consultancy <be...@ntlworld.com>
>
>
>
>
> 02/18/2004 04:24 AM
> Please respond to users
>
>
> T
> To:     users@cocoon.apache.org
> cc:
>
> bcc:
> Subject:        IFRAME behaviour
>
>
> Hi,
> I have a page structure that works on the following principal:
>
> <tr>
>                  <!-- Menu Bar -->
>                  <td>menu items go here</td>
>
>                  <!-- Iframe - dynamic content -->
>                  <td><iframe></td>
> </tr>
>
> In the iframe a document is loaded which makes image calls like so:
>
> <image src="frame/myname.jpg" /> which should match a map in my sitemap
> defined as:
>
>                                                  <map:match
> pattern="frame/*.jpg">
>                                                   <map:generate
> type="serverpages" src="xsp/svg.xsp">
>  <map:parameter name="artistID" value="{1}"/>
>                                                   </map:generate>
>  <map:serialize type="svg2jpeg"/>
>                                                  </map:match>
>
> For hours I could not get any images to load until I referenced the
> image calls as <image src="../../frame/myname.jpg" />. My question is,
> as every document loaded in a cocoon environment has to pass through
> the sitemap before it does anything, why doesn't <image
> src="frame/myname.jpg" /> work?
>
> many thanks in advance
>
>
>
> ---------------------------------------------------------------------
> 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