cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dr. Hans M. Rupp" <>
Subject Re: Manipulating the request headers in Cocoon?
Date Fri, 02 May 2003 13:50:16 GMT

>From an earlier post:

I have a curious problem with the i18n:date and i18n:date-time tag. When
I use one of these tags and access the page with a specific wap-Browser,
which I must support, the output terminates at the first occurence of
one of these tags.

>>From the xsl source:

<b><xsl:value-of select="$name" /></b><br />
    <i18n:date-time src-pattern="EEEE, MMMM d, yyyy hh:mm:ss a z"
locale="{Weather/UserLocale}" pattern="E, dd.MM.;"><xsl:value-of
/></i18n:date-time><xsl:text> </xsl:text><i18n:text>Uhr</i18n:text><br

Everything after the <br /> is missing in the output

I first thought that it is a problem of the i18n transformer so I
checked the SAX-Events from the Trax-Transformer and the
i18n-Transformer and it seems that already the Trax-Transformer
terminates the output after the i18n date tag.

>>From the sitemap:

<map:resource name="viewpage">
   <map:generate type="serverpages"

   <map:transform src="xsl/{nextxsl}.xsl"/>
   <!-- for debugging only  remove for production -->
   <map:transform type="log">
        <map:parameter name="logfile" value="afterXSLT.log"/>
        <map:parameter name="append" value="yes"/>
     <!-- end for debugging only -->
   <map:transform type="i18n"/>
   <!-- for debugging only  remove for production -->
   <map:transform type="log">
        <map:parameter name="logfile" value="afterI18n.log"/>
        <map:parameter name="append" value="no"/>
     <!-- end for debugging only -->
   <map:transform type="browserAdapter"/>
   <map:serialize type="wml">

from afterXSLT.log:


[            ] 1. uri=,local=pattern,qname=pattern,type=CDATA,value=E,
[            ] 2. uri=,local=locale,qname=locale,type=CDATA,value=de_DE
[            ] 3.
uri=,local=src-pattern,qname=src-pattern,type=CDATA,value=EEEE, MMMM d,
yyyy hh:mm:ss a z
[characters] Friday, May 2, 2003 10:00:52 AM CEST

[endElement] uri=,local=p,qname=p
[endElement] uri=,local=card,qname=card
[endElement] uri=,local=wml,qname=wml

Since the site works well with all web-browser I have used except for
the one we really do have to support I have checked the differences
between the headers they send.
And it turns out the crucial difference is the Accept-Language:
Accept-Language: en
Accept-Language: de, en
does not work.

If I use the original request from the browser which does not work and
send it with netcat, I will get the abbreviated page, if I use the same
request having only the "de," removed everything works fine.

Now if this had been a problem of the i18n transformer it might at least
make some sense. But as I pointed out already the Trax-Transformer
terminates output at the i18n tag.

(From the sitemap:
<map:transformer label="transformer" logger="sitemap.transformer.xslt"
name="xslt" pool-grow="2" pool-max="32" pool-min="8"

I would be very gratefull for any ideas how to fix this problem.

Many thanks,


Reinhard Pötz wrote:

> Maybe you can give us more details when this error occurs because
> request header information shouldn't have any influences to your
> pipelines *by default*.
> Reinhard
> > From: Dr. Hans M. Rupp []
> >
> > > The request header is set at the client side. You can read
> > the values
> > > and you can do with them whatever you want.
> > >
> >
> > My problem is that a specific Request-Header value coming
> > from the client seems to cause a problem with the
> > transformation (don't ask how a request header can disturb
> > the XSLT transformer, it's above my head, but I have
> > experimentally verified it), so manipulationg the request
> > before it reaches the transformer might be a workaround if
> > feasible. I think there are no methods in the servlet-API to
> > manipulate the request. Sigh ...
> >
> > Greetings,
> >
> > Hans
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Dr. Hans M. Rupp
danet Internet Solutions GmbH
Waldburgstr. 17-19
70563 Stuttgart

Fon +49 711 133 53 50
Fax +49 711 133 53 53


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message