You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Gav...." <br...@brightontown.com.au> on 2006/01/21 15:41:45 UTC

character entities

I wrote earlier :-

| P.S-
|
| Creating an empty hook has the side effect of a self closing div - 
obviously
| inlvalid and messes
| up the rest of the page.
|
| e.g.
|
| <forrest:hook name="headlines"></forrest:hook>
| creates
| <div id="headlines />
| instead of
| <div id="headlines"></div>
|

This made me have a look around, and as a side-effect found an old
thread regarding this back in July 2005, just before my time I think.

The discussion also brought up &#160; and its possible side effects
of creating  .

I am seeing  a lot lately and so think the problem is still not solved.

For instance it is the result of siteinfo-last-published.ft.

Last Published:Â 01/21/2006 17:53:37

This line is created from the contract here :-

<xsl:template name="siteinfo-last-published-body">
        <script type="text/javascript">document.write("<i18n:text >Last 
Published:</i18n:text>&#160;" + document.lastModified);</script>
      </xsl:template>

I have a theory.

in the code the &#160; is right next to a " (quote). The entity number for " 
(quote) is &#34;

I had a crazy thought that maybe they were adding together somehow. 
(160+34=194)

&#160; + &#34; = &#194;

Guess what &#194; is equal to , yup :-

Â

Anyway, in the example contract code above, removing &#160; and putting a 
real space in there cures it and the space
is preserved no problem as it is enclosed between the quotes.

I copied the contract to my /pili/html/ directory and it now renders 
correctly.

Have I missed something here or was it that simple ?

Still looking into the empty <div> problem but again may be &#160; related 
I'm not sure.
There was talk in the archives it was cured, but seems to be back.

HTH

Gav... 



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.21/236 - Release Date: 20/01/2006



Re: [zone] httpd configuration (was character entities)

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> David Crossley escribi??: 
> > Thorsten Scherler wrote:
> > > David Crossley escribi??:
> > > > 
> > > > No need to have them all in SVN, just the one that
> > > > we want to change.
> > > > 
> > > > I see that Cocoon put all their config into the
> > > > pmc/cocoon section of the private committers svn.
> > > 
> > > Hmm, and how are they doing the checkout?
> > 
> > At the moment it is actually the other way around.
> > They maintain the files on the server, and a tar-it-up.sh
> > to gather the important files, then a committer unpacks
> > and adds it to svn. A temporary measure.
> 
> Hmm, yeah a route that we should not go.

However it might make sense for these few
secret files, to get around the problem that
you describe below.

> > > I thought the private stuff is
> > > with password and we cannot checkout stuff with a user on zones.
> > 
> > As long as the user is in the right group
> > it will be fine. And as long as each user sets
> > their umask properly.
> 
> Hmm, you know that svn stores the password in a file? This means at
> least sudo can look up all passwords if she wants.

I see what you mean. However our committers
are trusted and people only get sudo if they
need it. Still you are right.

I wonder how other projects do it.
Perhaps a question for infra@.

Actually all the svn checkouts that i have
done on the zone are anonymous checkouts,
i.e. http and not https, so no password.
However, that will not work for our section
of the committers repository.

> I thought that was
> the reason why we could not set up a forrestbot on zones that is
> actually as well deploying to our website. ???

Not really. The reason is that we cannot
use a role-based account to do svn checkin.
i.e. imagine that we wanted to have a special
user called 'fb' and use that to run forrestbot
and do 'svn ci'. We cannot because 'fb' is not
a committer and so has no credentials.

> > That module is private to "committers" so that
> > should be okay.
> 
> Yeah, still the password is stored on the server.
> 
> > > > We should do the same for sensitive files like httpd.conf
> > > > 
> > > > The main stuff would stay in our forrest/zones svn,
> > > > because that is not sensitive and is of use to
> > > > other people.
> > > 
> > > Agree but I am not sure how you thought about it.
> > 
> > Neither am i.
> 
> ;-)
> 
> > > > > > Either way, we will need a document to remind us of all about
> > > > > > these specific symlinks and 'svn co'. I started something at
> > > > > > f.a.o/zone.html
> > > > > 
> > > > > I have not checked it in yet because we should decide first whether we
> > > > > want to have /etc/apache2/ in our svn or only /etc/apache2/httpd.conf.
> > > > > 
> > > > > I added it for now directly to /etc/apache2/httpd.conf and started the
> > > > > server (which had been down).
> > > > 
> > > > Glad that more people can now start the services.
> > > > We need to listen to infra@ and realise it is down.
> > > 
> > > Actually I submitted a patch to infrastructure to monitor lenya.zones
> > > with http://monitoring.apache.org/status/
> > > 
> > > http://issues.apache.org/jira/browse/INFRA-698
> > > 
> > > If we want, I can do the same for forrest, then we know when it is down
> > > and can react.
> > 
> > Our http server should only be down if the whole
> > zones machine has been rebooted. So IMO no need
> > for monitoring.
> 
> I have set up (again) a lenya instance on
> http://lenya.zones.apache.org/index.html for us a while ago. I have not
> told anyone till now because I hoped that my infra patch will be applied
> and we could monitor the server right away. I did some testing with up
> times and it seems to be fine this time.
> http://lenya.zones.apache.org:9000/
>
> But actually I would like to propose to set up a lenya instance on *our*
> zones server (due to the fact that I am the only one in lenya ATM that
> is looking out for the zone, it does not make any different to me to
> support it directly here). I am keen that we slowly playing around with
> lenya as cms and that we are independent from the lenya zone.

Better propose that in a separate thread.
Sounds like a good idea. That way other Forrest
committers can help.

> Further I would like to see as well a dynamic instance of forrest
> running on zone (I plan to start a web gui for dynamically altering
> structurer files) as show case.

We need to first make sure that forrest is
not a resource hog. This zone machine is shared
with other users, and we don't want to get
a bad name.

