You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Cabezuelo Vivo <an...@eresmas.com> on 2000/11/29 12:28:21 UTC

DOCTYPE problem

Hello all,

I have a litle problem with cocoon.

I am trying to serve an xml file from cocoom without any transformation. I
have changed the defoult transformer to text/xml.

The xml file looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE noticias [
 <!ELEMENT noticias (noticia+)>
 <!ELEMENT noticia
(noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
 <!ELEMENT noticiaid (#PCDATA)>
 <!ELEMENT servicio (#PCDATA)>
 <!ELEMENT fecha (#PCDATA)>
 <!ELEMENT hora (#PCDATA)>
 <!ELEMENT categoria (#PCDATA)>
 <!ELEMENT guia (#PCDATA)>
 <!ELEMENT titulo (#PCDATA)>
 <!ELEMENT texto (#PCDATA)>
 ]>
<noticias>

 <noticia>
<noticiaid>1013626</noticiaid>
<servicio>DEPORTES</servicio>
<fecha>20001129</fecha>
<hora>10:15</hora>
<categoria>DEP</categoria>
<guia>FUTBOL-EUROPA</guia>
<titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
EUROPEAS</titulo>
<texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el equipo
más sólido en defensa</texto>
</noticia>
</noticias>

and the response from Cocoon looks like this:

 <!ELEMENT noticias (noticia+)>
 <!ELEMENT noticia
(noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
 <!ELEMENT noticiaid (#PCDATA)>
 <!ELEMENT servicio (#PCDATA)>
 <!ELEMENT fecha (#PCDATA)>
 <!ELEMENT hora (#PCDATA)>
 <!ELEMENT categoria (#PCDATA)>
 <!ELEMENT guia (#PCDATA)>
 <!ELEMENT titulo (#PCDATA)>
 <!ELEMENT texto (#PCDATA)>
 <?xml version="1.0" encoding="ISO-8859-1"?>
<noticias>

 <noticia>
<noticiaid>1013626</noticiaid>
<servicio>DEPORTES</servicio>
<fecha>20001129</fecha>
<hora>10:15</hora>
<categoria>DEP</categoria>
<guia>FUTBOL-EUROPA</guia>
<titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
EUROPEAS</titulo>
<texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el equipo
más sólido en defensa</texto>
</noticia>
</noticias>


Does anybody have an idea of which could be the problem.

I'm using:
Cocoon 1.8
Windows 98
Apache 1.3.12
JServ 1.1

Thanks in advance.
___
Antonio Cabezuelo


Re: DOCTYPE problem

Posted by Antonio Cabezuelo Vivo <an...@eresmas.com>.
The change does not correct the problem.

I don't know if this is a cocoon problem or a fromatter problem.

If I comment the DOCTYPE declaration everything is ok.

___
Antonio.


----- Original Message -----
From: Antonios Peris <ap...@largemedium.com>
To: <co...@xml.apache.org>; Antonio Cabezuelo Vivo
<an...@eresmas.com>
Sent: Thursday, November 30, 2000 2:24 AM
Subject: Re: DOCTYPE problem


OK, the change in teh source code was this:
In class Engine, method handle
just move the line:

// get the right formatter for the page
Formatter formatter = formatters.getFormatter(document);

move it just before the process of the document begins. That is a couple of
rows up from where it is now. It has to do with the fct that it processes
the document before the formatter type.
My problem was to add a new formatter except the default one and for some
reason it did not take the new formatter. So nothing happened.

Well I'm not sure that this will solve your problem because you want to use
text/xml (which I think is bad documented in the cocoon.properties file) and
not a HTMLFormatter. So if this wont work double check the .properties file.
Why don't you want to use HTMLFormatter? you can always specify new ones
that can handle the transformation you want.


----- Original Message -----
From: "Antonio Cabezuelo Vivo" <an...@eresmas.com>
To: "Antonios Peris" <ap...@largemedium.com>
Cc: "cocoon" <co...@xml.apache.org>
Sent: Wednesday, November 29, 2000 1:11 PM
Subject: Re: DOCTYPE problem


> Thanks for your fast repply.
>
> I have added the line you suggest and the problem remains.
>
> Could you please send me the change you made to cocoon? Maybe I need it.
>
> Thanks again,
> ___
> Antonio Cabezuelo
>
> ----- Original Message -----
> From: Antonios Peris <ap...@largemedium.com>
> To: <co...@xml.apache.org>; Antonio Cabezuelo Vivo
> <an...@eresmas.com>
> Sent: Thursday, November 30, 2000 12:52 AM
> Subject: Re: DOCTYPE problem
>
>
> Nothing happens right?
>
> Try adding this line at the beginning of your xml file:
> <?cocoon-format type="text/xml"?>
>
> I had a similar problem with different formatters. Also made a monor
chance
> in the Cocoon source code to make it work. Maybe you don' tneed to do it.
>
> ----- Original Message -----
> From: "Antonio Cabezuelo Vivo" <an...@eresmas.com>
> To: "cocoon" <co...@xml.apache.org>
> Sent: Wednesday, November 29, 2000 12:28 PM
> Subject: DOCTYPE problem
>
>
> > Hello all,
> >
> > I have a litle problem with cocoon.
> >
> > I am trying to serve an xml file from cocoom without any transformation.
I
> > have changed the defoult transformer to text/xml.
> >
> > The xml file looks like this:
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <!DOCTYPE noticias [
> >  <!ELEMENT noticias (noticia+)>
> >  <!ELEMENT noticia
> > (noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
> >  <!ELEMENT noticiaid (#PCDATA)>
> >  <!ELEMENT servicio (#PCDATA)>
> >  <!ELEMENT fecha (#PCDATA)>
> >  <!ELEMENT hora (#PCDATA)>
> >  <!ELEMENT categoria (#PCDATA)>
> >  <!ELEMENT guia (#PCDATA)>
> >  <!ELEMENT titulo (#PCDATA)>
> >  <!ELEMENT texto (#PCDATA)>
> >  ]>
> > <noticias>
> >
> >  <noticia>
> > <noticiaid>1013626</noticiaid>
> > <servicio>DEPORTES</servicio>
> > <fecha>20001129</fecha>
> > <hora>10:15</hora>
> > <categoria>DEP</categoria>
> > <guia>FUTBOL-EUROPA</guia>
> > <titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
> > EUROPEAS</titulo>
> > <texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el
equipo
> > más sólido en defensa</texto>
> > </noticia>
> > </noticias>
> >
> > and the response from Cocoon looks like this:
> >
> >  <!ELEMENT noticias (noticia+)>
> >  <!ELEMENT noticia
> > (noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
> >  <!ELEMENT noticiaid (#PCDATA)>
> >  <!ELEMENT servicio (#PCDATA)>
> >  <!ELEMENT fecha (#PCDATA)>
> >  <!ELEMENT hora (#PCDATA)>
> >  <!ELEMENT categoria (#PCDATA)>
> >  <!ELEMENT guia (#PCDATA)>
> >  <!ELEMENT titulo (#PCDATA)>
> >  <!ELEMENT texto (#PCDATA)>
> >  <?xml version="1.0" encoding="ISO-8859-1"?>
> > <noticias>
> >
> >  <noticia>
> > <noticiaid>1013626</noticiaid>
> > <servicio>DEPORTES</servicio>
> > <fecha>20001129</fecha>
> > <hora>10:15</hora>
> > <categoria>DEP</categoria>
> > <guia>FUTBOL-EUROPA</guia>
> > <titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
> > EUROPEAS</titulo>
> > <texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el
equipo
> > más sólido en defensa</texto>
> > </noticia>
> > </noticias>
> >
> >
> > Does anybody have an idea of which could be the problem.
> >
> > I'm using:
> > Cocoon 1.8
> > Windows 98
> > Apache 1.3.12
> > JServ 1.1
> >
> > Thanks in advance.
> > ___
> > Antonio Cabezuelo
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>




Re: DOCTYPE problem

Posted by Antonios Peris <ap...@largemedium.com>.
OK, the change in teh source code was this:
In class Engine, method handle
just move the line:

// get the right formatter for the page
Formatter formatter = formatters.getFormatter(document);

move it just before the process of the document begins. That is a couple of
rows up from where it is now. It has to do with the fct that it processes
the document before the formatter type.
My problem was to add a new formatter except the default one and for some
reason it did not take the new formatter. So nothing happened.

Well I'm not sure that this will solve your problem because you want to use
text/xml (which I think is bad documented in the cocoon.properties file) and
not a HTMLFormatter. So if this wont work double check the .properties file.
Why don't you want to use HTMLFormatter? you can always specify new ones
that can handle the transformation you want.


----- Original Message -----
From: "Antonio Cabezuelo Vivo" <an...@eresmas.com>
To: "Antonios Peris" <ap...@largemedium.com>
Cc: "cocoon" <co...@xml.apache.org>
Sent: Wednesday, November 29, 2000 1:11 PM
Subject: Re: DOCTYPE problem


> Thanks for your fast repply.
>
> I have added the line you suggest and the problem remains.
>
> Could you please send me the change you made to cocoon? Maybe I need it.
>
> Thanks again,
> ___
> Antonio Cabezuelo
>
> ----- Original Message -----
> From: Antonios Peris <ap...@largemedium.com>
> To: <co...@xml.apache.org>; Antonio Cabezuelo Vivo
> <an...@eresmas.com>
> Sent: Thursday, November 30, 2000 12:52 AM
> Subject: Re: DOCTYPE problem
>
>
> Nothing happens right?
>
> Try adding this line at the beginning of your xml file:
> <?cocoon-format type="text/xml"?>
>
> I had a similar problem with different formatters. Also made a monor
chance
> in the Cocoon source code to make it work. Maybe you don' tneed to do it.
>
> ----- Original Message -----
> From: "Antonio Cabezuelo Vivo" <an...@eresmas.com>
> To: "cocoon" <co...@xml.apache.org>
> Sent: Wednesday, November 29, 2000 12:28 PM
> Subject: DOCTYPE problem
>
>
> > Hello all,
> >
> > I have a litle problem with cocoon.
> >
> > I am trying to serve an xml file from cocoom without any transformation.
I
> > have changed the defoult transformer to text/xml.
> >
> > The xml file looks like this:
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <!DOCTYPE noticias [
> >  <!ELEMENT noticias (noticia+)>
> >  <!ELEMENT noticia
> > (noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
> >  <!ELEMENT noticiaid (#PCDATA)>
> >  <!ELEMENT servicio (#PCDATA)>
> >  <!ELEMENT fecha (#PCDATA)>
> >  <!ELEMENT hora (#PCDATA)>
> >  <!ELEMENT categoria (#PCDATA)>
> >  <!ELEMENT guia (#PCDATA)>
> >  <!ELEMENT titulo (#PCDATA)>
> >  <!ELEMENT texto (#PCDATA)>
> >  ]>
> > <noticias>
> >
> >  <noticia>
> > <noticiaid>1013626</noticiaid>
> > <servicio>DEPORTES</servicio>
> > <fecha>20001129</fecha>
> > <hora>10:15</hora>
> > <categoria>DEP</categoria>
> > <guia>FUTBOL-EUROPA</guia>
> > <titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
> > EUROPEAS</titulo>
> > <texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el
equipo
> > más sólido en defensa</texto>
> > </noticia>
> > </noticias>
> >
> > and the response from Cocoon looks like this:
> >
> >  <!ELEMENT noticias (noticia+)>
> >  <!ELEMENT noticia
> > (noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
> >  <!ELEMENT noticiaid (#PCDATA)>
> >  <!ELEMENT servicio (#PCDATA)>
> >  <!ELEMENT fecha (#PCDATA)>
> >  <!ELEMENT hora (#PCDATA)>
> >  <!ELEMENT categoria (#PCDATA)>
> >  <!ELEMENT guia (#PCDATA)>
> >  <!ELEMENT titulo (#PCDATA)>
> >  <!ELEMENT texto (#PCDATA)>
> >  <?xml version="1.0" encoding="ISO-8859-1"?>
> > <noticias>
> >
> >  <noticia>
> > <noticiaid>1013626</noticiaid>
> > <servicio>DEPORTES</servicio>
> > <fecha>20001129</fecha>
> > <hora>10:15</hora>
> > <categoria>DEP</categoria>
> > <guia>FUTBOL-EUROPA</guia>
> > <titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
> > EUROPEAS</titulo>
> > <texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el
equipo
> > más sólido en defensa</texto>
> > </noticia>
> > </noticias>
> >
> >
> > Does anybody have an idea of which could be the problem.
> >
> > I'm using:
> > Cocoon 1.8
> > Windows 98
> > Apache 1.3.12
> > JServ 1.1
> >
> > Thanks in advance.
> > ___
> > Antonio Cabezuelo
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


Re: DOCTYPE problem

Posted by Antonio Cabezuelo Vivo <an...@eresmas.com>.
Thanks for your fast repply.

I have added the line you suggest and the problem remains.

Could you please send me the change you made to cocoon? Maybe I need it.

Thanks again,
___
Antonio Cabezuelo

----- Original Message -----
From: Antonios Peris <ap...@largemedium.com>
To: <co...@xml.apache.org>; Antonio Cabezuelo Vivo
<an...@eresmas.com>
Sent: Thursday, November 30, 2000 12:52 AM
Subject: Re: DOCTYPE problem


Nothing happens right?

Try adding this line at the beginning of your xml file:
<?cocoon-format type="text/xml"?>

I had a similar problem with different formatters. Also made a monor chance
in the Cocoon source code to make it work. Maybe you don' tneed to do it.

----- Original Message -----
From: "Antonio Cabezuelo Vivo" <an...@eresmas.com>
To: "cocoon" <co...@xml.apache.org>
Sent: Wednesday, November 29, 2000 12:28 PM
Subject: DOCTYPE problem


> Hello all,
>
> I have a litle problem with cocoon.
>
> I am trying to serve an xml file from cocoom without any transformation. I
> have changed the defoult transformer to text/xml.
>
> The xml file looks like this:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE noticias [
>  <!ELEMENT noticias (noticia+)>
>  <!ELEMENT noticia
> (noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
>  <!ELEMENT noticiaid (#PCDATA)>
>  <!ELEMENT servicio (#PCDATA)>
>  <!ELEMENT fecha (#PCDATA)>
>  <!ELEMENT hora (#PCDATA)>
>  <!ELEMENT categoria (#PCDATA)>
>  <!ELEMENT guia (#PCDATA)>
>  <!ELEMENT titulo (#PCDATA)>
>  <!ELEMENT texto (#PCDATA)>
>  ]>
> <noticias>
>
>  <noticia>
> <noticiaid>1013626</noticiaid>
> <servicio>DEPORTES</servicio>
> <fecha>20001129</fecha>
> <hora>10:15</hora>
> <categoria>DEP</categoria>
> <guia>FUTBOL-EUROPA</guia>
> <titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
> EUROPEAS</titulo>
> <texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el equipo
> más sólido en defensa</texto>
> </noticia>
> </noticias>
>
> and the response from Cocoon looks like this:
>
>  <!ELEMENT noticias (noticia+)>
>  <!ELEMENT noticia
> (noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
>  <!ELEMENT noticiaid (#PCDATA)>
>  <!ELEMENT servicio (#PCDATA)>
>  <!ELEMENT fecha (#PCDATA)>
>  <!ELEMENT hora (#PCDATA)>
>  <!ELEMENT categoria (#PCDATA)>
>  <!ELEMENT guia (#PCDATA)>
>  <!ELEMENT titulo (#PCDATA)>
>  <!ELEMENT texto (#PCDATA)>
>  <?xml version="1.0" encoding="ISO-8859-1"?>
> <noticias>
>
>  <noticia>
> <noticiaid>1013626</noticiaid>
> <servicio>DEPORTES</servicio>
> <fecha>20001129</fecha>
> <hora>10:15</hora>
> <categoria>DEP</categoria>
> <guia>FUTBOL-EUROPA</guia>
> <titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
> EUROPEAS</titulo>
> <texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el equipo
> más sólido en defensa</texto>
> </noticia>
> </noticias>
>
>
> Does anybody have an idea of which could be the problem.
>
> I'm using:
> Cocoon 1.8
> Windows 98
> Apache 1.3.12
> JServ 1.1
>
> Thanks in advance.
> ___
> Antonio Cabezuelo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>




Re: DOCTYPE problem

Posted by Antonios Peris <ap...@largemedium.com>.
Nothing happens right?

Try adding this line at the beginning of your xml file:
<?cocoon-format type="text/xml"?>

I had a similar problem with different formatters. Also made a monor chance
in the Cocoon source code to make it work. Maybe you don' tneed to do it.

----- Original Message -----
From: "Antonio Cabezuelo Vivo" <an...@eresmas.com>
To: "cocoon" <co...@xml.apache.org>
Sent: Wednesday, November 29, 2000 12:28 PM
Subject: DOCTYPE problem


> Hello all,
>
> I have a litle problem with cocoon.
>
> I am trying to serve an xml file from cocoom without any transformation. I
> have changed the defoult transformer to text/xml.
>
> The xml file looks like this:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE noticias [
>  <!ELEMENT noticias (noticia+)>
>  <!ELEMENT noticia
> (noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
>  <!ELEMENT noticiaid (#PCDATA)>
>  <!ELEMENT servicio (#PCDATA)>
>  <!ELEMENT fecha (#PCDATA)>
>  <!ELEMENT hora (#PCDATA)>
>  <!ELEMENT categoria (#PCDATA)>
>  <!ELEMENT guia (#PCDATA)>
>  <!ELEMENT titulo (#PCDATA)>
>  <!ELEMENT texto (#PCDATA)>
>  ]>
> <noticias>
>
>  <noticia>
> <noticiaid>1013626</noticiaid>
> <servicio>DEPORTES</servicio>
> <fecha>20001129</fecha>
> <hora>10:15</hora>
> <categoria>DEP</categoria>
> <guia>FUTBOL-EUROPA</guia>
> <titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
> EUROPEAS</titulo>
> <texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el equipo
> más sólido en defensa</texto>
> </noticia>
> </noticias>
>
> and the response from Cocoon looks like this:
>
>  <!ELEMENT noticias (noticia+)>
>  <!ELEMENT noticia
> (noticiaid,servicio,fecha,hora,categoria,guia,titulo,texto)>
>  <!ELEMENT noticiaid (#PCDATA)>
>  <!ELEMENT servicio (#PCDATA)>
>  <!ELEMENT fecha (#PCDATA)>
>  <!ELEMENT hora (#PCDATA)>
>  <!ELEMENT categoria (#PCDATA)>
>  <!ELEMENT guia (#PCDATA)>
>  <!ELEMENT titulo (#PCDATA)>
>  <!ELEMENT texto (#PCDATA)>
>  <?xml version="1.0" encoding="ISO-8859-1"?>
> <noticias>
>
>  <noticia>
> <noticiaid>1013626</noticiaid>
> <servicio>DEPORTES</servicio>
> <fecha>20001129</fecha>
> <hora>10:15</hora>
> <categoria>DEP</categoria>
> <guia>FUTBOL-EUROPA</guia>
> <titulo>VALENCIA Y MANCHESTER, EQUIPOS MENOS GOLEADOS LIGAS
> EUROPEAS</titulo>
> <texto>Valencia, 29 nov (EFE).- El Valencia se ha convertido en el equipo
> más sólido en defensa</texto>
> </noticia>
> </noticias>
>
>
> Does anybody have an idea of which could be the problem.
>
> I'm using:
> Cocoon 1.8
> Windows 98
> Apache 1.3.12
> JServ 1.1
>
> Thanks in advance.
> ___
> Antonio Cabezuelo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>