繁体   English   中英

如何使用EasyRdf添加rdf:datatype

[英]How to add rdf:datatype with EasyRdf

我正在使用http://www.easyrdf.org/ PHP库创建RDF文档。 我不知道如何将rdf:datatype添加到RDF文档中。

所以我想实现的是

<rdf:Description rdf:datatype="&xsd:integer">58</rdf:Description>

这产生了预期的效果

// Add xsd:integer to the resource
$rdf_resource->add(
    'rdf:Description',
    EasyRdf_Literal::create(58, null, 'xsd:integer')
);

暂无
暂无

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

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