> > > > Next step is to automate the startup. See the fixme
> > > > note at http://forrest.apache.org/zone.html#admin
> > > 
> > > Yeah on lenya we seem to have it because you cannot stop the httpd
> > > without another one get up instantly. I will try to find the difference
> > > between both configs.
> > 
> > We don't have any config. As you can see we must start by
> > hand after a reboot.
> 
> I will try to set this up ASAP, since just today the server was down again (I started it again).

Okay, i presume that you mean 'smf'.

-David

Re: [zone] httpd configuration (was character entities)

Posted by Thorsten Scherler <th...@apache.org>.
El sáb, 28-01-2006 a las 22:17 +1100, David Crossley escribió: 
> Thorsten Scherler wrote:
> > David Crossley escribi??:
> > > 
> > > No need to have them all in SVN, just the one that
> > > we want to change.
> > > 
> > > I see that Cocoon put all their config into the
> > > pmc/cocoon section of the private committers svn.
> > 
> > Hmm, and how are they doing the checkout?
> 
> At the moment it is actually the other way around.
> They maintain the files on the server, and a tar-it-up.sh
> to gather the important files, then a committer unpacks
> and adds it to svn. A temporary measure.

Hmm, yeah a route that we should not go.

> 
> > I thought the private stuff is
> > with password and we cannot checkout stuff with a user on zones.
> 
> As long as the user is in the right group
> it will be fine. And as long as each user sets
> their umask properly.

Hmm, you know that svn stores the password in a file? This means at
least sudo can look up all passwords if she wants. I thought that was
the reason why we could not set up a forrestbot on zones that is
actually as well deploying to our website. ¿?

> 
> That module is private to "committers" so that
> should be okay.

Yeah, still the password is stored on the server.

> 
> > > We should do the same for sensitive files like httpd.conf
> > > 
> > > The main stuff would stay in our forrest/zones svn,
> > > because that is not sensitive and is of use to
> > > other people.
> > 
> > Agree but I am not sure how you thought about it.
> 
> Neither am i.

;-)

> 
> > > > > Either way, we will need a document to remind us of all about
> > > > > these specific symlinks and 'svn co'. I started something at
> > > > > f.a.o/zone.html
> > > > 
> > > > I have not checked it in yet because we should decide first whether we
> > > > want to have /etc/apache2/ in our svn or only /etc/apache2/httpd.conf.
> > > > 
> > > > I added it for now directly to /etc/apache2/httpd.conf and started the
> > > > server (which had been down).
> > > 
> > > Glad that more people can now start the services.
> > > We need to listen to infra@ and realise it is down.
> > 
> > Actually I submitted a patch to infrastructure to monitor lenya.zones
> > with http://monitoring.apache.org/status/
> > 
> > http://issues.apache.org/jira/browse/INFRA-698
> > 
> > If we want, I can do the same for forrest, then we know when it is down
> > and can react.
> 
> Our http server should only be down if the whole
> zones machine has been rebooted. So IMO no need
> for monitoring.

I have set up (again) a lenya instance on
http://lenya.zones.apache.org/index.html for us a while ago. I have not
told anyone till now because I hoped that my infra patch will be applied
and we could monitor the server right away. I did some testing with up
times and it seems to be fine this time.
http://lenya.zones.apache.org:9000/

But actually I would like to propose to set up a lenya instance on *our*
zones server (due to the fact that I am the only one in lenya ATM that
is looking out for the zone, it does not make any different to me to
support it directly here). I am keen that we slowly playing around with
lenya as cms and that we are independent from the lenya zone.

Further I would like to see as well a dynamic instance of forrest
running on zone (I plan to start a web gui for dynamically altering
structurer files) as show case.

> 
> > > Next step is to automate the startup. See the fixme
> > > note at http://forrest.apache.org/zone.html#admin
> > 
> > Yeah on lenya we seem to have it because you cannot stop the httpd
> > without another one get up instantly. I will try to find the difference
> > between both configs.
> 
> We don't have any config. As you can see we must start by
> hand after a reboot.
> 

I will try to set this up ASAP, since just today the server was down again (I started it again).

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [zone] httpd configuration (was character entities)

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> David Crossley escribi??:
> > 
> > No need to have them all in SVN, just the one that
> > we want to change.
> > 
> > I see that Cocoon put all their config into the
> > pmc/cocoon section of the private committers svn.
> 
> Hmm, and how are they doing the checkout?

At the moment it is actually the other way around.
They maintain the files on the server, and a tar-it-up.sh
to gather the important files, then a committer unpacks
and adds it to svn. A temporary measure.

> I thought the private stuff is
> with password and we cannot checkout stuff with a user on zones.

As long as the user is in the right group
it will be fine. And as long as each user sets
their umask properly.

That module is private to "committers" so that
should be okay.

> > We should do the same for sensitive files like httpd.conf
> > 
> > The main stuff would stay in our forrest/zones svn,
> > because that is not sensitive and is of use to
> > other people.
> 
> Agree but I am not sure how you thought about it.

Neither am i.

> > > > Either way, we will need a document to remind us of all about
> > > > these specific symlinks and 'svn co'. I started something at
> > > > f.a.o/zone.html
> > > 
> > > I have not checked it in yet because we should decide first whether we
> > > want to have /etc/apache2/ in our svn or only /etc/apache2/httpd.conf.
> > > 
> > > I added it for now directly to /etc/apache2/httpd.conf and started the
> > > server (which had been down).
> > 
> > Glad that more people can now start the services.
> > We need to listen to infra@ and realise it is down.
> 
> Actually I submitted a patch to infrastructure to monitor lenya.zones
> with http://monitoring.apache.org/status/
> 
> http://issues.apache.org/jira/browse/INFRA-698
> 
> If we want, I can do the same for forrest, then we know when it is down
> and can react.

