This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] getting rid of !DOCTYPE in chunks


> > Trying with these params:
> > 
> >    <xsl:param name="chunker.output.doctype-public" select="''"/>
> >    <xsl:param name="chunker.output.doctype-system" select="''"/>
> > 
> > I get a standard doctype (on one line):
> > 
> >   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> >    "http://www.w3.org/TR/html4/loose.dtd";>
> 
>   By default libxslt implementation of exslt:document fallback to
> a 4.0 version if there is no doctype defined:
> 
> ------------- libxslt/transform.c l 1979 ---------------------
>         if (xmlStrEqual(method, (const xmlChar *) "html")) {
>             ctxt->type = XSLT_OUTPUT_HTML;
>             if (((doctypePublic != NULL) || (doctypeSystem != NULL)))
>                 res = htmlNewDoc(doctypeSystem, doctypePublic);
>             else {
>                 if (version == NULL)
>                     version = (const xmlChar *) "4.0";
> #ifdef XSLT_GENERATE_HTML_DOCTYPE
>                 xsltGetHTMLIDs(version, &doctypePublic, &doctypeSystem);
> #endif
>                 res = htmlNewDoc(doctypeSystem, doctypePublic);
>             }
>             if (res == NULL)
>                 goto error;
>         } else
> ---------------------------------------------------------------
> 
>   This start to be at the limits of what's specified from what is not
> in the XSLT spec and is even more unspecified in EXSLT...

Ah, said news again :((

The exsl spec says:

| With the exception of the href attribute which is allowed only on
| exsl:document, the attributes on exsl:document are applied to a
| subsidiary result document in the same way that the attributes
| on xsl:output are applied to the main result document.

So it says it should work the same way as xsl:output.
But the XSL spec says nothing about what should be output,
when there is no doctype spec. It only details what should
a parser do in case there is some doctype spec.

I thought that to provide the most of the abilities, it
is logical that if you provide no doctype, then no doctype
is printed out. If you would like to get a HTML doctype,
you can always specify that, but if you want no doctype,
you cannot do that with the current implementation. So if
you would remove the default doctype from the implementation,
it would still be compatible with both XSLT and EXST, and
would provide more options for the style sheet author.

Otherwise I need to write a postprocessor ;)

Goba


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]