diff --git a/doc/doc.pri b/doc/doc.pri
new file mode 100644
index 0000000000000000000000000000000000000000..459e9baa3c15967a5ef0f86a40a0c46069610ee5
--- /dev/null
+++ b/doc/doc.pri
@@ -0,0 +1,14 @@
+OTHER_FILES += \
+                $$PWD/qt5.qdocconf \
+                $$PWD/qt5-dita.qdocconf
+
+docs_target.target = docs
+docs_target.commands = qdoc3 $$PWD/qt5.qdocconf
+
+ditadocs_target.target = ditadocs
+ditadocs_target.commands = qdoc3 $$PWD/qt5-dita.qdocconf
+
+QMAKE_EXTRA_TARGETS = docs_target ditadocs_target
+QMAKE_CLEAN += \
+               "-r $$PWD/html" \
+               "-r $$PWD/ditaxml"
diff --git a/doc/qt5-dita.qdocconf b/doc/qt5-dita.qdocconf
new file mode 100644
index 0000000000000000000000000000000000000000..d9703e10e03ddebb2ceee3e1296dea8797c61af9
--- /dev/null
+++ b/doc/qt5-dita.qdocconf
@@ -0,0 +1,22 @@
+# Name of the project.
+project = projectname
+
+# Directories in which to search for files to document and images.
+# By default set to the root directory of the project for sources
+# and headers and qdoc will therefore generate output for each file.
+# Images should be placed in <rootdir>/dic/images and examples in
+# <rootdir>/examples.
+# Paths are relative to the  location of this file.
+exampledirs += .
+headerdirs += ..
+sourcedirs += ..
+
+
+
+#Do not change the variables after this line unless you know what you are doing.
+
+outputdir = ditaxml
+outputformats = DITAXML
+
+sources.fileextensions = "*.cpp *.qdoc *.mm *.qml"
+headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx"
diff --git a/doc/qt5.qdocconf b/doc/qt5.qdocconf
new file mode 100644
index 0000000000000000000000000000000000000000..bd0fd6730bc9b688b3c26a1d9b23903e0b0ed5e3
--- /dev/null
+++ b/doc/qt5.qdocconf
@@ -0,0 +1,67 @@
+# Name of the project.
+project = Qt Xml Patterns
+
+# Directories in which to search for files to document and images.
+# By default set to the root directory of the project for sources
+# and headers and qdoc will therefore generate output for each file.
+# Images should be placed in <rootdir>/dic/images and examples in
+# <rootdir>/examples.
+# Paths are relative to the  location of this file.
+exampledirs += ../doc/src
+headerdirs += ..
+imagedirs += images
+sourcedirs += ..
+
+# The following parameters are for creating a qhp file, the qhelpgenerator
+# program can convert the qhp file into a qch file which can be opened in
+# Qt Assistant and/or Qt Creator.
+
+# Defines the name of the project. You cannot use operators (+, =, -) in
+# the name. Properties for this project are set using a qhp.<projectname>.property
+# format.
+qhp.projects = qtxmlpatterns
+
+# Sets the name of the output qhp file.
+qhp.qtxmlpatterns.file = projectname.qhp
+
+# Namespace for the output file. This namespace is used to distinguish between
+# different documentation files in Creator/Assistant.
+qhp.qtxmlpatterns.namespace = com.nokia.mp.projectname.100
+
+# Title for the package, will be the main title for the package in
+# Assistant/Creator.
+qhp.qtxmlpatterns.indexTitle = Qt XMLPatterns Documentation
+
+# Extra files to add to the output which are not linked to from anywhere
+# using a qdoc \l command.
+qhp.qtxmlpatterns.extraFiles = style/style.css \
+                                     index.html
+
+# Only updtae the name of the project for the next variables.
+qhp.qtxmlpatterns.virtualFolder  = qdoc
+qhp.qtxmlpatterns.subprojects = classes
+qhp.qtxmlpatterns.subprojects.classes.title = Classes
+qhp.qtxmlpatterns.subprojects.classes.selectors = class fake:headerfile
+qhp.qtxmlpatterns.subprojects.classes.sortPages = true
+
+
+
+# Do NOT change the variables after this line unless you know what you are doing.
+
+outputdir = html
+outputformats = HTML
+
+examples.fileextensions = "*.cpp *.h *.js *.svg *.xml *.ui *.qml"
+examples.imageextensions = "*.png *.jpeg *.jpg *.gif *.mng"
+headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx"
+sources.fileextensions = "*.cpp *.qdoc *.mm *.qml"
+
+HTML.nobreadcrumbs = "true"
+
+HTML.templatedir = .
+HTML.stylesheets = style/style.css
+
+HTML.headerstyles = "  <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n"
+HTML.endheader = "</head>\n<body>\n"
+
+HTML.footer = "<div class=\"footer\">Copyright (c) 2011 Nokia Corporation and/or its subsidiaries. All rights reserved.</div>\n"
diff --git a/doc/style/style.css b/doc/style/style.css
new file mode 100644
index 0000000000000000000000000000000000000000..df84049f12a08d68086728ae454e72ba6ecd75da
--- /dev/null
+++ b/doc/style/style.css
@@ -0,0 +1,137 @@
+a:link, a:visited {
+    color: #00732F;
+    text-decoration: none;
+    font-weight: bold;
+}
+
+body {
+    font: normal 400 14px/1.2 Arial;
+    margin-top: 85px;
+}
+
+h1 {
+    margin: 0;
+}
+
+h2 {
+    font: 500 20px/1.2 Arial;
+}
+
+h3.fn, span.fn {
+    -moz-border-radius: 7px 7px 7px 7px;
+    -webkit-border-radius: 7px 7px 7px 7px;
+    border-radius: 7px 7px 7px 7px;
+    background-color: #F6F6F6;
+    border-width: 1px;
+    border-style: solid;
+    border-color: #E6E6E6;
+    word-spacing: 3px;
+    padding: 3px 5px;
+}
+
+table, pre {
+    -moz-border-radius: 7px 7px 7px 7px;
+    -webkit-border-radius: 7px 7px 7px 7px;
+    border-radius: 7px 7px 7px 7px;
+    background-color: #F6F6F6;
+    border: 1px solid #E6E6E6;
+    border-collapse: separate;
+    font-size: 12px;
+    line-height: 1.2;
+    margin-bottom: 25px;
+    margin-left: 15px;
+}
+
+table td {
+    padding: 3px 15px 3px 20px;
+}
+
+table tr.even {
+    background-color: white;
+    color: #66666E;
+}
+
+table tr.odd {
+    background-color: #F6F6F6;
+    color: #66666E;
+}
+
+li {
+    margin-bottom: 10px;
+    padding-left: 12px;
+}
+
+.cpp {
+    display: block;
+    margin: 10;
+    overflow: hidden;
+    overflow-x: hidden;
+    overflow-y: hidden;
+    padding: 20px 0 20px 0;
+}
+
+.footer {
+    margin-top: 50px;
+}
+
+.memItemLeft {
+    padding-right: 3px;
+}
+
+.memItemRight {
+    padding: 3px 15px 3px 0;
+}
+
+.qml {
+    display: block;
+    margin: 10;
+    overflow: hidden;
+    overflow-x: hidden;
+    overflow-y: hidden;
+    padding: 20px 0 20px 0;
+}
+
+.qmldefault {
+    padding-left: 5px;
+    float: right;
+    color: red;
+}
+
+.qmlreadonly {
+    padding-left: 5px;
+    float: right;
+    color: #254117;
+}
+
+.rightAlign {
+    padding: 3px 5px 3px 10px;
+    text-align: right;
+}
+
+.title {
+    background-color: white;
+    color: #44A51C;
+    font-family: Verdana;
+    font-size: 35px;
+    font-weight: normal;
+    left: 0;
+    padding-bottom: 5px;
+    padding-left: 16px;
+    padding-top: 20px;
+    position: absolute;
+    right: 0;
+    top: 0;
+}
+
+.toc {
+    float: right;
+    -moz-border-radius: 7px 7px 7px 7px;
+    -webkit-border-radius: 7px 7px 7px 7px;
+    border-radius: 7px 7px 7px 7px;
+    background-color: #F6F6F6;
+    border: 1px solid #DDD;
+    margin: 0 20px 10px 10px;
+    padding: 20px 15px 20px 20px;
+    height: auto;
+    width: 200px;
+}
diff --git a/qtxmlpatterns.pro b/qtxmlpatterns.pro
index f3bd6fecae3f0e0c7d68c596ca2b8d48b3b8b5b3..effac282f29a29bc2f27a12b1e15eea4ab761c65 100644
--- a/qtxmlpatterns.pro
+++ b/qtxmlpatterns.pro
@@ -21,3 +21,5 @@ SUBDIRS += module_qtxmlpatterns_src \
            module_qtxmlpatterns_tools \
            module_qtxmlpatterns_examples \
            module_qtxmlpatterns_tests \
+
+include (doc/doc.pri)