Our http server should only be down if the whole
zones machine has been rebooted. So IMO no need
for monitoring.

> > Next step is to automate the startup. See the fixme
> > note at http://forrest.apache.org/zone.html#admin
> 
> Yeah on lenya we seem to have it because you cannot stop the httpd
> without another one get up instantly. I will try to find the difference
> between both configs.

We don't have any config. As you can see we must start by
hand after a reboot.

-David

Re: [zone] httpd configuration (was character entities)

Posted by Thorsten Scherler <th...@apache.org>.
El sáb, 28-01-2006 a las 17:04 +1100, David Crossley escribió:
> Thorsten Scherler wrote:
> > David Crossley escribi??:
> > > Thorsten Scherler wrote:
> > > > David Crossley escribi??:
> > ...
> > > > > At some stage we also need that httpd.conf to be in
> > > > > our forrest/zones SVN.
> > > > 
> > > > Will add our http.conf into the zone svn and symlink to it.
> > > 
> > > Perhaps better to have direct svn checkout, but not sure if that
> > > is possible for this httpd config.
> > 
> > Hmm, actually it would but only sudos could update then.
> 
> That is how it should be.
> 
> > ...and do we really want all the following files in svn (seeing by the
> > public)?
> > # ls -al /etc/apache2/
> > total 340
> > drwxr-xr-x   2 root     bin          512 Dec 15 01:07 .
> > drwxr-xr-x  65 root     sys         3584 Jan 26 05:26 ..
> > -rw-r--r--   1 root     bin         1987 May 16  2005
> > highperformance-std.conf
> > -rw-r--r--   1 root     bin         1987 May 16  2005
> > highperformance.conf
> > -rw-r--r--   1 root     bin        37519 May 16  2005 httpd-std.conf
> > -rw-r--r--   1 root     root       37689 Jan 26 22:31 httpd.conf
> > -rw-r--r--   1 root     bin        37661 Jul 20  2005 httpd.conf-example
> > -rw-r--r--   1 root     bin        12959 May 16  2005 magic
> > -rw-r--r--   1 root     bin        15020 May 16  2005 mime.types
> > -rw-r--r--   1 root     bin        10759 May 16  2005 ssl-std.conf
> > -rw-r--r--   1 root     bin        10996 May 16  2005 ssl.conf
> 
> No need to have them all in SVN, just the one that
> we want to change.
> 
> I see that Cocoon put all their config into the
> pmc/cocoon section of the private committers svn.
> 

Hmm, and how are they doing the checkout? I thought the private stuff is
with password and we cannot checkout stuff with a user on zones.

> We should do the same for sensitive files like httpd.conf
> 
> The main stuff would stay in our forrest/zones svn,
> because that is not sensitive and is of use to
> other people.

Agree but I am not sure how you thought about it.


> 
> > > Either way, we will need a document to remind us of all about
> > > these specific symlinks and 'svn co'. I started something at
> > > f.a.o/zone.html
> > 
> > I have not checked it in yet because we should decide first whether we
> > want to have /etc/apache2/ in our svn or only /etc/apache2/httpd.conf.
> > 
> > I added it for now directly to /etc/apache2/httpd.conf and started the
> > server (which had been down).
> 
> Glad that more people can now start the services.
> We need to listen to infra@ and realise it is down.
> 

Actually I submitted a patch to infrastructure to monitor lenya.zones
with http://monitoring.apache.org/status/

http://issues.apache.org/jira/browse/INFRA-698

If we want, I can do the same for forrest, then we know when it is down
and can react.

> Next step is to automate the startup. See the fixme
> note at http://forrest.apache.org/zone.html#admin

Yeah on lenya we seem to have it because you cannot stop the httpd
without another one get up instantly. I will try to find the difference
between both configs.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [zone] httpd configuration (was character entities)

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> David Crossley escribi??:
> > Thorsten Scherler wrote:
> > > David Crossley escribi??:
> ...
> > > > At some stage we also need that httpd.conf to be in
> > > > our forrest/zones SVN.
> > > 
> > > Will add our http.conf into the zone svn and symlink to it.
> > 
> > Perhaps better to have direct svn checkout, but not sure if that
> > is possible for this httpd config.
> 
> Hmm, actually it would but only sudos could update then.

That is how it should be.

> ...and do we really want all the following files in svn (seeing by the
> public)?
> # ls -al /etc/apache2/
> total 340
> drwxr-xr-x   2 root     bin          512 Dec 15 01:07 .
> drwxr-xr-x  65 root     sys         3584 Jan 26 05:26 ..
> -rw-r--r--   1 root     bin         1987 May 16  2005
> highperformance-std.conf
> -rw-r--r--   1 root     bin         1987 May 16  2005
> highperformance.conf
> -rw-r--r--   1 root     bin        37519 May 16  2005 httpd-std.conf
> -rw-r--r--   1 root     root       37689 Jan 26 22:31 httpd.conf
> -rw-r--r--   1 root     bin        37661 Jul 20  2005 httpd.conf-example
> -rw-r--r--   1 root     bin        12959 May 16  2005 magic
> -rw-r--r--   1 root     bin        15020 May 16  2005 mime.types
> -rw-r--r--   1 root     bin        10759 May 16  2005 ssl-std.conf
> -rw-r--r--   1 root     bin        10996 May 16  2005 ssl.conf

No need to have them all in SVN, just the one that
we want to change.

I see that Cocoon put all their config into the
pmc/cocoon section of the private committers svn.

We should do the same for sensitive files like httpd.conf

The main stuff would stay in our forrest/zones svn,
because that is not sensitive and is of use to
other people.

> > Either way, we will need a document to remind us of all about
> > these specific symlinks and 'svn co'. I started something at
> > f.a.o/zone.html
> 
> I have not checked it in yet because we should decide first whether we
> want to have /etc/apache2/ in our svn or only /etc/apache2/httpd.conf.
> 
> I added it for now directly to /etc/apache2/httpd.conf and started the
> server (which had been down).

