Social forum

Style sheet warning

 
Picture of David Monllao
Style sheet warning
by David Monllao - Thursday, 21 June 2007, 9:31 AM
 
Hi,

We are testing autoview to include it into our moodle installation.With php version 4xx it works fine, but we upgraded to 5.2.1 and when we add a instance to a course we get a warning

Warning: XSLTProcessor::importStylesheet() [function.XSLTProcessor-importStylesheet]: compilation error: file /var/www/moodle/mod/autoview/avedit/avedit.xsl line 8 element output in /var/www/moodle/mod/autoview/lib.php on line 115

Warning: XSLTProcessor::importStylesheet() [function.XSLTProcessor-importStylesheet]: invalid value for method: xhtml in /var/www/moodle/mod/autoview/lib.php on line 115

Are we missing a module or something?
Picture of Tim Williams
Re: Style sheet warning
by Tim Williams - Thursday, 21 June 2007, 10:23 AM
 
I don't think so, i'll have a look at this on my PHP 5 test setup and see if the same thing happens with the latest version. Watch this space!
Picture of Tim Williams
Re: Style sheet warning
by Tim Williams - Thursday, 21 June 2007, 11:15 AM
 
Well i've just tested my current development version on php5 and i'm not seeing this error. This could be because i've done some more work on the module since the last public download was release and I have inadvertently fixed the problem you are seeing.

I've put up a new release version with my latest and greatest code. Can you try this out and see if you get the same problem ?
Picture of David Monllao
Re: Style sheet warning
by David Monllao - Thursday, 21 June 2007, 12:17 PM
 
Thanks for the speed of your reply!

I see the same warning, it can't load the style sheet.

I'm using the module in a 1.8 'virgin' installation and i have adapted the code to 1.6.4 (our explotation version) and happens the same

I paste my configuration:

PHP: Version 5.2.1

XSL:
XSL enabled
libxslt Version 1.1.20
libxslt compiled against libxml Version 2.6.27
EXSLT enabled
libexslt Version 1.1.20

Picture of Tim Williams
Re: Style sheet warning
by Tim Williams - Thursday, 21 June 2007, 1:18 PM
 
That's the same version i've got on my PHP 5 test setup. 1.8 should be OK, i've just upgraded our test server to 1.8 and it seems to work fine. The only thing i've not done is test this module with Moodle 1.8 on PHP 5, however since the error is coming from a part of the code which dosn't need to talk to the rest of Moodle, I can't quite see any way that this could cause the problem.

If you go to moodle/mod/autoview/test.php this page should test your PHP XSL support and check the installation for missing/inaccessible files. In the mean time I will do some thinking.
Picture of Tim Williams
Re: Style sheet warning
by Tim Williams - Thursday, 21 June 2007, 2:04 PM
 
I think I just found a possible problem which makes sense of this error message. Try going into the avedit/autoview.xsl and avedit/avedit.xsl files and find the following line :

<xsl:output method="xhtml"

Change the "xhtml" to "html" and see if this solves the problem. I was under the impression that xhtml was a valid output method, but i've just checked the reference and it says it isn't. Why you are getting an error and i'm not with the same PHP and xml/xsl library versions is a bit of a mystery. Anyway, i'm hoping that is the problem.

Let me know if the fixes the problem and i'll incorporate it back into the next release.
Picture of David Monllao
Re: Style sheet warning
by David Monllao - Thursday, 21 June 2007, 2:34 PM
 
Hi Tim,

My test.php says all is OK

PHP5 libxslt XSLTProcessor Found
 XSLTProcessor->importStyleSheet() OK
 XSLTProcessor->setParameter() OK
 XSLTProcessor->transformToXML() OK
 DOMDocument OK
 DOMDocument->load() OK



Picture of Tim Williams
Re: Style sheet warning
by Tim Williams - Thursday, 21 June 2007, 4:35 PM
 
I've been trying the styles sheets out with the command line xsltproc command and I can see the warning messages that you are getting (without the PHP added bits)

compilation error: file avedit.xsl line 8 element output
invalid value for method: xhtml


However, this warning does not prevent the processor from producing the correct HTML and is stopped by changing xhtml to html (as mentioned in my earlier message), so i'm mystified as to why this hasn't stopped the error for you.

I'm also not sure why you are seeing this warning on the page, my guess is that you have some kind of debugging option turned on on your server which causes warnings as well as errors to be passed through when processing XSL style sheets.
Picture of David Monllao
Re: Style sheet warning
by David Monllao - Friday, 22 June 2007, 9:14 AM
 
Sorry for my english, when i say 'without get any warning' i want to say that i don't see warnings but i think the style sheet doesn't load.

I work with display_errors on and error_reporting E_ALL & ~E_NOTICE

I paste an image, i think the lower frame must continue the format of the moodle theme, maybe it mustn't?

Picture of Tim Williams
Re: Style sheet warning
by Tim Williams - Friday, 22 June 2007, 10:41 AM
 
This looks correct to me. I think you have a working installation ! The AutoView module isn't currently picking up any Moodle themeing. I haven't worked that bit out yet. The entire AutoView system was written to work independently of Moodle and i'm currently working out how to integrate it with the moodle module without having to split the codebase and create incompatible versions.

If you want to change the colours to match have a look at the autoview/vresource/style.css file. This controls all the themeing. The plan at some point is to write a php script which can generate a suitable AutoView css file from the moodle theme.

If you haven't done so already, you'll also find the spanish translations for the main interface in /autoview/vresource/lang/es.js . The editor is capable of being similarly translated but this hasn't been done yet.

PS : Do I spy an Ubuntu desktop ? We have CentOS and Mandriva here so linux support is high on my list.
Picture of David Monllao
Re: Style sheet warning
by David Monllao - Friday, 22 June 2007, 1:18 PM
 
Ok, sorry then.

We want to use your module in our moodle installation (Universitat Rovira i Virgili, Tarragona, Spain) and we must integrate it with our moodle theme.

I attach the code for versions < 1.7 maybe someone need it


ñam ñam ñam linux...
Picture of Tim Williams
Re: Style sheet warning
by Tim Williams - Tuesday, 26 June 2007, 10:22 AM
 
Thought you might like to know, i've just finished writing a bit of script that should be able to pull themeing information from Moodle and apply it to AutoView Presentations on the fly.

Should be in the next release which i'll try to get packaged up in the next few days.
Picture of David Monllao
Re: Style sheet warning
by David Monllao - Tuesday, 26 June 2007, 11:39 AM
 

Good news! My firefox have a pretty autoview bookmark.

I had mistaken the file I sent last day...

This is the code with mysql.sql and without roles and contexts