You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by beyaNet Consultancy <be...@ntlworld.com> on 2004/02/21 19:36:31 UTC
Incomplete image requests
Hi,
I have constructed a pipe which handles image requests and spits out an
svg. On the page in question there are 3 images. The pipe is:
<map:match pattern="unframe/*/*.jpg">
<map:generate type="serverpages" src="xsp/svg.xsp">
<map:parameter name="imageNum" value="{2}"/>
<map:parameter name="artistID" value="{3}"/>
</map:generate>
<map:serialize type="svg2jpeg"/>
</map:match>
The image link is built up in my xsp page as:
<artists-photo1>
<xsp:element name="img">
<xsp:attribute
name="src">artistImage/1/<xsp:expr>artistID</xsp:expr>.jpg</xsp:
attribute>
</xsp:element>
</artists-photo1>
So I have 3 images on one page which are built up in that format. What
is happening is that the first image call is made no problem, and the
image is displayed on the page. The second image is now requested but
the image is never loaded and the browser just sits there waiting for
an image to load. What is causing this, and what can I do to resolve
it? My svg page is attached. The html format of the calling xsl page
is:
............. snippet .............
<tr>
<td valign="top" align="center"><xsl:apply-templates
select="//artists-photo1"/></td>
</tr>
<tr>
<td valign="top"><xsl:apply-templates
select="//artists-photo2"/></td>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="artists-photo1">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="artists-photo2">
<xsl:apply-templates/>
</xsl:template>
many thanks in advance
On 19 Feb 2004, at 12:31, Simon Mieth wrote:
> On Thu, 19 Feb 2004 12:19:13 +0000
> beyaNet Consultancy <be...@ntlworld.com> wrote:
>
>> Hi Simon,
>> I think I am coming closer to the answer I have been
>> having with the svg canvas size not changing. If I make a
>> request for the image outside of the iframe it is loaded
>> into,
>> (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4
>> 6.jpg), then the image changes according to the sizes I
>> give it. If i try and call the image so that it loads
>> within the iframe, then no matter what values you give the
>> height and width of the svg tag no change to the canvas
>> size takes place. Any ideas?
>>
>
>
> Hi Andrew,
>
> maybe you have inside your html-source <image width=""
> height="" >-statements, then the browser scale the image
> allways to this size. If the image is larger or smaller, the
> browser scale ever to this size. If so, remove the width=""
> and height="" and have allready <img src="" /> and the
> browser will diplay the size from your image.
>
>
> Best Regards,
>
> Simon
>
Re: Incomplete image requests
Posted by beyaNet Consultancy <be...@ntlworld.com>.
geoff,
my fault, sorry. Copied the wrong pipe. The correct pipe is:
<map:match pattern="**artistImage/*/*.jpg">
<map:generate type="serverpages" src="xsp/svg.xsp">
<map:parameter name="imageNum" value="{2}"/>
<map:parameter name="artistID" value="{3}"/>
</map:generate>
<map:serialize type="svg2jpeg"/>
</map:match>
many thanks in advance
On 21 Feb 2004, at 18:56, Geoff Howard wrote:
> beyaNet Consultancy wrote:
>
>> Hi,
>> I have constructed a pipe which handles image requests and spits out
>> an svg. On the page in question there are 3 images. The pipe is:
>>
>> <map:match pattern="unframe/*/*.jpg">
>> <map:generate type="serverpages" src="xsp/svg.xsp">
>> <map:parameter name="imageNum" value="{2}"/>
>> <map:parameter name="artistID" value="{3}"/>
>> </map:generate>
>> <map:serialize type="svg2jpeg"/>
>> </map:match>
>
>
> Huh? You have two wildcard tokens in your pattern and reference only
> the second and the non-existant third. Did you type wrong?
>
>> The image link is built up in my xsp page as:
>>
>> <artists-photo1>
>> <xsp:element name="img">
>> <xsp:attribute
>> name="src">artistImage/1/<xsp:expr>artistID</xsp:expr>.jpg</xsp:
>> attribute>
>> </xsp:element>
>> </artists-photo1>
>
>
> And here you are referring to an image source which looks like it
> would be matched by a pattern like artistImage/*/*.jpg in your
> sitemap, but you don't appear to have such a pattern matcher set up.
> Is this really what you're using??
>
>> So I have 3 images on one page which are built up in that format.
>> What is happening is that the first image call is made no problem,
>> and the image is displayed on the page. The second image is now
>> requested but the image is never loaded and the browser just sits
>> there waiting for an image to load. What is causing this, and what
>> can I do to resolve it? My svg page is attached. The html format of
>> the calling xsl page is:
>
>
> The only mysterious thing here is why the first image works at all
> given the above data.
> Geoff
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
Re: Incomplete image requests
Posted by Geoff Howard <co...@leverageweb.com>.
beyaNet Consultancy wrote:
> Hi,
> I have constructed a pipe which handles image requests and spits out
> an svg. On the page in question there are 3 images. The pipe is:
>
> <map:match pattern="unframe/*/*.jpg">
> <map:generate type="serverpages" src="xsp/svg.xsp">
> <map:parameter name="imageNum" value="{2}"/>
> <map:parameter name="artistID" value="{3}"/>
> </map:generate>
> <map:serialize type="svg2jpeg"/>
> </map:match>
Huh? You have two wildcard tokens in your pattern and reference only
the second and the non-existant third. Did you type wrong?
> The image link is built up in my xsp page as:
>
> <artists-photo1>
> <xsp:element name="img">
> <xsp:attribute
> name="src">artistImage/1/<xsp:expr>artistID</xsp:expr>.jpg</xsp:attribute>
>
> </xsp:element>
> </artists-photo1>
And here you are referring to an image source which looks like it would
be matched by a pattern like artistImage/*/*.jpg in your sitemap, but
you don't appear to have such a pattern matcher set up. Is this really
what you're using??
> So I have 3 images on one page which are built up in that format. What
> is happening is that the first image call is made no problem, and the
> image is displayed on the page. The second image is now requested but
> the image is never loaded and the browser just sits there waiting for
> an image to load. What is causing this, and what can I do to resolve
> it? My svg page is attached. The html format of the calling xsl page is:
The only mysterious thing here is why the first image works at all given
the above data.
Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Incomplete image requests
Posted by beyaNet Consultancy <be...@ntlworld.com>.
Geoff,
yes, the reason I am not using an image/database reader is because of
the hibernate middle layer used in the system and wanting to keep the
system consistent. In terms of whether I am getting back information,
yes I am. If i make a single call for either image then the data is
returned to the browser, if I try and make multiple image requests then
only one image is returned successfully and then the browser sits there
waiting for the next one.
many thanks in advance...
On 21 Feb 2004, at 22:32, Geoff Howard wrote:
> beyaNet Consultancy wrote:
>
>> forgot to attach the the svg file, here it is
>
>
> I just looked quickly at your xsp and before we get any further into
> this, can you explain why you're not using an image/database reader
> for this? Is it because of the hibernate support? I don't see any
> purpose for putting this into svg (as base64 jpeg) just to
> re-serialize as jpg. I've seen about a million messages go by about
> this general topic so you may just need to quickly summarize the
> issue.
>
> Assuming you have some need to do it this way though, I'd recommend
> putting some logging (or just System.out.println which should get spit
> out in your terminal console) to see what is going on internally. Are
> you sure you're getting data back in each case fo example?
>
> Geoff
>
>> many thanks in advance
>>
>> On 21 Feb 2004, at 18:36, beyaNet Consultancy wrote:
>>
>> Hi,
>> I have constructed a pipe which handles image requests and spits
>> out an svg. On the page in question there are 3 images. The pipe
>> is:
>>
>> <map:match pattern="unframe/*/*.jpg">
>> <map:generate type="serverpages" src="xsp/svg.xsp">
>> <map:parameter name="imageNum" value="{2}"/>
>> <map:parameter name="artistID" value="{3}"/>
>> </map:generate>
>> <map:serialize type="svg2jpeg"/>
>> </map:match>
>>
>> The image link is built up in my xsp page as:
>>
>> <artists-photo1>
>> <xsp:element name="img">
>> <xsp:attribute
>>
>> name="src">artistImage/1/<xsp:expr>artistID</xsp:expr>.jpg</xsp:
>> attribute>
>>
>> </xsp:element>
>> </artists-photo1>
>>
>> So I have 3 images on one page which are built up in that format.
>> What is happening is that the first image call is made no problem,
>> and the image is displayed on the page. The second image is now
>> requested but the image is never loaded and the browser just sits
>> there waiting for an image to load. What is causing this, and what
>> can I do to resolve it? My svg page is attached. The html format
>> of the calling xsl page is:
>>
>> ............. snippet .............
>> <tr>
>> <td valign="top" align="center"><xsl:apply-templates
>> select="//artists-photo1"/></td>
>> </tr>
>> <tr>
>> <td valign="top"><xsl:apply-templates
>> select="//artists-photo2"/></td>
>> </tr>
>> </table>
>> </body>
>> </html>
>> </xsl:template>
>>
>>
>> <xsl:template match="artists-photo1">
>> <xsl:apply-templates/>
>> </xsl:template>
>>
>>
>> <xsl:template match="artists-photo2">
>> <xsl:apply-templates/>
>> </xsl:template>
>>
>>
>> many thanks in advance
>>
>> On 19 Feb 2004, at 12:31, Simon Mieth wrote:
>>
>> On Thu, 19 Feb 2004 12:19:13 +0000
>> beyaNet Consultancy <be...@ntlworld.com> wrote:
>>
>> Hi Simon,
>> I think I am coming closer to the answer I have been
>> having with the svg canvas size not changing. If I make a
>> request for the image outside of the iframe it is loaded
>> into,
>> (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4
>> 6.jpg), then the image changes according to the sizes I
>> give it. If i try and call the image so that it loads
>> within the iframe, then no matter what values you give the
>> height and width of the svg tag no change to the canvas
>> size takes place. Any ideas?
>>
>>
>>
>> Hi Andrew,
>>
>> maybe you have inside your html-source <image width=""
>> height="" >-statements, then the browser scale the image
>> allways to this size. If the image is larger or smaller, the
>> browser scale ever to this size. If so, remove the width=""
>> and height="" and have allready <img src="" /> and the
>> browser will diplay the size from your image.
>>
>>
>> Best Regards,
>>
>> Simon
>>
>> ----------------------------------------------------------------------
>> --
>>
>> ---------------------------------------------------------------------
>> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Incomplete image requests
Posted by Geoff Howard <co...@leverageweb.com>.
beyaNet Consultancy wrote:
> forgot to attach the the svg file, here it is
I just looked quickly at your xsp and before we get any further into
this, can you explain why you're not using an image/database reader for
this? Is it because of the hibernate support? I don't see any purpose
for putting this into svg (as base64 jpeg) just to re-serialize as jpg.
I've seen about a million messages go by about this general topic so you
may just need to quickly summarize the issue.
Assuming you have some need to do it this way though, I'd recommend
putting some logging (or just System.out.println which should get spit
out in your terminal console) to see what is going on internally. Are
you sure you're getting data back in each case fo example?
Geoff
> many thanks in advance
>
> On 21 Feb 2004, at 18:36, beyaNet Consultancy wrote:
>
> Hi,
> I have constructed a pipe which handles image requests and spits
> out an svg. On the page in question there are 3 images. The pipe is:
>
> <map:match pattern="unframe/*/*.jpg">
> <map:generate type="serverpages" src="xsp/svg.xsp">
> <map:parameter name="imageNum" value="{2}"/>
> <map:parameter name="artistID" value="{3}"/>
> </map:generate>
> <map:serialize type="svg2jpeg"/>
> </map:match>
>
> The image link is built up in my xsp page as:
>
> <artists-photo1>
> <xsp:element name="img">
> <xsp:attribute
> name="src">artistImage/1/<xsp:expr>artistID</xsp:expr>.jpg</xsp:attribute>
>
> </xsp:element>
> </artists-photo1>
>
> So I have 3 images on one page which are built up in that format.
> What is happening is that the first image call is made no problem,
> and the image is displayed on the page. The second image is now
> requested but the image is never loaded and the browser just sits
> there waiting for an image to load. What is causing this, and what
> can I do to resolve it? My svg page is attached. The html format
> of the calling xsl page is:
>
> ............. snippet .............
> <tr>
> <td valign="top" align="center"><xsl:apply-templates
> select="//artists-photo1"/></td>
> </tr>
> <tr>
> <td valign="top"><xsl:apply-templates
> select="//artists-photo2"/></td>
> </tr>
> </table>
> </body>
> </html>
> </xsl:template>
>
>
> <xsl:template match="artists-photo1">
> <xsl:apply-templates/>
> </xsl:template>
>
>
> <xsl:template match="artists-photo2">
> <xsl:apply-templates/>
> </xsl:template>
>
>
> many thanks in advance
>
> On 19 Feb 2004, at 12:31, Simon Mieth wrote:
>
> On Thu, 19 Feb 2004 12:19:13 +0000
> beyaNet Consultancy <be...@ntlworld.com> wrote:
>
> Hi Simon,
> I think I am coming closer to the answer I have been
> having with the svg canvas size not changing. If I make a
> request for the image outside of the iframe it is loaded
> into,
> (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4
> 6.jpg), then the image changes according to the sizes I
> give it. If i try and call the image so that it loads
> within the iframe, then no matter what values you give the
> height and width of the svg tag no change to the canvas
> size takes place. Any ideas?
>
>
>
> Hi Andrew,
>
> maybe you have inside your html-source <image width=""
> height="" >-statements, then the browser scale the image
> allways to this size. If the image is larger or smaller, the
> browser scale ever to this size. If so, remove the width=""
> and height="" and have allready <img src="" /> and the
> browser will diplay the size from your image.
>
>
> Best Regards,
>
> Simon
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>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
Re: Incomplete image requests
Posted by beyaNet Consultancy <be...@ntlworld.com>.
forgot to attach the the svg file, here it is