Posts

Showing posts with the label xml

Partial HTML5 support in IE8 without shims or javascript

Image
Today, I stumbled across something strange in IE8 where it was able to identify and render HTML5 elements like <section> and <article> without the use of the HTML5-shiv or even without having to use document.createElement() . I figured it had to do with an "xmlns" attributed which accidently landed up on one of the <section> tags in my html. To illustrate my point, I'll use variations of the following HTML: <!DOCTYPE html> <html>   <head>     <style>       .outer,.middle,.inner {         padding: 20px;       }       .outer {         border: 1px solid black;         background: lightblue;       }       .middle {         border: 1px solid red;         background: yellow;       }       .inner {         border...

Upgrading maven-jetty-plugin for Jetty 8 to use Servlet 3.0

When moving from Jetty 6 to Jetty 8, one of the biggest changes is the jump from Servlet version 2.5 to version 3.0. There is also a change in the JSP version which was 2.0 in Jetty 6.x while it is JSP 2.1 in Jetty 8.x. Keeping that in mind, the dependency for the servlet api needs to be configured to use Servlet 3.0 jars. This should have been sufficient if it wasn't for a change in "maven-jetty-plugin" also. Up to versions 6.x of the maven-jetty-plugin are available under the artifactId of "maven-jetty-plugin". So running, mvn jetty:run with the following in your pom.xml would be sufficient. <plugin>   <groupId>org.mortbay.jetty</groupId>   <artifactId>maven-jetty-plugin</artifactId> </plugin> But if you try to do that with Servlet 3.0, you would end up with a java.lang.ClassNotFoundException for javax.servlet.ServletRegistration$Dynamic.class This is because for jetty 7 and above, the artifactId for the plugin is "jet...

Moving a storage pool in Virt Manager/Qemu

Today, I had to move my storage pool in Qemu to some other partition due to low disk space on my root partition. I decided to move it to a directory in my /home partition (I'm used to allocating most of my disk space to the /home partition). First of all, we need to stop libvirtd. /sbin/service libvirtd stop Next, we should move the storage pool to the new location. By default the storage pool is located at /var/lib/libvirt/images . I choose to move it to the directory /home/ausmarton/vm . mv /var/lib/libvirt/images /home/ausmarton/vm Any storage pool that is configured, has an xml file created for itself in /etc/libvirt/storage . So, in our case, we just need to edit the file /etc/libvirt/storage/default.xml . Here, we need to edit the path element which comes under the target element. <path>/var/lib/libvirt/images</path> Now that line should look something like this: <path>/home/ausmarton/vm</path> I would like to point out that /etc/libvirt/storage/ a...

Class 'DOMDocument' not found error in Drupal 7

Thought of trying out Drupal 7 after a long time, as much as I had used Drupal 6, I was expecting Drupal 7 to work out of the box for a system which was previously running Drupal 6.I noticed that, for some reason, there were these error messages in my httpd logs: [Wed Jul 25 17:40:13 2012] [error] [client 127.0.0.1] PHP Fatal error:  Class 'DOMDocument' not found in /home/ausmarton/Public/website/drupal-7.7/modules/filter/filter.module on line 1041 Now, since I had worked quite a bit with version 6, I knew that all that needs to be done was this: yum install php-xml and /sbin/service httpd reload  And it did work! Well, so it looks like besides the usual php extensions like php-gd, php-mysql and others, Drupal 7 also needs php-xml to be able to work properly. EDIT: I've tried this with PHP 5.3.11 on Apache 2.2.21.