Re: [xslt] Getting the media type
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] Getting the media type
- Date: Sun, 10 Jun 2001 04:30:09 -0400
On Sat, Jun 09, 2001 at 11:19:22PM +0100, Matt Sergeant wrote:
> On Sat, 9 Jun 2001, Daniel Veillard wrote:
>
> > > For now I solved it by setting the stylesheet's method to HTML when the
> > > resultset's DOM->type == XML_HTML_DOCUMENT_NODE in the call to
> > > $stylesheet->transform().
> >
> > Oh, of you are looking for the "method" then use the macro
> > const xmlChar *method;
> >
> > XSLT_GET_IMPORT_PTR(method, style, method)
>
> I'm looking for the method because if the media type wasn't set in the
> stylesheet, then if the method was "html" (either manually set, or by
> having the root element of the output document be <html>), then the media
> type defaults to "text/html".
>
> How does the above macro differ from doing method = style->method;
It applies the cascading, if the top stylesheet imports another one
etc ... the macro follows the cascading order until it finds the given
attribute with the higher priority. This merging w.r.t. importing
order is specified in the last paragraph of
http://www.w3.org/TR/xslt#output
E.g the top stylesheet may define the output encoding while one of the
embedded ones defines the output method.
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]