eclipse中hibernate和mybatis中xml配置文件的没有标签提醒解决方法

Posted 宇的季节

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了eclipse中hibernate和mybatis中xml配置文件的没有标签提醒解决方法相关的知识,希望对你有一定的参考价值。

  当我们使用eclipse编写Mybatishibernatexml文件时,面对众多标签的配置文件,却没有自动提醒,对于工作和学习都十分不方便。

  之所以没有自动提醒,是因为dtd文件没有加载成功。

  默认mybatisdtd文件会从网络中加载,但是因为是国外的网站,所以一般我们是访问不了的,也就造成了没有自动提醒的现象,但是可以通过手动配置来实现该功能,并且对应的文件就在jar包中。大家可以自己找也可以直接复制下面的dtd文件。

mybatis-3-config.dtd文件

 

<!DOCTYPE configuration  
  PUBLIC "-//mybatis.org//DTD Config 3.0//EN"  
  "http://mybatis.org/dtd/mybatis-3-config.dtd">  

 

 

<?xml version="1.0" encoding="UTF-8" ?>
<!--

       Copyright 2009-2012 the original author or authors.

       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.

-->

<!ELEMENT configuration (properties?, settings?, typeAliases?, typeHandlers?, objectFactory?, objectWrapperFactory?, plugins?, environments?, databaseIdProvider?, mappers?)>

<!ELEMENT databaseIdProvider (property*)>
<!ATTLIST databaseIdProvider
type CDATA #REQUIRED
>

<!ELEMENT properties (property*)>
<!ATTLIST properties
resource CDATA #IMPLIED
url CDATA #IMPLIED
>

<!ELEMENT property EMPTY>
<!ATTLIST property
name CDATA #REQUIRED
value CDATA #REQUIRED
>

<!ELEMENT settings (setting+)>

<!ELEMENT setting EMPTY>
<!ATTLIST setting
name CDATA #REQUIRED
value CDATA #REQUIRED
>

<!ELEMENT typeAliases (typeAlias*,package*)>

<!ELEMENT typeAlias EMPTY>
<!ATTLIST typeAlias
type CDATA #REQUIRED
alias CDATA #IMPLIED
>

<!ELEMENT typeHandlers (typeHandler*,package*)>

<!ELEMENT typeHandler EMPTY>
<!ATTLIST typeHandler
javaType CDATA #IMPLIED
jdbcType CDATA #IMPLIED
handler CDATA #REQUIRED
>

<!ELEMENT objectFactory (property*)>
<!ATTLIST objectFactory
type CDATA #REQUIRED
>

<!ELEMENT objectWrapperFactory (property*)>
<!ATTLIST objectWrapperFactory
type CDATA #REQUIRED
>

<!ELEMENT plugins (plugin+)>

<!ELEMENT plugin (property*)>
<!ATTLIST plugin
interceptor CDATA #REQUIRED
>

<!ELEMENT environments (environment+)>
<!ATTLIST environments
default CDATA #REQUIRED
>

<!ELEMENT environment (transactionManager,dataSource)>
<!ATTLIST environment
id CDATA #REQUIRED
>

<!ELEMENT transactionManager (property*)>
<!ATTLIST transactionManager
type CDATA #REQUIRED
>

<!ELEMENT dataSource (property*)>
<!ATTLIST dataSource
type CDATA #REQUIRED
>

<!ELEMENT mappers (mapper*,package*)>

<!ELEMENT mapper EMPTY>
<!ATTLIST mapper
resource CDATA #IMPLIED
url CDATA #IMPLIED
class CDATA #IMPLIED
>

<!ELEMENT package EMPTY>
<!ATTLIST package
name CDATA #REQUIRED
>
View Code

 

mybatis-3-mapper.dtd文件

<!DOCTYPE mapper 
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"
>
<?xml version="1.0" encoding="UTF-8" ?>
<!--

       Copyright 2009-2013 the original author or authors.

       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.

-->

<!ELEMENT mapper (cache-ref | cache | resultMap* | parameterMap* | sql* | insert* | update* | delete* | select* )+>
<!ATTLIST mapper
xmlns:fo CDATA #IMPLIED
namespace CDATA #IMPLIED
>

<!ELEMENT cache-ref EMPTY>
<!ATTLIST cache-ref
namespace CDATA #REQUIRED
>

