Sun GlassFish Web Space Server 10.0 Secure Web Access Add-On Guide

Tag Text

This rule is for rewriting the PCDATA of CDATA of the tag element.

This section is divided into the following parts:

Tag Text Syntax

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

where

tagName is the name of the tag

attributePatterns is the attributes and their value patterns for this tag (optional, meaning this tag has no attributes at all)

source is the URI of this xml file (optional, default is *, meaning, any xml page)

Tag Text Example

Assume the base URL of the page is:

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

Page Content

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

Rules

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

Output

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

Description

The first line in the page content has an Attribute Example. The second line in the page content does not contain an attribute with the attribute called name and value of attribute name to be src, and hence no rewriting is done. To rewrite this also we need to have <TagText tag="attribute"/>