XML Schema 中 import 和 include 的区别

XML Schema 允许将一个XSD文件分为几个文件存放,在必要时使用 import 或者 include 进行导入。这二者的区别是:

例子:

<xsd:import namespace=”http://acme.com/supplier/types”
schemaLocation=”http://acme.com/supplier/types.xsd”/>
<xsd:include schemaLocation=”http://acme.com/supplier/types.xsd”/>
By javafuns on July 22, 2008 at 13:24 · Views: 1,625 · Permalink · RSS
Categorized in: SOA · Tagged with: 
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

3 Responses

Subscribe to comments via RSS

  1. Written by intih
    on 2010/02/07 at 21:12
    Reply · Permalink

    这里应该存在点误解,import也可以用来引入相同namespace的schema

  2. Written by javafuns
    on 2010/02/08 at 22:41
    Reply · Permalink

    不可以,相同的namespace只能用include导入

  3. Written by javafuns
    on 2010/02/08 at 22:43
    Reply · Permalink

    我特意重新查找了一下,ORACLE网站上有一篇文章介绍的比较详细:
    http://www.oracle.com/technology/pub/articles/srivastava_structures.html

Subscribe to comments via RSS

Leave a Reply


  • Highest Rated

  • My PicasaPhotos

    9a6297314aa2120aeac4afc9.jpg

    IMG_0559.JPG

    IMG_0685.JPG

  • RSS My del.icio.us

  • My RSS