<!ELEMENT cache (property*)>
<!ATTLIST cache
type CDATA #IMPLIED
eviction CDATA #IMPLIED
flushInterval CDATA #IMPLIED
size CDATA #IMPLIED
readOnly CDATA #IMPLIED
>

<!ELEMENT parameterMap (parameter+)?>
<!ATTLIST parameterMap
id CDATA #REQUIRED
type CDATA #REQUIRED
>

<!ELEMENT parameter EMPTY>
<!ATTLIST parameter
property CDATA #REQUIRED
javaType CDATA #IMPLIED
jdbcType CDATA #IMPLIED
mode (IN | OUT | INOUT) #IMPLIED
resultMap CDATA #IMPLIED
scale CDATA #IMPLIED
typeHandler CDATA #IMPLIED
>

<!ELEMENT resultMap (constructor?,id*,result*,association*,collection*, discriminator?)>
<!ATTLIST resultMap
id CDATA #REQUIRED
type CDATA #REQUIRED
extends CDATA #IMPLIED
autoMapping (true|false) #IMPLIED
>

<!ELEMENT constructor (idArg*,arg*)>

<!ELEMENT id EMPTY>
<!ATTLIST id
property CDATA #IMPLIED
javaType CDATA #IMPLIED
column CDATA #IMPLIED
jdbcType CDATA #IMPLIED
typeHandler CDATA #IMPLIED
>

<!ELEMENT result EMPTY>
<!ATTLIST result
property CDATA #IMPLIED
javaType CDATA #IMPLIED
column CDATA #IMPLIED
jdbcType CDATA #IMPLIED
typeHandler CDATA #IMPLIED
>

<!ELEMENT idArg EMPTY>
<!ATTLIST idArg
javaType CDATA #IMPLIED
column CDATA #IMPLIED
jdbcType CDATA #IMPLIED
typeHandler CDATA #IMPLIED
select CDATA #IMPLIED
resultMap CDATA #IMPLIED
>

<!ELEMENT arg EMPTY>
<!ATTLIST arg
javaType CDATA #IMPLIED
column CDATA #IMPLIED
jdbcType CDATA #IMPLIED
typeHandler CDATA #IMPLIED
select CDATA #IMPLIED
resultMap CDATA #IMPLIED
>

<!ELEMENT collection (constructor?,id*,result*,association*,collection*, discriminator?)>
<!ATTLIST collection
property CDATA #REQUIRED
column CDATA #IMPLIED
javaType CDATA #IMPLIED
ofType CDATA #IMPLIED
jdbcType CDATA #IMPLIED
select CDATA #IMPLIED
resultMap CDATA #IMPLIED
typeHandler CDATA #IMPLIED
notNullColumn CDATA #IMPLIED
columnPrefix CDATA #IMPLIED
resultSet CDATA #IMPLIED
foreignColumn CDATA #IMPLIED
autoMapping (true|false) #IMPLIED
fetchType (lazy|eager) #IMPLIED
>

<!ELEMENT association (constructor?,id*,result*,association*,collection*, discriminator?)>
<!ATTLIST association
property CDATA #REQUIRED
column CDATA #IMPLIED
javaType CDATA #IMPLIED
jdbcType CDATA #IMPLIED
select CDATA #IMPLIED
resultMap CDATA #IMPLIED
typeHandler CDATA #IMPLIED
notNullColumn CDATA #IMPLIED
columnPrefix CDATA #IMPLIED
resultSet CDATA #IMPLIED
foreignColumn CDATA #IMPLIED
autoMapping (true|false) #IMPLIED
fetchType (lazy|eager) #IMPLIED
>

<!ELEMENT discriminator (case+)>
<!ATTLIST discriminator
column CDATA #IMPLIED
javaType CDATA #REQUIRED
jdbcType CDATA #IMPLIED
typeHandler CDATA #IMPLIED
>

<!ELEMENT case (constructor?,id*,result*,association*,collection*, discriminator?)>
<!ATTLIST case
value CDATA #REQUIRED
resultMap CDATA #IMPLIED
resultType CDATA #IMPLIED
>

<!ELEMENT property EMPTY>
<!ATTLIST property
name CDATA #REQUIRED
value CDATA #REQUIRED
>

<!ELEMENT typeAlias EMPTY>
<!ATTLIST typeAlias
alias CDATA #REQUIRED
type CDATA #REQUIRED
>

