以文本方式查看主题

-  W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWL  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  各位大虾高手,帮我看看这个RDF的语法错误吧,用jena不能读入数据库  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=12325)


--  作者:小蜜蜂
--  发布时间:11/26/2004 12:46:00 AM

--  各位大虾高手,帮我看看这个RDF的语法错误吧,用jena不能读入数据库
<?xml version="1.0"?>
<rdf:RDF
    xmlns="http://www.owl-ontologies.com/news.owl#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
   xml:base="http://www.owl-ontologies.com/news.owl">
  
   <Media rdf:about="#AP" />
   <Media rdf:about="#usatoday" />
   <Media rdf:about="#Forbes" />
   <Media rdf:about="#Reuters" />
   <Media rdf:about="#BusinessWeek" />
   <Media rdf:about="#CP" />
   <Media rdf:about="#HealthDay" />
   <Media rdf:about="#E! Online" />   
   <Media rdf:about="#LAUNCH" />
   <Media rdf:about="#Ziff Davis" />    
   
   <Person rdf:about="#Amanda Gardner" />   
   <Person rdf:about="#Amy Norton" />             
   <Person rdf:about="#Anthony J. Brown" />    
   <Person rdf:about="#BARRY SCHWEID" />  
   <Person rdf:about="#Bruce Schneier" />  
   <Person rdf:about="#BETH HARRIS" />     
   <Person rdf:about="#CHRIS SHERIDAN" />
   <Person rdf:about="#CURT ANDERSON" />   
   <Person rdf:about="#Clint Willis" />    
   <Person rdf:about="#Dirk Smillie" />  
   <Person rdf:about="#David Lewis" />  
   <Person rdf:about="#DOUG TUCKER" />  
   <Person rdf:about="#ELLSWORTH CARTER" />    
   <Person rdf:about="#Finbarr O'Reilly" />      
   <Person rdf:about="#HAMZA HENDAWI" />     
   <Person rdf:about="#HOPE YEN" />                
   <Person rdf:about="#Guy Kewney" />   
   <Person rdf:about="#Glenn Somerville" />     
   <Person rdf:about="#Gene G. Marcial" />
   <Person rdf:about="#James Cox" />
   <Person rdf:about="#Kathleen Doheny" />
   <Person rdf:about="#KIM HOUSEGO" />         
   <Person rdf:about="#Mark P. Mills" />  
   <Person rdf:about="#MARK SHERMAN" />
   <Person rdf:about="#MICHAEL FELBERBAUM" />
   <Person rdf:about="#Melinda Newman" />  
   <Person rdf:about="#MARI YAMAGUCHI" />
   <Person rdf:about="#NANCY CARR" />  
   <Person rdf:about="#Nicole Maestri" />  
   <Person rdf:about="#JIM ABRAMS" />      
   <Person rdf:about="#JENNIFER LOVEN" />     
   <Person rdf:about="#Josh Grossberg" />   
   <Person rdf:about="#JENNIFER C. KERR" />  
   <Person rdf:about="#JAMES C. HELICKE" />   
   <Person rdf:about="#JOHN MARSHALL" />   
   <Person rdf:about="#Lyndsey Parker" />    
   <Person rdf:about="#LAURA WIDES" />    
   <Person rdf:about="#LARA SUKHTIAN" />      
   <Person rdf:about="#Paul Sexton" />      
   <Person rdf:about="#TOM RAUM" />     
   <Person rdf:about="#TIM ELFRINK" />   
   <Person rdf:about="#TED BRIDIS" />                
   <Person rdf:about="#Stephanie Nebehay" />   
   <Person rdf:about="#Sarah Hall" />
   <Person rdf:about="#Steve Gorman" />
   <Person rdf:about="#SAM HANANEL" />                       
   <Person rdf:about="#Spencer Swartz" />     
  
  <News  rdf:about="http://story.news.yahoo.com/news?tmpl=story&ncid=1387&e=2&u=/ap/20041122/ap_on_sp_bk_ne/bkn_pacers_pistons_brawl&sid=95747870"/>
    <hasSubject rdf:resource="#Basketball" />
    <hasMedia rdf:resource="#AP" />
    <hasAuthor rdf:resource="#CHRIS SHERIDAN" />
   <title> NBA Suspends Artest for Rest of Season </title>
   <pubDate>Mon Nov 22, 2004 </pubDate>
   <link> http://story.news.yahoo.com/news?tmpl=story&ncid=1387&e=2&u=/ap/20041122/ap_on_sp_bk_ne/bkn_pacers_pistons_brawl&sid=95747870 </link>
   <description >The wrath of David Stern was unleashed, giving Ron Artest, Stephen Jackson and Jermaine O'Neal a long time — extremely long in Artest's case — to ponder the error of their ways. </description >
  </News>
  
  <News  rdf:about="http://story.news.yahoo.com/news?tmpl=story&cid=677&ncid=1203&e=1&u=/usatoday/20041122/bs_usatoday/uswontacttoslowdollardrop"/>
    <hasSubject rdf:resource="#Economy" />
    <hasMedia rdf:resource="#usatoday" />
    <hasAuthor rdf:resource="#James Cox" />
   <title> U.S. won't act to slow dollar drop </title>
   <pubDate>Mon Nov 22, 2004 </pubDate>
   <link> http://story.news.yahoo.com/news?tmpl=story&cid=677&ncid=1203&e=1&u=/usatoday/20041122/bs_usatoday/uswontacttoslowdollardrop </link>
   <description >Treasury Secretary John Snow urged European and Asian policymakers Sunday to adopt policies to trigger job growth, domestic spending and investment, and to not count on the United States to slow the dollar's decline in value against their currencies. </description >
  </News>
                                   
</rdf:RDF>
--  作者:annyshmily
--  发布时间:3/5/2005 10:37:00 PM

--  
<News  rdf:about="http://story.news.yahoo.com/news?tmpl=story&ncid=1387&e=2&u=/ap/20041122/ap_on_sp_bk_ne/bkn_pacers_pistons_brawl&sid=95747870"/>
这句结尾好像不需要"/"吧
--  作者:annyshmily
--  发布时间:3/5/2005 11:15:00 PM

--  
<News  rdf:about="http://story.news.yahoo.com/news?tmpl=story&ncid=1387&e=2&u=/ap/20041122/ap_on_sp_bk_ne/bkn_pacers_pistons_brawl&sid=95747870"/>
这最后的 “/”去掉,行吗
--  作者:admin
--  发布时间:3/5/2005 11:42:00 PM

--  
恩。。这里的 / 是多余的。

因为这里的 News element不是empty element


--  作者:annyshmily
--  发布时间:3/6/2005 1:53:00 PM

--  
虽然我能发现这个语法错误,因为我把rdf入门标准看了几遍,xml基础知识也看了两遍。但是昨天刚下了jena,还不会用。是不是把解压后的.jar文件拷入sdk的lib中就算安装完成?那么,最基本的使用是怎么用,比如用它处理rdf文件?
还有,我装的j2se-1.4sdk,路径是c:/sun\AppServer\,在这个路径里有lib文件夹,在这个路径的sdk文件夹也有lib文件夹,就是有这两个lib:c:/sun\AppServer\lib; c:/sun\AppServer\SDK\lib,应该是把jena的.jar拷入后面这个文件夹吧?并且在拷的时候,c:/sun\AppServer\SDK\lib已经有个commons-logging.jar文件,需要覆盖吗?
--  作者:wypiglet
--  发布时间:3/7/2005 4:13:00 PM

--  
楼上的,你的RDF入门标准是英文还是中文,要是中文的,能告诉我网址吗,我也下一个
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
62.500ms