简体   繁体   English

符号3 RDF / XML的URI

[英]notation 3 URI to RDF/XML

I'm trying to convert an n3 file to rdf/xml through rdf:about converter. 我正在尝试通过rdf:转换器将n3文件转换为rdf / xml。 Unfortunately some URIs have special characters like: . 不幸的是,一些URI具有特殊字符,如:。 -> gene:01.01.01 % -> gene:fog2/zfpm2 | - >基因:01.01.01% - >基因:fog2 / zfpm2 | -> gene:17867|203045 - >基因:17867 | 203045

and the convertor note this examples as a notation 3 grammar error. 并且转换器将此示例注释为符号3语法错误。 I searched everywhere for escaping characters which would help me make the convention but with no success. 我到处寻找逃脱的角色,这些角色可以帮助我制作会议,但没有成功。 Does anyone know how i could represent these special characters in the URIs? 有谁知道我如何在URI中表示这些特殊字符? is there any other convertor that would allow me proceed this convention? 有没有其他转换器可以让我继续这个约定?

if i remove these URIs, my file is converted normally. 如果我删除这些URI,我的文件正常转换。 thanks in advance. 提前致谢。

The most reliable thing will be to write out the URIs in full. 最可靠的是完整地写出URI。 So if you have: 所以如果你有:

@prefix gene: <http://example.com/>

gene:fog2/zfpm rdfs:label "something".

rewrite this instead to: 改写这个改为:

@prefix gene: <http://example.com/>

<http://example.com/fog2/zfpm> rdfs:label "something".

Note, some characters are not even allowed in this notation (for example, spaces). 注意,在这种表示法中甚至不允许某些字符(例如,空格)。 In that case, they need to be handled with percent encoding : 在这种情况下,需要使用百分比编码来处理它们:

<http://example.com/fog2/zfpm%20xyz> rdfs:label "something".

Here the space has been percent-encoded as %20 . 这里的空间已被百分比编码为%20

The latest Turtle spec (Turtle is W3C's standardized version of the non-standard N3) also allows escaping of some of these special characters as backslashes: 最新的规范(海龟是W3C的非标准N3的标准化版本)还允许逃逸的一些这些特殊字符为反斜杠:

gene:fog2\/zfpm rdfs:label "something".

But this isn't widely implemented yet, and older tools/services won't support it. 但这还没有得到广泛实施,旧的工具/服务也不会支持它。 The rdfabout.com converter certainly won't support it. rdfabout.com转换器当然不会支持它。

triplr.org is better than rdfabout.com, by the way. 顺便说一句, triplr.org比rdfabout.com更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM