Sun Java System Portal Server Secure Remote Access 7.2 管理指南

標記文字

此規則是用於重新寫入標記元素的 PCDATA 或 CDATA。

本節分為下列部分:

標記文字語法

<TagText tag="tagName" 
[attributePatterns="attribute_patterns_for_ this_tag" source="*"]/>

其中

tagName 為標記名稱

attributePatterns 是此標記的屬性及值式樣 (可選,表示此標記完全不具屬性)

source 是此 xml 檔案的 URI (可選,預設為 *,表示任何 xml 網頁)

標記文字範例

假設此網頁的基準 URL 是:

http://abc.sesta.com/test/rewriter/test1/xml/page.html

網頁內容

<xml>
<Attribute name="src">test.html</attribute>
<attribute>abc.html</attribute>
</xml>

規則

<TagText tag="attribute" attributePatterns="name=src"/>

輸出

<xml>
<Attribute name="src">gateway-URL/
http://abc.sesta.com/test/rewriter/test1/
xml/test.html</attribute><attribute>abc.html</attribute>
</xml>

描述

網頁內容的第一行包含屬性範例。此網頁內容的第二行不包含具有屬性呼叫名稱且屬性名稱值為 src 的屬性,因此不會執行任何重新寫入的動作。要進行重新寫入,我們亦需具有 <TagText tag="attribute"/>