Glad that more people can now start the services.
We need to listen to infra@ and realise it is down.

Next step is to automate the startup. See the fixme
note at http://forrest.apache.org/zone.html#admin

-David

Re: [zone] httpd configuration (was character entities)

Posted by Thorsten Scherler <th...@apache.org>.
El jue, 26-01-2006 a las 12:17 +1100, David Crossley escribió:
> Thorsten Scherler wrote:
> > David Crossley escribi??:
...
> > > At some stage we also need that httpd.conf to be in
> > > our forrest/zones SVN.
> > 
> > Will add our http.conf into the zone svn and symlink to it.
> 
> Perhaps better to have direct svn checkout, but not sure if that
> is possible for this httpd config.

Hmm, actually it would but only sudos could update then.

...and do we really want all the following files in svn (seeing by the
public)?
# ls -al /etc/apache2/
total 340
drwxr-xr-x   2 root     bin          512 Dec 15 01:07 .
drwxr-xr-x  65 root     sys         3584 Jan 26 05:26 ..
-rw-r--r--   1 root     bin         1987 May 16  2005
highperformance-std.conf
-rw-r--r--   1 root     bin         1987 May 16  2005
highperformance.conf
-rw-r--r--   1 root     bin        37519 May 16  2005 httpd-std.conf
-rw-r--r--   1 root     root       37689 Jan 26 22:31 httpd.conf
-rw-r--r--   1 root     bin        37661 Jul 20  2005 httpd.conf-example
-rw-r--r--   1 root     bin        12959 May 16  2005 magic
-rw-r--r--   1 root     bin        15020 May 16  2005 mime.types
-rw-r--r--   1 root     bin        10759 May 16  2005 ssl-std.conf
-rw-r--r--   1 root     bin        10996 May 16  2005 ssl.conf

> 
> Either way, we will need a document to remind us of all about
> these specific symlinks and 'svn co'. I started something at
> f.a.o/zone.html

I have not checked it in yet because we should decide first whether we
want to have /etc/apache2/ in our svn or only /etc/apache2/httpd.conf.

I added it for now directly to /etc/apache2/httpd.conf and started the
server (which had been down).

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [zone] httpd configuration (was character entities)

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> David Crossley escribi??:
> > Thorsten Scherler wrote:
> > > 
> > > Should I apply it as well for our zone? I did it only for Lenya atm and
> > > it works fine. :)
> > 
> > Yes please.
> > 
> > At some stage we also need that httpd.conf to be in
> > our forrest/zones SVN.
> 
> Will add our http.conf into the zone svn and symlink to it.

Perhaps better to have direct svn checkout, but not sure if that
is possible for this httpd config.

Either way, we will need a document to remind us of all about
these specific symlinks and 'svn co'. I started something at
f.a.o/zone.html

> Further I
> will apply above described patch as soon I can login. Right now I get:
> ssh: connect to host forrest.zones.apache.org port 22: Connection timed
> out

Yes, the machine "helios" is down:
http://www.apache.org/dev/#status

-David

Re: [zone] httpd configuration (was character entities)

Posted by Thorsten Scherler <th...@apache.org>.
El jue, 26-01-2006 a las 09:19 +1100, David Crossley escribió:
> Thorsten Scherler wrote:
> > 
> > sudo su
> > vi /etc/apache2/httpd.conf
> > find "Directory" and add the "" the part should look like:
> > 
> > # First, we configure the "default" to be a very restrictive set of
> > # features.
> > #
> > <Directory />
> >     Options FollowSymLinks
> >     AllowOverride None
> >     AddDefaultCharset UTF-8
> > </Directory>
> > 
> > That is better as stated in
> > http://httpd.apache.org/docs/2.2/howto/htaccess.html since 
> > "However, in general, use of .htaccess files should be avoided when
> > possible. Any configuration that you would consider putting in
> > a .htaccess file, can just as effectively be made in a <Directory>
> > section in your main server configuration file."
> > 
> > Should I apply it as well for our zone? I did it only for Lenya atm and
> > it works fine. :)
> 
> Yes please.
> 
> At some stage we also need that httpd.conf to be in
> our forrest/zones SVN.
> 

Will add our http.conf into the zone svn and symlink to it. Further I
will apply above described patch as soon I can login. Right now I get:
ssh: connect to host forrest.zones.apache.org port 22: Connection timed
out

salu2

> -David
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [zone] httpd configuration (was character entities)

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> 
> sudo su
> vi /etc/apache2/httpd.conf
> find "Directory" and add the "" the part should look like:
> 
> # First, we configure the "default" to be a very restrictive set of
> # features.
> #
> <Directory />
>     Options FollowSymLinks
>     AllowOverride None
>     AddDefaultCharset UTF-8
> </Directory>
> 
> That is better as stated in
> http://httpd.apache.org/docs/2.2/howto/htaccess.html since 
> "However, in general, use of .htaccess files should be avoided when
> possible. Any configuration that you would consider putting in
> a .htaccess file, can just as effectively be made in a <Directory>
> section in your main server configuration file."
> 
> Should I apply it as well for our zone? I did it only for Lenya atm and
> it works fine. :)

Yes please.

At some stage we also need that httpd.conf to be in
our forrest/zones SVN.

-David

Re: [zone] httpd configuration (was character entities)

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 24-01-2006 a las 23:43 +0100, Thorsten Scherler escribió:
> El mié, 25-01-2006 a las 09:23 +1100, David Crossley escribió:
> > Thorsten Scherler wrote:
> > > David Crossley escribi??:
> > > > 
> > > > On forrest.apache.org we have this workaround in our .htaccess
> > > > AddDefaultCharset UTF-8
> > > > 
> > > > However we don't yet have that on forrest.zones.apache.org as
> > > > our httpd instance needs other configuration too.
> > > 
> > > Yeah, I tried the .htaccess tip but like you stated there are some other
> > > configurations to do. 
> > > 
> > > Do you know which or maybe can point me to some resources?
> > 
> > http://httpd.apache.org/docs/2.2/
> > 
> > Need to enable the use of .htaccess files.
> > 
> 
> Thx, will have a look.
> 

