XML技术中的XBase、XPointer与安全机制解析
1. XBase的使用
XML Base(XBase)在XML文档中创建了类似于 (X)HTML 基础元素的功能,它为文档提供了一个不同于默认基础 URI 的 URI 基础。这个功能通过在文档的前言阶段使用 xml:base 语句来实现。
1.1 设置不同的基础 URI
如果之前使用的 XML 示例需要设置一个不同于默认的基础 URI,可以按以下方式定义:
<?xml version="1.0"?>
<doc xml:base="http://alternate.filmstuff.com/"
xmlns:xlink="http://www.w3.org/1999/xlink">
<?xml-stylesheet type="text/xsl" href="filmlibrary.xsl"?>
<filmlibrary>
<motionpicture>
<title>"The Wizard of Oz"</title>
<year>1939</year>
<genre>
<category>
musical
</category>
</genre>
</motionpicture>
<motionpicture>
<title>"Duck Soup"</title>
<year>1933</yea
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



