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/03/25 12:37:45 UTC
XHTML 1.1 Declaration
Hi,
I have specified the following XHTML declaration in my sitemap:
<map:serializer name="xhtml"
src="org.apache.cocoon.serialization.XMLSerializer"
mime-type="text/html" logger="sitemap.serializer.xhtml" pool-grow="2"
pool-max="64" pool-min="2">
<doctype-public>-//W3C//DTD XHTML 1.1 //EN</doctype-public>
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd</doctype-
system>
<encoding>UTF-8</encoding>
<indent>yes</indent>
</map:serializer>
As part of the XHTML declaration it is required that the following is
psecified within the opening html tag:
<html xmlns="http://www.w3.org/1999/xhtml">
My question is this, as I have also declared a <map:select
type="browser"/> which depending on the browser determines which
serializer to use, is there a global parameter I can specify within my
sitemap which when an XHTML 1.1 compatible browser is detected also
writes xmlns="http://www.w3.org/1999/xhtml" into the opening html tag?
I ask this because my site is broken down into frames and I don't want
to have to go through each page putting some form of code which
determines the browser type, and if XHTML 1.1 writes the xmlns
declaration into the html tag.
So if browser is XHTML 1.1 compatible:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Peter
Re: XHTML 1.1 Declaration
Posted by Michael Roth <mr...@ronin.matrix.tuwien.ac.at>.
Hi,
The HTML-Generator
(http://cocoon.apache.org/2.1/userdocs/generators/html-generator.html) uses
JTidy
for proper output, you can configure how jtidy is doing it.
<map:generator type="html" src="org.apache.cocoon.generation.HTMLGenerator">
<jtidy-config>jtidy.properties</jtidy-config>
</map:generator>
Sample Config File (jtidy.properties)
output-xml: no
output-xhtml: no
input-xml: no
For all Options go to http://www.w3.org/People/Raggett/tidy/
Perhaps this will help
Michael
At 14:23 25.03.2004 +0000, you wrote:
>Hi,
>has anyone got any ideas to this problem. For example I was thinking of
>something like:
>
> <map:serializer name="xhtml"
> src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/html"
> logger="sitemap.serializer.xhtml" pool-grow="2" pool-max="64" pool-min="2">
> <doctype-public>-//W3C//DTD XHTML 1.1
> //EN</doctype-public>
>
><doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd</doctype-system>
> <encoding>UTF-8</encoding>
> <indent>yes</indent>
>
>
><html>xmlns="<http://www.w3.org/1999/xhtml>http://www.w3.org/1999/xhtml"</html>
>
>
> </map:serializer>
>make sense?
>
>Peter
>
>On 25 Mar 2004, at 11:37, beyaNet Consultancy wrote:
>
>>Hi,
>>I have specified the following XHTML declaration in my sitemap:
>>
>> <map:serializer name="xhtml"
>> src="org.apache.cocoon.serialization.XMLSerializer"
>> mime-type="text/html" logger="sitemap.serializer.xhtml" pool-grow="2"
>> pool-max="64" pool-min="2">
>> <doctype-public>-//W3C//DTD XHTML 1.1
>> //EN</doctype-public>
>>
>><doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd</doctype-system>
>> <encoding>UTF-8</encoding>
>> <indent>yes</indent>
>> </map:serializer>
>>
>>As part of the XHTML declaration it is required that the following is
>>psecified within the opening html tag:
>>
>><html xmlns="<http://www.w3.org/1999/xhtml>http://www.w3.org/1999/xhtml">
>>
>>My question is this, as I have also declared a <map:select
>>type="browser"/> which depending on the browser determines which
>>serializer to use, is there a global parameter I can specify within my
>>sitemap which when an XHTML 1.1 compatible browser is detected also
>>writes xmlns="<http://www.w3.org/1999/xhtml>http://www.w3.org/1999/xhtml"
>>into the opening html tag? I ask this because my site is broken down into
>>frames and I don't want to have to go through each page putting some form
>>of code which determines the browser type, and if XHTML 1.1 writes the
>>xmlns declaration into the html tag.
>>
>>So if browser is XHTML 1.1 compatible:
>>
>><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN"
>>"<http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd>http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
>>
>><html xmlns="<http://www.w3.org/1999/xhtml>http://www.w3.org/1999/xhtml">
>>
>>Peter
></blockquote></x-html>
Michael Roth
Technische Universität Wien
Zentraler Informatik Dienst - Zentrale Services
Wiedner Hauptstraße 8-10, 1040 Wien
Tel.: 58801 42091 / Fax: 58801 42099
Re: XHTML 1.1 Declaration
Posted by beyaNet Consultancy <be...@ntlworld.com>.
Hi,
has anyone got any ideas to this problem. For example I was thinking of
something like:
<map:serializer name="xhtml"
src="org.apache.cocoon.serialization.XMLSerializer"
mime-type="text/html" logger="sitemap.serializer.xhtml" pool-grow="2"
pool-max="64" pool-min="2">
<doctype-public>-//W3C//DTD XHTML 1.1 //EN</doctype-public>
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd</doctype-
system>
<encoding>UTF-8</encoding>
<indent>yes</indent>
<html>xmlns="http://www.w3.org/1999/xhtml"</html>
</map:serializer>
make sense?
Peter
On 25 Mar 2004, at 11:37, beyaNet Consultancy wrote:
> Hi,
> I have specified the following XHTML declaration in my sitemap:
>
> <map:serializer name="xhtml"
> src="org.apache.cocoon.serialization.XMLSerializer"
> mime-type="text/html" logger="sitemap.serializer.xhtml" pool-grow="2"
> pool-max="64" pool-min="2">
> <doctype-public>-//W3C//DTD XHTML 1.1 //EN</doctype-public>
>
> <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd</doctype-
> system>
> <encoding>UTF-8</encoding>
> <indent>yes</indent>
> </map:serializer>
>
> As part of the XHTML declaration it is required that the following is
> psecified within the opening html tag:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
>
> My question is this, as I have also declared a <map:select
> type="browser"/> which depending on the browser determines which
> serializer to use, is there a global parameter I can specify within my
> sitemap which when an XHTML 1.1 compatible browser is detected also
> writes xmlns="http://www.w3.org/1999/xhtml" into the opening html tag?
> I ask this because my site is broken down into frames and I don't want
> to have to go through each page putting some form of code which
> determines the browser type, and if XHTML 1.1 writes the xmlns
> declaration into the html tag.
>
> So if browser is XHTML 1.1 compatible:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
>
> Peter
>