Skip to Content
语义Web 编程
book

语义Web 编程

by Toby Segaran, Colin Evans, Jamie Taylor
January 2019
Intermediate to advanced
276 pages
5h 43m
Chinese
China Machine Press
Content preview from 语义Web 编程
78
4
需要注意的是,用于设置谓词的属性取决于 RDF 语句中的宾语类型。如果宾语是文字,
则谓词由 property 属性指定。但是,如果宾语是资源,则使用 rel rev 属性。因为
XHTML 标记语言用于生成人类可读的显示,所以用 RDF 语句的主语
-
谓词
-
宾语顺序
显示数据可能不太方便。为处理这种情况,RDFa 提供了用于设置谓词的 rev 属性,它
用于表示语句的顺序已被颠倒(宾语
-
谓词
-
)。
至少,我们可以在单个标签元素中指定 RDF 三元组。在下面的例子中,宾语是一个文
字,因此我们使用 property 属性来声明谓词:
<span xmlns:foaf="http://xmlns.com/foaf/0.1/"
about="http://kiwitobes.com/toby.rdf#ts"
property="foaf:nick"
content="kiwitobes" />
当语句的宾语是资源时,我们使用属性 rel 来声明谓词:
<span xmlns:foaf="http://xmlns.com/foaf/0.1/"
about="http://kiwitobes.com/toby.rdf#ts"
rel="http://xmlns.com/foaf/0.1/homepage"
href="http://kiwkitobes.com" />
但是我们也可以使用 XHTML 元素来显示部分结构。例如,当显示字符串“ kiwitobes
时,我们可以对 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

前端架构设计

前端架构设计

Micah Godbolt
精通模块化JavaScript

精通模块化JavaScript

Nicolás Bevacqua
Core JavaServer™ Faces

Core JavaServer™ Faces

David Geary, Cay S. Horstmann

Publisher Resources

ISBN: 9787111615873