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


The rules for XML attributes are similar to the attribute rules for HTML. The difference is that attribute rules of XML are cases sensitive while HTML attribute rules are not. This is again due to case sensitivity built into XML and not into HTML.

Rewriter translates the attribute value based on the attribute name.

This section is divided into the following parts:

Attribute Syntax

<Attribute name="attributeName" [tag="*" type=”URL” valuePatterns="*" source=”*”]/>


attributeName is the name of the attribute (mandatory)

tag is the name of the tag, where this attribute is present (optional, deafult is * , meaning any tag)

valuePatterns See Using Pattern Matching in Rules.

source is the URI of this XML page (optional, default is *, meaning in any XML page)

Attribute Example

Assume the base URL of the page is:

Page Content

<baseroot href="/root.html"/>
<img href="image.html"/>
<string href="1234|substring.html"/>
<check href="1234|string.html"/>


<Attribute name="href"tag="check" valuePatterns="1234|"/>


<baseroot href="/root.html"/><img href="image.html"/>
<string href="1234|substring.html"/><check href="1234|


In the above example, only the fourth line is rewritten because it meets all the conditions specified in the rule. See Using Pattern Matching in Rules.