You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alessio Sangalli <al...@manoweb.com> on 2002/11/16 20:10:08 UTC

inserting doctype from xsl

Perhaps it has already been discussed, but I didn't find any reference 
to this in the mail list archives.

I wanted to check my code with the w3c validator; I get a fatal error 
because I didn't put the DOCTYPE thing at the beginning of the page.

However I can't put it from inside xsl because I get


  The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode 
notifies that org.apache.cocoon.ProcessingException says:

doctype not allowed in content.

More precisely:

org.apache.cocoon.ProcessingException: Exception in creating Transform 
Handler: org.xml.sax.SAXParseException: doctype not allowed in content.



how can I do? I've tried few solutions found in dejanews but none worked...

bye & thank you
as





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: inserting doctype from xsl

Posted by Miles Elam <mi...@pcextremist.com>.
There's more than one doctype you could have for HTML.  Some folks may 
want to send HTML 3.2 with the appropriate header.

It would be possible to have all of the doctypes ready to go out of the 
box.  It would also mean a html32 serializer, a html4 serializer, a 
html401 serializer, etc. and that's not counting the 
transitional/strict/frameset qualifiers.

Seems a lot to have in the default sitemap when most people would only 
use one or two at the most.

- Miles

Alessio Sangalli wrote:

> <map:serializer logger="sitemap.serializer.html" mime-type="text/html" 
> name="html" pool-grow="4" pool-max="32" pool-min="4" 
> src="org.apache.cocoon.serialization.HTMLSerializer">
>       <buffer-size>1024</buffer-size>
>      <doctype-public>-//W3C//DTD HTML 4.01 
> Transitional//EN</doctype-public>
>     </map:serializer>
>
>
>
> shouldn't it be inserted by default in a default sitemap from the 
> cocoon installations? should we write this to the developers mailing 
> list?




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: inserting doctype from xsl

Posted by Alessio Sangalli <al...@manoweb.com>.
Jeremy Quinn wrote:

>
> On Saturday, Nov 16, 2002, at 19:10 Europe/London, Alessio Sangalli 
> wrote:
>
> > Perhaps it has already been discussed, but I didn't find any
> > reference  to this in the mail list archives.
>
>
> Set it up in the relevant serializer in the
> map:components/map:serializers section of your sitemap like this:

good I've set it up on the html serializer like this:


<map:serializer logger="sitemap.serializer.html" mime-type="text/html" 
name="html" pool-grow="4" pool-max="32" pool-min="4" 
src="org.apache.cocoon.serialization.HTMLSerializer">
       <buffer-size>1024</buffer-size>
      <doctype-public>-//W3C//DTD HTML 4.01 
Transitional//EN</doctype-public>
     </map:serializer>



shouldn't it be inserted by default in a default sitemap from the cocoon 
installations? should we write this to the developers mailing list?

bye
as





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: inserting doctype from xsl

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On Saturday, Nov 16, 2002, at 19:10 Europe/London, Alessio Sangalli  
wrote:

> Perhaps it has already been discussed, but I didn't find any reference  
> to this in the mail list archives.

Set it up in the relevant serializer in the  
map:components/map:serializers section of your sitemap like this:

    <map:serializer logger="sitemap.serializer.xhtml"  
mime-type="text/html" name="xhtml" pool-grow="2" pool-max="64"  
pool-min="2" src="org.apache.cocoon.serialization.XMLSerializer">
      <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
       
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</ 
doctype-system>
      <encoding>UTF-8</encoding>
    </map:serializer>

This is an example of setting up the xhtml serializer.

Now, when I have:

	<map:serialize type="xhtml"/>

at the end of my pipeline, my documents get that DOCTYPE.

hope this helps

regards Jeremy


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>