Re: [xslt] <xsl:output media-type="some-other-mime-type" />



On Thu, Jul 18, 2002 at 12:46:24AM +0200, philipp@dunkel.org wrote:
> I have been looking at xslt.c specifically the function
> 
> void xsltParseStylesheetOutput(xsltStylesheetPtr style, xmlNodePtr cur)
> 
> and I have a question:
> Is there a specific reason that the media-type attribute is ignored/not
> treated?
> Since I use it/intend to use it a lot to server wap pages, it would be
> very nice to have.
> 
> If indeed this is just an oversight (and since this works for me it
> might be) why not add something like:
> 
> prop = xsltGetNsProp(cur, (const xmlChar *) "media-type",
> XSLT_NAMESPACE);
> if (prop != NULL) {
>   if (style->mediaType) xmlFree(style->mediaType);
>   style->mediaType = NULL;
>   style->mediaType = prop;
> }
> 
> somewhere around line 656 of xlst.c
> 
> Any feedback will be appreciated.

  Sensible, I did that, now the problem is that nowhere the code seems
to look at style->mediaType, and honnestly I don't remember how it's
supposed to be used in stylesheets ...

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]