sudo su
vi /etc/apache2/httpd.conf
find "Directory" and add the "" the part should look like:

# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    AddDefaultCharset UTF-8
</Directory>

That is better as stated in
http://httpd.apache.org/docs/2.2/howto/htaccess.html since 
"However, in general, use of .htaccess files should be avoided when
possible. Any configuration that you would consider putting in
a .htaccess file, can just as effectively be made in a <Directory>
section in your main server configuration file."

Should I apply it as well for our zone? I did it only for Lenya atm and
it works fine. :)

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [zone] httpd configuration (was character entities)

Posted by Thorsten Scherler <th...@apache.org>.
El mié, 25-01-2006 a las 09:23 +1100, David Crossley escribió:
> Thorsten Scherler wrote:
> > David Crossley escribi??:
> > > 
> > > On forrest.apache.org we have this workaround in our .htaccess
> > > AddDefaultCharset UTF-8
> > > 
> > > However we don't yet have that on forrest.zones.apache.org as
> > > our httpd instance needs other configuration too.
> > 
> > Yeah, I tried the .htaccess tip but like you stated there are some other
> > configurations to do. 
> > 
> > Do you know which or maybe can point me to some resources?
> 
> http://httpd.apache.org/docs/2.2/
> 
> Need to enable the use of .htaccess files.
> 

Thx, will have a look.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: [zone] httpd configuration (was character entities)

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> David Crossley escribi??:
> > 
> > On forrest.apache.org we have this workaround in our .htaccess
> > AddDefaultCharset UTF-8
> > 
> > However we don't yet have that on forrest.zones.apache.org as
> > our httpd instance needs other configuration too.
> 
> Yeah, I tried the .htaccess tip but like you stated there are some other
> configurations to do. 
> 
> Do you know which or maybe can point me to some resources?

http://httpd.apache.org/docs/2.2/

Need to enable the use of .htaccess files.

-David

[zone] httpd configuration (was character entities)

Posted by Thorsten Scherler <th...@apache.org>.
El lun, 23-01-2006 a las 11:43 +1100, David Crossley escribió:
> Thorsten Scherler wrote:
> >
> > Yeah, I am running into the same problem ATM. You can see it online at 
> > http://lenya.zones.apache.org/ "Today:??..." (I am looking right now to
> > fix that, so the site may be fixed if you visit it)
> > 
> > On my local machine that does not happen. I have run into a similar
> > problem with cocoon on a job I did a while ago. The problem was lying in
> > the server configuration, now I just looked on our zones server:
> > Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
> > -bash-3.00$ locale
> > LANG=
> > LC_CTYPE="C"
> > LC_NUMERIC="C"
> > LC_TIME="C"
> > LC_COLLATE="C"
> > LC_MONETARY="C"
> > LC_MESSAGES="C"
> > LC_ALL=
> > 
> > The locale is not UTF-8!
> > 
> > Doing "locale" on my machine gives:
> > LANG=es_ES.UTF-8
> > LC_CTYPE="es_ES.UTF-8"
> > LC_NUMERIC="es_ES.UTF-8"
> > LC_TIME="es_ES.UTF-8"
> > LC_COLLATE="es_ES.UTF-8"
> > LC_MONETARY="es_ES.UTF-8"
> > LC_MESSAGES="es_ES.UTF-8"
> > LC_PAPER="es_ES.UTF-8"
> > LC_NAME="es_ES.UTF-8"
> > LC_ADDRESS="es_ES.UTF-8"
> > LC_TELEPHONE="es_ES.UTF-8"
> > LC_MEASUREMENT="es_ES.UTF-8"
> > LC_IDENTIFICATION="es_ES.UTF-8"
> > LC_ALL=
> > 
> > That is UTF-8!
> > 
> > The solution back on the job was setting the language to de_DE.UTF-8
> > before starting the tomcat server.
> > 

I tried this but the httpd on zone is started differently like on other
unix systems. I am still looking for a way how to "teach apache2" to use
utf-8 locales. 

Finding
http://marc.theaimsgroup.com/?t=113761190300004&r=1&w=2

