新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论Semantic Web(语义Web,语义网或语义万维网, Web 3.0)及相关理论,如:Ontology(本体,本体论), OWL(Web Ontology Langauge,Web本体语言), Description Logic(DL, 描述逻辑),RDFa,Ontology Engineering等。
    [返回] 计算机科学论坛W3CHINA.ORG讨论区 - Web新技术讨论『 Semantic Web(语义Web)/描述逻辑/本体 』 → 关于RDF的一些疑问 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 3337 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 关于RDF的一些疑问 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     dulm 帅哥哟,离线,有人找我吗?
      
      
      等级:大一(高数修炼中)
      文章:30
      积分:170
      门派:XML.ORG.CN
      注册:2008/11/11

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给dulm发送一个短消息 把dulm加入好友 查看dulm的个人资料 搜索dulm在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看dulm的博客楼主
    发贴心情 关于RDF的一些疑问

    1.看完语义网络基础,本来一直以为这rdfs:domain 只能是Class的。
    今天在Practical RDF上看到,有的属性的rdfs:domain 是指向Property的。但是Property默认是小写的,书里定义属性relevancy的地方是小写的,rdfs:domain 里面引用的时候又用大写的Relevancy了。。。。不知道有没有关系。


    2.还有如果一个类A,一个属性B,如果A内的属性B是通过rdf:Seq组织的,B的domain写A还是rdf:Seq?如果写A的话,通过什么方式来在Schema内指出B在A内,而且是以rdf:Seq方式组织的。

    3.xml的Schema应该是一看就知道怎么通过这个Schema写xml的。RDF的Schema对于Property的domain和range的定义有些广泛(没有详细指明那个类,用广泛的resours指代)。是否都是需要通过第3个文件来详细描绘类和属性的组织。

    4.类Resourse 有 属性 bio,  bio 又有N个子属性description、author等。一般惯例是为bio再开一个类Bio组织子属性,还是直接让这些子属性依附于属性bio?


    <?xml version="1.0"?>
    <rdf:RDF xml:lang="en"
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

    <rdfs:Class rdf:about="http://burningbird.net/postcon/elements/1.0/Resource">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en"> Web Resource</rdfs:label>
    <rdfs:comment xml:lang="en">
        Web resource managed with PostCon system
    </rdfs:comment>
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource" />
    </rdfs:Class>

    <rdfs:Class rdf:about="http://burningbird.net/postcon/elements/1.0/Movement">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en"> Web Resource Movement</rdfs:label>
    <rdfs:comment xml:lang="en">
        An event for the resource within the PostCon system
    </rdfs:comment>
    </rdfs:Class>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/bio">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en">Resource biography</rdfs:label>
    <rdfs:comment xml:lang="en">
        Biographical information for resource
    </rdfs:comment>
    <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    <rdfs:domain rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/relevancy">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en">Resource Relevancy</rdfs:label>
    <rdfs:comment xml:lang="en">
        Biographical information for resource
    </rdfs:comment>
    <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    <rdfs:domain rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/presentation">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en">Resource Presentation</rdfs:label>
    <rdfs:comment xml:lang="en">
        Information related to relevancy of resource
    </rdfs:comment>
    <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    <rdfs:domain rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/history">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en"> Web Content History</rdfs:label>
    <rdfs:comment xml:lang="en">
        History of movement of content within system
    </rdfs:comment>
    <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    <rdfs:domain rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/currentStatus">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en">Current Status</rdfs:label>
    <rdfs:comment>Current status of document (allowable values of Active and Inactive)</rdfs:
    comment>
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
    <rdfs:domain rdf:resource="http://postcon/elements/1.0/Relevancy"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/reason">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en">Reason</rdfs:label>
    <rdfs:comment>Reason</rdfs:comment>
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
    <rdfs:domain rdf:resource="http://postcon/elements/1.0/Resource"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/movementType">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en">Movement Type</rdfs:label>
    <rdfs:comment>Type of Movement (allowable values of Move, Add, Remove)</rdfs:comment>
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
    <rdfs:domain rdf:resource="http://postcon/elements/1.0/Movement"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/related">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en"> Related Resource</rdfs:label>
    <rdfs:comment xml:lang="en">
        Resources within PostCon system related to current resource
    </rdfs:comment>
    <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/requires">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en">Resource Requirement</rdfs:label>
    <rdfs:comment xml:lang="en">
        External resource required by current resource
    </rdfs:comment>
    <rdfs:range rdf:resource="http://burningbird.net/postcon/elements/1.0/Resource"/>
    </rdf:Property>

    <rdf:Property rdf:about="http://burningbird.net/postcon/elements/1.0/type">
    <rdfs:isDefinedBy rdf:resource="http://burningbird.net/postcon/elements/1.0/"/>
    <rdfs:label xml:lang="en">Resource Type</rdfs:label>
    <rdfs:comment>Type of Required Resource</rdfs:comment>
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
    </rdf:Property>

    </rdf:RDF>


    Example 6-5. PostCon vocabulary instance showing Movement and related resources
    <?xml version="1.0"?>
    <rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:pstcn="http://burningbird.net/postcon/elements/1.0/"
      xml:base="http://burningbird.net/articles/">

      <pstcn:Resource rdf:about="monsters1.htm">

    <!--biography of resource-->
         <pstcn:bio rdf:parseType="Resource">
            <pstcn:title>Tale of Two Monsters: Legends</pstcn:title>
           <pstcn:abstract>
             When I think of "monsters" I think of the creatures of
             legends and tales, from the books and movies, and
             I think of the creatures that have entertained me for years.
           </pstcn:abstract>
            <pstcn:description>
             Part 1 of four-part series on cryptozoology, legends,
             Nessie the Loch Ness Monster and the giant squid.
            </pstcn:description>
            <pstcn:dateCreated>1999-08-01T00:00:00-06:00</pstcn:dateCreated>
            <pstcn:author>Shelley Powers</pstcn:author>
            <pstcn:owner>Burningbird Network</pstcn:owner>
         </pstcn:bio>   

    <!--related resources-->
         <pstcn:related rdf:resource="monsters2.htm" />
         <pstcn:related rdf:resource="monsters3.htm" />
         <pstcn:related rdf:resource="monsters4.htm" />

    <!--resource movements-->
         <pstcn:history>
           <rdf:Seq>
            <rdf:_1 rdf:resource="http://www.yasd.com/dynaearth/monsters1.htm" />
            <rdf:_2 rdf:resource="http://www.dynamicearth.com/articles/monsters1.htm" />
            <rdf:_3 rdf:resource="http://burningbird.net/articles/monsters1.htm" />
          </rdf:Seq>    
         </pstcn:history>

      </pstcn:Resource>

    <!--related resource defintions-->
      <pstcn:Resource rdf:about="monsters2.htm">
         <pstcn:title>Cryptozooloy</pstcn:title>
         <pstcn:reason>First in the Tale of Two Monsters series.</pstcn:reason>
      </pstcn:Resource>
      <pstcn:Resource rdf:about="monsters3.htm">
         <pstcn:title>A Tale of Two Monsters: Architeuthis Dux (Giant Squid)</pstcn:title>
         <pstcn:reason>Second in the Tale of Two Monsters series.</pstcn:reason>
      </pstcn:Resource>
      <pstcn:Resource rdf:about="monsters4.htm">
         <pstcn:title>Nessie, the Loch Ness Monster </pstcn:title>
         <pstcn:reason>Fourth in the Tale of Two Monsters series.</pstcn:reason>
      </pstcn:Resource>

    <!--resource movement definitions-->
      <pstcn:Movement rdf:about="http://www.yasd.com/dynaearth/monsters1.htm">
          <pstcn:movementType>Add</pstcn:movementType>
          <pstcn:reason>New Article</pstcn:reason>
          <pstcn:date>1998-01-01T00:00:00-05:00</pstcn:date>
      </pstcn:Movement>
      <pstcn:Movement rdf:about="http://www.dynamicearth.com/articles/monsters1.htm">
          <pstcn:movementType>Move</pstcn:movementType>
          <pstcn:reason>moved to dynamicearth.com domain</pstcn:reason>
          <pstcn:date>1999-10-31:T00:00:00-05:00</pstcn:date>
      </pstcn:Movement>
      <pstcn:Movement rdf:about="http://burningbird.net/articles/monsters1.htm">
         <pstcn:movementType>Move</pstcn:movementType>
         <pstcn:reason>Moved to burningbird.net</pstcn:reason>
         <pstcn:date>2002-11-01:T00:00:00-05:00</pstcn:date>
      </pstcn:Movement>

    </rdf:RDF>


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/11/12 16:16:00
     
     admin 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      头衔:W3China站长
      等级:计算机硕士学位(管理员)
      文章:5255
      积分:18407
      门派:W3CHINA.ORG
      注册:2003/10/5

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给admin发送一个短消息 把admin加入好友 查看admin的个人资料 搜索admin在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 点击这里发送电邮给admin  访问admin的主页 引用回复这个贴子 回复这个贴子 查看admin的博客2
    发贴心情 
    以下是引用dulm在2008-11-12 16:16:00的发言:
    1.看完语义网络基础,本来一直以为这rdfs:domain 只能是Class的。
    今天在Practical RDF上看到,有的属性的rdfs:domain 是指向Property的。但是Property默认是小写的,书里定义属性relevancy的地方是小写的,rdfs:domain 里面引用的时候又用大写的Relevancy了。。。。不知道有没有关系。
    ~~~~~~~~~~~~~XML不区分大小写的。没关系。


    2.还有如果一个类A,一个属性B,如果A内的属性B是通过rdf:Seq组织的,B的domain写A还是rdf:Seq?如果写A的话,通过什么方式来在Schema内指出B在A内,而且是以rdf:Seq方式组织的。
    ~~~~~~~~~~~~~~写A。 B.domain=A; B.range=rdf:Seq

    3.xml的Schema应该是一看就知道怎么通过这个Schema写xml的。RDF的Schema对于Property的domain和range的定义有些广泛(没有详细指明那个类,用广泛的resours指代)。是否都是需要通过第3个文件来详细描绘类和属性的组织。
    ~~~~~~~~~~~~~~~~什么叫"Property的domain和range的定义有些广泛(没有详细指明那个类", Property的domain和range指定的就是类阿。

    4.类Resourse 有 属性 bio,  bio 又有N个子属性description、author等。一般惯例是为bio再开一个类Bio组织子属性,还是直接让这些子属性依附于属性bio?
    ~~~~~~~~~~~~~这属于本体工程实践的考虑,要根据实际场景来看,不可一概而论。


    ----------------------------------------------

    -----------------------------------------------

    第十二章第一节《用ROR创建面向资源的服务》
    第十二章第二节《用Restlet创建面向资源的服务》
    第三章《REST式服务有什么不同》
    InfoQ SOA首席编辑胡键评《RESTful Web Services中文版》
    [InfoQ文章]解答有关REST的十点疑惑

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/11/13 1:16:00
     
     dulm 帅哥哟,离线,有人找我吗?
      
      
      等级:大一(高数修炼中)
      文章:30
      积分:170
      门派:XML.ORG.CN
      注册:2008/11/11

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给dulm发送一个短消息 把dulm加入好友 查看dulm的个人资料 搜索dulm在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 引用回复这个贴子 回复这个贴子 查看dulm的博客3
    发贴心情 
    以下是引用admin在2008-11-13 1:16:00的发言:
    [quote]以下是引用dulm在2008-11-12 16:16:00的发言:
    1.看完语义网络基础,本来一直以为这rdfs:domain 只能是Class的。
      今天在Practical RDF上看到,有的属性的rdfs:domain 是指向Property的。但是Property默认是小写的,书里定义属性relevancy的地方是小写的,rdfs:domain 里面引用的时候又用大写的Relevancy了。。。。不知道有没有关系。
    ~~~~~~~~~~~~~XML不区分大小写的。没关系。

      
      2.还有如果一个类A,一个属性B,如果A内的属性B是通过rdf:Seq组织的,B的domain写A还是rdf:Seq?如果写A的话,通过什么方式来在Schema内指出B在A内,而且是以rdf:Seq方式组织的。
    ~~~~~~~~~~~~~~写A。 B.domain=A; B.range=rdf:Seq

      3.xml的Schema应该是一看就知道怎么通过这个Schema写xml的。RDF的Schema对于Property的domain和range的定义有些广泛(没有详细指明那个类,用广泛的resours指代)。是否都是需要通过第3个文件来详细描绘类和属性的组织。
    ~~~~~~~~~~~~~~~~什么叫"Property的domain和range的定义有些广泛(没有详细指明那个类", Property的domain和range指定的就是类阿。

    1)比如我要对类A引入DC的一些属性如title,因为dc已经定义好了,自己写schema里面自然没有这种描述。要用这个schema的人仅从这个schema是否能知道你的本意是让类A有title这个属性的。
    2)我自己有许多类(如100多个)都用到某一自己定义的属性B,但也有一些类不要属性B,一般人定义B的时候是不指明domain、还是把所有用到B的类一一枚举出来?如果不指明domain用户使用这个schema的时候不就不知道到底哪些类有使用这个属性了?

    所以对于rdf的shema由于类和属性分开定义,好像没有xml的schema一个元素里面直接定义子元素那样明了。这样是否就需要其他文档来辅助说明类的所有属性?


      4.类Resourse 有 属性 bio,  bio 又有N个子属性description、author等。一般惯例是为bio再开一个类Bio组织子属性,还是直接让这些子属性依附于属性bio?
    ~~~~~~~~~~~~~这属于本体工程实践的考虑,要根据实际场景来看,不可一概而论。[/quote]


    谢谢

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/11/13 13:33:00
     
     iamwym 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      等级:计算机硕士学位(版主)
      文章:2454
      积分:17456
      门派:XML.ORG.CN
      注册:2004/11/14

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给iamwym发送一个短消息 把iamwym加入好友 查看iamwym的个人资料 搜索iamwym在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 访问iamwym的主页 引用回复这个贴子 回复这个贴子 查看iamwym的博客4
    发贴心情 
    楼主多实践一下,一些问题就迎刃而解了
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/11/13 13:37:00
     
     admin 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      头衔:W3China站长
      等级:计算机硕士学位(管理员)
      文章:5255
      积分:18407
      门派:W3CHINA.ORG
      注册:2003/10/5

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给admin发送一个短消息 把admin加入好友 查看admin的个人资料 搜索admin在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 点击这里发送电邮给admin  访问admin的主页 引用回复这个贴子 回复这个贴子 查看admin的博客5
    发贴心情 
    以下是引用dulm在2008-11-13 13:33:00的发言:
    1)比如我要对类A引入DC的一些属性如title,因为dc已经定义好了,自己写schema里面自然没有这种描述。要用这个schema的人仅从这个schema是否能知道你的本意是让类A有title这个属性的。
    ~~~~~~~~~~~在你的RDFS里这样写就行了:
    <rdf:Property rdf:about="http://purl.org/dc/elements/1.1/title">
      <rdfs:domain rdf:resource="#A"/>
    </rdf:Property>

    2)我自己有许多类(如100多个)都用到某一自己定义的属性B,但也有一些类不要属性B,一般人定义B的时候是不指明domain、还是把所有用到B的类一一枚举出来?
    ~~~~~~~~~~~一般来说,不要定义domain, range,除非你有这个必要。你定义的RDF Schema是为了在一定领域内重用的,如果你对一个property定义了很多不必要(在该领域内不具代表性)的东西,那么势必会影响它在该领域内被重用。

    如果不指明domain用户使用这个schema的时候不就不知道到底哪些类有使用这个属性了?
    ~~~~~~~~~~~~这也意味着:用户在使用该property时,可以不受domain的限制。

    所以对于rdf的shema由于类和属性分开定义,好像没有xml的schema一个元素里面直接定义子元素那样明了。这样是否就需要其他文档来辅助说明类的所有属性?
    ~~~~~~~~~~~~RDF跟XML目标不同。XML Schema那样定义,是为了交换给定格式的数据。而RDF的想法是:Anyone can say Anything about Any topic,所以没有像XML Schema定义的那么死。


    ----------------------------------------------

    -----------------------------------------------

    第十二章第一节《用ROR创建面向资源的服务》
    第十二章第二节《用Restlet创建面向资源的服务》
    第三章《REST式服务有什么不同》
    InfoQ SOA首席编辑胡键评《RESTful Web Services中文版》
    [InfoQ文章]解答有关REST的十点疑惑

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2008/11/15 15:13:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 Semantic Web(语义Web)/描述逻辑/本体 』的所有贴子 点击这里发送电邮给Google AdSense  访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/9/25 9:35:19

    本主题贴数5,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    125.000ms