XSLT stylesheet does not have an XML mimetype

624 views
Skip to first unread message

Johannes

unread,
Nov 8, 2009, 11:24:07 PM11/8/09
to ReposStyle
Hey,

when I set up the xsl-File for my repository, I get the following
error:

XSLT stylesheet does not have an XML mimetype

What can I do about this? Do I have to update my apache2.conf?

Already tried to update /etc/mime.types with

text/xml xml xsl

this drives me nuts.

cheers
Johannes

Staffan

unread,
Nov 9, 2009, 2:07:39 PM11/9/09
to repos...@googlegroups.com

Very strange. I haven't seen this before. Is the message shown in the
browser? I'm not sure if Apache reads your /etc/mime.types. Apache's
mod_mime might have its own mapping file. Have you tried AddType? See
http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addtype

/Staffan

Johannes

unread,
Nov 11, 2009, 10:25:13 PM11/11/09
to ReposStyle
Some other people had this problem as well:

http://www.theerrormessage.com/2007/06/08/an-xslt-stylesheet-does-not-have-an-xml-mimetype/

but this did not fix my error.

i tried AddType text/xml xslt
and AddType text/xsl xslt, aswell

cheers


On Nov 10, 8:07 am, Staffan <sols...@gmail.com> wrote:

Staffan

unread,
Nov 12, 2009, 12:16:30 AM11/12/09
to repos...@googlegroups.com
On Thu, Nov 12, 2009 at 4:25 AM, Johannes <johannes...@gmail.com> wrote:
>
> Some other people had this problem as well:
>
> http://www.theerrormessage.com/2007/06/08/an-xslt-stylesheet-does-not-have-an-xml-mimetype/
>
> but this did not fix my error.
>
> i tried AddType text/xml xslt
> and AddType text/xsl xslt, aswell
>

Have you checked what the Content-Type header value is now? Is it set at all?

/Staffan

Johannes

unread,
Nov 12, 2009, 4:45:57 PM11/12/09
to ReposStyle
in my mod_mime i added:

AddType text/xsl xsl xslt

and it still says:

"Error loading stylesheet: An XSLT stylesheet does not have an XML
mimetype:"


page source says:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="repos-web/view/repos.xslt"?>
<!DOCTYPE svn [
<!ELEMENT svn (index)>
<!ATTLIST svn version CDATA #REQUIRED
href CDATA #REQUIRED>
<!ELEMENT index (updir?, (file | dir)*)>
<!ATTLIST index name CDATA #IMPLIED
path CDATA #IMPLIED
rev CDATA #IMPLIED
base CDATA #IMPLIED>
<!ELEMENT updir EMPTY>
<!ELEMENT file EMPTY>
<!ATTLIST file name CDATA #REQUIRED
href CDATA #REQUIRED>
<!ELEMENT dir EMPTY>

<!ATTLIST dir name CDATA #REQUIRED
href CDATA #REQUIRED>
]>
...

thanks for helping me!

cheers


On Nov 12, 6:16 pm, Staffan <sols...@gmail.com> wrote:
> On Thu, Nov 12, 2009 at 4:25 AM, Johannes <johannes.helm...@gmail.com> wrote:
>
> > Some other people had this problem as well:
>
> >http://www.theerrormessage.com/2007/06/08/an-xslt-stylesheet-does-not...

Johannes

unread,
Nov 12, 2009, 7:54:26 PM11/12/09
to ReposStyle
fixed!

solution was:

* apache2's >>mod_mime<< must be running

* ensure that this line is in /etc/apache2/mods-enabled/mime.conf
TypesConfig /etc/mime.types

* ensure that this line in /etc/mime.types
application/xml xml xls xslt

* add the following line after "SVNIndexXSLT "/repos-web/view/
repos.xslt" ":
ModMimeUsePathInfo on
(this interprets files according to their extension..)

* should work now...

when directly called reposURL/repos-web/view/repos.xslt and right
click/View Page Info gives you:
Type: application/xml
(before it was: "Type: text/plain")

cheers

Staffan

unread,
Nov 14, 2009, 3:12:03 AM11/14/09
to repos...@googlegroups.com
On Fri, Nov 13, 2009 at 1:54 AM, Johannes <johannes...@gmx.de> wrote:
>
> fixed!
>
> solution was:
>
> * apache2's >>mod_mime<< must be running
>
> * ensure that this line is in /etc/apache2/mods-enabled/mime.conf
> TypesConfig /etc/mime.types
>
> * ensure that this line in /etc/mime.types
> application/xml                                 xml xls xslt
>
> * add the following line after   "SVNIndexXSLT "/repos-web/view/
> repos.xslt" ":
> ModMimeUsePathInfo on
> (this interprets files according to their extension..)
>
> *  should work now...
>
> when directly called reposURL/repos-web/view/repos.xslt and right
> click/View Page Info gives you:
> Type: application/xml
> (before it was: "Type: text/plain")
>
> cheers
>

Great that you solved it. I've never seen the need for
ModMimeUsePathInfo before. The config in mime.conf is usually
sufficient.

The mime type you see in View Page Info is, now that the transform
works, the output type from the XSLT. To see the actual http headers
curl is a good tool: forr example "curl -I
http://localhost/repos-web/view/repos.xsl".

/Staffan

Johannes Helmuth

unread,
Nov 14, 2009, 6:16:11 PM11/14/09
to repos...@googlegroups.com
Staffan wrote:
> ModMimeUsePathInfo before. The config in mime.conf is usually
> sufficient.
>
> The mime type you see in View Page Info is, now that the transform
> works, the output type from the XSLT. To see the actual http headers
> curl is a good tool: forr example "curl -I
> http://localhost/repos-web/view/repos.xsl".
>
> /Staffan
>
>
Thanks man for the hint with curl (did not know that).

setting mime type in the repository via property svn:mime-type is also
possible...

cheers and *closed*
johannes

Bhagya Yadhav

unread,
May 31, 2013, 5:58:20 AM5/31/13
to repos...@googlegroups.com
Hello all,

An XSLT stylesheet does not have an XML mimetype: Is this a kind of security vulnerability?

Please describe in details if this is an web app security issue.

Thanks,
Bhagya
Reply all
Reply to author
Forward
0 new messages