protege中 org.xml.sax.SAXParseException: White spaces are required between publicId and systemId

  刚刚接触本体建模,很多东西不懂。用protege加载CIDOC CRM的owl文件然后将其转存至本地后无法打开,网上查了一下,原因是命名空间所声明的本体没有加载进来(即当前所用本体依赖于其它上层本体),于是在<owl:Ontology rdf:about=""> </owl:Ontology>中把所有声明都加进去了,形式如下:

  <owl:imports rdf:resource="http://www.w3.org/2003/11/swrlb#" /> 

  <owl:imports rdf:resource="http://www.w3.org/2003/11/swrl#" />

  <owl:imports rdf:resource="http://protege.stanford.edu/plugins/owl/protege#" />

  <owl:imports rdf:resource="http://www.owl-ontologies.com/2005/08/07/xsp.owl" />

  ……

报错

  org.xml.sax.SAXParseException: White spaces are required between publicId and systemId

最开始被异常信息欺骗了,以为哪里少了个空格,实际上真正原因是publicId and systemId冲突,即你的命名和系统命名冲突了。于是所有全部删掉,只留下一个

  <owl:imports rdf:resource="http://www.owl-ontologies.com/2005/08/07/xsp.owl" />

搞定!猜测原因可能是有些上层本体是protege里有的(太基础太常用了),你再由外部引入就会产生冲突,而另一些是系统里没有的,比如这里的xsp.owl。

转载于:https://www.cnblogs.com/rouge/archive/2013/05/25/3099196.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值