使用本体将 XML 转换为 RDF/XML 的最佳方法
我有一个使用 XPDL 标准(具有 XML 模式)的 XML。我现在要做的就是根据某种本体将其内容转换为 RDF 格式(以 XML 序列化)。显然,这里需要某种映射。我想使用 PHP 来完成此操作。问题是,我不知道如何做到最好。我知道如何读取 XML 文件,但是映射将如何发生?什么是好的方法?
I have an XML which uses the XPDL standard (which has an XML schema). What I'm trying to do now is to convert its content to RDF format (serialized in XML), in terms of a certain ontology. Clearly, there needs to be some sort of mapping here. I would like to do this using PHP. The thing is, I have no idea how to do this best. I know how to read an XML file, but how would the mappings occur? What would be a good approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我建议使用XSLT。将一种 XML 风格转换为另一种风格时,它通常是最好、最简单的解决方案。
映射将出现在生成 RDF
Description
元素的 XPDL 元素的模板匹配中。I would recommend using XSLT. When transforming one flavor of XML into another it is often the best and easiest solution.
The mappings would occur in template matches for the XPDL elements that generate the RDF
Description
elements.您可以在
http: //www.gac-grid.org/project-products/Software/XML2RDF.html
(或 sourceforge.net/projects/xmltordf/)。
也许这也能解决你的问题。
You can find a generic XML to RDF converter that works without an ontology at
http://www.gac-grid.org/project-products/Software/XML2RDF.html
(or sourceforge.net/projects/xmltordf/).
Maybe this can solve your problem, too.
查看 http://xsparql.deri.org
Take a look to http://xsparql.deri.org
也许什么也没有。因为 RDF 是 XML 或 XML 的另一种形式的扩展。所以我会告诉你:“什么都不做”。
Maybe nothing. Because RDF is an extension to XML or another flavor of XML. So I will say you: "Do nothing.".