<!ELEMENT select (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST select
id CDATA #REQUIRED
parameterMap CDATA #IMPLIED
parameterType CDATA #IMPLIED
resultMap CDATA #IMPLIED
resultType CDATA #IMPLIED
resultSetType (FORWARD_ONLY | SCROLL_INSENSITIVE | SCROLL_SENSITIVE) #IMPLIED
statementType (STATEMENT|PREPARED|CALLABLE) #IMPLIED
fetchSize CDATA #IMPLIED
timeout CDATA #IMPLIED
flushCache (true|false) #IMPLIED
useCache (true|false) #IMPLIED
databaseId CDATA #IMPLIED
lang CDATA #IMPLIED
resultOrdered (true|false) #IMPLIED
resultSets CDATA #IMPLIED 
>

<!ELEMENT insert (#PCDATA | selectKey | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST insert
id CDATA #REQUIRED
parameterMap CDATA #IMPLIED
parameterType CDATA #IMPLIED
timeout CDATA #IMPLIED
flushCache (true|false) #IMPLIED
statementType (STATEMENT|PREPARED|CALLABLE) #IMPLIED
keyProperty CDATA #IMPLIED
useGeneratedKeys (true|false) #IMPLIED
keyColumn CDATA #IMPLIED
databaseId CDATA #IMPLIED
lang CDATA #IMPLIED
>

<!ELEMENT selectKey (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST selectKey
resultType CDATA #IMPLIED
statementType (STATEMENT|PREPARED|CALLABLE) #IMPLIED
keyProperty CDATA #IMPLIED
keyColumn CDATA #IMPLIED
order (BEFORE|AFTER) #IMPLIED
databaseId CDATA #IMPLIED
>

<!ELEMENT update (#PCDATA | selectKey | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST update
id CDATA #REQUIRED
parameterMap CDATA #IMPLIED
parameterType CDATA #IMPLIED
timeout CDATA #IMPLIED
flushCache (true|false) #IMPLIED
statementType (STATEMENT|PREPARED|CALLABLE) #IMPLIED
keyProperty CDATA #IMPLIED
useGeneratedKeys (true|false) #IMPLIED
keyColumn CDATA #IMPLIED
databaseId CDATA #IMPLIED
lang CDATA #IMPLIED
>

<!ELEMENT delete (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST delete
id CDATA #REQUIRED
parameterMap CDATA #IMPLIED
parameterType CDATA #IMPLIED
timeout CDATA #IMPLIED
flushCache (true|false) #IMPLIED
statementType (STATEMENT|PREPARED|CALLABLE) #IMPLIED
databaseId CDATA #IMPLIED
lang CDATA #IMPLIED
>

<!-- Dynamic -->

<!ELEMENT include EMPTY>
<!ATTLIST include
refid CDATA #REQUIRED
>

<!ELEMENT bind EMPTY>
<!ATTLIST bind
 name CDATA #REQUIRED
 value CDATA #REQUIRED
>

<!ELEMENT sql (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST sql
id CDATA #REQUIRED
lang CDATA #IMPLIED
databaseId CDATA #IMPLIED
>

<!ELEMENT trim (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST trim
prefix CDATA #IMPLIED
prefixOverrides CDATA #IMPLIED
suffix CDATA #IMPLIED
suffixOverrides CDATA #IMPLIED
>
<!ELEMENT where (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ELEMENT set (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>

<!ELEMENT foreach (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST foreach
collection CDATA #REQUIRED
item CDATA #IMPLIED
index CDATA #IMPLIED
open CDATA #IMPLIED
close CDATA #IMPLIED
separator CDATA #IMPLIED
>

<!ELEMENT choose (when* , otherwise?)>
<!ELEMENT when (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST when
test CDATA #REQUIRED
>
<!ELEMENT otherwise (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>

<!ELEMENT if (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST if
test CDATA #REQUIRED
>
View Code

hibernate-configuration-3.0.dtd文件

<!-- Hibernate file-based configuration document.

<!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

An instance of this document contains property settings and references
to mapping files for a number of SessionFactory instances to be listed
in JNDI.

-->

<!ELEMENT hibernate-configuration (session-factory,security?)>

<!ELEMENT property (#PCDATA)>
<!ATTLIST property name CDATA #REQUIRED>

<!ELEMENT mapping EMPTY> <!-- reference to a mapping file -->
<!ATTLIST mapping resource CDATA #IMPLIED>
<!ATTLIST mapping file CDATA #IMPLIED>
<!ATTLIST mapping jar CDATA #IMPLIED>
<!ATTLIST mapping package CDATA #IMPLIED>
<!ATTLIST mapping class CDATA #IMPLIED>

<!ELEMENT class-cache EMPTY>
<!ATTLIST class-cache class CDATA #REQUIRED>
<!ATTLIST class-cache region CDATA #IMPLIED>
<!ATTLIST class-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>
<!ATTLIST class-cache include (all|non-lazy) "all">

<!ELEMENT collection-cache EMPTY>
<!ATTLIST collection-cache collection CDATA #REQUIRED>
<!ATTLIST collection-cache region CDATA #IMPLIED>
<!ATTLIST collection-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>

<!ELEMENT event (listener*)>
<!ATTLIST event type (auto-flush|merge|create|create-onflush|delete|dirty-check|evict|flush|flush-entity|load|load-collection|lock|refresh|replicate|save-update|save|update|pre-load|pre-update|pre-insert|pre-delete|pre-collection-recreate|pre-collection-remove|pre-collection-update|post-load|post-update|post-insert|post-delete|post-collection-recreate|post-collection-remove|post-collection-update|post-commit-update|post-commit-insert|post-commit-delete) #REQUIRED>

<!ELEMENT listener EMPTY>
<!ATTLIST listener type (auto-flush|merge|create|create-onflush|delete|dirty-check|evict|flush|flush-entity|load|load-collection|lock|refresh|replicate|save-update|save|update|pre-load|pre-update|pre-insert|pre-delete|pre-collection-recreate|pre-collection-remove|pre-collection-update|post-load|post-update|post-insert|post-delete|post-collection-recreate|post-collection-remove|post-collection-update|post-commit-update|post-commit-insert|post-commit-delete) #IMPLIED>
<!ATTLIST listener class CDATA #REQUIRED>

<!ELEMENT session-factory (property*, mapping*, (class-cache|collection-cache)*, event*, listener*)>
<!ATTLIST session-factory name CDATA #IMPLIED> <!-- the JNDI name -->

<!ELEMENT security (grant*)>
<!ATTLIST security context CDATA #REQUIRED> <!--the JACC contextID-->

<!ELEMENT grant EMPTY>
<!ATTLIST grant role CDATA #REQUIRED>
<!ATTLIST grant entity-name CDATA #REQUIRED>
<!ATTLIST grant actions CDATA #REQUIRED>
View Code

hibernate-mapping-3.0.dtd文件

<!-- Hibernate Mapping DTD.

<!DOCTYPE hibernate-mapping PUBLIC 
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://www.hibernate.org/dtd/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*,
    identifier-generator*,
    typedef*,
    filter-def*,
    import*,
    (class|subclass|joined-subclass|union-subclass)*,
    resultset*,
    (query|sql-query)*,
    filter-def*,
    fetch-profile*,
    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.../> is 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">

<!--
    <identifier-generator.../> allows customized short-naming of IdentifierGenerator implementations.
-->
<!ELEMENT identifier-generator EMPTY>
    <!ATTLIST identifier-generator name CDATA #REQUIRED>
    <!ATTLIST identifier-generator class CDATA #REQUIRED>

<!--
    <typedef.../> allows defining a customized type mapping 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*,
    fetch-profile*,
    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>

<!--
-->
<!ELEMENT fetch-profile (fetch*)>
    <!ATTLIST fetch-profile name CDATA #REQUIRED>

<!--
    The <fetch> element defines a single path to which the fetch
    refers, as well as the style of fetch to apply.  The \'root\' of the
    path is different depending upon the context in which the
    containing <fetch-profile/> occurs; within a <class/> element,
    the entity-name of the containing class mapping is assumed...
-->
<!ELEMENT fetch EMPTY>
    <!ATTLIST fetch entity CDATA #IMPLIED> <!-- Implied as long as the containing fetch profile is contained in a class mapping -->
    <!ATTLIST fetch association CDATA #REQUIRED>
    <!ATTLIST fetch style (join|select) "join">

<!-- 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)+, generator? )>
    <!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">
    hibernate 和eclipselink的区别

mybatis-generator 代码自动生成插件

maven在eclipse上怎么把数据库表生成实体类

mybatis和hibernate的区别

Hibernate 与 mybatis 区别

mybatis为何不像hibernate一样有 Transaction.begin() 只有commit 和rollback