makes it clear that even if you set the env to utf-8 prior to the start
of httpd it will get ignored. :(

> > >
...
> > 
> > Actually regarding http://www.html-world.de/program/html_sz.php 
> > Unicode: &nbsp;
> > XML: &#160;
> > Result: space
> > 
> > We are using the right code for spaces. I guess you need to set the
> > locale to UTF-8 on the server (before starting httpd), since forrest is
> > rendering it on lenya.zones just fine but the httpd is delivering the
> > content with "??".
> 
> On forrest.apache.org we have this workaround in our .htaccess
> AddDefaultCharset UTF-8
> 
> However we don't yet have that on forrest.zones.apache.org as
> our httpd instance needs other configuration too.

Yeah, I tried the .htaccess tip but like you stated there are some other
configurations to do. 

Do you know which or maybe can point me to some resources?

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: character entities

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
>
> Yeah, I am running into the same problem ATM. You can see it online at 
> http://lenya.zones.apache.org/ "Today:??..." (I am looking right now to
> fix that, so the site may be fixed if you visit it)
> 
> On my local machine that does not happen. I have run into a similar
> problem with cocoon on a job I did a while ago. The problem was lying in
> the server configuration, now I just looked on our zones server:
> Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
> -bash-3.00$ locale
> LANG=
> LC_CTYPE="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_COLLATE="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_ALL=
> 
> The locale is not UTF-8!
> 
> Doing "locale" on my machine gives:
> LANG=es_ES.UTF-8
> LC_CTYPE="es_ES.UTF-8"
> LC_NUMERIC="es_ES.UTF-8"
> LC_TIME="es_ES.UTF-8"
> LC_COLLATE="es_ES.UTF-8"
> LC_MONETARY="es_ES.UTF-8"
> LC_MESSAGES="es_ES.UTF-8"
> LC_PAPER="es_ES.UTF-8"
> LC_NAME="es_ES.UTF-8"
> LC_ADDRESS="es_ES.UTF-8"
> LC_TELEPHONE="es_ES.UTF-8"
> LC_MEASUREMENT="es_ES.UTF-8"
> LC_IDENTIFICATION="es_ES.UTF-8"
> LC_ALL=
> 
> That is UTF-8!
> 
> The solution back on the job was setting the language to de_DE.UTF-8
> before starting the tomcat server.
> 
> > I am seeing ?? a lot lately and so think the problem is still not solved.
> 
> Yeah, we need to find the root cause of this problem. I guess it is
> lying in the "locale".
> 
> > For instance it is the result of siteinfo-last-published.ft.
> > 
> > Last Published:?? 01/21/2006 17:53:37
> > 
> > This line is created from the contract here :-
> > 
> > <xsl:template name="siteinfo-last-published-body">
> >         <script type="text/javascript">document.write("<i18n:text >Last 
> > Published:</i18n:text>&#160;" + document.lastModified);</script>
> >       </xsl:template>
> > 
> > I have a theory.
> > 
> > in the code the &#160; is right next to a " (quote). The entity number for " 
> > (quote) is &#34;
> > 
> > I had a crazy thought that maybe they were adding together somehow. 
> > (160+34=194)
> > 
> > &#160; + &#34; = &#194;
> > 
> > Guess what &#194; is equal to , yup :-
> > 
> > ??
> 
> Jeje, nice theory, but I have an example where you do not combine &#160;
> with " and still the described behavior can be seen.
> 
>         <forrest:hook class="breadtrail">
>           <forrest:contract name="genericMarkup">
>             <forrest:properties contract="genericMarkup">
>               <forrest:property name="genericMarkup">
>                 <strong>&#160;</strong>
>               </forrest:property>
>             </forrest:properties>
>           </forrest:contract>
>         </forrest:hook>
> 
> 
> > 
> > Anyway, in the example contract code above, removing &#160; and putting a 
> > real space in there cures it and the space
> > is preserved no problem as it is enclosed between the quotes.
> > 
> > I copied the contract to my /pili/html/ directory and it now renders 
> > correctly.
> > 
> > Have I missed something here or was it that simple ?
> > 
> 
> Actually regarding http://www.html-world.de/program/html_sz.php 
> Unicode: &nbsp;
> XML: &#160;
> Result: space
> 
> We are using the right code for spaces. I guess you need to set the
> locale to UTF-8 on the server (before starting httpd), since forrest is
> rendering it on lenya.zones just fine but the httpd is delivering the
> content with "??".

On forrest.apache.org we have this workaround in our .htaccess
AddDefaultCharset UTF-8

However we don't yet have that on forrest.zones.apache.org as
our httpd instance needs other configuration too.

-David

> More information about utf-8 and unicode can be found on [1]. How to set
> it in Gentoo [2] is in spanish only but I reckon you still can get the
> idea following the coding examples. Finally [3] a smaller howto in
> english.
> 
> HTH
> salu2
> 
> [1]http://www.cl.cam.ac.uk/~mgk25/unicode.html
> [2]http://es.gentoo-wiki.com/Unicode-UTF-8
> [3]http://www.linux.com/howtos/Indic-Fonts-HOWTO/locale.shtml
> -- 
> thorsten
> 
> "Together we stand, divided we fall!" 
> Hey you (Pink Floyd)
> 

Re: character entities

Posted by Thorsten Scherler <th...@apache.org>.
El mié, 25-01-2006 a las 16:34 +0800, Gav.... escribió:
> -
...
> |
> | Jeje, nice theory, but I have an example where you do not combine &#160;
> | with " and still the described behavior can be seen.
> |
> |        <forrest:hook class="breadtrail">
> |          <forrest:contract name="genericMarkup">
> |            <forrest:properties contract="genericMarkup">
> |              <forrest:property name="genericMarkup">
> |                <strong>&#160;</strong>
> |              </forrest:property>
> |            </forrest:properties>
> |          </forrest:contract>
> |        </forrest:hook>
> 
> Yes, it was a theory, it  was late also.
> What does a strong space look like :)
> 

lol It is a trick, because the genericMarkup contract is expecting
markup and not single strings. ;-)

> |
> |
> | >
> | > Anyway, in the example contract code above, removing &#160; and putting 
> a
> | > real space in there cures it and the space
> | > is preserved no problem as it is enclosed between the quotes.
> | >
> | > I copied the contract to my /pili/html/ directory and it now renders
> | > correctly.
> | >
> | > Have I missed something here or was it that simple ?
> | >
> |
> | Actually regarding http://www.html-world.de/program/html_sz.php
> | Unicode: &nbsp;
> | XML: &#160;
> | Result: space
> |
> | We are using the right code for spaces. I guess you need to set the
> | locale to UTF-8 on the server (before starting httpd), since forrest is
> | rendering it on lenya.zones just fine but the httpd is delivering the
> | content with "Â".
> 
> I am not disputing that &#160; is a space, my argument and what my
> solution above was that you need not employ &#160; all the time -
> especially when text is surrounded by quotes.
> 
> The example text is :-
> 
> ("<i18n:text >Last Published:</i18n:text>&#160;" + document.lastModified);
> 
> The &#160; is there to put a space between the : and the date produced by
> document.lastModified. I do not see a reason for using &#160; in this case
> the same as there is no &#160; between the words 'Last' and 'Published'
> 
> What works for me is :-
> 
> ("<i18n:text >Last Published:</i18n:text> " + document.lastModified);
> 
> That 'space' is legal and universal, it is enclosed in quotes and so will
> get converted correctly no matter how the locale is set on the server.
> 
> Also for some, there will definatly be problems in getting their web server
> locale changed. I can change my locale on my server no problem, however
> apache.minitutorials.com and some of my other sites are remotely hosted
> by different ISPs, I doubt they will change on my say so. I guess this to
> be true of many Forrest users.

