该RDF / XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rdf:RDF xmlns:cc="http://creativecommons.org/ns#" xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gn="http://www.geonames.org/ontology#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:wgs84_pos="http://www.w3.org/2003/01/geo/wgs84_pos#">
<gn:Feature rdf:about="http://sws.geonames.org/2750405/">
<gn:featureCode rdf:resource="http://www.geonames.org/ontology#A.PCLI"/>
</gn:Feature>
验证并可以使用http://www.rdfabout.com/demo/validator/转换为TTL / N3 。结果是
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix gn: <http://www.geonames.org/ontology#>.
@prefix cc: <http://creativecommons.org/ns#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix wgs84_pos: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
<http://sws.geonames.org/2750405/> gn:featureCode gn:A.PCLI;
a gn:Feature.
当我尝试验证此结果并尝试将其转换回时,由于时间段的原因,最终的gn:A.PCLI没有通过。正确的TTL语法是什么?
只需使用URI形式:
@prefix gn: <http://www.geonames.org/ontology#>.
<http://sws.geonames.org/2750405/> gn:featureCode <http://www.geonames.org/ontology#A.PCLI>;
a gn:Feature.
您的大多数前缀不是必需的。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句