Snapshot af729d01433bb5bbd6ca93c0fdf9778b36d624ce from master branch of git://git.jetbrains.org/idea/community.git

Change-Id: I214dd066d0d27444a26166c0eae1a5aaf3705d49
diff --git a/xml/tests/src/com/intellij/codeInsight/XmlDocumentationTest.java b/xml/tests/src/com/intellij/codeInsight/XmlDocumentationTest.java
new file mode 100644
index 0000000..319d394
--- /dev/null
+++ b/xml/tests/src/com/intellij/codeInsight/XmlDocumentationTest.java
@@ -0,0 +1,174 @@
+package com.intellij.codeInsight;
+
+import com.intellij.codeInsight.daemon.DaemonAnalyzerTestCase;
+import com.intellij.codeInsight.documentation.DocumentationManager;
+import com.intellij.lang.documentation.DocumentationProvider;
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.openapi.vfs.LocalFileSystem;
+import com.intellij.openapi.vfs.VfsUtilCore;
+import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.psi.PsiDocumentManager;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
+import com.intellij.testFramework.PlatformTestUtil;
+import org.jetbrains.annotations.Nullable;
+
+import java.io.File;
+
+/**
+ * @by maxim
+ */
+@SuppressWarnings("ConstantConditions")
+public class XmlDocumentationTest extends DaemonAnalyzerTestCase {
+
+  public void testXmlDoc() throws Exception {
+    doOneTest("1.xml", "display-name", false, "web-app_2_3.dtd");
+    doOneTest("2.xml", null, false, "web-app_2_4.xsd");
+    doOneTest("3.xml", null, false, "web-app_2_4.xsd", "j2ee_1_4.xsd");
+    doOneTest("3_2.xml", null, false, "web-app_2_4.xsd", "j2ee_1_4.xsd");
+    doOneTest("3_3.xml", null, false, "web-app_2_4.xsd", "j2ee_1_4.xsd");
+
+    doOneTest("4.xml", "context-param", false, false, "web-app_2_4.xsd");
+    doOneTest("5.xml", "aaa:context-param", false, false, "web-app_2_4.xsd");
+    doOneTest("6.xsd", "xs:complexType", true, true);
+    doOneTest("7.xml", "bbb", false);
+    doOneTest("8.xml", "bbb", false);
+    doOneTest("9.xml", "laquo", false);
+  }
+
+  public void testXmlDocWithCData() throws Exception {
+    doQuickDocGenerationTestWithCheckExpectedResult(getTestName(false) + ".xml","spring-beans.xsd");
+    doQuickDocGenerationTestWithCheckExpectedResult(getTestName(false) + "2.xml","spring-beans.xsd");
+  }
+
+  public void testXmlDoc2() throws Exception {
+    doQuickDocGenerationTestWithCheckExpectedResult(getTestName(false) + ".xml", "web-app_2_4.xsd");
+  }
+
+  public void testXmlDoc3() throws Exception {
+    doQuickDocGenerationTestWithCheckExpectedResult(getTestName(false) + ".xml", "hibernate-mapping-3.0.dtd");
+  }
+
+  public void testXmlDoc4() throws Exception {
+    final String testName = getTestName(false);
+    doQuickDocGenerationTestWithCheckExpectedResult(testName + ".xml", testName + ".xsd");
+  }
+
+  public void testSchemaPrefix() throws Exception {
+    DocumentationTestContext context = new DocumentationTestContext("SchemaPrefix.xml");
+    assertEquals("XML Namespace Prefix \"xs\" (http://www.w3.org/2001/XMLSchema)", context.getQuickNavigateInfo());
+  }
+
+  public void testXmlDoc6() throws Exception {
+    final String testName = getTestName(false);
+    doQuickDocGenerationTestWithCheckExpectedResult((Object)"car",testName + ".xml", testName + ".xsd");
+  }
+
+  public void testXmlDoc7() throws Exception {
+    final String testName = getTestName(false);
+    doQuickDocGenerationTestWithCheckExpectedResult((Object)"$Paste",testName + ".xml", testName + ".xsd");
+  }
+
+  private void doQuickDocGenerationTestWithCheckExpectedResult(final String... baseFileNames) throws Exception {
+    doQuickDocGenerationTestWithCheckExpectedResult(null, baseFileNames);
+  }
+
+  private void doQuickDocGenerationTestWithCheckExpectedResult(Object completionVariant, final String... baseFileNames) throws Exception {
+    final DocumentationTestContext context = new DocumentationTestContext(baseFileNames);
+    String pathname = getTestDataPath() + baseFileNames[0] + ".expected.html";
+    VirtualFile vfile = LocalFileSystem.getInstance().findFileByIoFile(new File(pathname));
+    assertNotNull(pathname + " not found", vfile);
+    String expectedText = StringUtil.convertLineSeparators(VfsUtilCore.loadText(vfile));
+    assertEquals(expectedText, StringUtil.convertLineSeparators(context.generateDoc()));
+
+    if (completionVariant != null) {
+      vfile = LocalFileSystem.getInstance().findFileByIoFile(new File(getTestDataPath() +baseFileNames[0] + ".expected.completion.html"));
+      expectedText = StringUtil.convertLineSeparators(VfsUtilCore.loadText(vfile), "\n");
+      assertEquals(expectedText, StringUtil.convertLineSeparators(context.generateDocForCompletion(completionVariant), "\n"));
+    }
+  }
+
+  public void testDtdDoc() throws Exception {
+    doOneTest("dtd.dtd", "foo", false, true, "web-app_2_4.xsd");
+    doOneTest("dtd.xml", "foo", false, true, "web-app_2_4.xsd");
+  }
+
+  private void doOneTest(String fileName, String lookupObject, boolean testExternal, String... additional) throws Exception {
+    configureByFiles(null, additional);
+    doOneTest(fileName, lookupObject, testExternal, true, "web-app_2_4.xsd");
+  }
+
+  @SuppressWarnings("ConstantConditions")
+  public class DocumentationTestContext {
+    final DocumentationProvider documentationProvider;
+    final PsiElement originalElement;
+    PsiElement element;
+    final PsiFile psiFile;
+
+    DocumentationTestContext(String... fileNames) throws Exception {
+      configureByFiles(null,fileNames);
+      psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(myEditor.getDocument());
+      originalElement = psiFile.findElementAt(myEditor.getCaretModel().getOffset());
+      element = DocumentationManager.getInstance(myProject).findTargetElement(myEditor, myFile, originalElement);
+
+      if (element == null) {
+        element = originalElement;
+      }
+
+      documentationProvider = DocumentationManager.getProviderFromElement(element);
+    }
+
+    @Nullable
+    String generateDoc() {
+      return documentationProvider.generateDoc(element, originalElement);
+    }
+
+    @Nullable
+    String getQuickNavigateInfo() {
+      return documentationProvider.getQuickNavigateInfo(element, originalElement);
+    }
+
+    @Nullable
+    public String generateDocForCompletion(Object completionVariant) {
+      PsiElement lookupItem = documentationProvider.getDocumentationElementForLookupItem(myPsiManager, completionVariant, originalElement);
+      assert lookupItem != null;
+      return documentationProvider.generateDoc(lookupItem, originalElement);
+    }
+  }
+
+  private void doOneTest(String fileName, String lookupObject, boolean testExternal, boolean testForElementUnderCaret, String... additional) throws Exception {
+
+    configureByFiles(null, additional);
+    final DocumentationTestContext context = new DocumentationTestContext(fileName);
+
+    if (testForElementUnderCaret) {
+      assertNotNull( "inline help for " + fileName, context.generateDoc() );
+      if (testExternal) {
+        assertNotNull( "external help", context.documentationProvider.getUrlFor(context.element, context.originalElement) );
+      }
+    }
+
+    if(lookupObject!=null) {
+      PsiElement docElement = context.documentationProvider.getDocumentationElementForLookupItem(
+        context.psiFile.getManager(), lookupObject,context.originalElement);
+      assertNotNull("no element for " + fileName, docElement);
+      assertNotNull( "inline help for lookup", context.documentationProvider.generateDoc(docElement, context.originalElement) );
+      if (testExternal) {
+        assertNotNull( "external help for lookup", context.documentationProvider.getUrlFor(docElement, context.originalElement) );
+      }
+    }
+  }
+
+  public void testScopeAttribute() throws Exception {
+    doQuickDocGenerationTestWithCheckExpectedResult(getTestName(false) + ".xml","spring-beans.xsd");
+  }
+
+  public void testXslCompletion() throws Exception {
+    doQuickDocGenerationTestWithCheckExpectedResult((Object)"apply-imports", "xslCompletion.xsl");
+  }
+
+  @Override
+  protected String getTestDataPath() {
+    return PlatformTestUtil.getCommunityPath() + "/xml/tests/testData/documentation/";
+  }
+}
\ No newline at end of file
diff --git a/xml/tests/src/com/intellij/codeInsight/XmlParsingTest.java b/xml/tests/src/com/intellij/codeInsight/XmlParsingTest.java
index da3254a..ebcacc5 100644
--- a/xml/tests/src/com/intellij/codeInsight/XmlParsingTest.java
+++ b/xml/tests/src/com/intellij/codeInsight/XmlParsingTest.java
@@ -670,6 +670,15 @@
     doTest("<script type=\"application/custom\">Custom Script</script>", "test.html");
   }
 
+  public void testKeywordsAsName() throws Exception {
+    doTestDtd("<!ELEMENT FIELD ANY>\n" +
+              "<!ELEMENT PUBLIC ANY>\n" +
+              "<!ELEMENT EMPTY ANY>\n" +
+              "<!ELEMENT ANY ANY>\n" +
+              "<!ELEMENT AND (FIELD|PUBLIC|EMPTY|ANY)*>");
+
+  }
+
   static class MyLanguage extends Language implements InjectableLanguage {
     protected MyLanguage() {
       super("MyLanguage", "application/custom");
diff --git a/xml/tests/src/com/intellij/codeInsight/completion/XmlCompletionTest.java b/xml/tests/src/com/intellij/codeInsight/completion/XmlCompletionTest.java
index 574942b..e860123 100644
--- a/xml/tests/src/com/intellij/codeInsight/completion/XmlCompletionTest.java
+++ b/xml/tests/src/com/intellij/codeInsight/completion/XmlCompletionTest.java
@@ -646,5 +646,23 @@
     assertEquals("src", strings.get(1));
     assertEquals("align", strings.get(2));
   }
+
+  public void testDoNotProcessAnyInRestrictions() throws Exception {
+    myFixture.configureByText("foo.xsd", "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n" +
+                                         "    <<caret>\n" +
+                                         "</xs:schema>");
+    myFixture.completeBasic();
+    assertSameElements(myFixture.getLookupElementStrings(), "xs:annotation",
+                                                            "xs:attribute",
+                                                            "xs:attributeGroup",
+                                                            "xs:complexType",
+                                                            "xs:element",
+                                                            "xs:group",
+                                                            "xs:import",
+                                                            "xs:include",
+                                                            "xs:notation",
+                                                            "xs:redefine",
+                                                            "xs:simpleType");
+  }
 }
 
diff --git a/xml/tests/src/com/intellij/codeInsight/daemon/XmlHighlightingTest.java b/xml/tests/src/com/intellij/codeInsight/daemon/XmlHighlightingTest.java
index 476e91b..51e0ff2 100644
--- a/xml/tests/src/com/intellij/codeInsight/daemon/XmlHighlightingTest.java
+++ b/xml/tests/src/com/intellij/codeInsight/daemon/XmlHighlightingTest.java
@@ -1992,6 +1992,11 @@
     doTest(getFullRelativeTestName(".html"), true, true);
   }
 
+  public void testAnyAttribute() throws Exception {
+    configureByFiles(null, BASE_PATH + "anyAttribute.xml", BASE_PATH + "services-1.0.xsd");
+    doDoTest(true, false);
+  }
+
   @Override
   protected void setUp() throws Exception {
     super.setUp();
diff --git a/xml/tests/src/com/intellij/codeInsight/template/XmlLiveTemplateTest.groovy b/xml/tests/src/com/intellij/codeInsight/template/XmlLiveTemplateTest.groovy
index c928a92..db73bb1 100644
--- a/xml/tests/src/com/intellij/codeInsight/template/XmlLiveTemplateTest.groovy
+++ b/xml/tests/src/com/intellij/codeInsight/template/XmlLiveTemplateTest.groovy
@@ -52,5 +52,13 @@
     manager.startTemplate(myFixture.getEditor(), template);
     myFixture.checkResult '<tag><selection><</selection><caret></tag>'
   }
+
+  public void "test insert CDATA by CD and tab"() {
+    myFixture.configureByText 'a.xml', '<tag><caret></tag>'
+    myFixture.type('CD\t')
+    myFixture.checkResult '''<tag><![CDATA[
+
+]]></tag>'''
+  }
   
 }
diff --git a/xml/tests/src/com/intellij/xml/XmlNamespacesTest.java b/xml/tests/src/com/intellij/xml/XmlNamespacesTest.java
index 03d221c..e457bdc1 100644
--- a/xml/tests/src/com/intellij/xml/XmlNamespacesTest.java
+++ b/xml/tests/src/com/intellij/xml/XmlNamespacesTest.java
@@ -4,7 +4,7 @@
 import com.intellij.codeInsight.daemon.impl.analysis.XmlUnusedNamespaceInspection;
 import com.intellij.codeInsight.intention.IntentionAction;
 import com.intellij.codeInspection.htmlInspections.XmlInspectionToolProvider;
-import com.intellij.javaee.ExternalResourceManagerImpl;
+import com.intellij.javaee.ExternalResourceManagerExImpl;
 import com.intellij.openapi.application.Result;
 import com.intellij.openapi.command.WriteCommandAction;
 import com.intellij.testFramework.IdeaTestCase;
@@ -208,6 +208,14 @@
     doOptimizeImportsTest(text);
   }
 
+  public void testUsedInXmlns() throws Exception {
+    myFixture.testHighlighting("spring.xml", "spring-beans-2.5.xsd", "spring-batch-2.1.xsd");
+    IntentionAction action = myFixture.getAvailableIntention(XmlUnusedNamespaceInspection.RemoveNamespaceDeclarationFix.NAME);
+    assertNotNull(action);
+    myFixture.launchAction(action);
+    myFixture.checkResultByFile("spring_after.xml");
+  }
+
   private void doUnusedDeclarationTest(String text, String after, String name) throws Exception {
     doUnusedDeclarationTest(text, after, name, true);
   }
@@ -241,12 +249,12 @@
   protected void setUp() throws Exception {
     super.setUp();
     myFixture.enableInspections(new XmlInspectionToolProvider());
-    ExternalResourceManagerImpl.registerResourceTemporarily("http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd",
-                                                            getTestDataPath() + "/web-app_2_5.xsd", getTestRootDisposable());
-    ExternalResourceManagerImpl.registerResourceTemporarily("http://xml.apache.org/axis/wsdd/",
-                                                            getTestDataPath() + "/wsdd.dtd", getTestRootDisposable());
-    ExternalResourceManagerImpl.registerResourceTemporarily("http://xml.apache.org/axis/wsdd/providers/java",
-                                                            getTestDataPath() + "/wsdd_provider_java.xsd", getTestRootDisposable());
+    ExternalResourceManagerExImpl.registerResourceTemporarily("http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd",
+                                                              getTestDataPath() + "/web-app_2_5.xsd", getTestRootDisposable());
+    ExternalResourceManagerExImpl.registerResourceTemporarily("http://xml.apache.org/axis/wsdd/",
+                                                              getTestDataPath() + "/wsdd.dtd", getTestRootDisposable());
+    ExternalResourceManagerExImpl.registerResourceTemporarily("http://xml.apache.org/axis/wsdd/providers/java",
+                                                              getTestDataPath() + "/wsdd_provider_java.xsd", getTestRootDisposable());
   }
 
   @Override
diff --git a/xml/tests/testData/documentation/1.xml b/xml/tests/testData/documentation/1.xml
new file mode 100644
index 0000000..40e4977
--- /dev/null
+++ b/xml/tests/testData/documentation/1.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "web-app_2_3.dtd">
+
+<we<caret>b-app>
+</web-app>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/2.xml b/xml/tests/testData/documentation/2.xml
new file mode 100644
index 0000000..e937206
--- /dev/null
+++ b/xml/tests/testData/documentation/2.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<web-a<caret>pp xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
+    version="2.4">
+</web-app>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/3.xml b/xml/tests/testData/documentation/3.xml
new file mode 100644
index 0000000..a537c46
--- /dev/null
+++ b/xml/tests/testData/documentation/3.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
+    version="2.4">
+  <ejb-ref></ejb-ref>
+</web-app>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/3_2.xml b/xml/tests/testData/documentation/3_2.xml
new file mode 100644
index 0000000..0645e72
--- /dev/null
+++ b/xml/tests/testData/documentation/3_2.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
+    version="2.4">
+  <ejb-ref>  </ejb-ref>
+</web-app>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/3_3.xml b/xml/tests/testData/documentation/3_3.xml
new file mode 100644
index 0000000..22a1ccb
--- /dev/null
+++ b/xml/tests/testData/documentation/3_3.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
+    version="2.4">
+  <ejb-ref > </ejb-ref>
+</web-app>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/4.xml b/xml/tests/testData/documentation/4.xml
new file mode 100644
index 0000000..62d4d03
--- /dev/null
+++ b/xml/tests/testData/documentation/4.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
+    version="2.4">
+  <<caret>ejb-ref></ejb-ref>
+</web-app>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/5.xml b/xml/tests/testData/documentation/5.xml
new file mode 100644
index 0000000..85938d5
--- /dev/null
+++ b/xml/tests/testData/documentation/5.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<aaa:web-app xmlns:aaa="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
+    version="2.4">
+  <<caret>
+</aaa:web-app>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/6.xsd b/xml/tests/testData/documentation/6.xsd
new file mode 100644
index 0000000..9234c16
--- /dev/null
+++ b/xml/tests/testData/documentation/6.xsd
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:schemas-dig-de:test2">
+    <xs:in<caret>clude schemaLocation="XsiSchemaLocation3.xsd"/>
+</xs:schema>
diff --git a/xml/tests/testData/documentation/7.xml b/xml/tests/testData/documentation/7.xml
new file mode 100644
index 0000000..56129c9
--- /dev/null
+++ b/xml/tests/testData/documentation/7.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE aaa [
+  <!ELEMENT aaa (#PCDATA)>
+  <!ATTLIST aaa
+    bbb CDATA #REQUIRED> <!-- this is the class name -->
+  ]>
+<aaa b<caret>bb="ccc"/>
diff --git a/xml/tests/testData/documentation/8.xml b/xml/tests/testData/documentation/8.xml
new file mode 100644
index 0000000..05b075c
--- /dev/null
+++ b/xml/tests/testData/documentation/8.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE aaa [
+  <!ELEMENT aaa (#PCDATA)>
+  <!-- this is the class name -->
+  <!ATTLIST aaa
+    bbb CDATA #REQUIRED>
+  ]>
+<aaa b<caret>bb="ccc"/>
diff --git a/xml/tests/testData/documentation/9.xml b/xml/tests/testData/documentation/9.xml
new file mode 100644
index 0000000..8a83797
--- /dev/null
+++ b/xml/tests/testData/documentation/9.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE aaa [
+  <!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark
+                                  = left pointing guillemet, U+00AB ISOnum -->
+  ]>
+<aaa bbb="c&la<caret>quo;cc"/>
diff --git a/xml/tests/testData/documentation/SchemaPrefix.xml b/xml/tests/testData/documentation/SchemaPrefix.xml
new file mode 100644
index 0000000..9929db0
--- /dev/null
+++ b/xml/tests/testData/documentation/SchemaPrefix.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://mySchema"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:my="http://mySchema">
+
+    <xs:element name="myElement" type="my:TYPE"/>
+    <xs:simpleType name="TYPE" id="TYPE">
+        <xs:restriction base="xs:integer">
+            <xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="T" id="T">
+        <xs:restriction base="xs:integer">
+            <xs:minInclusive value="0" id="id"/>
+        </xs:restriction>
+    </xs:simpleType>
+</x<caret>s:schema>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/ScopeAttribute.xml b/xml/tests/testData/documentation/ScopeAttribute.xml
new file mode 100644
index 0000000..f23c6b0
--- /dev/null
+++ b/xml/tests/testData/documentation/ScopeAttribute.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean id="s" class="java.lang.String" sco<caret>pe=""/>
+</beans>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/ScopeAttribute.xml.expected.html b/xml/tests/testData/documentation/ScopeAttribute.xml.expected.html
new file mode 100644
index 0000000..1e7166f
--- /dev/null
+++ b/xml/tests/testData/documentation/ScopeAttribute.xml.expected.html
@@ -0,0 +1,17 @@
+Tag name:&nbsp;<b>scope</b><br>Description  :&nbsp;The scope of this bean: typically &quot;singleton&quot; (one shared instance,<br>
+	which will be returned by all calls to getBean() with the id),<br>
+	or &quot;prototype&quot; (independent instance resulting from each call to<br>
+	getBean(). Default is &quot;singleton&quot;.<br>
+<br>
+	Singletons are most commonly used, and are ideal for multi-threaded<br>
+	service objects. Further scopes, such as &quot;request&quot; or &quot;session&quot;,<br>
+	might be supported by extended bean factories (for example, in a<br>
+	web environment).<br>
+<br>
+	Note: This attribute will not be inherited by child bean definitions.<br>
+	Hence, it needs to be specified per concrete bean definition.<br>
+<br>
+	Inner bean definitions inherit the singleton status of their containing<br>
+	bean definition, unless explicitly specified: The inner bean will be a<br>
+	singleton if the containing bean is a singleton, and a prototype if<br>
+	the containing bean has any other scope.
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc2.xml b/xml/tests/testData/documentation/XmlDoc2.xml
new file mode 100644
index 0000000..efcb0dc
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc2.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4"
+    xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd">
+    <servlet-mapping>
+        <caret><servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.seam</url-pattern>
+    </servlet-mapping>
+
+</web-app>
diff --git a/xml/tests/testData/documentation/XmlDoc2.xml.expected.html b/xml/tests/testData/documentation/XmlDoc2.xml.expected.html
new file mode 100644
index 0000000..a627f0f
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc2.xml.expected.html
@@ -0,0 +1,3 @@
+Complex type:&nbsp;<b>servlet-nameType</b><br>Description  :&nbsp;The servlet-name element contains the canonical name of the
+	servlet. Each servlet name is unique within the web
+	application.
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc3.xml b/xml/tests/testData/documentation/XmlDoc3.xml
new file mode 100644
index 0000000..004d366
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc3.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "hibernate-mapping-3.0.dtd">
+<hibernate-mapping package="auction">
+
+  <class name="Bid" discriminator-value="N">
+    <sub<caret>class/>
+  </class>
+
+</hibernate-mapping>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc3.xml.expected.html b/xml/tests/testData/documentation/XmlDoc3.xml.expected.html
new file mode 100644
index 0000000..24d43f9
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc3.xml.expected.html
@@ -0,0 +1,4 @@
+Tag name:&nbsp;<b>subclass</b><br>Description  :&nbsp;Subclass declarations are nested beneath the root class declaration to achieve<br>
+	polymorphic persistence with the table-per-hierarchy mapping strategy.<br>
+<br>
+	See the note on the class element regarding &lt;pojo/&gt; vs. @name usage...
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc4.xml b/xml/tests/testData/documentation/XmlDoc4.xml
new file mode 100644
index 0000000..5b13d87
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc4.xml
@@ -0,0 +1 @@
+<test att<caret>ribute="aaa" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="XmlDoc4.xsd"/>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc4.xml.expected.html b/xml/tests/testData/documentation/XmlDoc4.xml.expected.html
new file mode 100644
index 0000000..3d80f11
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc4.xml.expected.html
@@ -0,0 +1 @@
+Complex type:&nbsp;<b>myRefType</b><br>Description  :&nbsp;Hello, world!
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc4.xsd b/xml/tests/testData/documentation/XmlDoc4.xsd
new file mode 100644
index 0000000..6e075d9
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc4.xsd
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  <xs:element name="test" type="testType"/>
+  <xs:complexType name="testType">
+    <xs:simpleContent>
+      <xs:extension base="xs:string">
+        <xs:attribute type="myRefType" name="attribute"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:simpleType name="myRefType">
+  <xs:annotation>
+    <xs:documentation>
+      Hello, world!
+    </xs:documentation>
+  </xs:annotation>
+  <xs:union memberTypes="xs:string"/>
+</xs:simpleType>
+</xs:schema>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc5.xml b/xml/tests/testData/documentation/XmlDoc5.xml
new file mode 100644
index 0000000..4303cef
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc5.xml
@@ -0,0 +1,3 @@
+<pro<caret>ject xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 maven-4.0.0.xsd">
+</project>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc5.xml.expected.html b/xml/tests/testData/documentation/XmlDoc5.xml.expected.html
new file mode 100644
index 0000000..f2f8cd6
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc5.xml.expected.html
@@ -0,0 +1,2 @@
+Tag name:&nbsp;<b>project</b><br>Description  :&nbsp;The &lt;code&gt;&amp;lt;project&amp;gt;&lt;/code&gt; element is the root of the descriptor.
+         The following table lists all of the possible child elements.<br>Version  :&nbsp;3.0.0+
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc6.xml b/xml/tests/testData/documentation/XmlDoc6.xml
new file mode 100644
index 0000000..c9515d1
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc6.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xmlns="http://test.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://test.com XmlDoc6.xsd">
+
+   <foo value="b<caret>ar"/>
+</root>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc6.xml.expected.completion.html b/xml/tests/testData/documentation/XmlDoc6.xml.expected.completion.html
new file mode 100644
index 0000000..d0211d4
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc6.xml.expected.completion.html
@@ -0,0 +1 @@
+Enumeration value:&nbsp;<b>car</b><br>Description  :&nbsp;A vehicle to get you from A to B
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc6.xml.expected.html b/xml/tests/testData/documentation/XmlDoc6.xml.expected.html
new file mode 100644
index 0000000..87aeb0d9
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc6.xml.expected.html
@@ -0,0 +1 @@
+Enumeration value:&nbsp;<b>bar</b><br>Description  :&nbsp;A great place to get a drink
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc6.xsd b/xml/tests/testData/documentation/XmlDoc6.xsd
new file mode 100644
index 0000000..a7ecb63
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc6.xsd
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<xsd:schema xmlns="http://test.com"
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+            elementFormDefault="qualified"
+            attributeFormDefault="unqualified"
+            targetNamespace="http://test.com">
+
+    <xsd:element name="root" type="rootType">
+        <xsd:annotation>
+            <xsd:documentation>
+                The root of foo
+            </xsd:documentation>
+        </xsd:annotation>
+    </xsd:element>
+
+    <xsd:complexType name="rootType">
+        <xsd:sequence>
+            <xsd:element name="foo">
+                <xsd:annotation>
+                    <xsd:documentation>
+                        A generic non-useful element
+                    </xsd:documentation>
+                </xsd:annotation>
+                <xsd:complexType>
+                    <xsd:attribute name="value">
+                        <xsd:annotation>
+                            <xsd:documentation>
+                                A value for Foo
+                            </xsd:documentation>
+                        </xsd:annotation>
+                        <xsd:simpleType>
+                            <xsd:restriction base="xsd:NMTOKEN">
+                                <xsd:enumeration value="bar">
+                                    <xsd:annotation>
+                                        <xsd:documentation>
+                                            A great place to get a drink
+                                        </xsd:documentation>
+                                    </xsd:annotation>
+                                </xsd:enumeration>
+                                <xsd:enumeration value="car">
+                                    <xsd:annotation>
+                                        <xsd:documentation>
+                                            A vehicle to get you from A to B
+                                        </xsd:documentation>
+                                    </xsd:annotation>
+                                </xsd:enumeration>
+                                <xsd:enumeration value="dar">
+                                    <xsd:annotation>
+                                        <xsd:documentation>
+                                            A made up word
+                                        </xsd:documentation>
+                                    </xsd:annotation>
+                                </xsd:enumeration>
+                            </xsd:restriction>
+                        </xsd:simpleType>
+                    </xsd:attribute>
+                </xsd:complexType>
+            </xsd:element>
+        </xsd:sequence>
+    </xsd:complexType>
+</xsd:schema>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc7.xml b/xml/tests/testData/documentation/XmlDoc7.xml
new file mode 100644
index 0000000..a0253aa
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc7.xml
@@ -0,0 +1,2 @@
+<shortcut xmlns="http://test.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://test.com XmlDoc7.xsd" key="$C<caret>ut">gero cum</shortcut>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc7.xml.expected.completion.html b/xml/tests/testData/documentation/XmlDoc7.xml.expected.completion.html
new file mode 100644
index 0000000..b8200aa
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc7.xml.expected.completion.html
@@ -0,0 +1 @@
+Enumeration value:&nbsp;<b>$Paste</b><br>Description  :&nbsp;Ctrl+V
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc7.xml.expected.html b/xml/tests/testData/documentation/XmlDoc7.xml.expected.html
new file mode 100644
index 0000000..0c39263
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc7.xml.expected.html
@@ -0,0 +1 @@
+Enumeration value:&nbsp;<b>$Cut</b><br>Description  :&nbsp;Ctrl+X, Shift+Delete
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDoc7.xsd b/xml/tests/testData/documentation/XmlDoc7.xsd
new file mode 100644
index 0000000..055da82
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDoc7.xsd
@@ -0,0 +1,26 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test.com">
+  <xs:element name="shortcut">
+    <xs:complexType mixed="true">
+      <xs:attribute name="key" type="KeyboardShortcutType" use="optional"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:simpleType name="KeyboardShortcutType">
+    <xs:restriction base="xs:token">
+      <xs:enumeration value="$Copy">
+        <xs:annotation>
+          <xs:documentation>Ctrl+C, Ctrl+Insert</xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+      <xs:enumeration value="$Cut">
+        <xs:annotation>
+          <xs:documentation>Ctrl+X, Shift+Delete</xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+      <xs:enumeration value="$Paste">
+        <xs:annotation>
+          <xs:documentation>Ctrl+V</xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+    </xs:restriction>
+  </xs:simpleType>
+</xs:schema>
diff --git a/xml/tests/testData/documentation/XmlDocWithCData.xml b/xml/tests/testData/documentation/XmlDocWithCData.xml
new file mode 100644
index 0000000..1386d40
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDocWithCData.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<be<caret>ans xmlns="http://www.springframework.org/schema/beans"
+	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	   xmlns:util="http://www.springframework.org/schema/util"
+	   xsi:schemaLocation="http://www.springframework.org/schema/beans spring-beans.xsd
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
+
+        <util:properties id="myProperties" location="classpath:org/springframework/beans/factory/config/util.properties"/>
+	<util:constant id="min" static-field="java.lang.Integer.MIN_VALUE"/>
+  <util:map id="myProps">
+    <entry key="bbb" value="aaa"/>
+  </util:map>
+</beans>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDocWithCData.xml.expected.html b/xml/tests/testData/documentation/XmlDocWithCData.xml.expected.html
new file mode 100644
index 0000000..ede11d8
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDocWithCData.xml.expected.html
@@ -0,0 +1,2 @@
+Tag name:&nbsp;<b>beans</b><br>Description  :&nbsp;The top level (typically root) element. Allows the definition  &lt;&gt;&quot;&#39;/&gt;<br>
+	of default values for all nested bean definitions.
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/XmlDocWithCData2.xml b/xml/tests/testData/documentation/XmlDocWithCData2.xml
new file mode 100644
index 0000000..a8ae519
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDocWithCData2.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+                           http://www.springframework.org/schema/aop
+                           http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
+
+  <bean class="java.lang.String" scope="request">
+    <co<caret>nstructor-arg value="foo"/>
+    <aop:scoped-proxy/>
+  </bean>
+</beans>
diff --git a/xml/tests/testData/documentation/XmlDocWithCData2.xml.expected.html b/xml/tests/testData/documentation/XmlDocWithCData2.xml.expected.html
new file mode 100644
index 0000000..f6c63d9
--- /dev/null
+++ b/xml/tests/testData/documentation/XmlDocWithCData2.xml.expected.html
@@ -0,0 +1,11 @@
+Tag name:&nbsp;<b>constructor-arg</b><br>Description  :&nbsp;Bean definitions can specify zero or more constructor arguments.<br>
+	This is an alternative to &quot;autowire constructor&quot;.<br>
+	Arguments correspond to either a specific index of the constructor<br>
+	argument list or are supposed to be matched generically by type.<br>
+<br>
+	Note: A single generic argument value will just be used once, rather<br>
+	than potentially matched multiple times (as of Spring 1.1).<br>
+<br>
+	constructor-arg elements are also used in conjunction with the<br>
+	factory-method element to construct beans using static or instance<br>
+	factory methods.
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/dtd.dtd b/xml/tests/testData/documentation/dtd.dtd
new file mode 100644
index 0000000..4043164
--- /dev/null
+++ b/xml/tests/testData/documentation/dtd.dtd
@@ -0,0 +1,3 @@
+<!--Foo-->
+<!ELEMENT foo (#PCDATA)>
+<!ELEMENT bar (f<caret>oo)>
diff --git a/xml/tests/testData/documentation/dtd.xml b/xml/tests/testData/documentation/dtd.xml
new file mode 100644
index 0000000..8219bc6
--- /dev/null
+++ b/xml/tests/testData/documentation/dtd.xml
@@ -0,0 +1,5 @@
+<!DOCTYPE foo [
+    <!--Foo-->
+    <!ELEMENT foo (#PCDATA)>
+    ]>
+<f<caret>oo />
diff --git a/xml/tests/testData/documentation/hibernate-mapping-3.0.dtd b/xml/tests/testData/documentation/hibernate-mapping-3.0.dtd
new file mode 100644
index 0000000..de7bf3d
--- /dev/null
+++ b/xml/tests/testData/documentation/hibernate-mapping-3.0.dtd
@@ -0,0 +1,1036 @@
+<!-- Hibernate Mapping DTD.
+
+<!DOCTYPE hibernate-mapping PUBLIC 
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+An instance of this XML document may contain mappings for an arbitrary 
+number of classes. The class mappings may contain associations to classes
+mapped in the same document or in another document. No class may be 
+mapped more than once. Each document may also contain definitions of an
+arbitrary number of queries, and import declarations of arbitrary classes. 
+
+-->
+
+<!--
+	The document root.
+ -->
+
+<!ELEMENT hibernate-mapping (
+	meta*, 
+	typedef*, 
+	import*, 
+	(class|subclass|joined-subclass|union-subclass)*,
+    resultset*,
+	(query|sql-query)*,
+	filter-def*,
+    database-object*
+)>
+	<!ATTLIST hibernate-mapping schema CDATA #IMPLIED>									<!-- default: none -->
+	<!ATTLIST hibernate-mapping catalog CDATA #IMPLIED>									<!-- default: none -->
+	<!ATTLIST hibernate-mapping default-cascade CDATA "none">
+	<!ATTLIST hibernate-mapping default-access CDATA "property">
+	<!ATTLIST hibernate-mapping default-lazy (true|false) "true">
+	<!ATTLIST hibernate-mapping auto-import (true|false) "true">
+	<!ATTLIST hibernate-mapping package CDATA #IMPLIED>									<!-- default: none -->
+
+<!--
+	META element definition; used to assign meta-level attributes to a class
+	or property.  Is currently used by codegenerator as a placeholder for
+	values that is not directly related to OR mappings.
+-->
+<!ELEMENT meta (#PCDATA)>
+	<!ATTLIST meta attribute CDATA #REQUIRED>
+	<!ATTLIST meta inherit (true|false) "true">
+
+<!--
+	TYPEDEF element definition; defines a new name for a Hibernate type. May
+	contain parameters for parameterizable types.
+-->
+<!ELEMENT typedef (param*)>
+	<!ATTLIST typedef class CDATA #REQUIRED>
+	<!ATTLIST typedef name CDATA #REQUIRED>
+
+<!--
+	IMPORT element definition; an explicit query language "import"
+-->
+<!ELEMENT import EMPTY>
+	<!ATTLIST import class CDATA #REQUIRED>
+	<!ATTLIST import rename CDATA #IMPLIED>	<!-- default: unqualified class name -->
+
+<!--
+	Root entity mapping.  Poorly named as entities do not have to be represented by 
+	classes at all.  Mapped entities may be represented via different methodologies 
+	(POJO, Map, Dom4j).
+-->
+<!ELEMENT class (
+ 	meta*,
+	subselect?,
+	cache?,
+	synchronize*,
+	comment?,
+    tuplizer*,
+	(id|composite-id),
+	discriminator?,
+	natural-id?,
+	(version|timestamp)?,
+	(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,
+	((join*,subclass*)|joined-subclass*|union-subclass*),
+	loader?,sql-insert?,sql-update?,sql-delete?,
+	filter*,
+    resultset*,
+	(query|sql-query)*
+)>
+	<!ATTLIST class entity-name CDATA #IMPLIED>
+	<!ATTLIST class name CDATA #IMPLIED>                            <!-- this is the class name -->
+	<!ATTLIST class proxy CDATA #IMPLIED>							<!-- default: no proxy interface -->
+	<!ATTLIST class lazy (true|false) #IMPLIED>
+	<!ATTLIST class table CDATA #IMPLIED>							<!-- default: unqualified classname -->
+	<!ATTLIST class schema CDATA #IMPLIED>							<!-- default: none -->
+	<!ATTLIST class catalog CDATA #IMPLIED>							<!-- default: none -->
+	<!ATTLIST class subselect CDATA #IMPLIED>
+	<!ATTLIST class discriminator-value CDATA #IMPLIED>				<!-- default: unqualified class name | none -->
+	<!ATTLIST class mutable (true|false) "true">
+	<!ATTLIST class abstract (true|false) #IMPLIED>
+	<!ATTLIST class polymorphism (implicit|explicit) "implicit">
+	<!ATTLIST class where CDATA #IMPLIED>							<!-- default: none -->
+	<!ATTLIST class persister CDATA #IMPLIED>
+	<!ATTLIST class dynamic-update (true|false) "false">
+	<!ATTLIST class dynamic-insert (true|false) "false">
+	<!ATTLIST class batch-size CDATA #IMPLIED>
+	<!ATTLIST class select-before-update (true|false) "false">
+	<!ATTLIST class optimistic-lock (none|version|dirty|all) "version">
+	<!ATTLIST class check CDATA #IMPLIED>							<!-- default: none -->
+	<!ATTLIST class rowid CDATA #IMPLIED>
+	<!ATTLIST class node CDATA #IMPLIED>
+
+<!--
+    TUPLIZER element; defines tuplizer to use for a component/entity for a given entity-mode
+-->
+<!ELEMENT tuplizer EMPTY>
+    <!ATTLIST tuplizer entity-mode (pojo|dom4j|dynamic-map) #IMPLIED>   <!-- entity mode for which tuplizer is in effect -->
+    <!ATTLIST tuplizer class CDATA #REQUIRED>                           <!-- the tuplizer class to use -->
+
+<!--
+	FILTER-DEF element; top-level filter definition.
+-->
+<!ELEMENT filter-def (#PCDATA|filter-param)*>
+	<!ATTLIST filter-def name CDATA #REQUIRED> <!-- The filter name -->
+	<!ATTLIST filter-def condition CDATA #IMPLIED>
+
+<!--
+	FILTER-PARAM element; qualifies parameters found within a FILTER-DEF
+	condition.
+-->
+<!ELEMENT filter-param EMPTY>
+	<!ATTLIST filter-param name CDATA #REQUIRED> <!-- The parameter name -->
+	<!ATTLIST filter-param type CDATA #REQUIRED> <!-- The parameter type -->
+
+<!--
+	FILTER element; used to apply a filter.
+-->
+<!ELEMENT filter (#PCDATA)>
+	<!ATTLIST filter name CDATA #REQUIRED>
+	<!ATTLIST filter condition CDATA #IMPLIED>
+
+
+<!-- A join allows some properties of a class to be persisted to a second table -->
+
+<!ELEMENT join ( 
+	subselect?,
+	comment?,
+	key,
+	(property|many-to-one|component|dynamic-component|any)*,
+	sql-insert?,sql-update?,sql-delete?
+)>
+	<!ATTLIST join table CDATA #REQUIRED>
+	<!ATTLIST join schema CDATA #IMPLIED>						<!-- default: none -->
+	<!ATTLIST join catalog CDATA #IMPLIED>						<!-- default: none -->
+	<!ATTLIST join subselect CDATA #IMPLIED>
+	<!ATTLIST join fetch (join|select) "join">
+	<!ATTLIST join inverse (true|false) "false">
+	<!ATTLIST join optional (true|false) "false">
+
+<!-- A natural-id element allows declaration of the unique business key -->
+
+<!ELEMENT natural-id ( (property|many-to-one|component|dynamic-component|any)* )>
+	<!ATTLIST natural-id mutable (true|false) "false">
+
+<!-- Declares the id type, column and generation algorithm for an entity class.
+If a name attribut is given, the id is exposed to the application through the 
+named property of the class. If not, the id is only exposed to the application 
+via Session.getIdentifier() -->
+
+<!ELEMENT id (meta*,column*,type?,generator?)>
+	<!ATTLIST id name CDATA #IMPLIED>
+	<!ATTLIST id node CDATA #IMPLIED>
+	<!ATTLIST id access CDATA #IMPLIED>
+	<!ATTLIST id column CDATA #IMPLIED>
+	<!ATTLIST id type CDATA #IMPLIED>
+	<!ATTLIST id length CDATA #IMPLIED>
+	<!ATTLIST id unsaved-value CDATA #IMPLIED>					<!-- any|none|null|undefined|0|-1|... -->
+
+<!-- A composite key may be modelled by a java class with a property for each 
+key column. The class must implement java.io.Serializable and reimplement equals() 
+and hashCode(). -->
+
+<!ELEMENT composite-id ( meta*, (key-property|key-many-to-one)+ )>
+	<!ATTLIST composite-id class CDATA #IMPLIED>
+	<!ATTLIST composite-id mapped (true|false) "false">
+	<!ATTLIST composite-id name CDATA #IMPLIED>
+	<!ATTLIST composite-id node CDATA #IMPLIED>
+	<!ATTLIST composite-id access CDATA #IMPLIED>
+	<!ATTLIST composite-id unsaved-value (undefined|any|none) "undefined"> 
+
+<!-- Polymorphic data requires a column holding a class discriminator value. This
+value is not directly exposed to the application. -->
+
+<!ELEMENT discriminator ((column|formula)?)>
+	<!ATTLIST discriminator column CDATA #IMPLIED>				<!-- default: "class"|none -->
+	<!ATTLIST discriminator formula CDATA #IMPLIED>
+	<!ATTLIST discriminator type CDATA "string">
+	<!ATTLIST discriminator not-null (true|false) "true">
+	<!ATTLIST discriminator length CDATA #IMPLIED>
+	<!ATTLIST discriminator force (true|false) "false">
+	<!ATTLIST discriminator insert (true|false) "true">
+	
+<!-- Versioned data requires a column holding a version number. This is exposed to the
+application through a property of the Java class. -->
+
+<!ELEMENT version (meta*,column*)>
+	<!ATTLIST version name CDATA #REQUIRED>
+	<!ATTLIST version node CDATA #IMPLIED>
+	<!ATTLIST version access CDATA #IMPLIED>
+	<!ATTLIST version column CDATA #IMPLIED>
+	<!ATTLIST version type CDATA "integer">
+	<!ATTLIST version unsaved-value (null|negative|undefined) "undefined">
+    <!ATTLIST version generated (never|always) "never">
+    <!ATTLIST version insert (true|false) #IMPLIED>
+
+<!ELEMENT timestamp (meta*)>
+	<!ATTLIST timestamp name CDATA #REQUIRED>
+	<!ATTLIST timestamp node CDATA #IMPLIED>
+	<!ATTLIST timestamp column CDATA #IMPLIED>
+	<!ATTLIST timestamp access CDATA #IMPLIED>
+	<!ATTLIST timestamp unsaved-value (null|undefined) "null">
+    <!ATTLIST timestamp source (vm|db) "vm">
+    <!ATTLIST timestamp generated (never|always) "never">
+
+
+<!--
+	Subclass declarations are nested beneath the root class declaration to achieve
+	polymorphic persistence with the table-per-hierarchy mapping strategy.
+
+	See the note on the class element regarding <pojo/> vs. @name usage...
+-->
+<!ELEMENT subclass (
+ 	meta*,
+    tuplizer*,
+	synchronize*,
+	(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,
+	join*, 
+	subclass*,
+	loader?,sql-insert?,sql-update?,sql-delete?,
+    resultset*,
+	(query|sql-query)*
+)>
+	<!ATTLIST subclass entity-name CDATA #IMPLIED>
+	<!ATTLIST subclass name CDATA #IMPLIED>
+	<!ATTLIST subclass proxy CDATA #IMPLIED>							<!-- default: no proxy interface -->
+	<!ATTLIST subclass discriminator-value CDATA #IMPLIED>				<!-- default: unqualified class name | none -->
+	<!ATTLIST subclass dynamic-update (true|false) "false">
+	<!ATTLIST subclass dynamic-insert (true|false) "false">
+	<!ATTLIST subclass select-before-update (true|false) "false">
+	<!ATTLIST subclass extends CDATA #IMPLIED>							<!-- default: empty when a toplevel, otherwise the nearest class definition -->
+	<!ATTLIST subclass lazy (true|false) #IMPLIED>
+	<!ATTLIST subclass abstract (true|false) #IMPLIED>
+	<!ATTLIST subclass persister CDATA #IMPLIED>
+	<!ATTLIST subclass batch-size CDATA #IMPLIED>
+	<!ATTLIST subclass node CDATA #IMPLIED>
+
+<!--
+	Joined subclasses are used for the normalized table-per-subclass mapping strategy
+
+	See the note on the class element regarding <pojo/> vs. @name usage...
+-->
+<!ELEMENT joined-subclass (
+	meta*,
+	subselect?,
+	synchronize*,
+	comment?,
+    tuplizer*,
+	key,
+	(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*, 
+	joined-subclass*,
+	loader?,sql-insert?,sql-update?,sql-delete?,
+    resultset*,
+	(query|sql-query)*
+)>
+	<!ATTLIST joined-subclass entity-name CDATA #IMPLIED>
+	<!ATTLIST joined-subclass name CDATA #IMPLIED>
+	<!ATTLIST joined-subclass proxy CDATA #IMPLIED>				 		<!-- default: no proxy interface -->
+	<!ATTLIST joined-subclass table CDATA #IMPLIED>				 		<!-- default: unqualified class name -->
+	<!ATTLIST joined-subclass schema CDATA #IMPLIED>
+	<!ATTLIST joined-subclass catalog CDATA #IMPLIED>
+	<!ATTLIST joined-subclass subselect CDATA #IMPLIED>
+	<!ATTLIST joined-subclass dynamic-update (true|false) "false">
+	<!ATTLIST joined-subclass dynamic-insert (true|false) "false">
+	<!ATTLIST joined-subclass select-before-update (true|false) "false">
+	<!ATTLIST joined-subclass extends CDATA #IMPLIED>			 		<!-- default: none when toplevel, otherwise the nearest class definition -->
+	<!ATTLIST joined-subclass lazy (true|false) #IMPLIED>
+	<!ATTLIST joined-subclass abstract (true|false) #IMPLIED>
+	<!ATTLIST joined-subclass persister CDATA #IMPLIED>
+	<!ATTLIST joined-subclass check CDATA #IMPLIED>				 		<!-- default: none -->
+	<!ATTLIST joined-subclass batch-size CDATA #IMPLIED>
+	<!ATTLIST joined-subclass node CDATA #IMPLIED>
+
+<!--
+	Union subclasses are used for the table-per-concrete-class mapping strategy
+
+	See the note on the class element regarding <pojo/> vs. @name usage...
+-->
+<!ELEMENT union-subclass (
+ 	meta*,
+	subselect?,
+	synchronize*,
+	comment?,
+    tuplizer*,
+	(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,
+	union-subclass*,
+	loader?,sql-insert?,sql-update?,sql-delete?,
+    resultset*,
+	(query|sql-query)*
+)>
+	<!ATTLIST union-subclass entity-name CDATA #IMPLIED>
+	<!ATTLIST union-subclass name CDATA #IMPLIED>
+	<!ATTLIST union-subclass proxy CDATA #IMPLIED>						<!-- default: no proxy interface -->
+	<!ATTLIST union-subclass table CDATA #IMPLIED>						<!-- default: unqualified class name -->
+	<!ATTLIST union-subclass schema CDATA #IMPLIED>
+	<!ATTLIST union-subclass catalog CDATA #IMPLIED>
+	<!ATTLIST union-subclass subselect CDATA #IMPLIED>
+	<!ATTLIST union-subclass dynamic-update (true|false) "false">
+	<!ATTLIST union-subclass dynamic-insert (true|false) "false">
+	<!ATTLIST union-subclass select-before-update (true|false) "false">
+	<!ATTLIST union-subclass extends CDATA #IMPLIED>					<!-- default: none when toplevel, otherwise the nearest class definition -->
+	<!ATTLIST union-subclass lazy (true|false) #IMPLIED>
+	<!ATTLIST union-subclass abstract (true|false) #IMPLIED>
+	<!ATTLIST union-subclass persister CDATA #IMPLIED>
+	<!ATTLIST union-subclass check CDATA #IMPLIED>						<!-- default: none -->
+	<!ATTLIST union-subclass batch-size CDATA #IMPLIED>
+	<!ATTLIST union-subclass node CDATA #IMPLIED>
+
+<!-- Property of an entity class or component, component-element, composite-id, etc. 
+JavaBeans style properties are mapped to table columns. -->
+
+<!ELEMENT property (meta*,(column|formula)*,type?)>
+	<!ATTLIST property name CDATA #REQUIRED>
+	<!ATTLIST property node CDATA #IMPLIED>
+	<!ATTLIST property access CDATA #IMPLIED>
+	<!ATTLIST property type CDATA #IMPLIED>
+	<!ATTLIST property column CDATA #IMPLIED>
+	<!ATTLIST property length CDATA #IMPLIED>
+	<!ATTLIST property precision CDATA #IMPLIED>
+	<!ATTLIST property scale CDATA #IMPLIED>
+	<!ATTLIST property not-null (true|false) #IMPLIED>
+	<!ATTLIST property unique (true|false) "false">
+	<!ATTLIST property unique-key CDATA #IMPLIED>
+	<!ATTLIST property index CDATA #IMPLIED>				<!-- include the columns spanned by this property in an index -->
+	<!ATTLIST property update (true|false) #IMPLIED>
+	<!ATTLIST property insert (true|false) #IMPLIED>
+	<!ATTLIST property optimistic-lock (true|false) "true">	<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST property formula CDATA #IMPLIED>
+	<!ATTLIST property lazy (true|false) "false">
+    <!ATTLIST property generated (never|insert|always) "never">
+
+<!-- Declares the type of the containing property (overrides an eventually existing type
+attribute of the property). May contain param elements to customize a ParametrizableType. -->
+<!ELEMENT type (param*)>
+	<!ATTLIST type name CDATA #REQUIRED>
+	
+<!-- Declares an association between two entities (Or from a component, component element,
+etc. to an entity). -->
+
+<!ELEMENT many-to-one (meta*,(column|formula)*)>
+	<!ATTLIST many-to-one name CDATA #REQUIRED>
+	<!ATTLIST many-to-one access CDATA #IMPLIED>
+	<!ATTLIST many-to-one class CDATA #IMPLIED>
+	<!ATTLIST many-to-one entity-name CDATA #IMPLIED>
+	<!ATTLIST many-to-one column CDATA #IMPLIED>
+	<!ATTLIST many-to-one not-null (true|false) #IMPLIED>
+	<!ATTLIST many-to-one unique (true|false) "false">
+	<!ATTLIST many-to-one unique-key CDATA #IMPLIED>
+	<!ATTLIST many-to-one index CDATA #IMPLIED>
+	<!ATTLIST many-to-one cascade CDATA #IMPLIED>
+	<!ATTLIST many-to-one outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST many-to-one fetch (join|select) #IMPLIED>
+	<!ATTLIST many-to-one update (true|false) "true">
+	<!ATTLIST many-to-one insert (true|false) "true">
+	<!ATTLIST many-to-one optimistic-lock (true|false) "true">	<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST many-to-one foreign-key CDATA #IMPLIED>
+	<!ATTLIST many-to-one property-ref CDATA #IMPLIED>
+	<!ATTLIST many-to-one formula CDATA #IMPLIED>
+	<!ATTLIST many-to-one lazy (false|proxy|no-proxy) #IMPLIED>
+	<!ATTLIST many-to-one not-found (exception|ignore) "exception">
+	<!ATTLIST many-to-one node CDATA #IMPLIED>
+	<!ATTLIST many-to-one embed-xml (true|false) "true">
+	
+<!-- Declares a one-to-one association between two entities (Or from a component, 
+component element, etc. to an entity). -->
+
+<!ELEMENT one-to-one (meta*,formula*)>
+	<!ATTLIST one-to-one name CDATA #REQUIRED>
+	<!ATTLIST one-to-one formula CDATA #IMPLIED>
+	<!ATTLIST one-to-one access CDATA #IMPLIED>
+	<!ATTLIST one-to-one class CDATA #IMPLIED>
+	<!ATTLIST one-to-one entity-name CDATA #IMPLIED>
+	<!ATTLIST one-to-one cascade CDATA #IMPLIED>
+	<!ATTLIST one-to-one outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST one-to-one fetch (join|select) #IMPLIED>
+	<!ATTLIST one-to-one constrained (true|false) "false">
+	<!ATTLIST one-to-one foreign-key CDATA #IMPLIED>
+	<!ATTLIST one-to-one property-ref CDATA #IMPLIED>
+	<!ATTLIST one-to-one lazy (false|proxy|no-proxy) #IMPLIED>
+	<!ATTLIST one-to-one node CDATA #IMPLIED>
+	<!ATTLIST one-to-one embed-xml (true|false) "true">
+	
+<!-- A property embedded in a composite identifier or map index (always not-null). -->
+
+<!ELEMENT key-property (meta*,column*,type?)>
+	<!ATTLIST key-property name CDATA #REQUIRED>
+	<!ATTLIST key-property access CDATA #IMPLIED>
+	<!ATTLIST key-property type CDATA #IMPLIED>
+	<!ATTLIST key-property column CDATA #IMPLIED>
+	<!ATTLIST key-property length CDATA #IMPLIED>
+	<!ATTLIST key-property node CDATA #IMPLIED>
+
+<!-- A many-to-one association embedded in a composite identifier or map index 
+(always not-null, never cascade). -->
+
+<!ELEMENT key-many-to-one (meta*,column*)>
+	<!ATTLIST key-many-to-one name CDATA #REQUIRED>
+	<!ATTLIST key-many-to-one access CDATA #IMPLIED>
+	<!ATTLIST key-many-to-one class CDATA #IMPLIED>
+	<!ATTLIST key-many-to-one entity-name CDATA #IMPLIED>
+	<!ATTLIST key-many-to-one column CDATA #IMPLIED>
+	<!ATTLIST key-many-to-one foreign-key CDATA #IMPLIED>
+	<!ATTLIST key-many-to-one lazy (false|proxy) #IMPLIED>
+
+<!-- An "any" association is a polymorphic association to any table with
+the given identifier type. The first listed column is a VARCHAR column 
+holding the name of the class (for that row). -->
+
+<!ELEMENT any (meta*,meta-value*,column,column+)>
+	<!ATTLIST any id-type CDATA #REQUIRED>
+	<!ATTLIST any meta-type CDATA #IMPLIED>			 	<!--- default: Hibernate.STRING -->
+	<!ATTLIST any name CDATA #REQUIRED>
+	<!ATTLIST any access CDATA #IMPLIED>
+	<!ATTLIST any insert (true|false) "true">
+	<!ATTLIST any update (true|false) "true">
+	<!ATTLIST any cascade CDATA #IMPLIED>
+	<!ATTLIST any index CDATA #IMPLIED>					<!-- include the columns spanned by this association in an index -->
+	<!ATTLIST any optimistic-lock (true|false) "true">	<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST any lazy (true|false) "false">
+	<!ATTLIST any node CDATA #IMPLIED>
+	
+<!ELEMENT meta-value EMPTY>
+	<!ATTLIST meta-value value CDATA #REQUIRED>
+	<!ATTLIST meta-value class CDATA #REQUIRED>
+
+<!-- A component is a user-defined class, persisted along with its containing entity
+to the table of the entity class. JavaBeans style properties of the component are
+mapped to columns of the table of the containing entity. A null component reference
+is mapped to null values in all columns and vice versa. Components do not support
+shared reference semantics. -->
+
+<!ELEMENT component (
+	meta*,
+    tuplizer*,
+	parent?,
+	(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|array|primitive-array)*
+)>
+	<!ATTLIST component class CDATA #IMPLIED>
+	<!ATTLIST component name CDATA #REQUIRED>
+	<!ATTLIST component access CDATA #IMPLIED>
+	<!ATTLIST component unique (true|false) "false">
+	<!ATTLIST component update (true|false) "true">
+	<!ATTLIST component insert (true|false) "true">
+	<!ATTLIST component lazy (true|false) "false">
+	<!ATTLIST component optimistic-lock (true|false) "true">
+	<!ATTLIST component node CDATA #IMPLIED>
+	
+<!-- A dynamic-component maps columns of the database entity to a java.util.Map 
+at the Java level -->
+
+<!ELEMENT dynamic-component (
+	(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|array|primitive-array)*
+)>
+	<!ATTLIST dynamic-component name CDATA #REQUIRED>
+	<!ATTLIST dynamic-component access CDATA #IMPLIED>
+	<!ATTLIST dynamic-component unique (true|false) "false">
+	<!ATTLIST dynamic-component update (true|false) "true">
+	<!ATTLIST dynamic-component insert (true|false) "true">
+	<!ATTLIST dynamic-component optimistic-lock (true|false) "true">
+	<!ATTLIST dynamic-component node CDATA #IMPLIED>
+
+<!-- properties declares that the contained properties form an alternate key. The name
+attribute allows an alternate key to be used as the target of a property-ref. -->
+
+<!ELEMENT properties (
+	(property|many-to-one|component|dynamic-component)*
+)>
+	<!ATTLIST properties name CDATA #REQUIRED>
+	<!ATTLIST properties unique (true|false) "false">
+	<!ATTLIST properties insert (true|false) "true">
+	<!ATTLIST properties update (true|false) "true">
+	<!ATTLIST properties optimistic-lock (true|false) "true">
+	<!ATTLIST properties node CDATA #IMPLIED>
+	
+<!-- The parent element maps a property of the component class as a pointer back to
+the owning entity. -->
+
+<!ELEMENT parent EMPTY>
+	<!ATTLIST parent name CDATA #REQUIRED>
+
+<!-- Collection declarations nested inside a class declaration indicate a foreign key 
+relationship from the collection table to the enclosing class. -->
+
+<!ELEMENT map (
+	meta*,
+	subselect?,
+	cache?,
+	synchronize*,
+	comment?,
+	key, 
+	(map-key|composite-map-key|map-key-many-to-many|index|composite-index|index-many-to-many|index-many-to-any), 
+	(element|one-to-many|many-to-many|composite-element|many-to-any),
+	loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
+	filter*
+)>
+	<!ATTLIST map name CDATA #REQUIRED>
+	<!ATTLIST map access CDATA #IMPLIED>
+	<!ATTLIST map table CDATA #IMPLIED>																<!-- default: name -->
+	<!ATTLIST map schema CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST map subselect CDATA #IMPLIED>
+	<!ATTLIST map catalog CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST map lazy (true|false|extra) #IMPLIED>
+	<!ATTLIST map mutable (true|false) "true">
+	<!ATTLIST map inverse (true|false) "false">
+	<!ATTLIST map sort CDATA "unsorted">														 	<!-- unsorted|natural|"comparator class", default: unsorted -->
+	<!ATTLIST map cascade CDATA #IMPLIED>
+	<!ATTLIST map order-by CDATA #IMPLIED>													 		<!-- default: none -->
+	<!ATTLIST map where CDATA #IMPLIED>																<!-- default: none -->
+	<!ATTLIST map batch-size CDATA #IMPLIED>
+	<!ATTLIST map outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST map fetch (join|select|subselect) #IMPLIED>
+	<!ATTLIST map check CDATA #IMPLIED>																<!-- default: none -->	
+	<!ATTLIST map persister CDATA #IMPLIED>														
+	<!ATTLIST map collection-type CDATA #IMPLIED>	
+	<!ATTLIST map optimistic-lock (true|false) "true">		<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST map node CDATA #IMPLIED>
+	<!ATTLIST map embed-xml (true|false) "true">
+	
+<!ELEMENT set (
+	meta*,
+	subselect?,
+	cache?,
+	synchronize*,
+	comment?,
+	key, 
+	(element|one-to-many|many-to-many|composite-element|many-to-any),
+	loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
+	filter*
+)>
+	<!ATTLIST set name CDATA #REQUIRED>
+	<!ATTLIST set access CDATA #IMPLIED>
+	<!ATTLIST set table CDATA #IMPLIED>																<!-- default: name -->
+	<!ATTLIST set schema CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST set catalog CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST set subselect CDATA #IMPLIED>
+	<!ATTLIST set lazy (true|false|extra) #IMPLIED>
+	<!ATTLIST set sort CDATA "unsorted">														 	<!-- unsorted|natural|"comparator class" -->
+	<!ATTLIST set inverse (true|false) "false">
+	<!ATTLIST set mutable (true|false) "true">
+	<!ATTLIST set cascade CDATA #IMPLIED>
+	<!ATTLIST set order-by CDATA #IMPLIED>													 		<!-- default: none -->
+	<!ATTLIST set where CDATA #IMPLIED>																<!-- default: none -->
+	<!ATTLIST set batch-size CDATA #IMPLIED>
+	<!ATTLIST set outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST set fetch (join|select|subselect) #IMPLIED>
+	<!ATTLIST set persister CDATA #IMPLIED>	
+	<!ATTLIST set collection-type CDATA #IMPLIED>														
+	<!ATTLIST set check CDATA #IMPLIED>																<!-- default: none -->
+	<!ATTLIST set optimistic-lock (true|false) "true">		<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST set node CDATA #IMPLIED>
+	<!ATTLIST set embed-xml (true|false) "true">
+
+<!ELEMENT bag (
+	meta*,
+	subselect?,
+	cache?,
+	synchronize*,
+	comment?,
+	key, 
+	(element|one-to-many|many-to-many|composite-element|many-to-any),
+	loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
+	filter*
+)>
+	<!ATTLIST bag name CDATA #REQUIRED>
+	<!ATTLIST bag access CDATA #IMPLIED>
+	<!ATTLIST bag table CDATA #IMPLIED>																<!-- default: name -->
+	<!ATTLIST bag schema CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST bag catalog CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST bag subselect CDATA #IMPLIED>
+	<!ATTLIST bag lazy (true|false|extra) #IMPLIED>
+	<!ATTLIST bag inverse (true|false) "false">
+	<!ATTLIST bag mutable (true|false) "true">
+	<!ATTLIST bag cascade CDATA #IMPLIED>
+	<!ATTLIST bag order-by CDATA #IMPLIED>													 		<!-- default: none -->
+	<!ATTLIST bag where CDATA #IMPLIED>																<!-- default: none -->
+	<!ATTLIST bag batch-size CDATA #IMPLIED>
+	<!ATTLIST bag outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST bag fetch (join|select|subselect) #IMPLIED>
+	<!ATTLIST bag persister CDATA #IMPLIED>															
+	<!ATTLIST bag collection-type CDATA #IMPLIED>	
+	<!ATTLIST bag check CDATA #IMPLIED>																<!-- default: none -->
+	<!ATTLIST bag optimistic-lock (true|false) "true">		<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST bag node CDATA #IMPLIED>
+	<!ATTLIST bag embed-xml (true|false) "true">
+
+<!ELEMENT idbag (
+	meta*,
+	subselect?,
+	cache?,
+	synchronize*,
+	comment?,
+	collection-id,
+	key, 
+	(element|many-to-many|composite-element|many-to-any),
+	loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
+	filter*
+)>
+	<!ATTLIST idbag name CDATA #REQUIRED>
+	<!ATTLIST idbag access CDATA #IMPLIED>
+	<!ATTLIST idbag table CDATA #IMPLIED>															<!-- default: name -->
+	<!ATTLIST idbag schema CDATA #IMPLIED>														 	<!-- default: none -->
+	<!ATTLIST idbag catalog CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST idbag subselect CDATA #IMPLIED>
+	<!ATTLIST idbag lazy (true|false|extra) #IMPLIED>
+	<!ATTLIST idbag mutable (true|false) "true">
+	<!ATTLIST idbag cascade CDATA #IMPLIED>
+	<!ATTLIST idbag order-by CDATA #IMPLIED>													 	<!-- default: none -->
+	<!ATTLIST idbag where CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST idbag batch-size CDATA #IMPLIED>
+	<!ATTLIST idbag outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST idbag fetch (join|select|subselect) #IMPLIED>
+	<!ATTLIST idbag persister CDATA #IMPLIED>															
+	<!ATTLIST idbag collection-type CDATA #IMPLIED>
+	<!ATTLIST idbag check CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST idbag optimistic-lock (true|false) "true">	<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST idbag node CDATA #IMPLIED>
+	<!ATTLIST idbag embed-xml (true|false) "true">
+
+<!ELEMENT list (
+	meta*,
+	subselect?,
+	cache?,
+	synchronize*,
+	comment?,
+	key, 
+	(index|list-index), 
+	(element|one-to-many|many-to-many|composite-element|many-to-any),
+	loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,
+	filter*
+)>
+	<!ATTLIST list name CDATA #REQUIRED>
+	<!ATTLIST list access CDATA #IMPLIED>
+	<!ATTLIST list table CDATA #IMPLIED>														 	<!-- default: name -->
+	<!ATTLIST list schema CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST list catalog CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST list subselect CDATA #IMPLIED>
+	<!ATTLIST list lazy (true|false|extra) #IMPLIED>
+	<!ATTLIST list inverse (true|false) "false">
+	<!ATTLIST list mutable (true|false) "true">
+	<!ATTLIST list cascade CDATA #IMPLIED>
+	<!ATTLIST list where CDATA #IMPLIED>														 	<!-- default: none -->
+	<!ATTLIST list batch-size CDATA #IMPLIED>
+	<!ATTLIST list outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST list fetch (join|select|subselect) #IMPLIED>
+	<!ATTLIST list persister CDATA #IMPLIED>																
+	<!ATTLIST list collection-type CDATA #IMPLIED>
+	<!ATTLIST list check CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST list optimistic-lock (true|false) "true">		<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST list node CDATA #IMPLIED>
+	<!ATTLIST list embed-xml (true|false) "true">
+
+<!ELEMENT array (
+	meta*,
+	subselect?,
+	cache?,
+	synchronize*,
+	comment?,
+	key, 
+	(index|list-index), 
+	(element|one-to-many|many-to-many|composite-element|many-to-any),
+	loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?
+)>
+	<!ATTLIST array name CDATA #REQUIRED>
+	<!ATTLIST array access CDATA #IMPLIED>
+	<!ATTLIST array table CDATA #IMPLIED>															<!-- default: name -->
+	<!ATTLIST array schema CDATA #IMPLIED>													 		<!-- default: none -->
+	<!ATTLIST array catalog CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST array subselect CDATA #IMPLIED>
+	<!ATTLIST array inverse (true|false) "false">
+	<!ATTLIST array mutable (true|false) "true">
+	<!ATTLIST array element-class CDATA #IMPLIED>
+	<!ATTLIST array cascade CDATA #IMPLIED>
+	<!ATTLIST array where CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST array batch-size CDATA #IMPLIED>
+	<!ATTLIST array outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST array fetch (join|select|subselect) #IMPLIED>
+	<!ATTLIST array persister CDATA #IMPLIED>															
+	<!ATTLIST array collection-type CDATA #IMPLIED>
+	<!ATTLIST array check CDATA #IMPLIED>															<!-- default: none -->
+	<!ATTLIST array optimistic-lock (true|false) "true">	<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST array node CDATA #IMPLIED>
+	<!ATTLIST array embed-xml (true|false) "true">
+
+<!ELEMENT primitive-array (
+	meta*, 
+	subselect?,
+	cache?, 
+	synchronize*,
+	comment?,
+	key, 
+	(index|list-index), 
+	element,
+	loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?
+)>
+	<!ATTLIST primitive-array name CDATA #REQUIRED>
+	<!ATTLIST primitive-array access CDATA #IMPLIED>
+	<!ATTLIST primitive-array table CDATA #IMPLIED>									<!-- default: name -->
+	<!ATTLIST primitive-array schema CDATA #IMPLIED>								<!-- default: none -->
+	<!ATTLIST primitive-array catalog CDATA #IMPLIED>								<!-- default: none -->
+	<!ATTLIST primitive-array subselect CDATA #IMPLIED>
+	<!ATTLIST primitive-array mutable (true|false) "true">
+	<!ATTLIST primitive-array where CDATA #IMPLIED>									<!-- default: none -->
+	<!ATTLIST primitive-array batch-size CDATA #IMPLIED>
+	<!ATTLIST primitive-array outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST primitive-array fetch (join|select|subselect) #IMPLIED>
+	<!ATTLIST primitive-array persister CDATA #IMPLIED>																
+	<!ATTLIST primitive-array collection-type CDATA #IMPLIED>
+	<!ATTLIST primitive-array check CDATA #IMPLIED>									<!-- default: none -->
+	<!ATTLIST primitive-array optimistic-lock (true|false) "true">		<!-- only supported for properties of a class (not component) -->
+	<!ATTLIST primitive-array node CDATA #IMPLIED>
+	<!ATTLIST primitive-array embed-xml (true|false) "true">
+
+<!-- Declares the element type of a collection of basic type -->
+
+<!ELEMENT element ( (column|formula)*, type? )>
+	<!ATTLIST element column CDATA #IMPLIED>
+	<!ATTLIST element node CDATA #IMPLIED>
+	<!ATTLIST element formula CDATA #IMPLIED>
+	<!ATTLIST element type CDATA #IMPLIED>
+	<!ATTLIST element length CDATA #IMPLIED>
+	<!ATTLIST element precision CDATA #IMPLIED>
+	<!ATTLIST element scale CDATA #IMPLIED>
+	<!ATTLIST element not-null (true|false) "false">
+	<!ATTLIST element unique (true|false) "false">
+
+<!-- One to many association. This tag declares the entity-class
+element type of a collection and specifies a one-to-many relational model -->
+
+<!ELEMENT one-to-many EMPTY>
+	<!ATTLIST one-to-many class CDATA #IMPLIED>
+	<!ATTLIST one-to-many not-found (exception|ignore) "exception">
+	<!ATTLIST one-to-many node CDATA #IMPLIED>
+	<!ATTLIST one-to-many embed-xml (true|false) "true">
+	<!ATTLIST one-to-many entity-name CDATA #IMPLIED>
+	<!-- No column declaration attributes required in this case. The primary
+	key column of the associated class is already mapped elsewhere.-->
+
+<!-- Many to many association. This tag declares the entity-class
+element type of a collection and specifies a many-to-many relational model -->
+
+<!ELEMENT many-to-many (meta*,(column|formula)*,filter*)>
+	<!ATTLIST many-to-many class CDATA #IMPLIED>
+	<!ATTLIST many-to-many node CDATA #IMPLIED>
+	<!ATTLIST many-to-many embed-xml (true|false) "true">
+	<!ATTLIST many-to-many entity-name CDATA #IMPLIED>
+	<!ATTLIST many-to-many column CDATA #IMPLIED>
+	<!ATTLIST many-to-many formula CDATA #IMPLIED>
+	<!ATTLIST many-to-many not-found (exception|ignore) "exception">
+	<!ATTLIST many-to-many outer-join (true|false|auto) #IMPLIED>
+	<!ATTLIST many-to-many fetch (join|select) #IMPLIED>
+	<!ATTLIST many-to-many lazy (false|proxy) #IMPLIED>
+	<!ATTLIST many-to-many foreign-key CDATA #IMPLIED>
+	<!ATTLIST many-to-many unique (true|false) "false">
+	<!ATTLIST many-to-many where CDATA #IMPLIED>
+	<!ATTLIST many-to-many order-by CDATA #IMPLIED>
+	<!ATTLIST many-to-many property-ref CDATA #IMPLIED>
+
+<!-- A composite element allows a collection to hold instances of an arbitrary 
+class, without the requirement of joining to an entity table. Composite elements
+have component semantics - no shared references and ad hoc null value semantics. 
+Composite elements may not hold nested collections. -->
+
+<!ELEMENT composite-element ( 
+	(meta*),
+	parent?,
+	(property|many-to-one|any|nested-composite-element)* 
+)>
+	<!ATTLIST composite-element class CDATA #REQUIRED>
+	<!ATTLIST composite-element node CDATA #IMPLIED>
+
+<!ELEMENT nested-composite-element ( 
+	parent?,
+	(property|many-to-one|any|nested-composite-element)* 
+)>
+	<!ATTLIST nested-composite-element class CDATA #REQUIRED>
+	<!ATTLIST nested-composite-element name CDATA #REQUIRED>
+	<!ATTLIST nested-composite-element access CDATA #IMPLIED>
+	<!ATTLIST nested-composite-element node CDATA #IMPLIED>
+	
+<!-- Declares the column name of a foreign key. -->
+
+<!ELEMENT key (column*)>
+	<!ATTLIST key column CDATA #IMPLIED>
+	<!ATTLIST key property-ref CDATA #IMPLIED>
+	<!ATTLIST key foreign-key CDATA #IMPLIED>
+	<!ATTLIST key on-delete (cascade|noaction) "noaction">
+	<!ATTLIST key not-null (true|false) #IMPLIED>
+	<!ATTLIST key update (true|false) #IMPLIED>
+	<!ATTLIST key unique (true|false) #IMPLIED>
+	
+<!-- Declares the type and column mapping for a collection index (array or
+list index, or key of a map). -->
+
+<!ELEMENT list-index (column?)>
+	<!ATTLIST list-index column CDATA #IMPLIED>
+	<!ATTLIST list-index base CDATA "0">
+
+<!ELEMENT map-key ((column|formula)*)>
+	<!ATTLIST map-key column CDATA #IMPLIED>
+	<!ATTLIST map-key formula CDATA #IMPLIED>
+	<!ATTLIST map-key type CDATA #REQUIRED>
+	<!ATTLIST map-key length CDATA #IMPLIED>
+	<!ATTLIST map-key node CDATA #IMPLIED>
+
+<!ELEMENT index (column*)>
+	<!ATTLIST index column CDATA #IMPLIED>
+	<!ATTLIST index type CDATA #IMPLIED>			<!-- required for maps -->
+	<!ATTLIST index length CDATA #IMPLIED>
+
+<!-- Many to many association mapped to the key of a map. ie. a map keyed
+on entities. -->
+
+<!ELEMENT map-key-many-to-many ((column|formula)*)>
+	<!ATTLIST map-key-many-to-many class CDATA #IMPLIED>
+	<!ATTLIST map-key-many-to-many entity-name CDATA #IMPLIED>
+	<!ATTLIST map-key-many-to-many column CDATA #IMPLIED>
+	<!ATTLIST map-key-many-to-many formula CDATA #IMPLIED>
+	<!ATTLIST map-key-many-to-many foreign-key CDATA #IMPLIED>
+
+<!ELEMENT index-many-to-many (column*)>
+	<!ATTLIST index-many-to-many class CDATA #REQUIRED>
+	<!ATTLIST index-many-to-many entity-name CDATA #IMPLIED>
+	<!ATTLIST index-many-to-many column CDATA #IMPLIED>
+	<!ATTLIST index-many-to-many foreign-key CDATA #IMPLIED>
+
+<!-- Composite index of a map ie. a map keyed on components. -->
+
+<!ELEMENT composite-map-key ( (key-property|key-many-to-one)+ )>
+	<!ATTLIST composite-map-key class CDATA #REQUIRED>
+
+<!ELEMENT composite-index ( (key-property|key-many-to-one)+ )>
+	<!ATTLIST composite-index class CDATA #REQUIRED>
+
+<!-- A "many to any" defines a polymorphic association to any table 
+with the given identifier type. The first listed column is a VARCHAR column 
+holding the name of the class (for that row). -->
+
+<!ELEMENT many-to-any (meta-value*,column, column+)>
+	<!ATTLIST many-to-any id-type CDATA #REQUIRED>
+	<!ATTLIST many-to-any meta-type CDATA #IMPLIED>			<!--- default: Hibernate.CLASS -->
+
+<!ELEMENT index-many-to-any (column, column+)>
+	<!ATTLIST index-many-to-any id-type CDATA #REQUIRED>
+	<!ATTLIST index-many-to-any meta-type CDATA #IMPLIED>	<!--- default: Hibernate.CLASS -->
+
+<!ELEMENT collection-id (meta*, column*, generator)>
+	<!ATTLIST collection-id column CDATA #REQUIRED>
+	<!ATTLIST collection-id type CDATA #REQUIRED>
+	<!ATTLIST collection-id length CDATA #IMPLIED>
+	
+<!-- Generators generate unique identifiers. The class attribute specifies a Java 
+class implementing an id generation algorithm. -->
+
+<!ELEMENT generator (param*)>
+	<!ATTLIST generator class CDATA #REQUIRED>
+<!ELEMENT param (#PCDATA)>
+	<!ATTLIST param name CDATA #REQUIRED>
+
+<!-- The column element is an alternative to column attributes and required for 
+mapping associations to classes with composite ids. -->
+
+<!ELEMENT column (comment?)>
+	<!ATTLIST column name CDATA #REQUIRED>
+	<!ATTLIST column length CDATA #IMPLIED>						<!-- default: 255 -->
+	<!ATTLIST column precision CDATA #IMPLIED>
+	<!ATTLIST column scale CDATA #IMPLIED>
+	<!ATTLIST column not-null (true|false) #IMPLIED>		 	<!-- default: false (except for id properties) -->
+	<!ATTLIST column unique (true|false) #IMPLIED>			 	<!-- default: false (except for id properties) -->
+	<!ATTLIST column unique-key CDATA #IMPLIED>					<!-- default: no unique key -->
+	<!ATTLIST column sql-type CDATA #IMPLIED>					<!-- override default column type for hibernate type -->
+	<!ATTLIST column index CDATA #IMPLIED>
+	<!ATTLIST column check CDATA #IMPLIED>						<!-- default: no check constraint -->
+    <!ATTLIST column default CDATA #IMPLIED>                    <!-- default: no default value -->
+
+<!-- The formula and subselect elements allow us to map derived properties and 
+entities. -->
+
+<!ELEMENT formula (#PCDATA)>
+<!ELEMENT subselect (#PCDATA)>
+
+<!-- The cache element enables caching of an entity class. -->
+<!ELEMENT cache EMPTY>
+	<!ATTLIST cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>				
+	<!ATTLIST cache region CDATA #IMPLIED>						<!-- default: class or collection role name -->
+	<!ATTLIST cache include (all|non-lazy) "all">
+
+<!-- The comment element allows definition of a database table or column comment. -->
+
+<!ELEMENT comment (#PCDATA)>
+
+<!-- The loader element allows specification of a named query to be used for fetching
+an entity or collection -->
+
+<!ELEMENT loader EMPTY>
+	<!ATTLIST loader query-ref CDATA #REQUIRED>
+
+<!-- The query element declares a named Hibernate query string -->
+
+<!ELEMENT query (#PCDATA|query-param)*>
+	<!ATTLIST query name CDATA #REQUIRED>
+	<!ATTLIST query flush-mode (auto|never|always) #IMPLIED>
+	<!ATTLIST query cacheable (true|false) "false">
+	<!ATTLIST query cache-region CDATA #IMPLIED>
+	<!ATTLIST query fetch-size CDATA #IMPLIED>
+	<!ATTLIST query timeout CDATA #IMPLIED>
+	<!ATTLIST query cache-mode (get|ignore|normal|put|refresh) #IMPLIED>
+    <!ATTLIST query read-only (true|false) #IMPLIED>
+    <!ATTLIST query comment CDATA #IMPLIED>
+
+<!-- The sql-query element declares a named SQL query string -->
+
+<!ELEMENT sql-query (#PCDATA|return-scalar|return|return-join|load-collection|synchronize|query-param)*>
+	<!ATTLIST sql-query name CDATA #REQUIRED>
+    <!ATTLIST sql-query resultset-ref CDATA #IMPLIED>
+	<!ATTLIST sql-query flush-mode (auto|never|always) #IMPLIED>
+	<!ATTLIST sql-query cacheable (true|false) "false">
+	<!ATTLIST sql-query cache-region CDATA #IMPLIED>
+	<!ATTLIST sql-query fetch-size CDATA #IMPLIED>
+	<!ATTLIST sql-query timeout CDATA #IMPLIED>
+	<!ATTLIST sql-query cache-mode (get|ignore|normal|put|refresh) #IMPLIED>
+    <!ATTLIST sql-query read-only (true|false) #IMPLIED>
+    <!ATTLIST sql-query comment CDATA #IMPLIED>
+	<!ATTLIST sql-query callable (true|false) "false">
+
+<!-- The query-param element is used only by tools that generate
+finder methods for named queries -->
+
+<!ELEMENT query-param EMPTY>
+	<!ATTLIST query-param name CDATA #REQUIRED>
+	<!ATTLIST query-param type CDATA #REQUIRED>
+
+<!-- The resultset element declares a named resultset mapping definition for SQL queries -->
+<!ELEMENT resultset (return-scalar|return|return-join|load-collection)*>
+	<!ATTLIST resultset name CDATA #REQUIRED>
+
+<!--
+	Defines a return component for a sql-query.  Alias refers to the alias
+	used in the actual sql query; lock-mode specifies the locking to be applied
+	when the query is executed.  The class, collection, and role attributes are mutually exclusive;
+	class refers to the class name of a "root entity" in the object result; collection refers
+	to a collection of a given class and is used to define custom sql to load that owned collection
+	and takes the form "ClassName.propertyName"; role refers to the property path for an eager fetch
+	and takes the form "owningAlias.propertyName"
+-->
+<!ELEMENT return (return-discriminator?,return-property)*>
+	<!ATTLIST return alias CDATA #IMPLIED>
+	<!ATTLIST return entity-name CDATA #IMPLIED>
+	<!ATTLIST return class CDATA #IMPLIED>
+	<!ATTLIST return lock-mode (none|read|upgrade|upgrade-nowait|write) "read">	
+
+<!ELEMENT return-property (return-column*)> 
+	<!ATTLIST return-property name CDATA #REQUIRED>
+	<!ATTLIST return-property column CDATA #IMPLIED>
+
+<!ELEMENT return-column EMPTY> 
+	<!ATTLIST return-column name CDATA #REQUIRED>
+
+<!ELEMENT return-discriminator EMPTY> 
+	<!ATTLIST return-discriminator column CDATA #REQUIRED>
+	
+<!ELEMENT return-join (return-property)*> 
+	<!ATTLIST return-join alias CDATA #REQUIRED>
+	<!ATTLIST return-join property CDATA #REQUIRED>
+	<!ATTLIST return-join lock-mode (none|read|upgrade|upgrade-nowait|write) "read">
+
+<!ELEMENT load-collection (return-property)*> 
+	<!ATTLIST load-collection alias CDATA #REQUIRED>
+	<!ATTLIST load-collection role CDATA #REQUIRED>
+	<!ATTLIST load-collection lock-mode (none|read|upgrade|upgrade-nowait|write) "read">
+
+<!ELEMENT return-scalar EMPTY>
+	<!ATTLIST return-scalar column CDATA #REQUIRED>
+	<!ATTLIST return-scalar type CDATA #IMPLIED>
+
+<!ELEMENT synchronize EMPTY>
+	<!ATTLIST synchronize table CDATA #REQUIRED>
+	
+<!-- custom sql operations -->
+<!ELEMENT sql-insert (#PCDATA)>
+	<!ATTLIST sql-insert callable (true|false) "false">
+	<!ATTLIST sql-insert check (none|rowcount|param) #IMPLIED>
+
+<!ELEMENT sql-update (#PCDATA)>
+	<!ATTLIST sql-update callable (true|false) "false">
+	<!ATTLIST sql-update check (none|rowcount|param) #IMPLIED>
+
+<!ELEMENT sql-delete (#PCDATA)>
+	<!ATTLIST sql-delete callable (true|false) "false">
+	<!ATTLIST sql-delete check (none|rowcount|param) #IMPLIED>
+
+<!ELEMENT sql-delete-all (#PCDATA)>
+	<!ATTLIST sql-delete-all callable (true|false) "false">
+	<!ATTLIST sql-delete-all check (none|rowcount|param) #IMPLIED>
+
+<!--
+    Element for defining "auxiliary" database objects.  Must be one of two forms:
+
+    #1 :
+        <database-object>
+            <definition class="CustomClassExtendingAuxiliaryObject"/>
+        </database-object>
+
+    #2 :
+        <database-object>
+            <create>CREATE OR REPLACE ....</create>
+            <drop>DROP ....</drop>
+        </database-object>
+-->
+<!ELEMENT database-object ( (definition|(create,drop)), dialect-scope* )>
+
+<!ELEMENT definition EMPTY>
+    <!ATTLIST definition class CDATA #REQUIRED>
+
+<!ELEMENT create (#PCDATA)>
+<!ELEMENT drop (#PCDATA)>
+
+<!--
+    dialect-scope element allows scoping auxiliary-objects to a particular
+    Hibernate dialect implementation.
+-->
+<!ELEMENT dialect-scope (#PCDATA)>
+    <!ATTLIST dialect-scope name CDATA #REQUIRED>
+
diff --git a/xml/tests/testData/documentation/j2ee_1_4.xsd b/xml/tests/testData/documentation/j2ee_1_4.xsd
new file mode 100644
index 0000000..3955cef
--- /dev/null
+++ b/xml/tests/testData/documentation/j2ee_1_4.xsd
@@ -0,0 +1,1607 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+     targetNamespace="http://java.sun.com/xml/ns/j2ee"
+     xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+     elementFormDefault="qualified"
+     attributeFormDefault="unqualified"
+     version="1.4">
+  <xsd:annotation>
+    <xsd:documentation>
+      @(#)j2ee_1_4.xsds	1.43 03/09/16
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:annotation>
+    <xsd:documentation>
+
+      Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
+      Road, Palo Alto, California 94303, U.S.A. All rights
+      reserved.
+
+      Sun Microsystems, Inc. has intellectual property rights
+      relating to technology described in this document. In
+      particular, and without limitation, these intellectual
+      property rights may include one or more of the U.S. patents
+      listed at http://www.sun.com/patents and one or more
+      additional patents or pending patent applications in the
+      U.S. and other countries.
+
+      This document and the technology which it describes are
+      distributed under licenses restricting their use, copying,
+      distribution, and decompilation. No part of this document
+      may be reproduced in any form by any means without prior
+      written authorization of Sun and its licensors, if any.
+
+      Third-party software, including font technology, is
+      copyrighted and licensed from Sun suppliers.
+
+      Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
+      JavaServer Pages, Enterprise JavaBeans and the Java Coffee
+      Cup logo are trademarks or registered trademarks of Sun
+      Microsystems, Inc. in the U.S. and other countries.
+
+      Federal Acquisitions: Commercial Software - Government Users
+      Subject to Standard License Terms and Conditions.
+
+    </xsd:documentation>
+  </xsd:annotation>
+
+<xsd:annotation>
+<xsd:documentation>
+
+The following definitions that appear in the common
+shareable schema(s) of J2EE deployment descriptors should be
+interpreted with respect to the context they are included:
+
+Deployment Component may indicate one of the following:
+    j2ee application;
+    application client;
+    web application;
+    enterprise bean;
+    resource adapter;
+
+Deployment File may indicate one of the following:
+    ear file;
+    war file;
+    jar file;
+    rar file;
+
+</xsd:documentation>
+</xsd:annotation>
+
+  <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
+	      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+  <xsd:include schemaLocation=
+	"http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd"/>
+
+
+<!-- **************************************************** -->
+
+  <xsd:group name="descriptionGroup">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This group keeps the usage of the contained description related
+	elements consistent across J2EE deployment descriptors.
+
+	All elements may occur multiple times with different languages,
+	to support localization of the content.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="display-name"
+		   type="j2ee:display-nameType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="icon"
+		   type="j2ee:iconType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+    </xsd:sequence>
+  </xsd:group>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="descriptionType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The description type is used by a description element to
+	provide text describing the parent element.  The elements
+	that use this type should include any information that the
+	Deployment Component's Deployment File file producer wants
+	to provide to the consumer of the Deployment Component's
+	Deployment File (i.e., to the Deployer). Typically, the
+	tools used by such a Deployment File consumer will display
+	the description when processing the parent element that
+	contains the description.
+
+	The lang attribute defines the language that the
+	description is provided in. The default value is "en" (English).
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="j2ee:xsdStringType">
+	<xsd:attribute ref="xml:lang"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:simpleType name="dewey-versionType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type defines a dewey decimal which is used
+	to describe versions of documents.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:restriction base="xsd:decimal">
+      <xsd:whiteSpace value="collapse"/>
+    </xsd:restriction>
+
+  </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="display-nameType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The display-name type contains a short name that is intended
+	  to be displayed by tools. It is used by display-name
+	  elements.  The display name need not be unique.
+
+	  Example:
+
+	  ...
+	     <display-name xml:lang="en">Employee Self Service</display-name>
+
+	  The value of the xml:lang attribute is "en" (English) by default.
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="j2ee:string">
+	<xsd:attribute ref="xml:lang"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="ejb-linkType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The ejb-linkType is used by ejb-link
+	  elements in the ejb-ref or ejb-local-ref elements to specify
+	  that an EJB reference is linked to enterprise bean.
+
+	  The value of the ejb-link element must be the ejb-name of an
+	  enterprise bean in the same ejb-jar file or in another ejb-jar
+	  file in the same J2EE application unit.
+
+	  Alternatively, the name in the ejb-link element may be
+	  composed of a path name specifying the ejb-jar containing the
+	  referenced enterprise bean with the ejb-name of the target
+	  bean appended and separated from the path name by "#".  The
+	  path name is relative to the Deployment File containing
+	  Deployment Component that is referencing the enterprise
+	  bean.  This allows multiple enterprise beans with the same
+	  ejb-name to be uniquely identified.
+
+	  Examples:
+
+	      <ejb-link>EmployeeRecord</ejb-link>
+
+	      <ejb-link>../products/product.jar#ProductEJB</ejb-link>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="ejb-local-refType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The ejb-local-refType is used by ejb-local-ref elements for
+	the declaration of a reference to an enterprise bean's local
+	home. The declaration consists of:
+
+	    - an optional description
+	    - the EJB reference name used in the code of the Deployment
+	      Component that's referencing the enterprise bean
+	    - the expected type of the referenced enterprise bean
+	    - the expected local home and local interfaces of the
+	      referenced enterprise bean
+	    - optional ejb-link information, used to specify the
+	      referenced enterprise bean
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="ejb-ref-name"
+		   type="j2ee:ejb-ref-nameType"/>
+      <xsd:element name="ejb-ref-type"
+		   type="j2ee:ejb-ref-typeType"/>
+      <xsd:element name="local-home"
+		   type="j2ee:local-homeType"/>
+      <xsd:element name="local"
+		   type="j2ee:localType"/>
+      <xsd:element name="ejb-link"
+		   type="j2ee:ejb-linkType"
+		   minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="ejb-ref-nameType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The ejb-ref-name element contains the name of an EJB
+	  reference. The EJB reference is an entry in the
+	  Deployment Component's environment and is relative to the
+	  java:comp/env context.  The name must be unique within the
+	  Deployment Component.
+
+	  It is recommended that name is prefixed with "ejb/".
+
+	  Example:
+
+	  <ejb-ref-name>ejb/Payroll</ejb-ref-name>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:jndi-nameType"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="ejb-ref-typeType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The ejb-ref-typeType contains the expected type of the
+	referenced enterprise bean.
+
+	The ejb-ref-type designates a value
+	that must be one of the following:
+
+	    Entity
+	    Session
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="Entity"/>
+	<xsd:enumeration value="Session"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="ejb-refType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The ejb-refType is used by ejb-ref elements for the
+	declaration of a reference to an enterprise bean's home. The
+	declaration consists of:
+
+	    - an optional description
+	    - the EJB reference name used in the code of
+	      the Deployment Component that's referencing the enterprise
+	      bean
+	    - the expected type of the referenced enterprise bean
+	    - the expected home and remote interfaces of the referenced
+	      enterprise bean
+	    - optional ejb-link information, used to specify the
+	      referenced enterprise bean
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="ejb-ref-name"
+		   type="j2ee:ejb-ref-nameType"/>
+      <xsd:element name="ejb-ref-type"
+		   type="j2ee:ejb-ref-typeType"/>
+
+      <xsd:element name="home"
+		   type="j2ee:homeType"/>
+      <xsd:element name="remote"
+		   type="j2ee:remoteType"/>
+      <xsd:element name="ejb-link"
+		   type="j2ee:ejb-linkType"
+		   minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="emptyType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type is used to designate an empty
+	element when used.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="env-entry-type-valuesType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  This type contains the fully-qualified Java type of the
+	  environment entry value that is expected by the
+	  application's code.
+
+	  The following are the legal values of env-entry-type-valuesType:
+
+	      java.lang.Boolean
+	      java.lang.Byte
+	      java.lang.Character
+	      java.lang.String
+	      java.lang.Short
+	      java.lang.Integer
+	      java.lang.Long
+	      java.lang.Float
+	      java.lang.Double
+
+	  Example:
+
+	  <env-entry-type>java.lang.Boolean</env-entry-type>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="java.lang.Boolean"/>
+	<xsd:enumeration value="java.lang.Byte"/>
+	<xsd:enumeration value="java.lang.Character"/>
+	<xsd:enumeration value="java.lang.String"/>
+	<xsd:enumeration value="java.lang.Short"/>
+	<xsd:enumeration value="java.lang.Integer"/>
+	<xsd:enumeration value="java.lang.Long"/>
+	<xsd:enumeration value="java.lang.Float"/>
+	<xsd:enumeration value="java.lang.Double"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="env-entryType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The env-entryType is used to declare an application's
+	environment entry. The declaration consists of an optional
+	description, the name of the environment entry, and an
+	optional value.  If a value is not specified, one must be
+	supplied during deployment.
+
+	It is used by env-entry elements.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="env-entry-name"
+		   type="j2ee:jndi-nameType">
+	<xsd:annotation>
+	  <xsd:documentation>
+	    <![CDATA[
+
+	      The env-entry-name element contains the name of a
+	      Deployment Component's environment entry.  The name
+	      is a JNDI name relative to the java:comp/env
+	      context.  The name must be unique within a
+	      Deployment Component. The uniqueness
+	      constraints must be defined within the declared
+	      context.
+
+	      Example:
+
+	      <env-entry-name>minAmount</env-entry-name>
+
+	      ]]>
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="env-entry-type"
+		   type="j2ee:env-entry-type-valuesType"/>
+
+      <xsd:element name="env-entry-value"
+		   type="j2ee:xsdStringType"
+		   minOccurs="0">
+	<xsd:annotation>
+	  <xsd:documentation>
+	    <![CDATA[
+
+	      The env-entry-value designates the value of a
+	      Deployment Component's environment entry. The value
+	      must be a String that is valid for the
+	      constructor of the specified type that takes a
+	      single String parameter, or for java.lang.Character,
+	      a single character.
+
+	      Example:
+
+	      <env-entry-value>100.00</env-entry-value>
+
+	      ]]>
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="fully-qualified-classType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The elements that use this type designate the name of a
+	Java class or interface.  The name is in the form of a
+	"binary name", as defined in the JLS.  This is the form
+	of name used in Class.forName().  Tools that need the
+	canonical name (the name used in source code) will need
+	to convert this binary name to the canonical name.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="generic-booleanType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type defines four different values which can designate
+	boolean values. This includes values yes and no which are
+	not designated by xsd:boolean
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="true"/>
+	<xsd:enumeration value="false"/>
+	<xsd:enumeration value="yes"/>
+	<xsd:enumeration value="no"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="homeType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The homeType defines the fully-qualified name of
+	  an enterprise bean's home interface.
+
+	  Example:
+
+	      <home>com.aardvark.payroll.PayrollHome</home>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:fully-qualified-classType"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="iconType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The icon type contains small-icon and large-icon elements
+	that specify the file names for small and large GIF or
+	JPEG icon images used to represent the parent element in a
+	GUI tool.
+
+	The xml:lang attribute defines the language that the
+	icon file names are provided in. Its value is "en" (English)
+	by default.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="small-icon" type="j2ee:pathType"
+		   minOccurs="0">
+	<xsd:annotation>
+	  <xsd:documentation>
+	    <![CDATA[
+
+	      The small-icon element contains the name of a file
+	      containing a small (16 x 16) icon image. The file
+	      name is a relative path within the Deployment
+	      Component's Deployment File.
+
+	      The image may be either in the JPEG or GIF format.
+	      The icon can be used by tools.
+
+	      Example:
+
+	      <small-icon>employee-service-icon16x16.jpg</small-icon>
+
+	      ]]>
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+      <xsd:element name="large-icon" type="j2ee:pathType"
+		   minOccurs="0">
+	<xsd:annotation>
+	  <xsd:documentation>
+	    <![CDATA[
+
+	      The large-icon element contains the name of a file
+	      containing a large
+	      (32 x 32) icon image. The file name is a relative
+	      path within the Deployment Component's Deployment
+	      File.
+
+	      The image may be either in the JPEG or GIF format.
+	      The icon can be used by tools.
+
+	      Example:
+
+	      <large-icon>employee-service-icon32x32.jpg</large-icon>
+
+	      ]]>
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+    </xsd:sequence>
+
+    <xsd:attribute ref="xml:lang"/>
+    <xsd:attribute name="id" type="xsd:ID"/>
+
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="java-identifierType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The java-identifierType defines a Java identifier.
+	The users of this type should further verify that
+	the content does not contain Java reserved keywords.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:pattern value="($|_|\p{L})(\p{L}|\p{Nd}|_|$)*"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="java-typeType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This is a generic type that designates a Java primitive
+	type or a fully qualified name of a Java interface/type,
+	or an array of such types.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:pattern value="[^\p{Z}]*"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="jndi-nameType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The jndi-nameType type designates a JNDI name in the
+	Deployment Component's environment and is relative to the
+	java:comp/env context.  A JNDI name must be unique within the
+	Deployment Component.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:group name="jndiEnvironmentRefsGroup">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This group keeps the usage of the contained JNDI environment
+	reference elements consistent across J2EE deployment descriptors.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="env-entry"
+		   type="j2ee:env-entryType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+      <xsd:element name="ejb-ref"
+		   type="j2ee:ejb-refType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+      <xsd:element name="ejb-local-ref"
+		   type="j2ee:ejb-local-refType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+      <xsd:group ref="j2ee:service-refGroup"/>
+      <xsd:element name="resource-ref"
+		   type="j2ee:resource-refType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+      <xsd:element name="resource-env-ref"
+		   type="j2ee:resource-env-refType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+      <xsd:element name="message-destination-ref"
+		   type="j2ee:message-destination-refType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+    </xsd:sequence>
+  </xsd:group>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="listenerType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The listenerType indicates the deployment properties for a web
+	application listener bean.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:group ref="j2ee:descriptionGroup"/>
+      <xsd:element name="listener-class"
+		   type="j2ee:fully-qualified-classType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The listener-class element declares a class in the
+	    application must be registered as a web
+	    application listener bean. The value is the fully
+	    qualified classname of the listener class.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="local-homeType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The local-homeType defines the fully-qualified
+	name of an enterprise bean's local home interface.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:fully-qualified-classType"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="localType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The localType defines the fully-qualified name of an
+	enterprise bean's local interface.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:fully-qualified-classType"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="message-destination-linkType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The message-destination-linkType is used to link a message
+	destination reference or message-driven bean to a message
+	destination.
+
+	The Assembler sets the value to reflect the flow of messages
+	between producers and consumers in the application.
+
+	The value must be the message-destination-name of a message
+	destination in the same Deployment File or in another
+	Deployment File in the same J2EE application unit.
+
+	Alternatively, the value may be composed of a path name
+	specifying a Deployment File containing the referenced
+	message destination with the message-destination-name of the
+	destination appended and separated from the path name by
+	"#". The path name is relative to the Deployment File
+	containing Deployment Component that is referencing the
+	message destination.  This allows multiple message
+	destinations with the same name to be uniquely identified.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="message-destination-refType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The message-destination-ref element contains a declaration
+	  of Deployment Component's reference to a message destination
+	  associated with a resource in Deployment Component's
+	  environment. It consists of:
+
+		  - an optional description
+		  - the message destination reference name
+		  - the message destination type
+		  - a specification as to whether the
+		    destination is used for
+		    consuming or producing messages, or both
+		  - a link to the message destination
+
+	  Examples:
+
+	  <message-destination-ref>
+		  <message-destination-ref-name>jms/StockQueue
+		  </message-destination-ref-name>
+		  <message-destination-type>javax.jms.Queue
+		  </message-destination-type>
+		  <message-destination-usage>Consumes
+		  </message-destination-usage>
+		  <message-destination-link>CorporateStocks
+		  </message-destination-link>
+	  </message-destination-ref>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="message-destination-ref-name"
+		   type="j2ee:jndi-nameType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The message-destination-ref-name element specifies
+	    the name of a message destination reference; its
+	    value is the environment entry name used in
+	    Deployment Component code.  The name is a JNDI name
+	    relative to the java:comp/env context and must be
+	    unique within an ejb-jar (for enterprise beans) or a
+	    Deployment File (for others).
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+      <xsd:element name="message-destination-type"
+		   type="j2ee:message-destination-typeType"/>
+      <xsd:element name="message-destination-usage"
+		   type="j2ee:message-destination-usageType"/>
+      <xsd:element name="message-destination-link"
+		   type="j2ee:message-destination-linkType"
+		   minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="message-destination-typeType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The message-destination-typeType specifies the type of
+	  the destination. The type is specified by the Java interface
+	  expected to be implemented by the destination.
+
+	  Example:
+
+	    <message-destination-type>javax.jms.Queue
+	    </message-destination-type>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:fully-qualified-classType"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="message-destination-usageType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The message-destination-usageType specifies the use of the
+	message destination indicated by the reference.  The value
+	indicates whether messages are consumed from the message
+	destination, produced for the destination, or both.  The
+	Assembler makes use of this information in linking producers
+	of a destination with its consumers.
+
+	The value of the message-destination-usage element must be
+	one of the following:
+	    Consumes
+	    Produces
+	    ConsumesProduces
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="Consumes"/>
+	<xsd:enumeration value="Produces"/>
+	<xsd:enumeration value="ConsumesProduces"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="message-destinationType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The message-destinationType specifies a message
+	  destination. The logical destination described by this
+	  element is mapped to a physical destination by the Deployer.
+
+	  The message destination element contains:
+
+		  - an optional description
+		  - an optional display-name
+		  - an optional icon
+		  - a message destination name which must be unique
+		    among message destination names within the same
+		    Deployment File.
+
+	  Example:
+
+	  <message-destination>
+		  <message-destination-name>CorporateStocks
+		  </message-destination-name>
+	  </message-destination>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:group ref="j2ee:descriptionGroup"/>
+      <xsd:element name="message-destination-name"
+		   type="j2ee:string">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The message-destination-name element specifies a
+	    name for a message destination.  This name must be
+	    unique among the names of message destinations
+	    within the Deployment File.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="param-valueType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type is a general type that can be used to declare
+	parameter/value lists.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="param-name"
+		   type="j2ee:string">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The param-name element contains the name of a
+	    parameter.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="param-value"
+		   type="j2ee:xsdStringType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The param-value element contains the value of a
+	    parameter.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="pathType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The elements that use this type designate either a relative
+	path or an absolute path starting with a "/".
+
+	In elements that specify a pathname to a file within the
+	same Deployment File, relative filenames (i.e., those not
+	starting with "/") are considered relative to the root of
+	the Deployment File's namespace.  Absolute filenames (i.e.,
+	those starting with "/") also specify names in the root of
+	the Deployment File's namespace.  In general, relative names
+	are preferred.  The exception is .war files where absolute
+	names are preferred for consistency with the Servlet API.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="remoteType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The remote element contains the fully-qualified name
+	  of the enterprise bean's remote interface.
+
+	  Example:
+
+	      <remote>com.wombat.empl.EmployeeService</remote>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:fully-qualified-classType"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="res-authType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The res-authType specifies whether the Deployment Component
+	code signs on programmatically to the resource manager, or
+	whether the Container will sign on to the resource manager
+	on behalf of the Deployment Component. In the latter case,
+	the Container uses information that is supplied by the
+	Deployer.
+
+	The value must be one of the two following:
+
+	    Application
+	    Container
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="Application"/>
+	<xsd:enumeration value="Container"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="res-sharing-scopeType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The res-sharing-scope type specifies whether connections
+	obtained through the given resource manager connection
+	factory reference can be shared. The value, if specified,
+	must be one of the two following:
+
+	    Shareable
+	    Unshareable
+
+	The default value is Shareable.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="Shareable"/>
+	<xsd:enumeration value="Unshareable"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="resource-env-refType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The resource-env-refType is used to define
+	  resource-env-type elements.  It contains a declaration of a
+	  Deployment Component's reference to an administered object
+	  associated with a resource in the Deployment Component's
+	  environment.  It consists of an optional description, the
+	  resource environment reference name, and an indication of
+	  the resource environment reference type expected by the
+	  Deployment Component code.
+
+	  Example:
+
+	  <resource-env-ref>
+	      <resource-env-ref-name>jms/StockQueue
+	      </resource-env-ref-name>
+	      <resource-env-ref-type>javax.jms.Queue
+	      </resource-env-ref-type>
+	  </resource-env-ref>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="resource-env-ref-name"
+		   type="j2ee:jndi-nameType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The resource-env-ref-name element specifies the name
+	    of a resource environment reference; its value is
+	    the environment entry name used in
+	    the Deployment Component code.  The name is a JNDI
+	    name relative to the java:comp/env context and must
+	    be unique within a Deployment Component.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="resource-env-ref-type"
+		   type="j2ee:fully-qualified-classType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The resource-env-ref-type element specifies the type
+	    of a resource environment reference.  It is the
+	    fully qualified name of a Java language class or
+	    interface.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="resource-refType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The resource-refType contains a declaration of a
+	  Deployment Component's reference to an external resource. It
+	  consists of an optional description, the resource manager
+	  connection factory reference name, the indication of the
+	  resource manager connection factory type expected by the
+	  Deployment Component code, the type of authentication
+	  (Application or Container), and an optional specification of
+	  the shareability of connections obtained from the resource
+	  (Shareable or Unshareable).
+
+	  Example:
+
+	  <resource-ref>
+	      <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
+	      <res-type>javax.sql.DataSource</res-type>
+	      <res-auth>Container</res-auth>
+	      <res-sharing-scope>Shareable</res-sharing-scope>
+	  </resource-ref>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="res-ref-name"
+		   type="j2ee:jndi-nameType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The res-ref-name element specifies the name of a
+	    resource manager connection factory reference.
+	    The name is a JNDI name relative to the
+	    java:comp/env context.
+	    The name must be unique within a Deployment File.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="res-type"
+		   type="j2ee:fully-qualified-classType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The res-type element specifies the type of the data
+	    source. The type is specified by the fully qualified
+	    Java language class or interface
+	    expected to be implemented by the data source.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="res-auth"
+		   type="j2ee:res-authType"/>
+
+      <xsd:element name="res-sharing-scope"
+		   type="j2ee:res-sharing-scopeType"
+		   minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="role-nameType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The role-nameType designates the name of a security role.
+
+	The name must conform to the lexical rules for a token.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="run-asType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The run-asType specifies the run-as identity to be
+	used for the execution of a component. It contains an
+	optional description, and the name of a security role.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="role-name"
+		   type="j2ee:role-nameType"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="security-role-refType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The security-role-refType contains the declaration of a
+	security role reference in a component's or a
+	Deployment Component's code. The declaration consists of an
+	optional description, the security role name used in the
+	code, and an optional link to a security role. If the
+	security role is not specified, the Deployer must choose an
+	appropriate security role.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="role-name"
+		   type="j2ee:role-nameType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The value of the role-name element must be the String used
+	    as the parameter to the
+	    EJBContext.isCallerInRole(String roleName) method or the
+	    HttpServletRequest.isUserInRole(String role) method.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="role-link"
+		   type="j2ee:role-nameType"
+		   minOccurs="0">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The role-link element is a reference to a defined
+	    security role. The role-link element must contain
+	    the name of one of the security roles defined in the
+	    security-role elements.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="security-roleType">
+    <xsd:annotation>
+      <xsd:documentation>
+	<![CDATA[
+
+	  The security-roleType contains the definition of a security
+	  role. The definition consists of an optional description of the
+	  security role, and the security role name.
+
+	  Example:
+
+	      <security-role>
+	      <description>
+		  This role includes all employees who are authorized
+		  to access the employee service application.
+	      </description>
+	      <role-name>employee</role-name>
+	      </security-role>
+
+	  ]]>
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="role-name"
+		   type="j2ee:role-nameType"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="string">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This is a special string datatype that is defined by J2EE as
+	a base type for defining collapsed strings. When schemas
+	require trailing/leading space elimination as well as
+	collapsing the existing whitespace, this base type may be
+	used.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:token">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="true-falseType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This simple type designates a boolean with only two
+	permissible values
+
+	- true
+	- false
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:xsdBooleanType">
+	<xsd:pattern value="(true|false)"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="url-patternType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The url-patternType contains the url pattern of the mapping.
+	It must follow the rules specified in Section 11.2 of the
+	Servlet API Specification. This pattern is assumed to be in
+	URL-decoded form and must not contain CR(#xD) or LF(#xA).
+	If it contains those characters, the container must inform
+	the developer with a descriptive error message.
+	The container must preserve all characters including whitespaces.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:string"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="xsdAnyURIType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type adds an "id" attribute to xsd:anyURI.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:anyURI">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="xsdBooleanType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type adds an "id" attribute to xsd:boolean.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:boolean">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="xsdIntegerType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type adds an "id" attribute to xsd:integer.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:integer">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="xsdNMTOKENType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type adds an "id" attribute to xsd:NMTOKEN.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:NMTOKEN">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="xsdNonNegativeIntegerType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type adds an "id" attribute to xsd:nonNegativeInteger.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:nonNegativeInteger">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="xsdPositiveIntegerType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type adds an "id" attribute to xsd:positiveInteger.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:positiveInteger">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="xsdQNameType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type adds an "id" attribute to xsd:QName.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:QName">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="xsdStringType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type adds an "id" attribute to xsd:string.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:extension base="xsd:string">
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:extension>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+</xsd:schema>
+
diff --git a/xml/tests/testData/documentation/spring-beans.xsd b/xml/tests/testData/documentation/spring-beans.xsd
new file mode 100644
index 0000000..04f42d5
--- /dev/null
+++ b/xml/tests/testData/documentation/spring-beans.xsd
@@ -0,0 +1,1077 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<xsd:schema xmlns="http://www.springframework.org/schema/beans"
+			xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+			targetNamespace="http://www.springframework.org/schema/beans">
+
+	<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
+
+	<xsd:annotation>
+		<xsd:documentation><![CDATA[
+	Spring XML Beans Schema, version 2.0
+	Authors: Rob Harrop, Juergen Hoeller
+
+	This defines a simple and consistent way of creating a namespace
+	of JavaBeans objects, managed by a Spring BeanFactory, read by
+	XmlBeanDefinitionReader (with DefaultBeanDefinitionDocumentReader).
+
+	This document type is used by most Spring functionality, including
+	web application contexts, which are based on bean factories.
+
+	Each "bean" element in this document defines a JavaBean.
+	Typically the bean class is specified, along with JavaBean properties
+	and/or constructor arguments.
+
+	A bean instance can be a "singleton" (shared instance) or a "prototype"
+	(independent instance). Further scopes can be provided by extended
+	bean factories, for example in a web environment.
+
+	References among beans are supported, that is, setting a JavaBean property
+	or a constructor argument to refer to another bean in the same factory
+	(or an ancestor factory).
+
+	As alternative to bean references, "inner bean definitions" can be used.
+	Singleton flags of such inner bean definitions are effectively ignored:
+	inner beans are typically anonymous prototypes.
+
+	There is also support for lists, sets, maps, and java.util.Properties
+	as bean property types or constructor argument types.
+		]]></xsd:documentation>
+	</xsd:annotation>
+
+	<!-- base types -->
+	<xsd:complexType name="identifiedType" abstract="true">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	The unique identifier for a bean. The scope of the identifier
+	is the enclosing bean factory.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:attribute name="id" type="xsd:ID">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The unique identifier for a bean.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<!-- Top-level <beans> tag -->
+	<xsd:element name="beans">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	The top level (typically root) element. Allows the definition  <>"'/>
+	of default values for all nested bean definitions.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="description" minOccurs="0"/>
+				<xsd:choice minOccurs="0" maxOccurs="unbounded">
+					<xsd:element ref="import"/>
+					<xsd:element ref="alias"/>
+					<xsd:element ref="bean"/>
+					<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+				</xsd:choice>
+			</xsd:sequence>
+			<xsd:attribute name="default-lazy-init" default="false" type="xsd:boolean">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'lazy-init' value; see the documentation for the
+	'lazy-init' attribute of the '<bean>/' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="default-merge" default="false" type="xsd:boolean">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'merge' value; see the documentation for the
+	'merge' attribute of the various collection elements.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="default-dependency-check" default="none">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'dependency-check' value; see the documentation for the
+	'dependency-check' attribute of the '<bean>/' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+				<xsd:simpleType>
+					<xsd:restriction base="xsd:NMTOKEN">
+						<xsd:enumeration value="none"/>
+						<xsd:enumeration value="all"/>
+						<xsd:enumeration value="objects"/>
+						<xsd:enumeration value="simple"/>
+					</xsd:restriction>
+				</xsd:simpleType>
+			</xsd:attribute>
+			<xsd:attribute name="default-autowire" default="no">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'autowire' value; see the documentation for the
+	'autowire' attribute of the '<bean>/' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+				<xsd:simpleType>
+					<xsd:restriction base="xsd:NMTOKEN">
+						<xsd:enumeration value="byType"/>
+						<xsd:enumeration value="byName"/>
+						<xsd:enumeration value="no"/>
+						<xsd:enumeration value="autodetect"/>
+						<xsd:enumeration value="constructor"/>
+					</xsd:restriction>
+				</xsd:simpleType>
+			</xsd:attribute>
+			<xsd:attribute name="default-init-method" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'init-method' value; see the documentation for the
+	'init-method' attribute of the '<bean>/' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="default-destroy-method" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'destroy-method' value; see the documentation for the
+	'destroy-method' attribute of the '<bean>/' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="description">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Contains informative text describing the purpose of the enclosing
+	element.
+	Used primarily for user documentation of XML bean definition documents.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="import">
+		<xsd:annotation>
+			<xsd:documentation source="java:org.springframework.core.io.Resource"><![CDATA[
+	Specifies an XML bean definition resource to import.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="resource" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The relative resource location of the XML (bean definition) file to import,
+	for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml".
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="alias">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Defines an alias for a bean (which can reside in a different definition
+	resource).
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="name" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the bean to define an alias for.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="alias" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The alias name to define for the bean.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:group name="beanElements">
+		<xsd:sequence>
+			<xsd:element ref="description" minOccurs="0"/>
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:element ref="meta"/>
+				<xsd:element ref="constructor-arg"/>
+				<xsd:element ref="property"/>
+				<xsd:element ref="lookup-method"/>
+				<xsd:element ref="replaced-method"/>
+				<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+			</xsd:choice>
+		</xsd:sequence>
+	</xsd:group>
+
+	<xsd:attributeGroup name="beanAttributes">
+		<xsd:attribute name="name" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Can be used to create one or more aliases illegal in an (XML) id.
+	Multiple aliases can be separated by any number of spaces, commas,
+	or semi-colons (or indeed any mixture of the three).
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="class" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation source="java:java.lang.Class"><![CDATA[
+	The fully qualified name of the bean's class, except if it pure serves as parent for child bean definitions.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="parent" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of the parent bean definition.
+
+	Will use the bean class of the parent if none is specified, but can
+	also override it. In the latter case, the child bean class must be
+	compatible with the parent, i.e. accept the parent's property values
+	and constructor argument values, if any.
+
+	A child bean definition will inherit constructor argument values,
+	property values and method overrides from the parent, with the option
+	to add new values. If init method, destroy method, factory bean and/or
+	factory method are specified, they will override the corresponding
+	parent settings.
+
+	The remaining settings will always be taken from the child definition:
+	depends on, autowire mode, dependency check, scope, lazy init.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="scope" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The scope of this bean: typically "singleton" (one shared instance,
+	which will be returned by all calls to getBean() with the id),
+	or "prototype" (independent instance resulting from each call to
+	getBean(). Default is "singleton".
+
+	Singletons are most commonly used, and are ideal for multi-threaded
+	service objects. Further scopes, such as "request" or "session",
+	might be supported by extended bean factories (for example, in a
+	web environment).
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+
+	Inner bean definitions inherit the singleton status of their containing
+	bean definition, unless explicitly specified: The inner bean will be a
+	singleton if the containing bean is a singleton, and a prototype if
+	the containing bean has any other scope.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="abstract" type="xsd:boolean">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Is this bean "abstract", that is, not meant to be instantiated itself
+	but rather just serving as parent for concrete child bean definitions?
+	The default is "false". Specify "true" to tell the bean factory to not
+	try to instantiate that particular bean in any case.
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per abstract bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="lazy-init" default="default" type="defaultable-boolean">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Indicates whether or not this bean is to be lazily initialized.
+	If false, it will be instantiated on startup by bean factories
+	that perform eager initialization of singletons. The default is
+	"false".
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="autowire" default="default">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Controls whether bean properties are "autowired".
+	This is an automagical process in which bean references don't need
+	to be coded explicitly in the XML bean definition file, but rather the
+	Spring container works out dependencies.
+
+	There are 5 modes:
+
+	1. "no"
+	The traditional Spring default. No automagical wiring. Bean references
+	must be defined in the XML file via the <ref/> element (or "ref"
+	attribute). We recommend this in most cases as it makes documentation
+	more explicit.
+
+	2. "byName"
+	Autowiring by property name. If a bean of class Cat exposes a dog
+	property, Spring will try to set this to the value of the bean "dog"
+	in the current container. If there is no matching bean by name, nothing
+	special happens; use dependency-check="objects" to raise an error in
+	that case.
+
+	3. "byType"
+	Autowiring if there is exactly one bean of the property type in the
+	container. If there is more than one, a fatal error is raised, and
+	you cannot use byType autowiring for that bean. If there is none,
+	nothing special happens; use dependency-check="objects" to raise an
+	error in that case.
+
+	4. "constructor"
+	Analogous to "byType" for constructor arguments. If there is not exactly
+	one bean of the constructor argument type in the bean factory, a fatal
+	error is raised.
+
+	5. "autodetect"
+	Chooses "constructor" or "byType" through introspection of the bean
+	class. If a default constructor is found, "byType" gets applied.
+
+	Note that explicit dependencies, i.e. "property" and "constructor-arg"
+	elements, always override autowiring. Autowire behavior can be combined
+	with dependency checking, which will be performed after all autowiring
+	has been completed.
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+			<xsd:simpleType>
+				<xsd:restriction base="xsd:NMTOKEN">
+					<xsd:enumeration value="byType"/>
+					<xsd:enumeration value="byName"/>
+					<xsd:enumeration value="default"/>
+					<xsd:enumeration value="no"/>
+					<xsd:enumeration value="autodetect"/>
+					<xsd:enumeration value="constructor"/>
+				</xsd:restriction>
+			</xsd:simpleType>
+		</xsd:attribute>
+		<xsd:attribute name="dependency-check" default="default">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Controls whether or not to check whether all of this
+	beans dependencies, expressed in its properties, are satisfied.
+	The default is to perform no dependency checking.
+
+	"simple" type dependency checking includes primitives and String
+	"object" includes collaborators (other beans in the factory)
+	"all" includes both types of dependency checking
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+			<xsd:simpleType>
+				<xsd:restriction base="xsd:NMTOKEN">
+					<xsd:enumeration value="default"/>
+					<xsd:enumeration value="none"/>
+					<xsd:enumeration value="all"/>
+					<xsd:enumeration value="objects"/>
+					<xsd:enumeration value="simple"/>
+				</xsd:restriction>
+			</xsd:simpleType>
+		</xsd:attribute>
+		<xsd:attribute name="depends-on" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The names of the beans that this bean depends on being initialized.
+	The bean factory will guarantee that these beans get initialized
+	before this bean.
+
+	Note that dependencies are normally expressed through bean properties
+	or constructor arguments. This property should just be necessary for
+	other kinds of dependencies like statics (*ugh*) or database preparation
+	on startup.
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="init-method" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of the custom initialization method to invoke after setting
+	bean properties. The method must have no arguments, but may throw any
+	exception.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="destroy-method" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of the custom destroy method to invoke on bean factory
+	shutdown. The method must have no arguments, but may throw any
+	exception.
+
+	Note: Only invoked on beans whose lifecycle is under the full
+	control of the factory - which is always the case for singletons,
+	but not guaranteed for any other scope.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="factory-method" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of a factory method to use to create this object. Use
+	constructor-arg elements to specify arguments to the factory method,
+	if it takes arguments. Autowiring does not apply to factory methods.
+
+	If the "class" attribute is present, the factory method will be a static
+	method on the class specified by the "class" attribute on this bean
+	definition. Often this will be the same class as that of the constructed
+	object - for example, when the factory method is used as an alternative
+	to a constructor. However, it may be on a different class. In that case,
+	the created object will *not* be of the class specified in the "class"
+	attribute. This is analogous to FactoryBean behavior.
+
+	If the "factory-bean" attribute is present, the "class" attribute is not
+	used, and the factory method will be an instance method on the object
+	returned from a getBean call with the specified bean name. The factory
+	bean may be defined as a singleton or a prototype.
+
+	The factory method can have any number of arguments. Autowiring is not
+	supported. Use indexed constructor-arg elements in conjunction with the
+	factory-method attribute.
+
+	Setter Injection can be used in conjunction with a factory method.
+	Method Injection cannot, as the factory method returns an instance,
+	which will be used when the container creates the bean.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="factory-bean" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Alternative to class attribute for factory-method usage.
+	If this is specified, no class attribute should be used.
+	This must be set to the name of a bean in the current or
+	ancestor factories that contains the relevant factory method.
+	This allows the factory itself to be configured using Dependency
+	Injection, and an instance (rather than static) method to be used.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="autowire-candidate" type="xsd:boolean">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Indicates whether or not this bean should be considered when looking
+	for candidates to satisfy another beans autowiring requirements.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:attributeGroup>
+
+	<xsd:element name="meta" type="metaType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Arbitrary metadata attached to a bean definition.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+
+	<xsd:complexType name="metaType">
+		<xsd:attribute name="key" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The key name of the metadata parameter being defined.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="value" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The value of the metadata parameter being defined (as a simple String).
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<xsd:element name="bean">
+		<xsd:annotation>
+			<xsd:documentation source="java:org.springframework.beans.factory.config.BeanDefinition"><![CDATA[
+	Defines a single (usually named) bean.
+
+	A bean definition may contain nested tags for constructor arguments,
+	property values, lookup methods, and replaced methods. Mixing constructor
+	injection and setter injection on the same bean is explicitly supported.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="identifiedType">
+					<xsd:group ref="beanElements"/>
+					<xsd:attributeGroup ref="beanAttributes"/>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="constructor-arg">
+		<xsd:annotation>
+			<xsd:documentation source="java:org.springframework.beans.factory.config.ConstructorArgumentValues">
+				<![CDATA[
+	Bean definitions can specify zero or more constructor arguments.
+	This is an alternative to "autowire constructor".
+	Arguments correspond to either a specific index of the constructor
+	argument list or are supposed to be matched generically by type.
+
+	Note: A single generic argument value will just be used once, rather
+	than potentially matched multiple times (as of Spring 1.1).
+
+	constructor-arg elements are also used in conjunction with the
+	factory-method element to construct beans using static or instance
+	factory methods.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="description" minOccurs="0"/>
+				<xsd:choice minOccurs="0" maxOccurs="1">
+					<xsd:element ref="bean"/>
+					<xsd:element ref="ref"/>
+					<xsd:element ref="idref"/>
+					<xsd:element ref="value"/>
+					<xsd:element ref="null"/>
+					<xsd:element ref="list"/>
+					<xsd:element ref="set"/>
+					<xsd:element ref="map"/>
+					<xsd:element ref="props"/>
+					<xsd:any namespace="##other" processContents="strict"/>
+				</xsd:choice>
+			</xsd:sequence>
+			<xsd:attribute name="index" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The exact index of thr argument in the constructor argument list.
+	Only needed to avoid ambiguities, e.g. in case of 2 arguments of
+	the exact same type.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="type" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The exact type of the constructor argument. Only needed to avoid
+	ambiguities, e.g. in case of 2 single argument constructors
+	that can both be converted from a String.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="ref" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<ref bean='...'/>" element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="value" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<value>...<value/>"
+	element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="property" type="propertyType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Bean definitions can have zero or more properties.
+	Property elements correspond to JavaBean setter methods exposed
+	by the bean classes. Spring supports primitives, references to other
+	beans in the same or related factories, lists, maps and properties.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+
+	<xsd:element name="lookup-method">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A lookup method causes the IoC container to override the given method
+	and return the bean with the name given in the bean attribute. This is
+	a form of Method Injection. It is particularly useful as an alternative
+	to implementing the BeanFactoryAware interface, in order to be able to
+	make getBean() calls for non-singleton instances at runtime. In this
+	case, Method Injection is a less invasive alternative.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="name" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the lookup method. This method must take no arguments.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="bean" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the bean in the current or ancestor factories that
+	the lookup method should resolve to. Often this bean will be a
+	prototype, in which case the lookup method will return a distinct
+	instance on every invocation. This is useful for single-threaded objects.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="replaced-method">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Similar to the lookup method mechanism, the replaced-method element
+	is used to control IoC container method overriding: Method Injection.
+	This mechanism allows the overriding of a method with arbitrary code.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:choice minOccurs="0" maxOccurs="unbounded">
+					<xsd:element ref="arg-type"/>
+				</xsd:choice>
+			</xsd:sequence>
+			<xsd:attribute name="name" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The name of the method whose implementation must be replaced by the
+	IoC container. If this method is not overloaded, there is no need
+	to use arg-type subelements. If this method is overloaded, arg-type
+	subelements must be used for all override definitions for the method.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="replacer" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation source="java:org.springframework.beans.factory.support.MethodReplacer"><![CDATA[
+	Bean name of an implementation of the MethodReplacer interface in the
+	current or ancestor factories. This may be a singleton or prototype
+	bean. If it is a prototype, a new instance will be used for each
+	method replacement. Singleton usage is the norm.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="arg-type">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Identifies an argument for a replaced method in the event of
+	method overloading.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:attribute name="match" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	Specification of the type of an overloaded method argument as a String.
+	For convenience, this may be a substring of the FQN. E.g. all the
+	following would match "java.lang.String":
+	- java.lang.String
+	- String
+	- Str
+
+	As the number of arguments will be checked also, this convenience
+	can often be used to save typing.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="ref">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Defines a reference to another bean in this factory or an external
+	factory (parent or included factory).
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="bean" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="local" type="xsd:IDREF">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean. The value must be a bean ID,
+	and thus can be checked by the XML parser, thus should be preferred
+	for references within the same bean factory XML file.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="parent" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean *in a parent factory*.
+						]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="idref">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	The id of another bean in this factory or an external factory
+	(parent or included factory).
+	While a regular 'value' element could instead be used for the
+	same effect, using idref in this case allows validation of local
+	bean ids by the XML parser, and name completion by supporting tools.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="bean" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="local" type="xsd:IDREF">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean. The value must be a bean ID,
+	and thus can be checked by the XML parser, thus should be preferred
+	for references within the same bean factory XML file.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="value">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Contains a string representation of a property value.
+	The property may be a string, or may be converted to the required
+	type using the JavaBeans PropertyEditor machinery. This makes it
+	possible for application developers to write custom PropertyEditor
+	implementations that can convert strings to arbitrary target objects.
+
+	Note that this is recommended for simple objects only. Configure
+	more complex objects by populating JavaBean properties with
+	references to other beans.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:attribute name="type" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The exact type that the value should be converted to. Only needed
+	if the type of the target property or constructor argument is
+	too generic: for example, in case of a collection element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="null">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Denotes a Java null value. Necessary because an empty "value" tag
+	will resolve to an empty String, which will not be resolved to a
+	null value unless a special PropertyEditor does so.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- Collection Elements -->
+	<xsd:group name="collectionElements">
+		<xsd:sequence>
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:element ref="bean"/>
+				<xsd:element ref="ref"/>
+				<xsd:element ref="idref"/>
+				<xsd:element ref="value"/>
+				<xsd:element ref="null"/>
+				<xsd:element ref="list"/>
+				<xsd:element ref="set"/>
+				<xsd:element ref="map"/>
+				<xsd:element ref="props"/>
+				<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+			</xsd:choice>
+		</xsd:sequence>
+	</xsd:group>
+
+	<xsd:element name="list" type="listOrSetType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A list can contain multiple inner bean, ref, collection, or value
+	elements. Java lists are untyped, pending generics support in Java5,
+	although references will be strongly typed. A list can also map to
+	an array type. The necessary conversion is automatically performed
+	by the BeanFactory.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="set" type="listOrSetType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A set can contain multiple inner bean, ref, collection, or value
+	elements. Java sets are untyped, pending generics support in Java5,
+	although references will be strongly typed.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="map" type="mapType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A mapping from a key to an object. Maps may be empty.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="entry" type="entryType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A map entry can be an inner bean, ref, value, or collection.
+	The key of the entry is given by the "key" attribute or child element.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="props" type="propsType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Props elements differ from map elements in that values must be strings.
+	Props may be empty.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+
+	<xsd:element name="key">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A key element can contain an inner bean, ref, value, or collection.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:group ref="collectionElements"/>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="prop">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	The string value of the property. Note that whitespace is trimmed
+	off to avoid unwanted whitespace caused by typical XML formatting.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:attribute name="key" type="xsd:string" use="required">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The key of the property entry.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:complexType name="propertyType">
+		<xsd:sequence>
+			<xsd:element ref="description" minOccurs="0"/>
+			<xsd:choice minOccurs="0" maxOccurs="1">
+				<xsd:element ref="meta"/>
+				<xsd:element ref="bean"/>
+				<xsd:element ref="ref"/>
+				<xsd:element ref="idref"/>
+				<xsd:element ref="value"/>
+				<xsd:element ref="null"/>
+				<xsd:element ref="list"/>
+				<xsd:element ref="set"/>
+				<xsd:element ref="map"/>
+				<xsd:element ref="props"/>
+				<xsd:any namespace="##other" processContents="strict"/>
+			</xsd:choice>
+		</xsd:sequence>
+		<xsd:attribute name="name" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of the property, following JavaBean naming conventions.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="ref" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<ref bean='...'/>".
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="value" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<value>...</value>"
+	element.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<!-- Collection Types -->
+
+	<!-- base collection type -->
+	<xsd:complexType name="baseCollectionType">
+		<xsd:attribute name="merge" type="defaultable-boolean">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Enables/disables merging for collections when using parent/child beans.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<!-- base type for collections that have (possibly) typed nested values -->
+	<xsd:complexType name="typedCollectionType">
+		<xsd:complexContent>
+			<xsd:extension base="baseCollectionType">
+				<xsd:attribute name="value-type" type="xsd:string">
+					<xsd:annotation>
+						<xsd:documentation source="java:java.lang.Class"><![CDATA[
+	The default Java type for nested values. Must be a fully qualified
+	class name.
+						]]></xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- 'map' element type -->
+	<xsd:complexType name="mapType">
+		<xsd:complexContent>
+			<xsd:extension base="typedCollectionType">
+				<xsd:sequence>
+					<xsd:choice minOccurs="0" maxOccurs="unbounded">
+						<xsd:element ref="entry"/>
+					</xsd:choice>
+				</xsd:sequence>
+				<xsd:attribute name="key-type" type="xsd:string">
+					<xsd:annotation>
+						<xsd:documentation source="java:java.lang.Class"><![CDATA[
+	The default Java type for nested entry keys. Must be a fully qualified
+	class name.
+						]]></xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- 'entry' element type -->
+	<xsd:complexType name="entryType">
+		<xsd:sequence>
+			<xsd:element ref="key" minOccurs="0"/>
+			<xsd:group ref="collectionElements"/>
+		</xsd:sequence>
+		<xsd:attribute name="key" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Each map element must specify its key as attribute or as child element.
+	A key attribute is always a String value.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="key-ref" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a to a "key" element with a nested
+	"<ref bean='...'/>".
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="value" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<value>...</value>"
+	element.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="value-ref" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<ref bean='...'/>".
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<!-- 'list' and 'set' collection type -->
+	<xsd:complexType name="listOrSetType">
+		<xsd:complexContent>
+			<xsd:extension base="typedCollectionType">
+				<xsd:group ref="collectionElements"/>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- 'props' collection type -->
+	<xsd:complexType name="propsType">
+		<xsd:complexContent>
+			<xsd:extension base="baseCollectionType">
+				<xsd:sequence>
+					<xsd:choice minOccurs="0" maxOccurs="unbounded">
+						<xsd:element ref="prop"/>
+					</xsd:choice>
+				</xsd:sequence>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- simple internal types -->
+	<xsd:simpleType name="defaultable-boolean">
+		<xsd:restriction base="xsd:NMTOKEN">
+			<xsd:enumeration value="default"/>
+			<xsd:enumeration value="true"/>
+			<xsd:enumeration value="false"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+
+</xsd:schema>
diff --git a/xml/tests/testData/documentation/web-app_2_3.dtd b/xml/tests/testData/documentation/web-app_2_3.dtd
new file mode 100644
index 0000000..5e3ab01
--- /dev/null
+++ b/xml/tests/testData/documentation/web-app_2_3.dtd
@@ -0,0 +1,1063 @@
+<!--
+Copyright (c) 2000 Sun Microsystems, Inc.,
+901 San Antonio Road,
+Palo Alto, California 94303, U.S.A.
+All rights reserved.
+
+Sun Microsystems, Inc. has intellectual property rights relating to
+technology embodied in the product that is described in this document.
+In particular, and without limitation, these intellectual property
+rights may include one or more of the U.S. patents listed at
+http://www.sun.com/patents and one or more additional patents or
+pending patent applications in the U.S. and in other countries.
+
+This document and the product to which it pertains are distributed
+under licenses restricting their use, copying, distribution, and
+decompilation.  This document may be reproduced and distributed but may
+not be changed without prior written authorization of Sun and its
+licensors, if any.
+
+Third-party software, including font technology, is copyrighted and
+licensed from Sun suppliers.
+
+Sun,  Sun Microsystems,  the Sun logo,  Java,  JavaServer Pages,  Java
+Naming and Directory Interface,  JDBC,  JDK,  JavaMail and  and
+Enterprise JavaBeans are trademarks or registered trademarks of Sun
+Microsystems, Inc. in the U.S. and other countries.
+
+Federal Acquisitions: Commercial Software - Government Users Subject to
+Standard License Terms and Conditions.
+
+DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
+CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
+WARRANTY OF MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR
+NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH
+DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
+
+
+_________________________________________________________________________
+
+Copyright (c) 2000 Sun Microsystems, Inc.,
+901 San Antonio Road,
+Palo Alto, California 94303, E'tats-Unis.
+Tous droits re'serve's.
+
+Sun Microsystems, Inc. a les droits de proprie'te' intellectuels
+relatants a` la technologie incorpore'e dans le produit qui est de'crit
+dans ce document. En particulier, et sans la limitation, ces droits de
+proprie'te' intellectuels peuvent inclure un ou plus des brevets
+ame'ricains e'nume're's a` http://www.sun.com/patents et un ou les
+brevets plus supple'mentaires ou les applications de brevet en attente
+dans les E'tats-Unis et dans les autres pays.
+
+Ce produit ou document est prote'ge' par un copyright et distribue'
+avec des licences qui en restreignent l'utilisation, la copie, la
+distribution, et la de'compilation.  Ce documention associe n peut
+e^tre reproduite et distribuer, par quelque moyen que ce soit, sans
+l'autorisation pre'alable et e'crite de Sun et de ses bailleurs de
+licence, le cas e'che'ant.
+
+Le logiciel de'tenu par des tiers, et qui comprend la technologie
+relative aux polices de caracte`res, est prote'ge' par un copyright et
+licencie' par des fournisseurs de Sun.
+
+Sun,  Sun Microsystems,  le logo Sun,  Java,  JavaServer Pages,  Java
+Naming and Directory Interface,  JDBC,  JDK,  JavaMail et  and
+Enterprise JavaBeans sont des marques de fabrique ou des marques
+de'pose'es de Sun Microsystems, Inc. aux E'tats-Unis et dans d'autres
+pays.
+
+LA DOCUMENTATION EST FOURNIE "EN L'E'TAT" ET TOUTES AUTRES CONDITIONS,
+DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT
+EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS
+NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A
+L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE
+CONTREFAC,ON.
+-->
+
+<!--
+This is the XML DTD for the Servlet 2.3 deployment descriptor.
+All Servlet 2.3 deployment descriptors must include a DOCTYPE
+of the following form:
+
+  <!DOCTYPE web-app PUBLIC
+	"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+	"http://java.sun.com/dtd/web-app_2_3.dtd">
+
+-->
+
+<!--
+The following conventions apply to all J2EE deployment descriptor
+elements unless indicated otherwise.
+
+- In elements that contain PCDATA, leading and trailing whitespace
+  in the data may be ignored.
+
+- In elements whose value is an "enumerated type", the value is
+  case sensitive.
+
+- In elements that specify a pathname to a file within the same
+  JAR file, relative filenames (i.e., those not starting with "/")
+  are considered relative to the root of the JAR file's namespace.
+  Absolute filenames (i.e., those starting with "/") also specify
+  names in the root of the JAR file's namespace.  In general, relative
+  names are preferred.  The exception is .war files where absolute
+  names are preferred for consistency with the servlet API.
+-->
+
+
+<!--
+The web-app element is the root of the deployment descriptor for
+a web application.
+-->
+<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
+context-param*, filter*, filter-mapping*, listener*, servlet*,
+servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
+error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
+login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)>
+
+<!--
+The auth-constraint element indicates the user roles that should
+be permitted access to this resource collection. The role-name
+used here must either correspond to the role-name of one of the
+security-role elements defined for this web application, or be
+the specially reserved role-name "*" that is a compact syntax for
+indicating all roles in the web application. If both "*" and
+rolenames appear, the container interprets this as all roles.
+If no roles are defined, no user is allowed access to the portion of
+the web application described by the containing security-constraint.
+The container matches role names case sensitively when determining
+access.
+
+
+Used in: security-constraint
+-->
+<!ELEMENT auth-constraint (description?, role-name*)>
+
+<!--
+The auth-method element is used to configure the authentication
+mechanism for the web application. As a prerequisite to gaining access to any web resources which are protected by an authorization
+constraint, a user must have authenticated using the configured
+mechanism. Legal values for this element are "BASIC", "DIGEST",
+"FORM", or "CLIENT-CERT".
+
+Used in: login-config
+-->
+<!ELEMENT auth-method (#PCDATA)>
+
+<!--
+The context-param element contains the declaration of a web
+application's servlet context initialization parameters.
+
+Used in: web-app
+-->
+<!ELEMENT context-param (param-name, param-value, description?)>
+
+<!--
+The description element is used to provide text describing the parent
+element.  The description element should include any information that
+the web application war file producer wants to provide to the consumer of
+the web application war file (i.e., to the Deployer). Typically, the tools
+used by the web application war file consumer will display the description
+when processing the parent element that contains the description.
+
+Used in: auth-constraint, context-param, ejb-local-ref, ejb-ref,
+env-entry, filter, init-param, resource-env-ref, resource-ref, run-as,
+security-role, security-role-ref, servlet, user-data-constraint,
+web-app, web-resource-collection
+-->
+<!ELEMENT description (#PCDATA)>
+
+<!--
+The display-name element contains a short name that is intended to be
+displayed by tools.  The display name need not be unique.
+
+Used in: filter, security-constraint, servlet, web-app
+
+Example:
+
+<display-name>Employee Self Service</display-name>
+-->
+<!ELEMENT display-name (#PCDATA)>
+
+<!--
+The distributable element, by its presence in a web application
+deployment descriptor, indicates that this web application is
+programmed appropriately to be deployed into a distributed servlet
+container
+
+Used in: web-app
+-->
+<!ELEMENT distributable EMPTY>
+
+<!--
+The ejb-link element is used in the ejb-ref or ejb-local-ref
+elements to specify that an EJB reference is linked to an
+enterprise bean.
+
+The name in the ejb-link element is composed of a
+path name specifying the ejb-jar containing the referenced enterprise
+bean with the ejb-name of the target bean appended and separated from
+the path name by "#".  The path name is relative to the war file
+containing the web application that is referencing the enterprise bean.
+This allows multiple enterprise beans with the same ejb-name to be
+uniquely identified.
+
+Used in: ejb-local-ref, ejb-ref
+
+Examples:
+
+	<ejb-link>EmployeeRecord</ejb-link>
+
+	<ejb-link>../products/product.jar#ProductEJB</ejb-link>
+
+-->
+<!ELEMENT ejb-link (#PCDATA)>
+
+<!--
+The ejb-local-ref element is used for the declaration of a reference to
+an enterprise bean's local home. The declaration consists of:
+
+	- an optional description
+	- the EJB reference name used in the code of the web application
+	  that's referencing the enterprise bean
+	- the expected type of the referenced enterprise bean
+	- the expected local home and local interfaces of the referenced
+	  enterprise bean
+	- optional ejb-link information, used to specify the referenced
+	  enterprise bean
+
+Used in: web-app
+-->
+<!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type,
+		local-home, local, ejb-link?)>
+
+<!--
+The ejb-ref element is used for the declaration of a reference to
+an enterprise bean's home. The declaration consists of:
+
+	- an optional description
+	- the EJB reference name used in the code of
+	  the web application that's referencing the enterprise bean
+	- the expected type of the referenced enterprise bean
+	- the expected home and remote interfaces of the referenced
+	  enterprise bean
+	- optional ejb-link information, used to specify the referenced
+	  enterprise bean
+
+Used in: web-app
+-->
+<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type,
+		home, remote, ejb-link?)>
+
+<!--
+The ejb-ref-name element contains the name of an EJB reference. The
+EJB reference is an entry in the web application's environment and is
+relative to the java:comp/env context.  The name must be unique
+within the web application.
+
+It is recommended that name is prefixed with "ejb/".
+
+Used in: ejb-local-ref, ejb-ref
+
+Example:
+
+<ejb-ref-name>ejb/Payroll</ejb-ref-name>
+-->
+<!ELEMENT ejb-ref-name (#PCDATA)>
+
+<!--
+The ejb-ref-type element contains the expected type of the
+referenced enterprise bean.
+
+The ejb-ref-type element must be one of the following:
+
+	<ejb-ref-type>Entity</ejb-ref-type>
+	<ejb-ref-type>Session</ejb-ref-type>
+
+Used in: ejb-local-ref, ejb-ref
+-->
+<!ELEMENT ejb-ref-type (#PCDATA)>
+
+<!--
+The env-entry element contains the declaration of a web application's
+environment entry. The declaration consists of an optional
+description, the name of the environment entry, and an optional
+value.  If a value is not specified, one must be supplied
+during deployment.
+-->
+<!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,
+env-entry-type)>
+
+<!--
+The env-entry-name element contains the name of a web applications's
+environment entry.  The name is a JNDI name relative to the
+java:comp/env context.  The name must be unique within a web application.
+
+Example:
+
+<env-entry-name>minAmount</env-entry-name>
+
+Used in: env-entry
+-->
+<!ELEMENT env-entry-name (#PCDATA)>
+
+<!--
+The env-entry-type element contains the fully-qualified Java type of
+the environment entry value that is expected by the web application's
+code.
+
+The following are the legal values of env-entry-type:
+
+	java.lang.Boolean
+	java.lang.Byte
+	java.lang.Character
+	java.lang.String
+	java.lang.Short
+	java.lang.Integer
+	java.lang.Long
+	java.lang.Float
+	java.lang.Double
+
+Used in: env-entry
+-->
+<!ELEMENT env-entry-type (#PCDATA)>
+
+<!--
+The env-entry-value element contains the value of a web application's
+environment entry. The value must be a String that is valid for the
+constructor of the specified type that takes a single String
+parameter, or for java.lang.Character, a single character.
+
+Example:
+
+<env-entry-value>100.00</env-entry-value>
+
+Used in: env-entry
+-->
+<!ELEMENT env-entry-value (#PCDATA)>
+
+<!--
+The error-code contains an HTTP error code, ex: 404
+
+Used in: error-page
+-->
+<!ELEMENT error-code (#PCDATA)>
+
+<!--
+The error-page element contains a mapping between an error code
+or exception type to the path of a resource in the web application
+
+Used in: web-app
+-->
+<!ELEMENT error-page ((error-code | exception-type), location)>
+
+<!--
+The exception type contains a fully qualified class name of a
+Java exception type.
+
+Used in: error-page
+-->
+<!ELEMENT exception-type (#PCDATA)>
+
+<!--
+The extension element contains a string describing an
+extension. example: "txt"
+
+Used in: mime-mapping
+-->
+<!ELEMENT extension (#PCDATA)>
+
+<!--
+Declares a filter in the web application. The filter is mapped to
+either a servlet or a URL pattern in the filter-mapping element, using
+the filter-name value to reference. Filters can access the
+initialization parameters declared in the deployment descriptor at
+runtime via the FilterConfig interface.
+
+Used in: web-app
+-->
+<!ELEMENT filter (icon?, filter-name, display-name?, description?,
+filter-class, init-param*)>
+
+<!--
+The fully qualified classname of the filter.
+
+Used in: filter
+-->
+<!ELEMENT filter-class (#PCDATA)>
+
+<!--
+Declaration of the filter mappings in this web application. The
+container uses the filter-mapping declarations to decide which filters
+to apply to a request, and in what order. The container matches the
+request URI to a Servlet in the normal way. To determine which filters
+to apply it matches filter-mapping declarations either on servlet-name,
+or on url-pattern for each filter-mapping element, depending on which
+style is used. The order in which filters are invoked is the order in
+which filter-mapping declarations that match a request URI for a
+servlet appear in the list of filter-mapping elements.The filter-name
+value must be the value of the <filter-name> sub-elements of one of the
+<filter> declarations in the deployment descriptor.
+
+Used in: web-app
+-->
+<!ELEMENT filter-mapping (filter-name, (url-pattern | servlet-name))>
+
+<!--
+The logical name of the filter. This name is used to map the filter.
+Each filter name is unique within the web application.
+
+Used in: filter, filter-mapping
+-->
+<!ELEMENT filter-name (#PCDATA)>
+
+<!--
+The form-error-page element defines the location in the web app
+where the error page that is displayed when login is not successful
+can be found. The path begins with a leading / and is interpreted
+relative to the root of the WAR.
+
+Used in: form-login-config
+-->
+<!ELEMENT form-error-page (#PCDATA)>
+
+<!--
+The form-login-config element specifies the login and error pages
+that should be used in form based login. If form based authentication
+is not used, these elements are ignored.
+
+Used in: login-config
+-->
+<!ELEMENT form-login-config (form-login-page, form-error-page)>
+
+<!--
+The form-login-page element defines the location in the web app
+where the page that can be used for login can be found. The path
+begins with a leading / and is interpreted relative to the root of the WAR.
+
+Used in: form-login-config
+-->
+<!ELEMENT form-login-page (#PCDATA)>
+
+<!--
+The home element contains the fully-qualified name of the enterprise
+bean's home interface.
+
+Used in: ejb-ref
+
+Example:
+
+<home>com.aardvark.payroll.PayrollHome</home>
+-->
+<!ELEMENT home (#PCDATA)>
+
+<!--
+The http-method contains an HTTP method (GET | POST |...).
+
+Used in: web-resource-collection
+-->
+<!ELEMENT http-method (#PCDATA)>
+
+<!--
+The icon element contains small-icon and large-icon elements that
+specify the file names for small and a large GIF or JPEG icon images
+used to represent the parent element in a GUI tool.
+
+Used in: filter, servlet, web-app
+-->
+<!ELEMENT icon (small-icon?, large-icon?)>
+
+<!--
+The init-param element contains a name/value pair as an
+initialization param of the servlet
+
+Used in: filter, servlet
+-->
+<!ELEMENT init-param (param-name, param-value, description?)>
+
+<!--
+The jsp-file element contains the full path to a JSP file within
+the web application beginning with a `/'.
+
+Used in: servlet
+-->
+<!ELEMENT jsp-file (#PCDATA)>
+
+<!--
+The large-icon element contains the name of a file
+containing a large (32 x 32) icon image. The file
+name is a relative path within the web application's
+war file.
+
+The image may be either in the JPEG or GIF format.
+The icon can be used by tools.
+
+Used in: icon
+
+Example:
+
+<large-icon>employee-service-icon32x32.jpg</large-icon>
+-->
+<!ELEMENT large-icon (#PCDATA)>
+
+<!--
+The listener element indicates the deployment properties for a web
+application listener bean.
+
+Used in: web-app
+-->
+<!ELEMENT listener (listener-class)>
+
+<!--
+The listener-class element declares a class in the application must be
+registered as a web application listener bean. The value is the fully qualified classname of the listener class.
+
+
+Used in: listener
+-->
+<!ELEMENT listener-class (#PCDATA)>
+
+<!--
+The load-on-startup element indicates that this servlet should be
+loaded (instantiated and have its init() called) on the startup
+of the web application. The optional contents of
+these element must be an integer indicating the order in which
+the servlet should be loaded. If the value is a negative integer,
+or the element is not present, the container is free to load the
+servlet whenever it chooses. If the value is a positive integer
+or 0, the container must load and initialize the servlet as the
+application is deployed. The container must guarantee that
+servlets marked with lower integers are loaded before servlets
+marked with higher integers. The container may choose the order
+of loading of servlets with the same load-on-start-up value.
+
+Used in: servlet
+-->
+<!ELEMENT load-on-startup (#PCDATA)>
+
+<!--
+
+The local element contains the fully-qualified name of the
+enterprise bean's local interface.
+
+Used in: ejb-local-ref
+
+-->
+<!ELEMENT local (#PCDATA)>
+
+<!--
+
+The local-home element contains the fully-qualified name of the
+enterprise bean's local home interface.
+
+Used in: ejb-local-ref
+-->
+<!ELEMENT local-home (#PCDATA)>
+
+<!--
+The location element contains the location of the resource in the web
+application relative to the root of the web application. The value of
+the location must have a leading `/'.
+
+Used in: error-page
+-->
+<!ELEMENT location (#PCDATA)>
+
+<!--
+The login-config element is used to configure the authentication
+method that should be used, the realm name that should be used for
+this application, and the attributes that are needed by the form login
+mechanism.
+
+Used in: web-app
+-->
+<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
+
+<!--
+The mime-mapping element defines a mapping between an extension
+and a mime type.
+
+Used in: web-app
+-->
+<!ELEMENT mime-mapping (extension, mime-type)>
+
+<!--
+The mime-type element contains a defined mime type. example:
+"text/plain"
+
+Used in: mime-mapping
+-->
+<!ELEMENT mime-type (#PCDATA)>
+
+<!--
+The param-name element contains the name of a parameter. Each parameter
+name must be unique in the web application.
+
+
+Used in: context-param, init-param
+-->
+<!ELEMENT param-name (#PCDATA)>
+
+<!--
+The param-value element contains the value of a parameter.
+
+Used in: context-param, init-param
+-->
+<!ELEMENT param-value (#PCDATA)>
+
+<!--
+The realm name element specifies the realm name to use in HTTP
+Basic authorization.
+
+Used in: login-config
+-->
+<!ELEMENT realm-name (#PCDATA)>
+
+<!--
+The remote element contains the fully-qualified name of the enterprise
+bean's remote interface.
+
+Used in: ejb-ref
+
+Example:
+
+<remote>com.wombat.empl.EmployeeService</remote>
+-->
+<!ELEMENT remote (#PCDATA)>
+
+<!--
+The res-auth element specifies whether the web application code signs
+on programmatically to the resource manager, or whether the Container
+will sign on to the resource manager on behalf of the web application. In the
+latter case, the Container uses information that is supplied by the
+Deployer.
+
+The value of this element must be one of the two following:
+
+	<res-auth>Application</res-auth>
+	<res-auth>Container</res-auth>
+
+Used in: resource-ref
+-->
+<!ELEMENT res-auth (#PCDATA)>
+
+<!--
+The res-ref-name element specifies the name of a resource manager
+connection factory reference.  The name is a JNDI name relative to the
+java:comp/env context.  The name must be unique within a web application.
+
+Used in: resource-ref
+-->
+<!ELEMENT res-ref-name (#PCDATA)>
+
+<!--
+The res-sharing-scope element specifies whether connections obtained
+through the given resource manager connection factory reference can be
+shared. The value of this element, if specified, must be one of the
+two following:
+
+	<res-sharing-scope>Shareable</res-sharing-scope>
+	<res-sharing-scope>Unshareable</res-sharing-scope>
+
+The default value is Shareable.
+
+Used in: resource-ref
+-->
+<!ELEMENT res-sharing-scope (#PCDATA)>
+
+<!--
+The res-type element specifies the type of the data source. The type
+is specified by the fully qualified Java language class or interface
+expected to be implemented by the data source.
+
+Used in: resource-ref
+-->
+<!ELEMENT res-type (#PCDATA)>
+
+<!--
+The resource-env-ref element contains a declaration of a web application's
+reference to an administered object associated with a resource
+in the web application's environment.  It consists of an optional
+description, the resource environment reference name, and an
+indication of the resource environment reference type expected by
+the web application code.
+
+Used in: web-app
+
+Example:
+
+<resource-env-ref>
+    <resource-env-ref-name>jms/StockQueue</resource-env-ref-name>
+    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+</resource-env-ref>
+-->
+<!ELEMENT resource-env-ref (description?, resource-env-ref-name,
+		resource-env-ref-type)>
+
+<!--
+The resource-env-ref-name element specifies the name of a resource
+environment reference; its value is the environment entry name used in
+the web application code.  The name is a JNDI name relative to the
+java:comp/env context and must be unique within a web application.
+
+Used in: resource-env-ref
+-->
+<!ELEMENT resource-env-ref-name (#PCDATA)>
+
+<!--
+The resource-env-ref-type element specifies the type of a resource
+environment reference.  It is the fully qualified name of a Java
+language class or interface.
+
+Used in: resource-env-ref
+-->
+<!ELEMENT resource-env-ref-type (#PCDATA)>
+
+<!--
+The resource-ref element contains a declaration of a web application's
+reference to an external resource. It consists of an optional
+description, the resource manager connection factory reference name,
+the indication of the resource manager connection factory type
+expected by the web application code, the type of authentication
+(Application or Container), and an optional specification of the
+shareability of connections obtained from the resource (Shareable or
+Unshareable).
+
+Used in: web-app
+
+Example:
+
+    <resource-ref>
+	<res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
+	<res-type>javax.sql.DataSource</res-type>
+	<res-auth>Container</res-auth>
+	<res-sharing-scope>Shareable</res-sharing-scope>
+    </resource-ref>
+-->
+<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth,
+		res-sharing-scope?)>
+
+<!--
+The role-link element is a reference to a defined security role. The
+role-link element must contain the name of one of the security roles
+defined in the security-role elements.
+
+Used in: security-role-ref
+-->
+<!ELEMENT role-link (#PCDATA)>
+
+<!--
+The role-name element contains the name of a security role.
+
+The name must conform to the lexical rules for an NMTOKEN.
+
+Used in: auth-constraint, run-as, security-role, security-role-ref
+-->
+<!ELEMENT role-name (#PCDATA)>
+
+<!--
+The run-as element specifies the run-as identity to be used for the
+execution of the web application. It contains an optional description, and
+the name of a security role.
+
+Used in: servlet
+-->
+<!ELEMENT run-as (description?, role-name)>
+
+<!--
+The security-constraint element is used to associate security
+constraints with one or more web resource collections
+
+Used in: web-app
+-->
+<!ELEMENT security-constraint (display-name?, web-resource-collection+,
+auth-constraint?, user-data-constraint?)>
+
+<!--
+The security-role element contains the definition of a security
+role. The definition consists of an optional description of the
+security role, and the security role name.
+
+Used in: web-app
+
+Example:
+
+    <security-role>
+	<description>
+	    This role includes all employees who are authorized
+	    to access the employee service application.
+	</description>
+	<role-name>employee</role-name>
+    </security-role>
+-->
+<!ELEMENT security-role (description?, role-name)>
+
+<!--
+The security-role-ref element contains the declaration of a security
+role reference in the web application's code. The declaration consists
+of an optional description, the security role name used in the code,
+and an optional link to a security role. If the security role is not
+specified, the Deployer must choose an appropriate security role.
+
+The value of the role-name element must be the String used as the
+parameter to the EJBContext.isCallerInRole(String roleName) method
+or the HttpServletRequest.isUserInRole(String role) method.
+
+Used in: servlet
+
+-->
+<!ELEMENT security-role-ref (description?, role-name, role-link?)>
+
+<!--
+The servlet element contains the declarative data of a
+servlet. If a jsp-file is specified and the load-on-startup element is
+present, then the JSP should be precompiled and loaded.
+
+Used in: web-app
+-->
+<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
+(servlet-class|jsp-file), init-param*, load-on-startup?, run-as?, security-role-ref*)>
+
+<!--
+The servlet-class element contains the fully qualified class name
+of the servlet.
+
+Used in: servlet
+-->
+<!ELEMENT servlet-class (#PCDATA)>
+
+<!--
+The servlet-mapping element defines a mapping between a servlet
+and a url pattern
+
+Used in: web-app
+-->
+<!ELEMENT servlet-mapping (servlet-name, url-pattern)>
+
+<!--
+The servlet-name element contains the canonical name of the
+servlet. Each servlet name is unique within the web application.
+
+Used in: filter-mapping, servlet, servlet-mapping
+-->
+<!ELEMENT servlet-name (#PCDATA)>
+
+<!--
+The session-config element defines the session parameters for
+this web application.
+
+Used in: web-app
+-->
+<!ELEMENT session-config (session-timeout?)>
+
+<!--
+The session-timeout element defines the default session timeout
+interval for all sessions created in this web application. The
+specified timeout must be expressed in a whole number of minutes.
+If the timeout is 0 or less, the container ensures the default
+behaviour of sessions is never to time out.
+
+Used in: session-config
+-->
+<!ELEMENT session-timeout (#PCDATA)>
+
+<!--
+The small-icon element contains the name of a file
+containing a small (16 x 16) icon image. The file
+name is a relative path within the web application's
+war file.
+
+The image may be either in the JPEG or GIF format.
+The icon can be used by tools.
+
+Used in: icon
+
+Example:
+
+<small-icon>employee-service-icon16x16.jpg</small-icon>
+-->
+<!ELEMENT small-icon (#PCDATA)>
+
+<!--
+The taglib element is used to describe a JSP tag library.
+
+Used in: web-app
+-->
+<!ELEMENT taglib (taglib-uri, taglib-location)>
+
+<!--
+the taglib-location element contains the location (as a resource
+relative to the root of the web application) where to find the Tag
+Libary Description file for the tag library.
+
+Used in: taglib
+-->
+<!ELEMENT taglib-location (#PCDATA)>
+
+<!--
+The taglib-uri element describes a URI, relative to the location
+of the web.xml document, identifying a Tag Library used in the Web
+Application.
+
+Used in: taglib
+-->
+<!ELEMENT taglib-uri (#PCDATA)>
+
+<!--
+The transport-guarantee element specifies that the communication
+between client and server should be NONE, INTEGRAL, or
+CONFIDENTIAL. NONE means that the application does not require any
+transport guarantees. A value of INTEGRAL means that the application
+requires that the data sent between the client and server be sent in
+such a way that it can't be changed in transit. CONFIDENTIAL means
+that the application requires that the data be transmitted in a
+fashion that prevents other entities from observing the contents of
+the transmission. In most cases, the presence of the INTEGRAL or
+CONFIDENTIAL flag will indicate that the use of SSL is required.
+
+Used in: user-data-constraint
+-->
+<!ELEMENT transport-guarantee (#PCDATA)>
+
+<!--
+The url-pattern element contains the url pattern of the mapping. Must
+follow the rules specified in Section 11.2 of the Servlet API
+Specification.
+
+Used in: filter-mapping, servlet-mapping, web-resource-collection
+-->
+<!ELEMENT url-pattern (#PCDATA)>
+
+<!--
+The user-data-constraint element is used to indicate how data
+communicated between the client and container should be protected.
+
+Used in: security-constraint
+-->
+<!ELEMENT user-data-constraint (description?, transport-guarantee)>
+
+<!--
+The web-resource-collection element is used to identify a subset
+of the resources and HTTP methods on those resources within a web
+application to which a security constraint applies. If no HTTP methods
+are specified, then the security constraint applies to all HTTP
+methods.
+
+Used in: security-constraint
+-->
+<!ELEMENT web-resource-collection (web-resource-name, description?,
+url-pattern*, http-method*)>
+
+<!--
+The web-resource-name contains the name of this web resource
+collection.
+
+Used in: web-resource-collection
+-->
+<!ELEMENT web-resource-name (#PCDATA)>
+
+<!--
+The welcome-file element contains file name to use as a default
+welcome file, such as index.html
+
+Used in: welcome-file-list
+-->
+<!ELEMENT welcome-file (#PCDATA)>
+
+<!--
+The welcome-file-list contains an ordered list of welcome files
+elements.
+
+Used in: web-app
+-->
+<!ELEMENT welcome-file-list (welcome-file+)>
+
+<!--
+The ID mechanism is to allow tools that produce additional deployment
+information (i.e., information beyond the standard deployment
+descriptor information) to store the non-standard information in a
+separate file, and easily refer from these tool-specific files to the
+information in the standard deployment descriptor.
+
+Tools are not allowed to add the non-standard information into the
+standard deployment descriptor.
+-->
+
+<!ATTLIST auth-constraint id ID #IMPLIED>
+<!ATTLIST auth-method id ID #IMPLIED>
+<!ATTLIST context-param id ID #IMPLIED>
+<!ATTLIST description id ID #IMPLIED>
+<!ATTLIST display-name id ID #IMPLIED>
+<!ATTLIST distributable id ID #IMPLIED>
+<!ATTLIST ejb-link id ID #IMPLIED>
+<!ATTLIST ejb-local-ref id ID #IMPLIED>
+<!ATTLIST ejb-ref id ID #IMPLIED>
+<!ATTLIST ejb-ref-name id ID #IMPLIED>
+<!ATTLIST ejb-ref-type id ID #IMPLIED>
+<!ATTLIST env-entry id ID #IMPLIED>
+<!ATTLIST env-entry-name id ID #IMPLIED>
+<!ATTLIST env-entry-type id ID #IMPLIED>
+<!ATTLIST env-entry-value id ID #IMPLIED>
+<!ATTLIST error-code id ID #IMPLIED>
+<!ATTLIST error-page id ID #IMPLIED>
+<!ATTLIST exception-type id ID #IMPLIED>
+<!ATTLIST extension id ID #IMPLIED>
+<!ATTLIST filter id ID #IMPLIED>
+<!ATTLIST filter-class id ID #IMPLIED>
+<!ATTLIST filter-mapping id ID #IMPLIED>
+<!ATTLIST filter-name id ID #IMPLIED>
+<!ATTLIST form-error-page id ID #IMPLIED>
+<!ATTLIST form-login-config id ID #IMPLIED>
+<!ATTLIST form-login-page id ID #IMPLIED>
+<!ATTLIST home id ID #IMPLIED>
+<!ATTLIST http-method id ID #IMPLIED>
+<!ATTLIST icon id ID #IMPLIED>
+<!ATTLIST init-param id ID #IMPLIED>
+<!ATTLIST jsp-file id ID #IMPLIED>
+<!ATTLIST large-icon id ID #IMPLIED>
+<!ATTLIST listener id ID #IMPLIED>
+<!ATTLIST listener-class id ID #IMPLIED>
+<!ATTLIST load-on-startup id ID #IMPLIED>
+<!ATTLIST local id ID #IMPLIED>
+<!ATTLIST local-home id ID #IMPLIED>
+<!ATTLIST location id ID #IMPLIED>
+<!ATTLIST login-config id ID #IMPLIED>
+<!ATTLIST mime-mapping id ID #IMPLIED>
+<!ATTLIST mime-type id ID #IMPLIED>
+<!ATTLIST param-name id ID #IMPLIED>
+<!ATTLIST param-value id ID #IMPLIED>
+<!ATTLIST realm-name id ID #IMPLIED>
+<!ATTLIST remote id ID #IMPLIED>
+<!ATTLIST res-auth id ID #IMPLIED>
+<!ATTLIST res-ref-name id ID #IMPLIED>
+<!ATTLIST res-sharing-scope id ID #IMPLIED>
+<!ATTLIST res-type id ID #IMPLIED>
+<!ATTLIST resource-env-ref id ID #IMPLIED>
+<!ATTLIST resource-env-ref-name id ID #IMPLIED>
+<!ATTLIST resource-env-ref-type id ID #IMPLIED>
+<!ATTLIST resource-ref id ID #IMPLIED>
+<!ATTLIST role-link id ID #IMPLIED>
+<!ATTLIST role-name id ID #IMPLIED>
+<!ATTLIST run-as id ID #IMPLIED>
+<!ATTLIST security-constraint id ID #IMPLIED>
+<!ATTLIST security-role id ID #IMPLIED>
+<!ATTLIST security-role-ref id ID #IMPLIED>
+<!ATTLIST servlet id ID #IMPLIED>
+<!ATTLIST servlet-class id ID #IMPLIED>
+<!ATTLIST servlet-mapping id ID #IMPLIED>
+<!ATTLIST servlet-name id ID #IMPLIED>
+<!ATTLIST session-config id ID #IMPLIED>
+<!ATTLIST session-timeout id ID #IMPLIED>
+<!ATTLIST small-icon id ID #IMPLIED>
+<!ATTLIST taglib id ID #IMPLIED>
+<!ATTLIST taglib-location id ID #IMPLIED>
+<!ATTLIST taglib-uri id ID #IMPLIED>
+<!ATTLIST transport-guarantee id ID #IMPLIED>
+<!ATTLIST url-pattern id ID #IMPLIED>
+<!ATTLIST user-data-constraint id ID #IMPLIED>
+<!ATTLIST web-app id ID #IMPLIED>
+<!ATTLIST web-resource-collection id ID #IMPLIED>
+<!ATTLIST web-resource-name id ID #IMPLIED>
+<!ATTLIST welcome-file id ID #IMPLIED>
+<!ATTLIST welcome-file-list id ID #IMPLIED>
diff --git a/xml/tests/testData/documentation/web-app_2_4.xsd b/xml/tests/testData/documentation/web-app_2_4.xsd
new file mode 100644
index 0000000..9e4f58dc
--- /dev/null
+++ b/xml/tests/testData/documentation/web-app_2_4.xsd
@@ -0,0 +1,1242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+	    targetNamespace="http://java.sun.com/xml/ns/j2ee"
+	    xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
+	    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	    elementFormDefault="qualified"
+	    attributeFormDefault="unqualified"
+	    version="2.4">
+  <xsd:annotation>
+    <xsd:documentation>
+      @(#)web-app_2_4.xsds	1.61 04/04/16
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:annotation>
+    <xsd:documentation>
+
+      DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+      Copyright 2003-2007 Sun Microsystems, Inc. All rights reserved.
+
+      The contents of this file are subject to the terms of either the
+      GNU General Public License Version 2 only ("GPL") or the Common
+      Development and Distribution License("CDDL") (collectively, the
+      "License").  You may not use this file except in compliance with
+      the License. You can obtain a copy of the License at
+      https://glassfish.dev.java.net/public/CDDL+GPL.html or
+      glassfish/bootstrap/legal/LICENSE.txt.  See the License for the
+      specific language governing permissions and limitations under the
+      License.
+
+      When distributing the software, include this License Header
+      Notice in each file and include the License file at
+      glassfish/bootstrap/legal/LICENSE.txt.  Sun designates this
+      particular file as subject to the "Classpath" exception as
+      provided by Sun in the GPL Version 2 section of the License file
+      that accompanied this code.  If applicable, add the following
+      below the License Header, with the fields enclosed by brackets []
+      replaced by your own identifying information:
+      "Portions Copyrighted [year] [name of copyright owner]"
+
+      Contributor(s):
+
+      If you wish your version of this file to be governed by only the
+      CDDL or only the GPL Version 2, indicate your decision by adding
+      "[Contributor] elects to include this software in this
+      distribution under the [CDDL or GPL Version 2] license."  If you
+      don't indicate a single choice of license, a recipient has the
+      option to distribute your version of this file under either the
+      CDDL, the GPL Version 2 or to extend the choice of license to its
+      licensees as provided above.  However, if you add GPL Version 2
+      code and therefore, elected the GPL Version 2 license, then the
+      option applies only if the new code is made subject to such
+      option by the copyright holder.
+
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:annotation>
+    <xsd:documentation>
+      <![CDATA[
+
+	This is the XML Schema for the Servlet 2.4 deployment descriptor.
+	The deployment descriptor must be named "WEB-INF/web.xml" in the
+	web application's war file.  All Servlet deployment descriptors
+	must indicate the web application schema by using the J2EE
+	namespace:
+
+	http://java.sun.com/xml/ns/j2ee
+
+	and by indicating the version of the schema by
+	using the version element as shown below:
+
+	    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	      xsi:schemaLocation="..."
+	      version="2.4">
+	      ...
+	    </web-app>
+
+	The instance documents may indicate the published version of
+	the schema using the xsi:schemaLocation attribute for J2EE
+	namespace with the following location:
+
+	http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
+
+	]]>
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:annotation>
+    <xsd:documentation>
+
+      The following conventions apply to all J2EE
+      deployment descriptor elements unless indicated otherwise.
+
+      - In elements that specify a pathname to a file within the
+	same JAR file, relative filenames (i.e., those not
+	starting with "/") are considered relative to the root of
+	the JAR file's namespace.  Absolute filenames (i.e., those
+	starting with "/") also specify names in the root of the
+	JAR file's namespace.  In general, relative names are
+	preferred.  The exception is .war files where absolute
+	names are preferred for consistency with the Servlet API.
+
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:include schemaLocation="j2ee_1_4.xsd"/>
+  <xsd:include schemaLocation="jsp_2_0.xsd"/>
+
+
+<!-- **************************************************** -->
+
+
+  <xsd:element name="web-app" type="j2ee:web-appType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The web-app element is the root of the deployment
+	descriptor for a web application.  Note that the sub-elements
+	of this element can be in the arbitrary order. Because of
+	that, the multiplicity of the elements of distributable,
+	session-config, welcome-file-list, jsp-config, login-config,
+	and locale-encoding-mapping-list was changed from "?" to "*"
+	in this schema.  However, the deployment descriptor instance
+	file must not contain multiple elements of session-config,
+	jsp-config, and login-config. When there are multiple elements of
+	welcome-file-list or locale-encoding-mapping-list, the container
+	must concatinate the element contents.  The multiple occurance
+	of the element distributable is redundant and the container
+	treats that case exactly in the same way when there is only
+	one distributable.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:unique name="web-app-servlet-name-uniqueness">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The servlet element contains the name of a servlet.
+	  The name must be unique within the web application.
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:servlet"/>
+      <xsd:field    xpath="j2ee:servlet-name"/>
+    </xsd:unique>
+
+    <xsd:unique name="web-app-filter-name-uniqueness">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The filter element contains the name of a filter.
+	  The name must be unique within the web application.
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:filter"/>
+      <xsd:field    xpath="j2ee:filter-name"/>
+    </xsd:unique>
+
+    <xsd:unique name="web-app-ejb-local-ref-name-uniqueness">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The ejb-local-ref-name element contains the name of an EJB
+	  reference. The EJB reference is an entry in the web
+	  application's environment and is relative to the
+	  java:comp/env context.  The name must be unique within
+	  the web application.
+
+	  It is recommended that name is prefixed with "ejb/".
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:ejb-local-ref"/>
+      <xsd:field    xpath="j2ee:ejb-ref-name"/>
+    </xsd:unique>
+
+    <xsd:unique name="web-app-ejb-ref-name-uniqueness">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The ejb-ref-name element contains the name of an EJB
+	  reference. The EJB reference is an entry in the web
+	  application's environment and is relative to the
+	  java:comp/env context.  The name must be unique within
+	  the web application.
+
+	  It is recommended that name is prefixed with "ejb/".
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:ejb-ref"/>
+      <xsd:field    xpath="j2ee:ejb-ref-name"/>
+    </xsd:unique>
+
+    <xsd:unique name="web-app-resource-env-ref-uniqueness">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The resource-env-ref-name element specifies the name of
+	  a resource environment reference; its value is the
+	  environment entry name used in the web application code.
+	  The name is a JNDI name relative to the java:comp/env
+	  context and must be unique within a web application.
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:resource-env-ref"/>
+      <xsd:field    xpath="j2ee:resource-env-ref-name"/>
+    </xsd:unique>
+
+    <xsd:unique name="web-app-message-destination-ref-uniqueness">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The message-destination-ref-name element specifies the name of
+	  a message destination reference; its value is the
+	  environment entry name used in the web application code.
+	  The name is a JNDI name relative to the java:comp/env
+	  context and must be unique within a web application.
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:message-destination-ref"/>
+      <xsd:field    xpath="j2ee:message-destination-ref-name"/>
+    </xsd:unique>
+
+    <xsd:unique name="web-app-res-ref-name-uniqueness">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The res-ref-name element specifies the name of a
+	  resource manager connection factory reference.  The name
+	  is a JNDI name relative to the java:comp/env context.
+	  The name must be unique within a web application.
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:resource-ref"/>
+      <xsd:field    xpath="j2ee:res-ref-name"/>
+    </xsd:unique>
+
+    <xsd:unique name="web-app-env-entry-name-uniqueness">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The env-entry-name element contains the name of a web
+	  application's environment entry.  The name is a JNDI
+	  name relative to the java:comp/env context.  The name
+	  must be unique within a web application.
+
+	</xsd:documentation>
+      </xsd:annotation>
+
+      <xsd:selector xpath="j2ee:env-entry"/>
+      <xsd:field    xpath="j2ee:env-entry-name"/>
+    </xsd:unique>
+
+    <xsd:key name="web-app-role-name-key">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  A role-name-key is specified to allow the references
+	  from the security-role-refs.
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:security-role"/>
+      <xsd:field    xpath="j2ee:role-name"/>
+    </xsd:key>
+
+    <xsd:keyref name="web-app-role-name-references"
+		refer="j2ee:web-app-role-name-key">
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The keyref indicates the references from
+	  security-role-ref to a specified role-name.
+
+	</xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="j2ee:servlet/j2ee:security-role-ref"/>
+      <xsd:field    xpath="j2ee:role-link"/>
+    </xsd:keyref>
+  </xsd:element>
+
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="auth-constraintType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The auth-constraintType indicates the user roles that
+	should be permitted access to this resource
+	collection. The role-name used here must either correspond
+	to the role-name of one of the security-role elements
+	defined for this web application, or be the specially
+	reserved role-name "*" that is a compact syntax for
+	indicating all roles in the web application. If both "*"
+	and rolenames appear, the container interprets this as all
+	roles.  If no roles are defined, no user is allowed access
+	to the portion of the web application described by the
+	containing security-constraint.  The container matches
+	role names case sensitively when determining access.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+      <xsd:element name="role-name"
+		   type="j2ee:role-nameType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="auth-methodType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The auth-methodType is used to configure the authentication
+	mechanism for the web application. As a prerequisite to
+	gaining access to any web resources which are protected by
+	an authorization constraint, a user must have authenticated
+	using the configured mechanism. Legal values are "BASIC",
+	"DIGEST", "FORM", "CLIENT-CERT", or a vendor-specific
+	authentication scheme.
+
+	Used in: login-config
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="dispatcherType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The dispatcher has four legal values: FORWARD, REQUEST, INCLUDE,
+	and ERROR. A value of FORWARD means the Filter will be applied
+	under RequestDispatcher.forward() calls.  A value of REQUEST
+	means the Filter will be applied under ordinary client calls to
+	the path or servlet. A value of INCLUDE means the Filter will be
+	applied under RequestDispatcher.include() calls.  A value of
+	ERROR means the Filter will be applied under the error page
+	mechanism.  The absence of any dispatcher elements in a
+	filter-mapping indicates a default of applying filters only under
+	ordinary client calls to the path or servlet.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="FORWARD"/>
+	<xsd:enumeration value="INCLUDE"/>
+	<xsd:enumeration value="REQUEST"/>
+	<xsd:enumeration value="ERROR"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:simpleType name="encodingType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The encodingType defines IANA character sets.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:restriction base="xsd:string">
+      <xsd:pattern value="[^\s]+"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="error-codeType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The error-code contains an HTTP error code, ex: 404
+
+	Used in: error-page
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:xsdPositiveIntegerType">
+	<xsd:pattern value="\d{3}"/>
+	<xsd:attribute name="id" type="xsd:ID"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="error-pageType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The error-pageType contains a mapping between an error code
+	or exception type to the path of a resource in the web
+	application.
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:choice>
+	<xsd:element name="error-code"
+		     type="j2ee:error-codeType"/>
+
+	<xsd:element name="exception-type"
+		     type="j2ee:fully-qualified-classType">
+	  <xsd:annotation>
+	    <xsd:documentation>
+
+	      The exception-type contains a fully qualified class
+	      name of a Java exception type.
+
+	    </xsd:documentation>
+	  </xsd:annotation>
+	</xsd:element>
+      </xsd:choice>
+
+      <xsd:element name="location"
+		   type="j2ee:war-pathType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The location element contains the location of the
+	    resource in the web application relative to the root of
+	    the web application. The value of the location must have
+	    a leading `/'.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="filter-mappingType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	Declaration of the filter mappings in this web
+	application is done by using filter-mappingType.
+	The container uses the filter-mapping
+	declarations to decide which filters to apply to a request,
+	and in what order. The container matches the request URI to
+	a Servlet in the normal way. To determine which filters to
+	apply it matches filter-mapping declarations either on
+	servlet-name, or on url-pattern for each filter-mapping
+	element, depending on which style is used. The order in
+	which filters are invoked is the order in which
+	filter-mapping declarations that match a request URI for a
+	servlet appear in the list of filter-mapping elements.The
+	filter-name value must be the value of the filter-name
+	sub-elements of one of the filter declarations in the
+	deployment descriptor.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="filter-name"
+		   type="j2ee:filter-nameType"/>
+      <xsd:choice>
+	<xsd:element name="url-pattern"
+		     type="j2ee:url-patternType"/>
+	<xsd:element name="servlet-name"
+		     type="j2ee:servlet-nameType"/>
+      </xsd:choice>
+      <xsd:element name="dispatcher"
+		   type="j2ee:dispatcherType"
+		   minOccurs="0" maxOccurs="4"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="filter-nameType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The logical name of the filter is declare
+	by using filter-nameType. This name is used to map the
+	filter.  Each filter name is unique within the web
+	application.
+
+	Used in: filter, filter-mapping
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:extension base="j2ee:nonEmptyStringType"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="filterType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The filterType is used to declare a filter in the web
+	application. The filter is mapped to either a servlet or a
+	URL pattern in the filter-mapping element, using the
+	filter-name value to reference. Filters can access the
+	initialization parameters declared in the deployment
+	descriptor at runtime via the FilterConfig interface.
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:group ref="j2ee:descriptionGroup"/>
+      <xsd:element name="filter-name"
+		   type="j2ee:filter-nameType"/>
+      <xsd:element name="filter-class"
+		   type="j2ee:fully-qualified-classType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The fully qualified classname of the filter.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="init-param"
+		   type="j2ee:param-valueType"
+		   minOccurs="0" maxOccurs="unbounded">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The init-param element contains a name/value pair as
+	    an initialization param of a servlet filter
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="form-login-configType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The form-login-configType specifies the login and error
+	pages that should be used in form based login. If form based
+	authentication is not used, these elements are ignored.
+
+	Used in: login-config
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+
+      <xsd:element name="form-login-page"
+		   type="j2ee:war-pathType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The form-login-page element defines the location in the web
+	    app where the page that can be used for login can be
+	    found.  The path begins with a leading / and is interpreted
+	    relative to the root of the WAR.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="form-error-page"
+		   type="j2ee:war-pathType">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The form-error-page element defines the location in
+	    the web app where the error page that is displayed
+	    when login is not successful can be found.
+	    The path begins with a leading / and is interpreted
+	    relative to the root of the WAR.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="http-methodType">
+    <xsd:annotation>
+
+      <xsd:documentation>
+
+	The http-method contains an HTTP method recognized by the
+	web-app, for example GET, POST, ...
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="GET"/>
+	<xsd:enumeration value="POST"/>
+	<xsd:enumeration value="PUT"/>
+	<xsd:enumeration value="DELETE"/>
+	<xsd:enumeration value="HEAD"/>
+	<xsd:enumeration value="OPTIONS"/>
+	<xsd:enumeration value="TRACE"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="locale-encoding-mapping-listType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The locale-encoding-mapping-list contains one or more
+	locale-encoding-mapping(s).
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="locale-encoding-mapping"
+		   type="j2ee:locale-encoding-mappingType"
+		   maxOccurs="unbounded"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="locale-encoding-mappingType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The locale-encoding-mapping contains locale name and
+	encoding name. The locale name must be either "Language-code",
+	such as "ja", defined by ISO-639 or "Language-code_Country-code",
+	such as "ja_JP".  "Country code" is defined by ISO-3166.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="locale"
+		   type="j2ee:localeType"/>
+      <xsd:element name="encoding"
+		   type="j2ee:encodingType"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:simpleType name="localeType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The localeType defines valid locale defined by ISO-639-1
+	and ISO-3166.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:restriction base="xsd:string">
+      <xsd:pattern value="[a-z]{2}(_|-)?([\p{L}\-\p{Nd}]{2})?"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="login-configType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The login-configType is used to configure the authentication
+	method that should be used, the realm name that should be
+	used for this application, and the attributes that are
+	needed by the form login mechanism.
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="auth-method"
+		   type="j2ee:auth-methodType"
+		   minOccurs="0"/>
+      <xsd:element name="realm-name"
+		   type="j2ee:string" minOccurs="0">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The realm name element specifies the realm name to
+	    use in HTTP Basic authorization.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+      <xsd:element name="form-login-config"
+		   type="j2ee:form-login-configType"
+		   minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="mime-mappingType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The mime-mappingType defines a mapping between an extension
+	and a mime type.
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:annotation>
+	<xsd:documentation>
+
+	  The extension element contains a string describing an
+	  extension. example: "txt"
+
+	</xsd:documentation>
+      </xsd:annotation>
+
+      <xsd:element name="extension"
+		   type="j2ee:string"/>
+      <xsd:element name="mime-type"
+		   type="j2ee:mime-typeType"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="mime-typeType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The mime-typeType is used to indicate a defined mime type.
+
+	Example:
+	"text/plain"
+
+	Used in: mime-mapping
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:pattern value="[^\p{Cc}^\s]+/[^\p{Cc}^\s]+"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="nonEmptyStringType">
+    <xsd:annotation>
+      <xsd:documentation>
+	This type defines a string which contains at least one
+	character.
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:minLength value="1"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="security-constraintType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The security-constraintType is used to associate
+	security constraints with one or more web resource
+	collections
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="display-name"
+		   type="j2ee:display-nameType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="web-resource-collection"
+		   type="j2ee:web-resource-collectionType"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="auth-constraint"
+		   type="j2ee:auth-constraintType"
+		   minOccurs="0"/>
+      <xsd:element name="user-data-constraint"
+		   type="j2ee:user-data-constraintType"
+		   minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="servlet-mappingType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The servlet-mappingType defines a mapping between a
+	servlet and a url pattern.
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="servlet-name"
+		   type="j2ee:servlet-nameType"/>
+      <xsd:element name="url-pattern"
+		   type="j2ee:url-patternType"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="servlet-nameType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The servlet-name element contains the canonical name of the
+	servlet. Each servlet name is unique within the web
+	application.
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:extension base="j2ee:nonEmptyStringType"/>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="servletType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The servletType is used to declare a servlet.
+	It contains the declarative data of a
+	servlet. If a jsp-file is specified and the load-on-startup
+	element is present, then the JSP should be precompiled and
+	loaded.
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:group ref="j2ee:descriptionGroup"/>
+      <xsd:element name="servlet-name"
+		   type="j2ee:servlet-nameType"/>
+      <xsd:choice>
+	<xsd:element name="servlet-class"
+		     type="j2ee:fully-qualified-classType">
+	  <xsd:annotation>
+	    <xsd:documentation>
+
+	      The servlet-class element contains the fully
+	      qualified class name of the servlet.
+
+	    </xsd:documentation>
+	  </xsd:annotation>
+	</xsd:element>
+
+	<xsd:element name="jsp-file"
+		     type="j2ee:jsp-fileType"/>
+
+      </xsd:choice>
+
+      <xsd:element name="init-param"
+		   type="j2ee:param-valueType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+      <xsd:element name="load-on-startup"
+		   type="j2ee:xsdIntegerType"
+		   minOccurs="0">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The load-on-startup element indicates that this
+	    servlet should be loaded (instantiated and have
+	    its init() called) on the startup of the web
+	    application. The optional contents of these
+	    element must be an integer indicating the order in
+	    which the servlet should be loaded. If the value
+	    is a negative integer, or the element is not
+	    present, the container is free to load the servlet
+	    whenever it chooses. If the value is a positive
+	    integer or 0, the container must load and
+	    initialize the servlet as the application is
+	    deployed. The container must guarantee that
+	    servlets marked with lower integers are loaded
+	    before servlets marked with higher integers. The
+	    container may choose the order of loading of
+	    servlets with the same load-on-start-up value.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+      <xsd:element name="run-as"
+		   type="j2ee:run-asType"
+		   minOccurs="0"/>
+      <xsd:element name="security-role-ref"
+		   type="j2ee:security-role-refType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="session-configType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The session-configType defines the session parameters
+	for this web application.
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="session-timeout"
+		   type="j2ee:xsdIntegerType"
+		   minOccurs="0">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The session-timeout element defines the default
+	    session timeout interval for all sessions created
+	    in this web application. The specified timeout
+	    must be expressed in a whole number of minutes.
+	    If the timeout is 0 or less, the container ensures
+	    the default behaviour of sessions is never to time
+	    out. If this element is not specified, the container
+	    must set its default timeout period.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="transport-guaranteeType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The transport-guaranteeType specifies that the communication
+	between client and server should be NONE, INTEGRAL, or
+	CONFIDENTIAL. NONE means that the application does not
+	require any transport guarantees. A value of INTEGRAL means
+	that the application requires that the data sent between the
+	client and server be sent in such a way that it can't be
+	changed in transit. CONFIDENTIAL means that the application
+	requires that the data be transmitted in a fashion that
+	prevents other entities from observing the contents of the
+	transmission. In most cases, the presence of the INTEGRAL or
+	CONFIDENTIAL flag will indicate that the use of SSL is
+	required.
+
+	Used in: user-data-constraint
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:enumeration value="NONE"/>
+	<xsd:enumeration value="INTEGRAL"/>
+	<xsd:enumeration value="CONFIDENTIAL"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="user-data-constraintType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The user-data-constraintType is used to indicate how
+	data communicated between the client and container should be
+	protected.
+
+	Used in: security-constraint
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="transport-guarantee"
+		   type="j2ee:transport-guaranteeType"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="war-pathType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The elements that use this type designate a path starting
+	with a "/" and interpreted relative to the root of a WAR
+	file.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:simpleContent>
+      <xsd:restriction base="j2ee:string">
+	<xsd:pattern value="/.*"/>
+      </xsd:restriction>
+    </xsd:simpleContent>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:simpleType name="web-app-versionType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	This type contains the recognized versions of
+	web-application supported. It is used to designate the
+	version of the web application.
+
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:restriction base="xsd:token">
+      <xsd:enumeration value="2.4"/>
+    </xsd:restriction>
+  </xsd:simpleType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="web-appType">
+
+    <xsd:choice minOccurs="0" maxOccurs="unbounded">
+      <xsd:group ref="j2ee:descriptionGroup"/>
+      <xsd:element name="distributable"
+		   type="j2ee:emptyType"/>
+      <xsd:element name="context-param"
+		   type="j2ee:param-valueType">
+
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The context-param element contains the declaration
+	    of a web application's servlet context
+	    initialization parameters.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+
+      <xsd:element name="filter"
+		   type="j2ee:filterType"/>
+      <xsd:element name="filter-mapping"
+		   type="j2ee:filter-mappingType"/>
+      <xsd:element name="listener"
+		   type="j2ee:listenerType"/>
+      <xsd:element name="servlet"
+		   type="j2ee:servletType"/>
+      <xsd:element name="servlet-mapping"
+		   type="j2ee:servlet-mappingType"/>
+      <xsd:element name="session-config"
+		   type="j2ee:session-configType"/>
+      <xsd:element name="mime-mapping"
+		   type="j2ee:mime-mappingType"/>
+      <xsd:element name="welcome-file-list"
+		   type="j2ee:welcome-file-listType"/>
+      <xsd:element name="error-page"
+		   type="j2ee:error-pageType"/>
+      <xsd:element name="jsp-config"
+		   type="j2ee:jsp-configType"/>
+      <xsd:element name="security-constraint"
+		   type="j2ee:security-constraintType"/>
+      <xsd:element name="login-config"
+		   type="j2ee:login-configType"/>
+      <xsd:element name="security-role"
+		   type="j2ee:security-roleType"/>
+      <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
+      <xsd:element name="message-destination"
+		   type="j2ee:message-destinationType"/>
+      <xsd:element name="locale-encoding-mapping-list"
+		   type="j2ee:locale-encoding-mapping-listType"/>
+    </xsd:choice>
+
+    <xsd:attribute name="version"
+		   type="j2ee:web-app-versionType"
+		   use="required"/>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="web-resource-collectionType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The web-resource-collectionType is used to identify a subset
+	of the resources and HTTP methods on those resources within
+	a web application to which a security constraint applies. If
+	no HTTP methods are specified, then the security constraint
+	applies to all HTTP methods.
+
+	Used in: security-constraint
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="web-resource-name"
+		   type="j2ee:string">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The web-resource-name contains the name of this web
+	    resource collection.
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+      <xsd:element name="description"
+		   type="j2ee:descriptionType"
+		   minOccurs="0"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="url-pattern"
+		   type="j2ee:url-patternType"
+		   maxOccurs="unbounded"/>
+      <xsd:element name="http-method"
+		   type="j2ee:http-methodType"
+		   minOccurs="0" maxOccurs="unbounded"/>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="welcome-file-listType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+	The welcome-file-list contains an ordered list of welcome
+	files elements.
+
+	Used in: web-app
+
+      </xsd:documentation>
+    </xsd:annotation>
+
+    <xsd:sequence>
+      <xsd:element name="welcome-file"
+		   type="xsd:string"
+		   maxOccurs="unbounded">
+	<xsd:annotation>
+	  <xsd:documentation>
+
+	    The welcome-file element contains file name to use
+	    as a default welcome file, such as index.html
+
+	  </xsd:documentation>
+	</xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:ID"/>
+  </xsd:complexType>
+
+</xsd:schema>
+
diff --git a/xml/tests/testData/documentation/xslCompletion.xsl b/xml/tests/testData/documentation/xslCompletion.xsl
new file mode 100644
index 0000000..d953aab
--- /dev/null
+++ b/xml/tests/testData/documentation/xslCompletion.xsl
@@ -0,0 +1,12 @@
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="text" omit-xml-declaration="yes" encoding="UTF-8"/>
+
+    <xsl:template match="/agent-definition/agent[@name='CustomAppsNexus']/properties/group[@id='nexusConfig']">
+        <xsl:apply-templates select="string|integer|boolean"/>
+    </xsl:template>
+
+    <xsl:template match="string">
+        <xsl:a<caret>ttribute select="@id"/><xsl:text></xsl:text>
+    </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/xml/tests/testData/documentation/xslCompletion.xsl.expected.completion.html b/xml/tests/testData/documentation/xslCompletion.xsl.expected.completion.html
new file mode 100644
index 0000000..2bcda1a
--- /dev/null
+++ b/xml/tests/testData/documentation/xslCompletion.xsl.expected.completion.html
@@ -0,0 +1,230 @@
+<html x:found="true" x:href="http://www.w3.org/TR/xslt#element-apply-imports" xmlns:x="urn:xslt-documentation" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+
+<style type="text/css" id="w3c">
+  a.external {
+    text-decoration: none;
+    border-bottom-color: blue;
+    border-bottom-style: dashed;
+    border-bottom-width: thin;
+  }
+
+  p.element-syntax {
+    border-color: black;
+    border-style: solid;
+    border-width: thin;
+  }
+
+  /* 2005-10-03: Modified to work with Java's HTML displaying capabilities */
+
+  /* Style for a "Recommendation" (http://www.w3.org/StyleSheets/TR/W3C-REC) */
+
+  /*
+     Copyright 1997-2003 W3C (MIT, ERCIM, Keio). All Rights Reserved.
+     The following software licensing rules apply:
+     http://www.w3.org/Consortium/Legal/copyright-software */
+
+  body {
+    margin: 0;
+    font-family: sans-serif;
+    color: black;
+    background-position: top left;
+  }
+
+  :link {
+    color: #00C;
+    background: transparent
+  }
+
+  :visited {
+    color: #609;
+    background: transparent
+  }
+
+  a:active {
+    color: #C00;
+    background: transparent
+  }
+
+  a:link img, a:visited img {
+    border-style: none
+  }
+
+  /* no border on img links */
+
+  a img {
+    color: white;
+  }
+
+  th, td {
+  /* ns 4 */
+    font-family: sans-serif;
+  }
+
+  h1, h2, h3, h4, h5, h6 {
+    text-align: left
+  }
+
+  /* background should be transparent, but WebTV has a bug */
+  h1, h2, h3 {
+    color: #005A9C;
+  }
+
+  h1 {
+    font: 170% sans-serif
+  }
+
+  h2 {
+    font: 140% sans-serif
+  }
+
+  h3 {
+    font: 100% sans-serif
+  }
+
+  h4 {
+    font: bold 100% sans-serif
+  }
+
+  h5 {
+    font: italic 100% sans-serif
+  }
+
+  h6 {
+    font: small-caps 100% sans-serif
+  }
+
+  .hide {
+    display: none
+  }
+
+  div.head {
+    margin-bottom: 1em
+  }
+
+  div.head h1 {
+    margin-top: 2em;
+    clear: both
+  }
+
+  div.head table {
+    margin-left: 2em;
+    margin-top: 2em
+  }
+
+  p.copyright {
+    margin-top: 15px;
+    font-size: 90%
+  }
+
+  p.copyright small {
+    font-size: small
+  }
+
+  /* hide from IE3 */
+  a[href]:hover {
+    background: #ffa
+  }
+
+  pre {
+    margin-left: 2em
+  }
+
+    /*
+    p {
+      margin-top: 0.6em;
+      margin-bottom: 0.6em;
+    }
+    */
+  dt, dd {
+    margin-top: 0;
+    margin-bottom: 0
+  }
+
+  /* opera 3.50 */
+  dt {
+    font-weight: bold
+  }
+
+  pre, code {
+    font-family: monospace
+  }
+
+  /* navigator 4 requires this */
+
+  ul.toc {
+    list-style: disc; /* Mac NS has problem with 'none' */
+    list-style: none;
+  }
+</style>
+</head>
+<body>
+      
+<h3>
+<a name="apply-imports"></a>Overriding Template Rules</h3>
+
+      
+<p class="element-syntax">
+<a name="element-apply-imports"></a><code>&lt;!--
+      Category: instruction --&gt;<br>
+      &lt;xsl:apply-imports&nbsp;/&gt;</code>
+</p>
+
+      
+<p>A template rule that is being used to override a template rule in an
+      imported stylesheet (see <a class="external" href="http://www.w3.org/TR/xslt#conflict">[<b>5.5 Conflict Resolution for
+      Template Rules</b>]</a>) can use the <code>xsl:apply-imports</code> element
+      to invoke the overridden template rule.</p>
+
+      
+<p>
+<a name="dt-current-template-rule"></a>At any point in the processing of a
+      stylesheet, there is a <b>current template rule</b>.  Whenever a template
+      rule is chosen by matching a pattern, the template rule becomes the current
+      template rule for the instantiation of the rule's template. When an
+      <code>xsl:for-each</code> element is instantiated, the current template rule
+      becomes null for the instantiation of the content of the
+      <code>xsl:for-each</code> element.</p>
+
+      
+<p>
+<code>xsl:apply-imports</code> processes the current node using only
+      template rules that were imported into the stylesheet element containing the
+      current template rule; the node is processed in the current template rule's
+      mode.  It is an error if <code>xsl:apply-imports</code> is instantiated when
+      the current template rule is null.</p>
+
+      
+<p>For example, suppose the stylesheet <code>doc.xsl</code> contains a
+      template rule for <code>example</code> elements:</p>
+      
+<pre>&lt;xsl:template match="example"&gt;
+        &lt;pre&gt;&lt;xsl:apply-templates/&gt;&lt;/pre&gt;
+      &lt;/xsl:template&gt;</pre>
+
+      
+<p>Another stylesheet could import <code>doc.xsl</code> and modify the
+      treatment of <code>example</code> elements as follows:</p>
+      
+<pre>&lt;xsl:import href="doc.xsl"/&gt;
+
+&lt;xsl:template match="example"&gt;
+  &lt;div style="border: solid red"&gt;
+     &lt;xsl:apply-imports/&gt;
+  &lt;/div&gt;
+&lt;/xsl:template&gt;</pre>
+
+      
+<p>The combined effect would be to transform an <code>example</code> into an
+      element of the form:</p>
+      
+<pre>&lt;div style="border: solid red"&gt;&lt;pre&gt;...&lt;/pre&gt;&lt;/div&gt;</pre>
+    
+<p id="w3c-footer" class="copyright">
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright">Copyright</a>
+    &nbsp;&copy;&nbsp; 1999 <a href="http://www.w3.org">W3C</a><sup>&reg;</sup>
+    (<a href="http://www.lcs.mit.edu">MIT</a>, <a href="http://www.inria.fr/">INRIA</a>,
+    <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
+  </p>
+</body>
+</html>
diff --git a/xml/tests/testData/documentation/xslCompletion.xsl.expected.html b/xml/tests/testData/documentation/xslCompletion.xsl.expected.html
new file mode 100644
index 0000000..931a181
--- /dev/null
+++ b/xml/tests/testData/documentation/xslCompletion.xsl.expected.html
@@ -0,0 +1,283 @@
+<html x:found="true" x:href="http://www.w3.org/TR/xslt#element-attribute" xmlns:x="urn:xslt-documentation" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+
+<style type="text/css" id="w3c">
+  a.external {
+    text-decoration: none;
+    border-bottom-color: blue;
+    border-bottom-style: dashed;
+    border-bottom-width: thin;
+  }
+
+  p.element-syntax {
+    border-color: black;
+    border-style: solid;
+    border-width: thin;
+  }
+
+  /* 2005-10-03: Modified to work with Java's HTML displaying capabilities */
+
+  /* Style for a "Recommendation" (http://www.w3.org/StyleSheets/TR/W3C-REC) */
+
+  /*
+     Copyright 1997-2003 W3C (MIT, ERCIM, Keio). All Rights Reserved.
+     The following software licensing rules apply:
+     http://www.w3.org/Consortium/Legal/copyright-software */
+
+  body {
+    margin: 0;
+    font-family: sans-serif;
+    color: black;
+    background-position: top left;
+  }
+
+  :link {
+    color: #00C;
+    background: transparent
+  }
+
+  :visited {
+    color: #609;
+    background: transparent
+  }
+
+  a:active {
+    color: #C00;
+    background: transparent
+  }
+
+  a:link img, a:visited img {
+    border-style: none
+  }
+
+  /* no border on img links */
+
+  a img {
+    color: white;
+  }
+
+  th, td {
+  /* ns 4 */
+    font-family: sans-serif;
+  }
+
+  h1, h2, h3, h4, h5, h6 {
+    text-align: left
+  }
+
+  /* background should be transparent, but WebTV has a bug */
+  h1, h2, h3 {
+    color: #005A9C;
+  }
+
+  h1 {
+    font: 170% sans-serif
+  }
+
+  h2 {
+    font: 140% sans-serif
+  }
+
+  h3 {
+    font: 100% sans-serif
+  }
+
+  h4 {
+    font: bold 100% sans-serif
+  }
+
+  h5 {
+    font: italic 100% sans-serif
+  }
+
+  h6 {
+    font: small-caps 100% sans-serif
+  }
+
+  .hide {
+    display: none
+  }
+
+  div.head {
+    margin-bottom: 1em
+  }
+
+  div.head h1 {
+    margin-top: 2em;
+    clear: both
+  }
+
+  div.head table {
+    margin-left: 2em;
+    margin-top: 2em
+  }
+
+  p.copyright {
+    margin-top: 15px;
+    font-size: 90%
+  }
+
+  p.copyright small {
+    font-size: small
+  }
+
+  /* hide from IE3 */
+  a[href]:hover {
+    background: #ffa
+  }
+
+  pre {
+    margin-left: 2em
+  }
+
+    /*
+    p {
+      margin-top: 0.6em;
+      margin-bottom: 0.6em;
+    }
+    */
+  dt, dd {
+    margin-top: 0;
+    margin-bottom: 0
+  }
+
+  /* opera 3.50 */
+  dt {
+    font-weight: bold
+  }
+
+  pre, code {
+    font-family: monospace
+  }
+
+  /* navigator 4 requires this */
+
+  ul.toc {
+    list-style: disc; /* Mac NS has problem with 'none' */
+    list-style: none;
+  }
+</style>
+</head>
+<body>
+      
+<h3>
+<a name="creating-attributes"></a>Creating Attributes with
+      <code>xsl:attribute</code>
+</h3>
+
+      
+<p class="element-syntax">
+<a name="element-attribute"></a><code>&lt;!--
+      Category: instruction --&gt;<br>
+      &lt;xsl:attribute<br>
+      &nbsp;&nbsp;<b>name</b> = { <var>qname</var> }<br>
+      &nbsp;&nbsp;namespace = { <var>uri-reference</var> }&gt;<br>
+      &nbsp;&nbsp;&lt;!-- Content: <var>template</var> --&gt;<br>
+      &lt;/xsl:attribute&gt;</code>
+</p>
+
+      
+<p>The <code>xsl:attribute</code> element can be used to add attributes to
+      result elements whether created by literal result elements in the stylesheet
+      or by instructions such as <code>xsl:element</code>. The <a class="external" href="http://www.w3.org/TR/xpath#dt-expanded-name">expanded-name</a> of the
+      attribute to be created is specified by a required <code>name</code>
+      attribute and an optional <code>namespace</code> attribute. Instantiating an
+      <code>xsl:attribute</code> element adds an attribute node to the containing
+      result element node. The content of the <code>xsl:attribute</code> element is
+      a template for the value of the created attribute.</p>
+
+      
+<p>The <code>name</code> attribute is interpreted as an <a class="external" href="http://www.w3.org/TR/xslt#dt-attribute-value-template">attribute value template</a>. It is an
+      error if the string that results from instantiating the attribute value
+      template is not a <a class="external" href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> or is the string
+      <code>xmlns</code>.  An XSLT processor may signal the error; if it does not
+      signal the error, it must recover by not adding the attribute to the result
+      tree. If the <code>namespace</code> attribute is not present, then the <a class="external" href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> is expanded into
+      an expanded-name using the namespace declarations in effect for the
+      <code>xsl:attribute</code> element, <i>not</i> including any default
+      namespace declaration.</p>
+
+      
+<p>If the <code>namespace</code> attribute is present, then it also is
+      interpreted as an <a class="external" href="http://www.w3.org/TR/xslt#dt-attribute-value-template">attribute value
+      template</a>. The string that results from instantiating it should be a URI
+      reference.  It is not an error if the string is not a syntactically legal URI
+      reference.  If the string is empty, then the expanded-name of the attribute
+      has a null namespace URI.  Otherwise, the string is used as the namespace URI
+      of the expanded-name of the attribute to be created. The local part of the <a class="external" href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> specified by the
+      <code>name</code> attribute is used as the local part of the expanded-name of
+      the attribute to be created.</p>
+
+      
+<p>XSLT processors may make use of the prefix of the <a class="external" href="http://www.w3.org/TR/REC-xml-names#NT-QName">QName</a> specified in the
+      <code>name</code> attribute when selecting the prefix used for outputting the
+      created attribute as XML; however, they are not required to do so and, if the
+      prefix is <code>xmlns</code>, they must not do so. Thus, although it is not
+      an error to do:</p>
+      
+<pre>&lt;xsl:attribute name="xmlns:xsl" namespace="whatever"&gt;http://www.w3.org/1999/XSL/Transform&lt;/xsl:attribute&gt;</pre>
+
+      
+<p>it will not result in a namespace declaration being output.</p>
+
+      
+<p>Adding an attribute to an element replaces any existing attribute of that
+      element with the same expanded-name.</p>
+
+      
+<p>The following are all errors:</p>
+      
+<ul>
+        
+<li>
+<p>Adding an attribute to an element after children have been added to
+          it; implementations may either signal the error or ignore the
+          attribute.</p>
+        
+</li>
+        
+<li>
+<p>Adding an attribute to a node that is not an element;
+          implementations may either signal the error or ignore the attribute.</p>
+        
+</li>
+        
+<li>
+<p>Creating nodes other than text nodes during the instantiation of the
+          content of the <code>xsl:attribute</code> element; implementations may
+          either signal the error or ignore the offending nodes.</p>
+        
+</li>
+      
+</ul>
+
+      
+<blockquote>
+        
+<b>NOTE:</b>When an <code>xsl:attribute</code> contains a text node with a
+        newline, then the XML output must contain a character reference. For
+        example,
+        <pre>&lt;xsl:attribute name="a"&gt;x
+y&lt;/xsl:attribute&gt;</pre>
+        will result in the output
+        <pre>a="x&amp;#xA;y"</pre>
+        (or with any equivalent character reference). The XML output cannot be
+        <pre>a="x
+y"</pre>
+        This is because XML 1.0 requires newline characters in attribute values to
+        be normalized into spaces but requires character references to newline
+        characters not to be normalized.  The attribute values in the data model
+        represent the attribute value after normalization.  If a newline occurring
+        in an attribute value in the tree were output as a newline character rather
+        than as character reference, then the attribute value in the tree created
+        by reparsing the XML would contain a space not a newline, which would mean
+        that the tree had not been output correctly.</blockquote>
+    
+<p id="w3c-footer" class="copyright">
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice.html#Copyright">Copyright</a>
+    &nbsp;&copy;&nbsp; 1999 <a href="http://www.w3.org">W3C</a><sup>&reg;</sup>
+    (<a href="http://www.lcs.mit.edu">MIT</a>, <a href="http://www.inria.fr/">INRIA</a>,
+    <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved.
+  </p>
+</body>
+</html>
diff --git a/xml/tests/testData/psi/testEmptyElementsInDtd.txt b/xml/tests/testData/psi/testEmptyElementsInDtd.txt
index 98de113..5fc67a3 100644
--- a/xml/tests/testData/psi/testEmptyElementsInDtd.txt
+++ b/xml/tests/testData/psi/testEmptyElementsInDtd.txt
@@ -4,7 +4,7 @@
       <empty list>
     PsiElement(XML_ELEMENT_DECL)
       XmlToken:XML_ELEMENT_DECL_START('<!ELEMENT')
-      PsiErrorElement:xml name expected
+      PsiErrorElement:XML name expected
         <empty list>
     PsiWhiteSpace(' ')
     XmlToken:XML_TAG_END('>')
@@ -17,14 +17,14 @@
       PsiElement(XML_ELEMENT_CONTENT_SPEC)
         PsiElement(XML_ELEMENT_CONTENT_GROUP)
           XmlToken:XML_LEFT_PAREN('(')
-          PsiErrorElement:Xml name or entity ref expected
+          PsiErrorElement:XML name or entity ref expected
             <empty list>
       XmlToken:XML_COMMA(',')
       XmlToken:XML_RIGHT_PAREN(')')
     PsiWhiteSpace('\n')
     PsiElement(XML_ATTLIST_DECL)
       XmlToken:XML_ATTLIST_DECL_START('<!ATTLIST')
-      PsiErrorElement:xml name expected
+      PsiErrorElement:XML name expected
         <empty list>
     PsiWhiteSpace(' ')
     XmlToken:XML_TAG_END('>')
@@ -57,7 +57,7 @@
           XmlToken:XML_LEFT_PAREN('(')
           XmlToken:XML_NAME('aaa')
           XmlToken:XML_COMMA(',')
-          PsiErrorElement:Xml name or entity ref expected
+          PsiErrorElement:XML name or entity ref expected
             <empty list>
           XmlToken:XML_RIGHT_PAREN(')')
       XmlToken:XML_TAG_END('>')
diff --git a/xml/tests/testData/psi/testEntityDeclaration.txt b/xml/tests/testData/psi/testEntityDeclaration.txt
index e8b81a6..e328434 100644
--- a/xml/tests/testData/psi/testEntityDeclaration.txt
+++ b/xml/tests/testData/psi/testEntityDeclaration.txt
@@ -13,7 +13,7 @@
     PsiWhiteSpace(' ')
     PsiElement(XML_ENTITY_DECL)
       XmlToken:XML_ENTITY_DECL_START('<!ENTITY')
-      PsiErrorElement:xml name expected
+      PsiErrorElement:XML name expected
         <empty list>
     PsiWhiteSpace(' ')
     XmlToken:XML_TAG_END('>')
\ No newline at end of file
diff --git a/xml/tests/testData/psi/testKeywordsAsName.txt b/xml/tests/testData/psi/testKeywordsAsName.txt
new file mode 100644
index 0000000..56cc129
--- /dev/null
+++ b/xml/tests/testData/psi/testKeywordsAsName.txt
@@ -0,0 +1,58 @@
+XmlFile:test.dtd
+  PsiElement(XML_DOCUMENT)
+    PsiElement(XML_PROLOG)
+      <empty list>
+    PsiElement(XML_ELEMENT_DECL)
+      XmlToken:XML_ELEMENT_DECL_START('<!ELEMENT')
+      PsiWhiteSpace(' ')
+      XmlToken:XML_NAME('FIELD')
+      PsiWhiteSpace(' ')
+      PsiElement(XML_ELEMENT_CONTENT_SPEC)
+        XmlToken:XML_CONTENT_ANY('ANY')
+      XmlToken:XML_TAG_END('>')
+    PsiWhiteSpace('\n')
+    PsiElement(XML_ELEMENT_DECL)
+      XmlToken:XML_ELEMENT_DECL_START('<!ELEMENT')
+      PsiWhiteSpace(' ')
+      XmlToken:XML_NAME('PUBLIC')
+      PsiWhiteSpace(' ')
+      PsiElement(XML_ELEMENT_CONTENT_SPEC)
+        XmlToken:XML_CONTENT_ANY('ANY')
+      XmlToken:XML_TAG_END('>')
+    PsiWhiteSpace('\n')
+    PsiElement(XML_ELEMENT_DECL)
+      XmlToken:XML_ELEMENT_DECL_START('<!ELEMENT')
+      PsiWhiteSpace(' ')
+      XmlToken:XML_NAME('EMPTY')
+      PsiWhiteSpace(' ')
+      PsiElement(XML_ELEMENT_CONTENT_SPEC)
+        XmlToken:XML_CONTENT_ANY('ANY')
+      XmlToken:XML_TAG_END('>')
+    PsiWhiteSpace('\n')
+    PsiElement(XML_ELEMENT_DECL)
+      XmlToken:XML_ELEMENT_DECL_START('<!ELEMENT')
+      PsiWhiteSpace(' ')
+      XmlToken:XML_NAME('ANY')
+      PsiWhiteSpace(' ')
+      PsiElement(XML_ELEMENT_CONTENT_SPEC)
+        XmlToken:XML_CONTENT_ANY('ANY')
+      XmlToken:XML_TAG_END('>')
+    PsiWhiteSpace('\n')
+    PsiElement(XML_ELEMENT_DECL)
+      XmlToken:XML_ELEMENT_DECL_START('<!ELEMENT')
+      PsiWhiteSpace(' ')
+      XmlToken:XML_NAME('AND')
+      PsiWhiteSpace(' ')
+      PsiElement(XML_ELEMENT_CONTENT_SPEC)
+        PsiElement(XML_ELEMENT_CONTENT_GROUP)
+          XmlToken:XML_LEFT_PAREN('(')
+          XmlToken:XML_NAME('FIELD')
+          XmlToken:XML_BAR('|')
+          XmlToken:XML_NAME('PUBLIC')
+          XmlToken:XML_BAR('|')
+          XmlToken:XML_CONTENT_EMPTY('EMPTY')
+          XmlToken:XML_BAR('|')
+          XmlToken:XML_CONTENT_ANY('ANY')
+          XmlToken:XML_RIGHT_PAREN(')')
+        XmlToken:XML_STAR('*')
+      XmlToken:XML_TAG_END('>')
\ No newline at end of file
diff --git a/xml/tests/testData/unusedNs/spring-batch-2.1.xsd b/xml/tests/testData/unusedNs/spring-batch-2.1.xsd
new file mode 100644
index 0000000..a4cadf5
--- /dev/null
+++ b/xml/tests/testData/unusedNs/spring-batch-2.1.xsd
@@ -0,0 +1,1291 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="http://www.springframework.org/schema/batch" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+	xmlns:tool="http://www.springframework.org/schema/tool" targetNamespace="http://www.springframework.org/schema/batch"
+	elementFormDefault="qualified" attributeFormDefault="unqualified"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool-2.5.xsd"
+	version="2.1">
+
+	<xsd:import namespace="http://www.springframework.org/schema/beans" />
+	<xsd:import namespace="http://www.springframework.org/schema/tool" />
+
+	<xsd:annotation>
+		<xsd:documentation><![CDATA[
+	Defines the configuration elements for Spring Batch Core.
+		]]></xsd:documentation>
+	</xsd:annotation>
+
+	<xsd:element name="job">
+		<xsd:annotation>
+			<xsd:documentation>
+				Defines a job composed of a set of steps and
+				transitions between steps. The job will be exposed in
+				the enclosing
+				bean factory as a component of type Job
+				that can be launched using a
+				JobLauncher.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="description" type="description" minOccurs="0" />
+				<xsd:choice minOccurs="0" maxOccurs="unbounded">
+					<xsd:group ref="flowGroup" minOccurs="1" maxOccurs="unbounded" />
+					<xsd:element name="listeners">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+							List of all listeners for the job
+							]]>
+							</xsd:documentation>
+						</xsd:annotation>
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="listener" type="jobExecutionListenerType" minOccurs="0" maxOccurs="unbounded" />
+							</xsd:sequence>
+							<xsd:attributeGroup ref="mergeAttribute" />
+						</xsd:complexType>
+					</xsd:element>
+					<xsd:element name="validator">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+							A JobParametersValidator as an inner bean definition.
+							]]>
+							</xsd:documentation>
+						</xsd:annotation>
+						<xsd:complexType>
+							<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
+							<xsd:attribute name="ref">
+								<xsd:annotation>
+									<xsd:documentation><![CDATA[
+							A reference to a JobParametersValidator.
+							]]>
+									</xsd:documentation>
+								</xsd:annotation>
+							</xsd:attribute>
+						</xsd:complexType>
+					</xsd:element>
+				</xsd:choice>
+			</xsd:sequence>
+			<xsd:attribute name="id" type="xsd:ID" use="required" />
+			<xsd:attributeGroup ref="jobRepositoryAttribute" />
+			<xsd:attribute name="incrementer" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+						A reference to a JobParametersIncrementer bean definition.  This will be
+						used to provide new parameters to a Job instance that is starting in a
+						sequence.
+						]]>
+					</xsd:documentation>
+					<xsd:appinfo>
+						<tool:annotation kind="ref" />
+						<tool:expected-type type="org.springframework.batch.core.JobParametersIncrementer" />
+					</xsd:appinfo>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="restartable" type="xsd:string" use="optional">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					Whether the job should be retartable or not in case of failure.  Set this to false
+					if the Job should not be restarted.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attributeGroup ref="parentAttribute" />
+			<xsd:attributeGroup ref="abstractAttribute" />
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="step">
+		<xsd:annotation>
+			<xsd:documentation>
+				Defines a stage in job processing backed by a
+				Step. The id attribute must be specified since this
+				step definition
+				will be referred to from other elements
+				to form a Job flow.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="stepType">
+					<xsd:attribute name="id" type="xsd:ID" use="required" />
+					<xsd:attributeGroup ref="abstractAttribute" />
+					<xsd:attributeGroup ref="jobRepositoryAttribute" />
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="flow">
+		<xsd:annotation>
+			<xsd:documentation>
+				Defines a flow composed of a set of steps and
+				transitions between steps.
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="description" type="description" minOccurs="0" />
+				<xsd:choice minOccurs="0" maxOccurs="unbounded">
+					<xsd:group ref="flowGroup" />
+				</xsd:choice>
+			</xsd:sequence>
+			<xsd:attribute name="id" type="xsd:ID" use="required" />
+			<xsd:attribute name="abstract" type="xsd:boolean" />
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="job-listener">
+		<xsd:annotation>
+			<xsd:documentation>
+				A reference to a JobExecutionListener (or a POJO
+				if using before-job-method / after-job-method or
+				source level
+				annotations).
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="jobExecutionListenerType">
+					<xsd:attribute name="id" type="xsd:ID" use="optional" />
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="step-listener">
+		<xsd:annotation>
+			<xsd:documentation>
+				A bean definition for a step listener (or POJO if
+				using *-method attributes or source level
+				annotations)
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="stepListenerType">
+					<xsd:attribute name="id" type="xsd:ID" use="optional" />
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="job-repository">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+			Configures a JobRepository using a relational database.  This is
+			needed by many other components (principally Job and Step implementations).
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="beans:identifiedType">
+					<xsd:attribute name="data-source" type="xsd:string" default="dataSource">
+						<xsd:annotation>
+							<xsd:documentation source="java:javax.sql.DataSource"><![CDATA[
+ref"							is not required, and only needs to be specified explicitly
+							if the bean name of the desired DataSource is not 'dataSource'.
+							]]></xsd:documentation>
+							<xsd:appinfo>
+								<tool:annotation kind="ref">
+									<tool:expected-type type="javax.sql.DataSource" />
+								</tool:annotation>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="transaction-manager" type="xsd:string" default="transactionManager">
+						<xsd:annotation>
+							<xsd:documentation source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
+							The bean name of the TransactionManager that is to be used. This attribute
+							is not required, and only needs to be specified explicitly
+							if the bean name of the desired TransactionManager is not 'transactionManager'.
+							]]></xsd:documentation>
+							<xsd:appinfo>
+								<tool:annotation kind="ref">
+									<tool:expected-type type="org.springframework.transaction.PlatformTransactionManager" />
+								</tool:annotation>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="isolation-level-for-create" default="SERIALIZABLE" type="isolationType">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+							The isolation level to use for creation of job execution entities.
+							The default is SERIALIZABLE, which prevents accidental
+							concurrent execution of the same job (REPEATABLE_READ
+							would work as well).
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="max-varchar-length" type="xsd:int">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+							The maximum length for a Java String that will fit in the long VARCHAR
+							columns in the database.  Can be less than the declared length in the DDL
+							if the database	supports multi-byte characters.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="table-prefix" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+							The the table prefix to use for all the batch meta-data tables.
+							Defaults to "BATCH_".
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="lob-handler" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+							A reference to the lob handler (optional).  Only override if using Oracle and
+							the database type is not being detected for some reason.
+							]]></xsd:documentation>
+							<xsd:appinfo>
+								<tool:annotation kind="ref">
+									<tool:expected-type type="org.springframework.jdbc.support.lob.LobHandler" />
+								</tool:annotation>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:group name="flowGroup">
+		<xsd:choice>
+			<xsd:element name="step">
+				<xsd:annotation>
+					<xsd:documentation>
+						Defines a stage in job processing backed by a
+						Step. The id attribute must be specified. The
+						step
+						requires either
+						a chunk definition,
+						a tasklet reference, or a reference to a
+						(possibly abstract) parent step.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:complexContent>
+						<xsd:extension base="stepType">
+							<xsd:attribute name="id" type="xsd:ID" use="required" />
+							<xsd:attributeGroup ref="nextAttribute" />
+						</xsd:extension>
+					</xsd:complexContent>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="split">
+				<xsd:annotation>
+					<xsd:documentation>
+						Declares job should split here into two or more
+						subflows.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:choice minOccurs="0" maxOccurs="unbounded">
+						<xsd:element name="flow">
+							<xsd:annotation>
+								<xsd:documentation>
+									A subflow within a job, having the same
+									format as a job, but without a separate identity.
+								</xsd:documentation>
+							</xsd:annotation>
+							<xsd:complexType>
+								<xsd:group ref="flowGroup" minOccurs="0" maxOccurs="unbounded" />
+								<xsd:attribute name="parent" type="xsd:string" use="optional">
+									<xsd:annotation>
+										<xsd:documentation source="java:org.springframework.batch.core.job.flow.Flow"><![CDATA[
+										The flow that will execute at this point in the job.
+										]]></xsd:documentation>
+										<xsd:appinfo>
+											<tool:annotation kind="ref">
+												<tool:expected-type type="org.springframework.batch.core.job.flow.Flow" />
+											</tool:annotation>
+										</xsd:appinfo>
+									</xsd:annotation>
+								</xsd:attribute>
+							</xsd:complexType>
+						</xsd:element>
+						<xsd:group ref="transitions" />
+					</xsd:choice>
+					<xsd:attribute name="id" type="xsd:ID" use="required" />
+					<xsd:attribute name="task-executor" type="xsd:string" use="optional">
+						<xsd:annotation>
+							<xsd:documentation source="java:org.springframework.core.task.TaskExecutor"><![CDATA[
+							The task executor responsible for executing the task.
+							]]></xsd:documentation>
+							<xsd:appinfo>
+								<tool:annotation kind="ref">
+									<tool:expected-type type="java:org.springframework.core.task.TaskExecutor" />
+								</tool:annotation>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attributeGroup ref="nextAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="flow">
+				<xsd:annotation>
+					<xsd:documentation>
+						Declares job should include an externalized flow
+						here.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="transitions" minOccurs="0" maxOccurs="unbounded" />
+					<xsd:attribute name="id" type="xsd:ID" use="required" />
+					<xsd:attribute name="parent" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation source="java:org.springframework.batch.core.job.flow.Flow"><![CDATA[
+							The flow that will execute at this point in the job specified as a
+							parent bean definition id.
+							]]></xsd:documentation>
+							<xsd:appinfo>
+								<tool:annotation kind="ref">
+									<tool:expected-type type="org.springframework.batch.core.job.flow.Flow" />
+								</tool:annotation>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attributeGroup ref="nextAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="decision">
+				<xsd:annotation>
+					<xsd:documentation>
+						Declares job should query a decider to determine
+						where execution should go next.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="transitions" minOccurs="0" maxOccurs="unbounded" />
+					<xsd:attribute name="id" type="xsd:ID" use="required" />
+					<xsd:attribute name="decider" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation>
+								The decider is a reference to a
+								JobExecutionDecider that can produce a status to base
+								the next
+								transition on.
+							</xsd:documentation>
+							<xsd:appinfo>
+								<tool:annotation kind="ref">
+									<tool:expected-type type="org.springframework.batch.core.job.flow.JobExecutionDecider" />
+								</tool:annotation>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:complexType>
+			</xsd:element>
+		</xsd:choice>
+	</xsd:group>
+
+	<xsd:complexType name="stepType">
+		<xsd:sequence>
+			<xsd:element name="description" type="description" minOccurs="0" />
+			<xsd:choice minOccurs="0" maxOccurs="1">
+				<xsd:choice>
+					<xsd:element name="tasklet" type="taskletType" />
+					<!-- custom namespace tasklet declaration -->
+					<xsd:any namespace="##other" minOccurs="1" maxOccurs="1" processContents="skip"/>
+				</xsd:choice>
+				<xsd:element name="partition" type="partitionType" />
+				<xsd:element name="job">
+					<xsd:complexType>
+						<xsd:attribute name="ref">
+							<xsd:annotation>
+								<xsd:documentation source="java:org.springframework.batch.core.Job"><![CDATA[
+							The job that will execute in this step.
+							]]></xsd:documentation>
+								<xsd:appinfo>
+									<tool:annotation kind="ref">
+										<tool:expected-type type="org.springframework.batch.core.Job" />
+									</tool:annotation>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:attribute>
+						<xsd:attribute name="job-launcher">
+							<xsd:annotation>
+								<xsd:documentation source="java:org.springframework.batch.core.launch.JobLauncher"><![CDATA[
+							The job that will execute in this step.
+							]]></xsd:documentation>
+								<xsd:appinfo>
+									<tool:annotation kind="ref">
+										<tool:expected-type type="java:org.springframework.batch.core.launch.JobLauncher" />
+									</tool:annotation>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:attribute>
+						<xsd:attribute name="job-parameters-extractor">
+							<xsd:annotation>
+								<xsd:documentation source="java:org.springframework.batch.core.step.job.JobParametersExtractor"><![CDATA[
+							The job parameters extractor to convert step execution into job parameters.
+							]]></xsd:documentation>
+								<xsd:appinfo>
+									<tool:annotation kind="ref">
+										<tool:expected-type type="java:org.springframework.batch.core.step.job.JobParametersExtractor" />
+									</tool:annotation>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:attribute>
+					</xsd:complexType>
+				</xsd:element>
+				<xsd:element name="flow">
+					<xsd:complexType>
+						<xsd:attribute name="parent" type="xsd:string" use="required">
+							<xsd:annotation>
+								<xsd:documentation source="java:org.springframework.batch.core.job.flow.Flow"><![CDATA[
+							The flow that will execute in this step.
+							]]></xsd:documentation>
+								<xsd:appinfo>
+									<tool:annotation kind="parent">
+										<tool:expected-type type="org.springframework.batch.core.job.flow.Flow" />
+									</tool:annotation>
+								</xsd:appinfo>
+							</xsd:annotation>
+						</xsd:attribute>
+					</xsd:complexType>
+				</xsd:element>
+			</xsd:choice>
+			<xsd:group ref="transitions" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="listeners" type="stepListenersType" minOccurs="0" maxOccurs="1" />
+		</xsd:sequence>
+		<xsd:attributeGroup ref="parentAttribute" />
+	</xsd:complexType>
+
+	<xsd:complexType name="partitionType">
+		<xsd:all>
+			<xsd:element name="step" type="stepType" minOccurs="0" maxOccurs="1" />
+			<xsd:element name="handler" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					Inline specification of a simple TaskExecutorPartitionHandler]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:attribute name="task-executor">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+					Reference to a TaskExecutor]]>
+							</xsd:documentation>
+							<xsd:appinfo>
+								<tool:annotation kind="ref">
+									<tool:expected-type type="org.springframework.core.task.TaskExecutor" />
+								</tool:annotation>
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="grid-size">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+								Grid size for the handler.  Defaults to 6.]]>
+							</xsd:documentation>
+							<xsd:appinfo>
+								<tool:annotation kind="direct" />
+							</xsd:appinfo>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:complexType>
+			</xsd:element>
+		</xsd:all>
+		<xsd:attribute name="handler">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+					Reference to a PartitionHandler]]>
+				</xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref">
+						<tool:expected-type type="org.springframework.core.partition.PartitionHandler" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="aggregator">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+					Reference to a StepExecutionAggregator that will be used to merge the partition results back into the master StepExecution]]>
+				</xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref">
+						<tool:expected-type type="org.springframework.core.partition.support.StepExecutionAggregator" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="partitioner">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+					Reference to a Partitioner]]>
+				</xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref">
+						<tool:expected-type type="org.springframework.core.partition.support.Partitioner" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="step">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+					Reference to a Step]]>
+				</xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref">
+						<tool:expected-type type="org.springframework.core.Step" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<xsd:complexType name="taskletType">
+		<xsd:all>
+			<xsd:element name="chunk" type="chunkTaskletType" minOccurs="0" maxOccurs="1" />
+			<xsd:element name="transaction-attributes" type="transaction-attributesType" minOccurs="0" maxOccurs="1" />
+			<xsd:element name="no-rollback-exception-classes" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					List of exception classes that should not cause rollback if possible.  This list
+					is only a hint and has to be interpreted by the step to make sense in context (e.g.
+					it might not be possible to honour the hint during a write operation, so consider moving
+					code that throws these exceptions to a processor or validator).
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="includeElementGroup" minOccurs="0" maxOccurs="unbounded" />
+					<xsd:attributeGroup ref="mergeAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="listeners" type="stepListenersType" minOccurs="0" maxOccurs="1" />
+			<xsd:element ref="beans:bean" minOccurs="0" maxOccurs="1" />
+			<xsd:element ref="beans:ref" minOccurs="0" maxOccurs="1" />
+		</xsd:all>
+		<xsd:attribute name="ref" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation>
+					The tasklet is a reference to another bean
+					definition that implements
+					the Tasklet interface.
+				</xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref" />
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="method" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation>
+					If the tasklet is specified as a bean definition, then a method can be specified and a POJO
+					will
+					be adapted to the Tasklet interface. The method suggested should have the same arguments
+					as Tasklet.execute (or a subset), and have a compatible return type (boolean, void or RepeatStatus).
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="start-limit" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The maximum number of times a Step may be started.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="allow-start-if-complete" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				Set to true to allow a step to be started even if it is already complete.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="transaction-manager" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
+				The bean name of the TransactionManager that is to be used. This attribute
+				is not required, and only needs to be specified explicitly
+				if the bean name of the desired TransactionManager is not 'transactionManager'.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref">
+						<tool:expected-type type="org.springframework.transaction.PlatformTransactionManager" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="task-executor" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation source="java:org.springframework.core.task.TaskExecutor"><![CDATA[
+				The task executor responsible for executing the task.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref">
+						<tool:expected-type type="org.springframework.core.task.TaskExecutor" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="throttle-limit" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				This limits the number of tasks queued for concurrent
+				processing to prevent thread pools from being overwhelmed.
+				Default is 4.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<xsd:complexType name="transaction-attributesType">
+		<xsd:attribute name="propagation">
+			<xsd:annotation>
+				<xsd:documentation source="java:org.springframework.transaction.annotation.Propagation"><![CDATA[
+				The transaction propagation behavior.
+				]]></xsd:documentation>
+			</xsd:annotation>
+			<xsd:simpleType>
+				<xsd:restriction base="xsd:string">
+					<xsd:enumeration value="REQUIRED" />
+					<xsd:enumeration value="SUPPORTS" />
+					<xsd:enumeration value="MANDATORY" />
+					<xsd:enumeration value="REQUIRES_NEW" />
+					<xsd:enumeration value="NOT_SUPPORTED" />
+					<xsd:enumeration value="NEVER" />
+					<xsd:enumeration value="NESTED" />
+				</xsd:restriction>
+			</xsd:simpleType>
+		</xsd:attribute>
+		<xsd:attribute name="isolation" type="isolationType">
+			<xsd:annotation>
+				<xsd:documentation source="java:org.springframework.transaction.annotation.Isolation"><![CDATA[
+				The transaction isolation level.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="timeout" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The transaction timeout value (in seconds).
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<xsd:simpleType name="isolationType">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="DEFAULT" />
+			<xsd:enumeration value="READ_UNCOMMITTED" />
+			<xsd:enumeration value="READ_COMMITTED" />
+			<xsd:enumeration value="REPEATABLE_READ" />
+			<xsd:enumeration value="SERIALIZABLE" />
+		</xsd:restriction>
+	</xsd:simpleType>
+
+	<xsd:group name="beanElementGroup">
+		<xsd:choice>
+			<xsd:element ref="beans:bean" />
+			<xsd:element ref="beans:ref" />
+		</xsd:choice>
+	</xsd:group>
+
+	<xsd:complexType name="chunkTaskletType">
+		<xsd:all>
+			<xsd:element name="reader" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					The ItemReader used by the step.
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
+					<xsd:attributeGroup ref="adapterMethodAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="processor" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					The ItemProcessor used by the step.
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
+					<xsd:attributeGroup ref="adapterMethodAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="writer" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					The ItemWriter used by the step.
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
+					<xsd:attributeGroup ref="adapterMethodAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="skip-policy" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					The SkipPolicy used by the step.  If specified then the skip limit and skippable exceptions are ignored
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
+					<xsd:attributeGroup ref="adapterMethodAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="retry-policy" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					The RetryPolicy used by the step.  If specified then the retry limit and retryable exceptions are ignored
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
+					<xsd:attributeGroup ref="adapterMethodAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="retry-listeners" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					List of all listeners for the step definition
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="listener" type="listenerType" minOccurs="0" maxOccurs="unbounded" />
+					</xsd:sequence>
+					<xsd:attributeGroup ref="mergeAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="streams" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					List of all streams to be included for the step definition
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="stream" minOccurs="0" maxOccurs="unbounded">
+							<xsd:complexType>
+								<xsd:attribute name="ref" type="xsd:string">
+									<xsd:annotation>
+										<xsd:documentation><![CDATA[
+										A reference to an ItemStream bean definition
+										]]>
+										</xsd:documentation>
+										<xsd:appinfo>
+											<tool:annotation kind="ref" />
+											<tool:expected-type type="org.springframework.batch.item.ItemStream" />
+										</xsd:appinfo>
+									</xsd:annotation>
+								</xsd:attribute>
+							</xsd:complexType>
+						</xsd:element>
+					</xsd:sequence>
+					<xsd:attributeGroup ref="mergeAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="skippable-exception-classes" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					List of exception classes that are skippable.  Exceptions (and their subclasses) that
+					are declared as included take precedence over the same value if it is also excluded.
+					Exceptions that are already marked as no-rollback
+					are automatically skippable (but it doesn't hurt to add them again here).
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="includeExcludeElementGroup" minOccurs="0" maxOccurs="unbounded" />
+					<xsd:attributeGroup ref="mergeAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="retryable-exception-classes" minOccurs="0" maxOccurs="1">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+					List of exception classes that are retryable. Exceptions (and their subclasses) that
+					are declared as included take precedence over the same value if it is also excluded.
+					]]>
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:group ref="includeExcludeElementGroup" minOccurs="0" maxOccurs="unbounded" />
+					<xsd:attributeGroup ref="mergeAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="listeners" type="stepListenersType" minOccurs="0" maxOccurs="1" />
+		</xsd:all>
+		<xsd:attribute name="commit-interval" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The number of items that will be processed before commit is called for the transaction.
+				Either set this or the chunk-completion-policy but not both.  Can be specified as an expression
+				that will be evaluated in the scope of the step (e.g. "#{jobParameters['commit.interval']}").
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="reader" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The bean name of the item reader that is to be used for the process.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref" />
+					<tool:expected-type type="org.springframework.batch.item.ItemReader" />
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="processor" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The bean name of the item processor that is to be used for the process.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref" />
+					<tool:expected-type type="org.springframework.batch.item.ItemProcessor" />
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="writer" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The bean name of the item writer that is to be used for the process.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref" />
+					<tool:expected-type type="org.springframework.batch.item.ItemWriter" />
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="skip-limit" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The maximum number of items that will be allowed to be skipped.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="skip-policy" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The skip policy to use.  If specified then the skip limit and skippable exceptions are ignored.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref" />
+					<tool:expected-type type="org.springframework.core.step.skip.SkipPolicy" />
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="retry-policy" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The retry policy to use.  If specified then the retry limit and retryable exceptions are ignored.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref" />
+					<tool:expected-type type="org.springframework.batch.retry.RetryPolicy" />
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="retry-limit" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The maximum number of times the processing of an item will be retried.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="cache-capacity" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				The capacity of the cache in the retry policy.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="reader-transactional-queue" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				Whether the reader is a transactional queue. If it is then items read should not be cached
+				in the event of a rollback since they will be returned to the queue. Default is false.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="processor-transactional" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				Whether the processor is transaction aware. If it is then processed items should not be
+				cached in between transactions in case of a rollback.  N.B. if reader-transactional-queue
+				is true then so should this be.  Default is true.  If false then the processor is only called
+				once per item per chunk, even if there are rollbacks with retries and skips.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="chunk-completion-policy" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation source="java:org.springframework.batch.repeat.CompletionPolicy"><![CDATA[
+				A transaction will be committed when this policy decides to
+				complete. Defaults to a SimpleCompletionPolicy with chunk size
+				equal to the commit-interval attribute.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref">
+						<tool:expected-type type="java:org.springframework.batch.repeat.CompletionPolicy" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<xsd:attributeGroup name="nextAttribute">
+		<xsd:attribute name="next" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+				A shortcut for specifying the next step to execute after this one, if there is only one choice.    The next
+				attribute is a synonym for &lt;next on="*"/&gt; plus &lt;fail on="FAILED"/&gt; in a transition.
+				If this attribute is specified, then there should be no nested transition elements]]>
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:attributeGroup>
+
+	<xsd:attributeGroup name="exceptionClassAttribute">
+		<xsd:attribute name="class" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation>
+					An exception class name.
+				</xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="direct">
+						<tool:expected-type type="java.lang.Class" />
+						<tool:assignable-to type="java.lang.Throwable" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:attributeGroup>
+
+	<xsd:group name="includeElementGroup">
+		<xsd:choice>
+			<xsd:element name="include">
+				<xsd:annotation>
+					<xsd:documentation>
+						Classify an exception as "included" in the set. Exceptions of this type or a subclass are
+						included.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:attributeGroup ref="exceptionClassAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+		</xsd:choice>
+	</xsd:group>
+
+	<xsd:group name="includeExcludeElementGroup">
+		<xsd:choice>
+			<xsd:group ref="includeElementGroup" />
+			<xsd:element name="exclude">
+				<xsd:annotation>
+					<xsd:documentation>
+						Classify an exception as "excluded" from the
+						set. Exceptions of this type or a subclass are
+						excluded
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:attributeGroup ref="exceptionClassAttribute" />
+				</xsd:complexType>
+			</xsd:element>
+		</xsd:choice>
+	</xsd:group>
+
+	<xsd:complexType name="listenerType">
+		<xsd:group ref="beanElementGroup" minOccurs="0" maxOccurs="1" />
+		<xsd:attribute name="ref" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation>
+					A reference to a listener, a POJO with a
+					listener-annotated method, or a POJO with
+					a method
+					referenced by a
+					*-method attribute.
+				</xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref" />
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<xsd:complexType name="jobExecutionListenerType">
+		<xsd:complexContent>
+			<xsd:extension base="listenerType">
+				<xsd:attribute name="before-job-method" type="xsd:string" />
+				<xsd:attribute name="after-job-method" type="xsd:string" />
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<xsd:complexType name="stepListenerType">
+		<xsd:complexContent>
+			<xsd:extension base="listenerType">
+				<xsd:attribute name="before-step-method" type="xsd:string" />
+				<xsd:attribute name="after-step-method" type="xsd:string" />
+				<xsd:attribute name="before-chunk-method" type="xsd:string" />
+				<xsd:attribute name="after-chunk-method" type="xsd:string" />
+				<xsd:attribute name="before-read-method" type="xsd:string" />
+				<xsd:attribute name="after-read-method" type="xsd:string" />
+				<xsd:attribute name="on-read-error-method" type="xsd:string" />
+				<xsd:attribute name="before-process-method" type="xsd:string" />
+				<xsd:attribute name="after-process-method" type="xsd:string" />
+				<xsd:attribute name="on-process-error-method" type="xsd:string" />
+				<xsd:attribute name="before-write-method" type="xsd:string" />
+				<xsd:attribute name="after-write-method" type="xsd:string" />
+				<xsd:attribute name="on-write-error-method" type="xsd:string" />
+				<xsd:attribute name="on-skip-in-read-method" type="xsd:string" />
+				<xsd:attribute name="on-skip-in-process-method" type="xsd:string" />
+				<xsd:attribute name="on-skip-in-write-method" type="xsd:string" />
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<xsd:complexType name="stepListenersType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+			The listeners for a step definition of any type relevant for a step (extensions of StepListener),
+			]]>
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element name="listener" type="stepListenerType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attributeGroup ref="mergeAttribute" />
+	</xsd:complexType>
+
+	<xsd:group name="transitions">
+		<xsd:choice>
+			<xsd:element name="next">
+				<xsd:annotation>
+					<xsd:documentation>
+						Defines a transition from this step to the
+						next
+						one depending on the value of the exit
+						status.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:attribute name="on" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation>A pattern to match against the exit status
+								code. Use * and ? as wildcard characters. When a
+								step finishes
+								the most
+								specific match will be chosen to select the next step.
+								Hint:
+								always include a default
+								transition with on=&quot;*&quot;.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="to" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation>
+								The name of the step to go to next. Must
+								resolve to one of the other steps in this job.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="stop">
+				<xsd:annotation>
+					<xsd:documentation>
+						Declares job should be stop at this point and
+						provides pointer where execution should continue
+						when
+						the job is
+						restarted.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:attribute name="on" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation>A pattern to match against the exit status
+								code. Use * and ? as wildcard characters.
+								When a step
+								finishes
+								the most specific match will be chosen to
+								select the next step.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="restart" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation>The name of the step to start on when the
+								stopped job is restarted.
+								Must resolve to one of the
+								other steps
+								in this job.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="end">
+				<xsd:annotation>
+					<xsd:documentation>
+						Declares job should end at this point, without
+						the possibility of restart.
+						BatchStatus will be
+						COMPLETED.
+						ExitStatus is configurable.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:attribute name="on" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation>A pattern to match against the exit status
+								code. Use * and ? as wildcard characters.
+								When a step
+								finishes
+								the most specific match will be chosen to
+								select the next step.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="exit-code" use="optional" type="xsd:string" default="COMPLETED">
+						<xsd:annotation>
+							<xsd:documentation>The exit code value to end on, defaults to
+								COMPLETED.</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="fail">
+				<xsd:annotation>
+					<xsd:documentation>
+						Declares job should fail at this point.
+						BatchStatus will be FAILED. ExitStatus is configurable.
+					</xsd:documentation>
+				</xsd:annotation>
+				<xsd:complexType>
+					<xsd:attribute name="on" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation>A pattern to match against the exit status
+								code. Use * and ? as wildcard characters.
+								When a step
+								finishes
+								the most specific match will be chosen to
+								select the next step.
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="exit-code" use="optional" type="xsd:string" default="FAILED">
+						<xsd:annotation>
+							<xsd:documentation>The exit code value to end on, defaults to
+								FAILED.</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:complexType>
+			</xsd:element>
+		</xsd:choice>
+	</xsd:group>
+
+	<xsd:attributeGroup name="jobRepositoryAttribute">
+		<xsd:attribute name="job-repository" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation source="java:org.springframework.batch.core.repository.JobRepository"><![CDATA[
+				The bean name of the JobRepository that is to be used. This attribute
+				is not required, and only needs to be specified explicitly
+				if the bean name of the desired JobRepository is not 'jobRepository'.
+				]]></xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref">
+						<tool:expected-type type="org.springframework.batch.core.repository.JobRepository" />
+					</tool:annotation>
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:attributeGroup>
+
+	<xsd:attributeGroup name="parentAttribute">
+		<xsd:attribute name="parent" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation>
+					The name of the parent bean from which the
+					configuration should inherit.
+				</xsd:documentation>
+				<xsd:appinfo>
+					<tool:annotation kind="ref" />
+				</xsd:appinfo>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:attributeGroup>
+
+	<xsd:attributeGroup name="abstractAttribute">
+		<xsd:attribute name="abstract" type="xsd:boolean" use="optional">
+			<xsd:annotation>
+				<xsd:documentation>
+					Is this bean "abstract", that is, not meant to be
+					instantiated itself
+					but rather just serving as
+					parent for concrete
+					child bean definitions?
+					The default is "false". Specify "true" to
+					tell the bean factory to not
+					try
+					to instantiate that particular bean
+					in any case.
+
+					Note: This attribute will not be inherited by child
+					bean definitions.
+					Hence, it needs to be specified per abstract bean
+					definition.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:attributeGroup>
+
+	<xsd:attributeGroup name="mergeAttribute">
+		<xsd:attribute name="merge" type="xsd:boolean" use="optional">
+			<xsd:annotation>
+				<xsd:documentation>
+					Should this list be merged with the corresponding
+					list provided
+					by the parent? If not, it will
+					overwrite the parent
+					list.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:attributeGroup>
+
+	<xsd:attributeGroup name="adapterMethodAttribute">
+		<xsd:attribute name="adapter-method" type="xsd:string" use="optional">
+			<xsd:annotation>
+				<xsd:documentation>
+					This attribute indicates the method from the
+					class that should
+					be used to dynamically create a
+					proxy.
+				</xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:attributeGroup>
+
+	<xsd:simpleType name="description">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Contains informative text describing the purpose of the enclosing element.
+	Used primarily for user documentation of XML bean definition documents.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:restriction base="xsd:string" />
+	</xsd:simpleType>
+
+</xsd:schema>
diff --git a/xml/tests/testData/unusedNs/spring-beans-2.5.xsd b/xml/tests/testData/unusedNs/spring-beans-2.5.xsd
new file mode 100644
index 0000000..170660a
--- /dev/null
+++ b/xml/tests/testData/unusedNs/spring-beans-2.5.xsd
@@ -0,0 +1,1164 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<xsd:schema xmlns="http://www.springframework.org/schema/beans"
+		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+		targetNamespace="http://www.springframework.org/schema/beans">
+
+	<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
+
+	<xsd:annotation>
+		<xsd:documentation><![CDATA[
+	Spring XML Beans Schema, version 2.5
+	Authors: Rob Harrop, Juergen Hoeller, Mark Fisher
+
+	This defines a simple and consistent way of creating a namespace
+	of JavaBeans objects, managed by a Spring BeanFactory, read by
+	XmlBeanDefinitionReader (with DefaultBeanDefinitionDocumentReader).
+
+	This document type is used by most Spring functionality, including
+	web application contexts, which are based on bean factories.
+
+	Each "bean" element in this document defines a JavaBean.
+	Typically the bean class is specified, along with JavaBean properties
+	and/or constructor arguments.
+
+	A bean instance can be a "singleton" (shared instance) or a "prototype"
+	(independent instance). Further scopes can be provided by extended
+	bean factories, for example in a web environment.
+
+	References among beans are supported, that is, setting a JavaBean property
+	or a constructor argument to refer to another bean in the same factory
+	(or an ancestor factory).
+
+	As alternative to bean references, "inner bean definitions" can be used.
+	Singleton flags of such inner bean definitions are effectively ignored:
+	inner beans are typically anonymous prototypes.
+
+	There is also support for lists, sets, maps, and java.util.Properties
+	as bean property types or constructor argument types.
+		]]></xsd:documentation>
+	</xsd:annotation>
+
+	<!-- base types -->
+	<xsd:complexType name="identifiedType" abstract="true">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	The unique identifier for a bean. The scope of the identifier
+	is the enclosing bean factory.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:attribute name="id" type="xsd:ID">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The unique identifier for a bean.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<!-- Top-level <beans> tag -->
+	<xsd:element name="beans">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	The top level (typically root) element. Allows the definition
+	of default values for all nested bean definitions.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="description" minOccurs="0"/>
+				<xsd:choice minOccurs="0" maxOccurs="unbounded">
+					<xsd:element ref="import"/>
+					<xsd:element ref="alias"/>
+					<xsd:element ref="bean"/>
+					<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+				</xsd:choice>
+			</xsd:sequence>
+			<xsd:attribute name="default-lazy-init" default="false" type="xsd:boolean">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'lazy-init' value; see the documentation for the
+	'lazy-init' attribute of the '<bean>' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="default-merge" default="false" type="xsd:boolean">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'merge' value; see the documentation for the
+	'merge' attribute of the various collection elements.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="default-autowire" default="no">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'autowire' value; see the documentation for the
+	'autowire' attribute of the '<bean>' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+				<xsd:simpleType>
+					<xsd:restriction base="xsd:NMTOKEN">
+						<xsd:enumeration value="no"/>
+						<xsd:enumeration value="byName"/>
+						<xsd:enumeration value="byType"/>
+						<xsd:enumeration value="constructor"/>
+						<xsd:enumeration value="autodetect"/>
+					</xsd:restriction>
+				</xsd:simpleType>
+			</xsd:attribute>
+			<xsd:attribute name="default-dependency-check" default="none">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'dependency-check' value; see the documentation for the
+	'dependency-check' attribute of the '<bean>' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+				<xsd:simpleType>
+					<xsd:restriction base="xsd:NMTOKEN">
+						<xsd:enumeration value="none"/>
+						<xsd:enumeration value="simple"/>
+						<xsd:enumeration value="objects"/>
+						<xsd:enumeration value="all"/>
+					</xsd:restriction>
+				</xsd:simpleType>
+			</xsd:attribute>
+			<xsd:attribute name="default-autowire-candidates" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	A default bean name pattern for identifying autowire candidates:
+	e.g. "*Service", "data*", "*Service*", "data*Service".
+	Also accepts a comma-separated list of patterns: e.g. "*Service,*Dao".
+	See the documentation for the 'autowire-candidate' attribute of the
+	'<bean/>' element for the semantic details of autowire candidate beans.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="default-init-method" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'init-method' value; see the documentation for the
+	'init-method' attribute of the '<bean>' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="default-destroy-method" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The default 'destroy-method' value; see the documentation for the
+	'destroy-method' attribute of the '<bean>' element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:anyAttribute namespace="##other" processContents="lax"/>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="description">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Contains informative text describing the purpose of the enclosing element.
+	Used primarily for user documentation of XML bean definition documents.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="import">
+		<xsd:annotation>
+			<xsd:documentation source="java:org.springframework.core.io.Resource"><![CDATA[
+	Specifies an XML bean definition resource to import.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="resource" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The relative resource location of the XML (bean definition) file to import,
+	for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml".
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="alias">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Defines an alias for a bean (which can reside in a different definition
+	resource).
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="name" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the bean to define an alias for.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="alias" type="xsd:string" use="required">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The alias name to define for the bean.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:group name="beanElements">
+		<xsd:sequence>
+			<xsd:element ref="description" minOccurs="0"/>
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:element ref="meta"/>
+				<xsd:element ref="constructor-arg"/>
+				<xsd:element ref="property"/>
+				<xsd:element ref="qualifier"/>
+				<xsd:element ref="lookup-method"/>
+				<xsd:element ref="replaced-method"/>
+				<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+			</xsd:choice>
+		</xsd:sequence>
+	</xsd:group>
+
+	<xsd:attributeGroup name="beanAttributes">
+		<xsd:attribute name="name" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Can be used to create one or more aliases illegal in an (XML) id.
+	Multiple aliases can be separated by any number of spaces, commas,
+	or semi-colons (or indeed any mixture of the three).
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="class" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation source="java:java.lang.Class"><![CDATA[
+	The fully qualified name of the bean's class, except if it serves only
+	as a parent definition for child bean definitions.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="parent" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of the parent bean definition.
+
+	Will use the bean class of the parent if none is specified, but can
+	also override it. In the latter case, the child bean class must be
+	compatible with the parent, i.e. accept the parent's property values
+	and constructor argument values, if any.
+
+	A child bean definition will inherit constructor argument values,
+	property values and method overrides from the parent, with the option
+	to add new values. If init method, destroy method, factory bean and/or
+	factory method are specified, they will override the corresponding
+	parent settings.
+
+	The remaining settings will always be taken from the child definition:
+	depends on, autowire mode, dependency check, scope, lazy init.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="scope" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The scope of this bean: typically "singleton" (one shared instance,
+	which will be returned by all calls to getBean with the given id), or
+	"prototype" (independent instance resulting from each call to getBean).
+	Default is "singleton".
+
+	Singletons are most commonly used, and are ideal for multi-threaded
+	service objects. Further scopes, such as "request" or "session", might
+	be supported by extended bean factories (e.g. in a web environment).
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+
+	Inner bean definitions inherit the singleton status of their containing
+	bean definition, unless explicitly specified: The inner bean will be a
+	singleton if the containing bean is a singleton, and a prototype if
+	the containing bean has any other scope.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="abstract" type="xsd:boolean">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Is this bean "abstract", that is, not meant to be instantiated itself
+	but rather just serving as parent for concrete child bean definitions?
+	The default is "false". Specify "true" to tell the bean factory to not
+	try to instantiate that particular bean in any case.
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per abstract bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="lazy-init" default="default" type="defaultable-boolean">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Indicates whether or not this bean is to be lazily initialized.
+	If false, it will be instantiated on startup by bean factories
+	that perform eager initialization of singletons. The default is
+	"false".
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="autowire" default="default">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Controls whether bean properties are "autowired".
+	This is an automagical process in which bean references don't need
+	to be coded explicitly in the XML bean definition file, but rather the
+	Spring container works out dependencies.
+
+	There are 5 modes:
+
+	1. "no"
+	The traditional Spring default. No automagical wiring. Bean references
+	must be defined in the XML file via the <ref/> element (or "ref"
+	attribute). We recommend this in most cases as it makes documentation
+	more explicit.
+
+	2. "byName"
+	Autowiring by property name. If a bean of class Cat exposes a "dog"
+	property, Spring will try to set this to the value of the bean "dog"
+	in the current container. If there is no matching bean by name, nothing
+	special happens; use dependency-check="objects" to raise an error in
+	that case.
+
+	3. "byType"
+	Autowiring if there is exactly one bean of the property type in the
+	container. If there is more than one, a fatal error is raised, and
+	you cannot use byType autowiring for that bean. If there is none,
+	nothing special happens; use dependency-check="objects" to raise an
+	error in that case.
+
+	4. "constructor"
+	Analogous to "byType" for constructor arguments. If there is not exactly
+	one bean of the constructor argument type in the bean factory, a fatal
+	error is raised.
+
+	5. "autodetect"
+	Chooses "constructor" or "byType" through introspection of the bean
+	class. If a default constructor is found, "byType" gets applied.
+
+	Note that explicit dependencies, i.e. "property" and "constructor-arg"
+	elements, always override autowiring. Autowire behavior can be combined
+	with dependency checking, which will be performed after all autowiring
+	has been completed.
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+			<xsd:simpleType>
+				<xsd:restriction base="xsd:NMTOKEN">
+					<xsd:enumeration value="default"/>
+					<xsd:enumeration value="no"/>
+					<xsd:enumeration value="byName"/>
+					<xsd:enumeration value="byType"/>
+					<xsd:enumeration value="constructor"/>
+					<xsd:enumeration value="autodetect"/>
+				</xsd:restriction>
+			</xsd:simpleType>
+		</xsd:attribute>
+		<xsd:attribute name="dependency-check" default="default">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Controls whether or not to check whether all of this
+	bean's dependencies, expressed in its properties, are satisfied.
+	The default is to perform no dependency checking.
+
+	"simple" type dependency checking includes primitives and String;
+	"objects" includes collaborators (other beans in the factory);
+	"all" includes both types of dependency checking.
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+			<xsd:simpleType>
+				<xsd:restriction base="xsd:NMTOKEN">
+					<xsd:enumeration value="default"/>
+					<xsd:enumeration value="none"/>
+					<xsd:enumeration value="simple"/>
+					<xsd:enumeration value="objects"/>
+					<xsd:enumeration value="all"/>
+				</xsd:restriction>
+			</xsd:simpleType>
+		</xsd:attribute>
+		<xsd:attribute name="depends-on" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The names of the beans that this bean depends on being initialized.
+	The bean factory will guarantee that these beans get initialized
+	before this bean.
+
+	Note that dependencies are normally expressed through bean properties
+	or constructor arguments. This property should just be necessary for
+	other kinds of dependencies like statics (*ugh*) or database preparation
+	on startup.
+
+	Note: This attribute will not be inherited by child bean definitions.
+	Hence, it needs to be specified per concrete bean definition.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="autowire-candidate" default="default" type="defaultable-boolean">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Indicates whether or not this bean should be considered when looking
+	for matching candidates to satisfy another bean's autowiring requirements.
+	Note that this does not affect explicit references by name, which will get
+	resolved even if the specified bean is not marked as an autowire candidate.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="primary" type="xsd:boolean">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Specifies that this bean should be given preference when multiple
+	candidates are qualified to autowire a single-valued dependency.
+	If exactly one 'primary' bean exists among the candidates, it
+	will be the autowired value.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="init-method" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of the custom initialization method to invoke after setting
+	bean properties. The method must have no arguments, but may throw any
+	exception.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="destroy-method" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of the custom destroy method to invoke on bean factory
+	shutdown. The method must have no arguments, but may throw any
+	exception.
+
+	Note: Only invoked on beans whose lifecycle is under the full
+	control of the factory - which is always the case for singletons,
+	but not guaranteed for any other scope.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="factory-method" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of a factory method to use to create this object. Use
+	constructor-arg elements to specify arguments to the factory method,
+	if it takes arguments. Autowiring does not apply to factory methods.
+
+	If the "class" attribute is present, the factory method will be a static
+	method on the class specified by the "class" attribute on this bean
+	definition. Often this will be the same class as that of the constructed
+	object - for example, when the factory method is used as an alternative
+	to a constructor. However, it may be on a different class. In that case,
+	the created object will *not* be of the class specified in the "class"
+	attribute. This is analogous to FactoryBean behavior.
+
+	If the "factory-bean" attribute is present, the "class" attribute is not
+	used, and the factory method will be an instance method on the object
+	returned from a getBean call with the specified bean name. The factory
+	bean may be defined as a singleton or a prototype.
+
+	The factory method can have any number of arguments. Autowiring is not
+	supported. Use indexed constructor-arg elements in conjunction with the
+	factory-method attribute.
+
+	Setter Injection can be used in conjunction with a factory method.
+	Method Injection cannot, as the factory method returns an instance,
+	which will be used when the container creates the bean.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="factory-bean" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Alternative to class attribute for factory-method usage.
+	If this is specified, no class attribute should be used.
+	This must be set to the name of a bean in the current or
+	ancestor factories that contains the relevant factory method.
+	This allows the factory itself to be configured using Dependency
+	Injection, and an instance (rather than static) method to be used.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:attributeGroup>
+
+	<xsd:element name="meta" type="metaType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Arbitrary metadata attached to a bean definition.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+
+	<xsd:complexType name="metaType">
+		<xsd:attribute name="key" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The key name of the metadata attribute being defined.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="value" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The value of the metadata attribute being defined (as a simple String).
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<xsd:element name="bean">
+		<xsd:annotation>
+			<xsd:documentation source="java:org.springframework.beans.factory.config.BeanDefinition"><![CDATA[
+	Defines a single (usually named) bean.
+
+	A bean definition may contain nested tags for constructor arguments,
+	property values, lookup methods, and replaced methods. Mixing constructor
+	injection and setter injection on the same bean is explicitly supported.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="identifiedType">
+					<xsd:group ref="beanElements"/>
+					<xsd:attributeGroup ref="beanAttributes"/>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="constructor-arg">
+		<xsd:annotation>
+			<xsd:documentation source="java:org.springframework.beans.factory.config.ConstructorArgumentValues">
+				<![CDATA[
+	Bean definitions can specify zero or more constructor arguments.
+	This is an alternative to "autowire constructor".
+	Arguments correspond to either a specific index of the constructor
+	argument list or are supposed to be matched generically by type.
+
+	Note: A single generic argument value will just be used once, rather
+	than potentially matched multiple times (as of Spring 1.1).
+
+	constructor-arg elements are also used in conjunction with the
+	factory-method element to construct beans using static or instance
+	factory methods.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="description" minOccurs="0"/>
+				<xsd:choice minOccurs="0" maxOccurs="1">
+					<xsd:element ref="bean"/>
+					<xsd:element ref="ref"/>
+					<xsd:element ref="idref"/>
+					<xsd:element ref="value"/>
+					<xsd:element ref="null"/>
+					<xsd:element ref="list"/>
+					<xsd:element ref="set"/>
+					<xsd:element ref="map"/>
+					<xsd:element ref="props"/>
+					<xsd:any namespace="##other" processContents="strict"/>
+				</xsd:choice>
+			</xsd:sequence>
+			<xsd:attribute name="index" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The exact index of the argument in the constructor argument list.
+	Only needed to avoid ambiguities, e.g. in case of 2 arguments of
+	the exact same type.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="type" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The exact type of the constructor argument. Only needed to avoid
+	ambiguities, e.g. in case of 2 single argument constructors
+	that can both be converted from a String.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="ref" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<ref bean='...'/>" element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="value" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<value>...<value/>" element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="property" type="propertyType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Bean definitions can have zero or more properties.
+	Property elements correspond to JavaBean setter methods exposed
+	by the bean classes. Spring supports primitives, references to other
+	beans in the same or related factories, lists, maps and properties.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+
+	<xsd:element name="qualifier">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Bean definitions can provide qualifiers to match against annotations
+	on a field or parameter for fine-grained autowire candidate resolution.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="attribute" minOccurs="0" maxOccurs="unbounded"/>
+			</xsd:sequence>
+			<xsd:attribute name="type" type="xsd:string" default="org.springframework.beans.factory.annotation.Qualifier"/>
+			<xsd:attribute name="value" type="xsd:string"/>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="attribute" type="metaType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A qualifier element may contain attribute child elements as key-value
+	pairs. These will be available for matching against attributes of a
+	qualifier annotation on an autowired field or parameter if present.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+
+	<xsd:element name="lookup-method">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A lookup method causes the IoC container to override the given method
+	and return the bean with the name given in the bean attribute. This is
+	a form of Method Injection. It is particularly useful as an alternative
+	to implementing the BeanFactoryAware interface, in order to be able to
+	make getBean() calls for non-singleton instances at runtime. In this
+	case, Method Injection is a less invasive alternative.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="name" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the lookup method. This method must take no arguments.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="bean" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the bean in the current or ancestor factories that
+	the lookup method should resolve to. Often this bean will be a
+	prototype, in which case the lookup method will return a distinct
+	instance on every invocation. This is useful for single-threaded objects.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="replaced-method">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Similar to the lookup method mechanism, the replaced-method element
+	is used to control IoC container method overriding: Method Injection.
+	This mechanism allows the overriding of a method with arbitrary code.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:choice minOccurs="0" maxOccurs="unbounded">
+					<xsd:element ref="arg-type"/>
+				</xsd:choice>
+			</xsd:sequence>
+			<xsd:attribute name="name" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The name of the method whose implementation must be replaced by the
+	IoC container. If this method is not overloaded, there is no need
+	to use arg-type subelements. If this method is overloaded, arg-type
+	subelements must be used for all override definitions for the method.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+			<xsd:attribute name="replacer" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation source="java:org.springframework.beans.factory.support.MethodReplacer"><![CDATA[
+	Bean name of an implementation of the MethodReplacer interface in the
+	current or ancestor factories. This may be a singleton or prototype
+	bean. If it is a prototype, a new instance will be used for each
+	method replacement. Singleton usage is the norm.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="arg-type">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Identifies an argument for a replaced method in the event of
+	method overloading.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:attribute name="match" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	Specification of the type of an overloaded method argument as a String.
+	For convenience, this may be a substring of the FQN. E.g. all the
+	following would match "java.lang.String":
+	- java.lang.String
+	- String
+	- Str
+
+	As the number of arguments will be checked also, this convenience
+	can often be used to save typing.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="ref">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Defines a reference to another bean in this factory or an external
+	factory (parent or included factory).
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="bean" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="local" type="xsd:IDREF">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean. The value must be a bean ID and thus can
+	be checked by the XML parser. This is therefore the preferred technique
+	for referencing beans within the same bean factory XML file.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="parent" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean in a parent factory.
+						]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="idref">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	The id of another bean in this factory or an external factory
+	(parent or included factory).
+	While a regular 'value' element could instead be used for the
+	same effect, using idref in this case allows validation of local
+	bean ids by the XML parser, and name completion by supporting tools.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:restriction base="xsd:anyType">
+					<xsd:attribute name="bean" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+					<xsd:attribute name="local" type="xsd:IDREF">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	The name of the referenced bean. The value must be a bean ID and thus can
+	be checked by the XML parser. This is therefore the preferred technique
+	for referencing beans within the same bean factory XML file.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:restriction>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="value">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Contains a string representation of a property value.
+	The property may be a string, or may be converted to the required
+	type using the JavaBeans PropertyEditor machinery. This makes it
+	possible for application developers to write custom PropertyEditor
+	implementations that can convert strings to arbitrary target objects.
+
+	Note that this is recommended for simple objects only. Configure
+	more complex objects by populating JavaBean properties with
+	references to other beans.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:attribute name="type" type="xsd:string">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The exact type that the value should be converted to. Only needed
+	if the type of the target property or constructor argument is
+	too generic: for example, in case of a collection element.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="null">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Denotes a Java null value. Necessary because an empty "value" tag
+	will resolve to an empty String, which will not be resolved to a
+	null value unless a special PropertyEditor does so.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:complexType>
+	</xsd:element>
+
+	<!-- Collection Elements -->
+	<xsd:group name="collectionElements">
+		<xsd:sequence>
+			<xsd:element ref="description" minOccurs="0"/>
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:element ref="bean"/>
+				<xsd:element ref="ref"/>
+				<xsd:element ref="idref"/>
+				<xsd:element ref="value"/>
+				<xsd:element ref="null"/>
+				<xsd:element ref="list"/>
+				<xsd:element ref="set"/>
+				<xsd:element ref="map"/>
+				<xsd:element ref="props"/>
+				<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
+			</xsd:choice>
+		</xsd:sequence>
+	</xsd:group>
+
+	<xsd:element name="list">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A list can contain multiple inner bean, ref, collection, or value elements.
+	A list can also map to an array type; the necessary conversion is performed
+	automatically.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="listOrSetType">
+					<xsd:attribute name="merge" type="defaultable-boolean">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	Enables/disables merging for collections when using parent/child beans.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="set">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A set can contain multiple inner bean, ref, collection, or value elements.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="listOrSetType">
+					<xsd:attribute name="merge" type="defaultable-boolean">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	Enables/disables merging for collections when using parent/child beans.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="map">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A mapping from a key to an object. Maps may be empty.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="mapType">
+					<xsd:attribute name="merge" type="defaultable-boolean">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	Enables/disables merging for collections when using parent/child beans.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="entry" type="entryType">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A map entry can be an inner bean, ref, value, or collection.
+	The key of the entry is given by the "key" attribute or child element.
+			]]></xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+
+	<xsd:element name="props">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	Props elements differ from map elements in that values must be strings.
+	Props may be empty.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:complexContent>
+				<xsd:extension base="propsType">
+					<xsd:attribute name="merge" type="defaultable-boolean">
+						<xsd:annotation>
+							<xsd:documentation><![CDATA[
+	Enables/disables merging for collections when using parent/child beans.
+							]]></xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
+				</xsd:extension>
+			</xsd:complexContent>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="key">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	A key element can contain an inner bean, ref, value, or collection.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:group ref="collectionElements"/>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="prop">
+		<xsd:annotation>
+			<xsd:documentation><![CDATA[
+	The string value of the property. Note that whitespace is trimmed
+	off to avoid unwanted whitespace caused by typical XML formatting.
+			]]></xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType mixed="true">
+			<xsd:choice minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:attribute name="key" type="xsd:string" use="required">
+				<xsd:annotation>
+					<xsd:documentation><![CDATA[
+	The key of the property entry.
+					]]></xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:complexType name="propertyType">
+		<xsd:sequence>
+			<xsd:element ref="description" minOccurs="0"/>
+			<xsd:choice minOccurs="0" maxOccurs="1">
+				<xsd:element ref="meta"/>
+				<xsd:element ref="bean"/>
+				<xsd:element ref="ref"/>
+				<xsd:element ref="idref"/>
+				<xsd:element ref="value"/>
+				<xsd:element ref="null"/>
+				<xsd:element ref="list"/>
+				<xsd:element ref="set"/>
+				<xsd:element ref="map"/>
+				<xsd:element ref="props"/>
+				<xsd:any namespace="##other" processContents="strict"/>
+			</xsd:choice>
+		</xsd:sequence>
+		<xsd:attribute name="name" type="xsd:string" use="required">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	The name of the property, following JavaBean naming conventions.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="ref" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<ref bean='...'/>".
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="value" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<value>...</value>" element.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<!-- Collection Types -->
+
+	<!-- base type for collections that have (possibly) typed nested values -->
+	<xsd:complexType name="collectionType">
+		<xsd:attribute name="value-type" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation source="java:java.lang.Class"><![CDATA[
+	The default Java type for nested values. Must be a fully qualified
+	class name.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<!-- 'list' and 'set' collection type -->
+	<xsd:complexType name="listOrSetType">
+		<xsd:complexContent>
+			<xsd:extension base="collectionType">
+				<xsd:group ref="collectionElements"/>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- 'map' element type -->
+	<xsd:complexType name="mapType">
+		<xsd:complexContent>
+			<xsd:extension base="collectionType">
+				<xsd:sequence>
+					<xsd:element ref="description" minOccurs="0"/>
+					<xsd:choice minOccurs="0" maxOccurs="unbounded">
+						<xsd:element ref="entry"/>
+					</xsd:choice>
+				</xsd:sequence>
+				<xsd:attribute name="key-type" type="xsd:string">
+					<xsd:annotation>
+						<xsd:documentation source="java:java.lang.Class"><![CDATA[
+	The default Java type for nested entry keys. Must be a fully qualified
+	class name.
+						]]></xsd:documentation>
+					</xsd:annotation>
+				</xsd:attribute>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- 'entry' element type -->
+	<xsd:complexType name="entryType">
+		<xsd:sequence>
+			<xsd:element ref="key" minOccurs="0"/>
+			<xsd:group ref="collectionElements"/>
+		</xsd:sequence>
+		<xsd:attribute name="key" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	Each map element must specify its key as attribute or as child element.
+	A key attribute is always a String value.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="key-ref" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a to a "key" element with a nested
+	"<ref bean='...'/>".
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="value" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<value>...</value>"
+	element.
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+		<xsd:attribute name="value-ref" type="xsd:string">
+			<xsd:annotation>
+				<xsd:documentation><![CDATA[
+	A short-cut alternative to a nested "<ref bean='...'/>".
+				]]></xsd:documentation>
+			</xsd:annotation>
+		</xsd:attribute>
+	</xsd:complexType>
+
+	<!-- 'props' collection type -->
+	<xsd:complexType name="propsType">
+		<xsd:complexContent>
+			<xsd:extension base="collectionType">
+				<xsd:sequence>
+					<xsd:choice minOccurs="0" maxOccurs="unbounded">
+						<xsd:element ref="prop"/>
+					</xsd:choice>
+				</xsd:sequence>
+			</xsd:extension>
+		</xsd:complexContent>
+	</xsd:complexType>
+
+	<!-- simple internal types -->
+	<xsd:simpleType name="defaultable-boolean">
+		<xsd:restriction base="xsd:NMTOKEN">
+			<xsd:enumeration value="default"/>
+			<xsd:enumeration value="true"/>
+			<xsd:enumeration value="false"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+
+</xsd:schema>
diff --git a/xml/tests/testData/unusedNs/spring.xml b/xml/tests/testData/unusedNs/spring.xml
new file mode 100644
index 0000000..6579845
--- /dev/null
+++ b/xml/tests/testData/unusedNs/spring.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       <warning descr="Namespace declaration is never used">xmlns:batch="http://www.spring<caret>framework.org/schema/batch"</warning>
+       xsi:schemaLocation="http://www.springframework.org/schema/beans spring-beans-2.5.xsd
+        http://www.springframework.org/schema/batch spring-batch-2.1.xsd">
+
+  <step id="abstractStep" abstract="true" xmlns="http://www.springframework.org/schema/batch"/>
+</beans>
diff --git a/xml/tests/testData/unusedNs/spring_after.xml b/xml/tests/testData/unusedNs/spring_after.xml
new file mode 100644
index 0000000..f1262d9
--- /dev/null
+++ b/xml/tests/testData/unusedNs/spring_after.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans spring-beans-2.5.xsd
+        http://www.springframework.org/schema/batch spring-batch-2.1.xsd">
+
+  <step id="abstractStep" abstract="true" xmlns="http://www.springframework.org/schema/batch"/>
+</beans>
diff --git a/xml/tests/testData/xml/anyAttribute.xml b/xml/tests/testData/xml/anyAttribute.xml
new file mode 100644
index 0000000..56835ab
--- /dev/null
+++ b/xml/tests/testData/xml/anyAttribute.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" ?>
+<container xmlns="http://symfony.com/schema/dic/services">
+
+    <services>
+        <service id="example.form.type" class="Acme\ExampleBundle\Form\Type\ExampleFormType">
+            <tag name="form.type" alias="example_form"/>
+        </service>
+    </services>
+</container>
\ No newline at end of file
diff --git a/xml/tests/testData/xml/services-1.0.xsd b/xml/tests/testData/xml/services-1.0.xsd
new file mode 100644
index 0000000..f1c2003
--- /dev/null
+++ b/xml/tests/testData/xml/services-1.0.xsd
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<xsd:schema xmlns="http://symfony.com/schema/dic/services"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+     targetNamespace="http://symfony.com/schema/dic/services"
+     elementFormDefault="qualified">
+
+  <xsd:annotation>
+    <xsd:documentation><![CDATA[
+      Symfony XML Services Schema, version 1.0
+      Authors: Fabien Potencier
+
+      This defines a way to describe PHP objects (services) and their
+      dependencies.
+    ]]></xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:element name="container" type="container" />
+
+  <xsd:complexType name="container">
+    <xsd:annotation>
+      <xsd:documentation><![CDATA[
+        The root element of a service file.
+      ]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+      <xsd:element name="imports" type="imports" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="parameters" type="parameters" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="services" type="services" minOccurs="0" maxOccurs="1" />
+      <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="services">
+    <xsd:annotation>
+      <xsd:documentation><![CDATA[
+        Enclosing element for the definition of all services
+      ]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:choice minOccurs="1" maxOccurs="unbounded">
+      <xsd:element name="service" type="service" />
+    </xsd:choice>
+  </xsd:complexType>
+
+  <xsd:complexType name="imports">
+    <xsd:annotation>
+      <xsd:documentation><![CDATA[
+        Enclosing element for the import elements
+      ]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:choice minOccurs="1" maxOccurs="unbounded">
+      <xsd:element name="import" type="import" />
+    </xsd:choice>
+  </xsd:complexType>
+
+  <xsd:complexType name="import">
+    <xsd:annotation>
+      <xsd:documentation><![CDATA[
+        Import an external resource defining other services or parameters
+      ]]></xsd:documentation>
+    </xsd:annotation>
+    <xsd:attribute name="resource" type="xsd:string" use="required" />
+    <xsd:attribute name="ignore-errors" type="boolean" />
+  </xsd:complexType>
+
+  <xsd:complexType name="configurator">
+    <xsd:attribute name="id" type="xsd:string" />
+    <xsd:attribute name="service" type="xsd:string" />
+    <xsd:attribute name="class" type="xsd:string" />
+    <xsd:attribute name="method" type="xsd:string" />
+    <xsd:attribute name="function" type="xsd:string" />
+  </xsd:complexType>
+
+  <xsd:complexType name="service">
+    <xsd:choice maxOccurs="unbounded">
+      <xsd:element name="file" type="xsd:string" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
+      <xsd:element name="configurator" type="configurator" minOccurs="0" maxOccurs="1" />
+      <xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
+      <xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
+      <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
+    </xsd:choice>
+    <xsd:attribute name="id" type="xsd:string" />
+    <xsd:attribute name="class" type="xsd:string" />
+    <xsd:attribute name="scope" type="xsd:string" />
+    <xsd:attribute name="public" type="boolean" />
+    <xsd:attribute name="synthetic" type="boolean" />
+    <xsd:attribute name="synchronized" type="boolean" />
+    <xsd:attribute name="lazy" type="boolean" />
+    <xsd:attribute name="abstract" type="boolean" />
+    <xsd:attribute name="factory-class" type="xsd:string" />
+    <xsd:attribute name="factory-method" type="xsd:string" />
+    <xsd:attribute name="factory-service" type="xsd:string" />
+    <xsd:attribute name="alias" type="xsd:string" />
+    <xsd:attribute name="parent" type="xsd:string" />
+  </xsd:complexType>
+
+  <xsd:complexType name="tag">
+    <xsd:attribute name="name" type="xsd:string" />
+    <xsd:anyAttribute namespace="##any" processContents="lax" />
+  </xsd:complexType>
+
+  <xsd:complexType name="parameters">
+    <xsd:choice minOccurs="1" maxOccurs="unbounded">
+      <xsd:element name="parameter" type="parameter" />
+    </xsd:choice>
+    <xsd:attribute name="type" type="parameter_type" />
+    <xsd:attribute name="key" type="xsd:string" />
+  </xsd:complexType>
+
+  <xsd:complexType name="parameter" mixed="true">
+    <xsd:choice minOccurs="0" maxOccurs="unbounded">
+      <xsd:element name="parameter" type="parameter" />
+    </xsd:choice>
+    <xsd:attribute name="type" type="parameter_type" />
+    <xsd:attribute name="id" type="xsd:string" />
+    <xsd:attribute name="key" type="xsd:string" />
+    <xsd:attribute name="on-invalid" type="invalid_sequence" />
+  </xsd:complexType>
+
+  <xsd:complexType name="property" mixed="true">
+    <xsd:choice minOccurs="0" maxOccurs="1">
+      <xsd:element name="service" type="service" />
+    </xsd:choice>
+    <xsd:attribute name="type" type="argument_type" />
+    <xsd:attribute name="id" type="xsd:string" />
+    <xsd:attribute name="name" type="xsd:string" />
+    <xsd:attribute name="on-invalid" type="xsd:string" />
+    <xsd:attribute name="strict" type="boolean" />
+  </xsd:complexType>
+
+  <xsd:complexType name="argument" mixed="true">
+    <xsd:choice maxOccurs="unbounded">
+      <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
+      <xsd:element name="service" type="service" />
+    </xsd:choice>
+    <xsd:attribute name="type" type="argument_type" />
+    <xsd:attribute name="id" type="xsd:string" />
+    <xsd:attribute name="key" type="xsd:string" />
+    <xsd:attribute name="index" type="xsd:integer" />
+    <xsd:attribute name="on-invalid" type="xsd:string" />
+    <xsd:attribute name="strict" type="boolean" />
+  </xsd:complexType>
+
+  <xsd:complexType name="call" mixed="true">
+    <xsd:choice maxOccurs="unbounded">
+      <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
+      <xsd:element name="service" type="service" />
+    </xsd:choice>
+    <xsd:attribute name="method" type="xsd:string" />
+  </xsd:complexType>
+
+  <xsd:simpleType name="parameter_type">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="collection" />
+      <xsd:enumeration value="service" />
+      <xsd:enumeration value="string" />
+      <xsd:enumeration value="constant" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="argument_type">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="collection" />
+      <xsd:enumeration value="service" />
+      <xsd:enumeration value="string" />
+      <xsd:enumeration value="constant" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="invalid_sequence">
+    <xsd:restriction base="xsd:string">
+      <xsd:enumeration value="null" />
+      <xsd:enumeration value="ignore" />
+      <xsd:enumeration value="exception" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <xsd:simpleType name="boolean">
+    <xsd:restriction base="xsd:string">
+      <xsd:pattern value="(%.+%|true|false)" />
+    </xsd:restriction>
+  </xsd:simpleType>
+</xsd:schema>