Yeah, you are right for above contract or any other xsl based code where
you always have the solution of <xsl:text> </xsl:text> or the one you
described, but the problem is actually bigger then this. Like seen in
the "strong space" example, you may want a single space in some hooks or
better in the structurer. 

I can understand that some server are out of control and the
configuration may be given, but as David points out normally you can
control it via .htaccess which all ISP should allow. 

I do not know atm a simple solution but I know that the source of
http://lenya.zones.apache.org/index.html on the servers DOC_ROOT looks
like:
<?xml version="1.0" encoding="UTF-8"?>
...
<div id="publishedStrip">
 <script type="text/javascript">document.write("Today: " + new
Date());</script>
</div>

...and looking on the source code of above link I can find:
<?xml version="1.0" encoding="UTF-8"?>
...
<div id="publishedStrip">
 <script type="text/javascript">document.write("Today:Â " + new
Date());</script>
</div>

Now the question is who to blame that the encoding is ignored? Like
stated above in some situation (e.g. not based on xsl) you need to use
the *right* way for defining spaces in utf-8 (&#160;), what about this
situations?

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: character entities

Posted by "Gav...." <br...@brightontown.com.au>.
----- Original Message ----- 
From: "Thorsten Scherler" <th...@apache.org>
To: <de...@forrest.apache.org>
Sent: Sunday, January 22, 2006 8:35 PM
Subject: Re: character entities


| El sáb, 21-01-2006 a las 22:41 +0800, Gav.... escribió:
| > I wrote earlier :-
| >
| > | P.S-
| > |
| > | Creating an empty hook has the side effect of a self closing div -
| > obviously
| > | inlvalid and messes
| > | up the rest of the page.
| > |
| > | e.g.
| > |
| > | <forrest:hook name="headlines"></forrest:hook>
| > | creates
| > | <div id="headlines />
| > | instead of
| > | <div id="headlines"></div>
| > |
| >
| > This made me have a look around, and as a side-effect found an old
| > thread regarding this back in July 2005, just before my time I think.
| >
| > The discussion also brought up &#160; and its possible side effects
| > of creating  .
|
| Yeah, I am running into the same problem ATM. You can see it online at
| http://lenya.zones.apache.org/ "Today:Â..." (I am looking right now to
| fix that, so the site may be fixed if you visit it)
|
| On my local machine that does not happen. I have run into a similar
| problem with cocoon on a job I did a while ago. The problem was lying in
| the server configuration, now I just looked on our zones server:
| Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
| -bash-3.00$ locale
| LANG=
| LC_CTYPE="C"
| LC_NUMERIC="C"
| LC_TIME="C"
| LC_COLLATE="C"
| LC_MONETARY="C"
| LC_MESSAGES="C"
| LC_ALL=
|
| The locale is not UTF-8!
|
| Doing "locale" on my machine gives:
| LANG=es_ES.UTF-8
| LC_CTYPE="es_ES.UTF-8"
| LC_NUMERIC="es_ES.UTF-8"
| LC_TIME="es_ES.UTF-8"
| LC_COLLATE="es_ES.UTF-8"
| LC_MONETARY="es_ES.UTF-8"
| LC_MESSAGES="es_ES.UTF-8"
| LC_PAPER="es_ES.UTF-8"
| LC_NAME="es_ES.UTF-8"
| LC_ADDRESS="es_ES.UTF-8"
| LC_TELEPHONE="es_ES.UTF-8"
| LC_MEASUREMENT="es_ES.UTF-8"
| LC_IDENTIFICATION="es_ES.UTF-8"
| LC_ALL=
|
| That is UTF-8!
|
| The solution back on the job was setting the language to de_DE.UTF-8
| before starting the tomcat server.
|
| >
| > I am seeing  a lot lately and so think the problem is still not solved.
|
| Yeah, we need to find the root cause of this problem. I guess it is
| lying in the "locale".
|
| > For instance it is the result of siteinfo-last-published.ft.
| >
| > Last Published:Â 01/21/2006 17:53:37
| >
| > This line is created from the contract here :-
| >
| > <xsl:template name="siteinfo-last-published-body">
| >         <script type="text/javascript">document.write("<i18n:text >Last
| > Published:</i18n:text>&#160;" + document.lastModified);</script>
| >       </xsl:template>
| >
| > I have a theory.
| >
| > in the code the &#160; is right next to a " (quote). The entity number 
for "
| > (quote) is &#34;
| >
| > I had a crazy thought that maybe they were adding together somehow.
| > (160+34=194)
| >
| > &#160; + &#34; = &#194;
| >
| > Guess what &#194; is equal to , yup :-
| >
| > Â
|
| Jeje, nice theory, but I have an example where you do not combine &#160;
| with " and still the described behavior can be seen.
|
|        <forrest:hook class="breadtrail">
|          <forrest:contract name="genericMarkup">
|            <forrest:properties contract="genericMarkup">
|              <forrest:property name="genericMarkup">
|                <strong>&#160;</strong>
|              </forrest:property>
|            </forrest:properties>
|          </forrest:contract>
|        </forrest:hook>

Yes, it was a theory, it  was late also.
What does a strong space look like :)

|
|
| >
| > Anyway, in the example contract code above, removing &#160; and putting 
a
| > real space in there cures it and the space
| > is preserved no problem as it is enclosed between the quotes.
| >
| > I copied the contract to my /pili/html/ directory and it now renders
| > correctly.
| >
| > Have I missed something here or was it that simple ?
| >
|
| Actually regarding http://www.html-world.de/program/html_sz.php
| Unicode: &nbsp;
| XML: &#160;
| Result: space
|
| We are using the right code for spaces. I guess you need to set the
| locale to UTF-8 on the server (before starting httpd), since forrest is
| rendering it on lenya.zones just fine but the httpd is delivering the
| content with "Â".

I am not disputing that &#160; is a space, my argument and what my
solution above was that you need not employ &#160; all the time -
especially when text is surrounded by quotes.

The example text is :-

("<i18n:text >Last Published:</i18n:text>&#160;" + document.lastModified);

The &#160; is there to put a space between the : and the date produced by
document.lastModified. I do not see a reason for using &#160; in this case
the same as there is no &#160; between the words 'Last' and 'Published'

What works for me is :-

("<i18n:text >Last Published:</i18n:text> " + document.lastModified);

That 'space' is legal and universal, it is enclosed in quotes and so will
get converted correctly no matter how the locale is set on the server.

Also for some, there will definatly be problems in getting their web server
locale changed. I can change my locale on my server no problem, however
apache.minitutorials.com and some of my other sites are remotely hosted
by different ISPs, I doubt they will change on my say so. I guess this to
be true of many Forrest users.

Gav... 



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.22/239 - Release Date: 24/01/2006



Re: character entities

Posted by Thorsten Scherler <th...@apache.org>.
El sáb, 21-01-2006 a las 22:41 +0800, Gav.... escribió:
> I wrote earlier :-
> 
> | P.S-
> |
> | Creating an empty hook has the side effect of a self closing div - 
> obviously
> | inlvalid and messes
> | up the rest of the page.
> |
> | e.g.
> |
> | <forrest:hook name="headlines"></forrest:hook>
> | creates
> | <div id="headlines />
> | instead of
> | <div id="headlines"></div>
> |
> 
> This made me have a look around, and as a side-effect found an old
> thread regarding this back in July 2005, just before my time I think.
> 
> The discussion also brought up &#160; and its possible side effects
> of creating  .

Yeah, I am running into the same problem ATM. You can see it online at 
http://lenya.zones.apache.org/ "Today:Â..." (I am looking right now to
fix that, so the site may be fixed if you visit it)

On my local machine that does not happen. I have run into a similar
problem with cocoon on a job I did a while ago. The problem was lying in
the server configuration, now I just looked on our zones server:
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
-bash-3.00$ locale
LANG=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

The locale is not UTF-8!

Doing "locale" on my machine gives:
LANG=es_ES.UTF-8
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=

That is UTF-8!

The solution back on the job was setting the language to de_DE.UTF-8
before starting the tomcat server.

> 
> I am seeing  a lot lately and so think the problem is still not solved.

Yeah, we need to find the root cause of this problem. I guess it is
lying in the "locale".

> For instance it is the result of siteinfo-last-published.ft.
> 
> Last Published:Â 01/21/2006 17:53:37
> 
> This line is created from the contract here :-
> 
> <xsl:template name="siteinfo-last-published-body">
>         <script type="text/javascript">document.write("<i18n:text >Last 
> Published:</i18n:text>&#160;" + document.lastModified);</script>
>       </xsl:template>
> 
> I have a theory.
> 
> in the code the &#160; is right next to a " (quote). The entity number for " 
> (quote) is &#34;
> 
> I had a crazy thought that maybe they were adding together somehow. 
> (160+34=194)
> 
> &#160; + &#34; = &#194;
> 
> Guess what &#194; is equal to , yup :-
> 
> Â

Jeje, nice theory, but I have an example where you do not combine &#160;
with " and still the described behavior can be seen.

        <forrest:hook class="breadtrail">
          <forrest:contract name="genericMarkup">
            <forrest:properties contract="genericMarkup">
              <forrest:property name="genericMarkup">
                <strong>&#160;</strong>
              </forrest:property>
            </forrest:properties>
          </forrest:contract>
        </forrest:hook>


> 
> Anyway, in the example contract code above, removing &#160; and putting a 
> real space in there cures it and the space
> is preserved no problem as it is enclosed between the quotes.
> 
> I copied the contract to my /pili/html/ directory and it now renders 
> correctly.
> 
> Have I missed something here or was it that simple ?
> 

Actually regarding http://www.html-world.de/program/html_sz.php 
Unicode: &nbsp;
XML: &#160;
Result: space

We are using the right code for spaces. I guess you need to set the
locale to UTF-8 on the server (before starting httpd), since forrest is
rendering it on lenya.zones just fine but the httpd is delivering the
content with "Â".

More information about utf-8 and unicode can be found on [1]. How to set
it in Gentoo [2] is in spanish only but I reckon you still can get the
idea following the coding examples. Finally [3] a smaller howto in
english.

> Still looking into the empty <div> problem but again may be &#160; related 
> I'm not sure.

No, IMO not, see above.

> There was talk in the archives it was cured, but seems to be back.
> 

forrest-trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/hooksMatcher.xsl
...
<xsl:if test="@nbsp='true'">&#160;</xsl:if>
...

Meaning 
<forrest:hook name="headlines"></forrest:hook>
creates
<div id="headlines />

and <forrest:hook name="headlines" nbsp="true"></forrest:hook>
gives
<div id="headlines"> </div>

We need to document this in the howto.

HTH
salu2

[1]http://www.cl.cam.ac.uk/~mgk25/unicode.html
[2]http://es.gentoo-wiki.com/Unicode-UTF-8
[3]http://www.linux.com/howtos/Indic-Fonts-HOWTO/locale.shtml
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)