The Rewriter modifies the URL portions of various elements that appear on a web page. The Rewriter comes with a default set of rules to determine the elements of a web page to rewrite. A collection of rules for various categories and subcategories is stored in a .dtd file and is called a ruleset. The Rewriter rulesets are defined in XML.
The DTD is located in /opt/SUNWportal/web-src/WEB-INF/lib/rewriter.jar (resources/RuleSet.dtd). Rulesets are used to identify URLs. By default, all strings in web content starting with characters such as “/”, ../, “http” and “https” are considered to be URLs and are candidates for rewriting.
Rules for HTML Content
Rules for XML Content
As Wireless Markup Language (WML) is similar to HTML, HTML rules are applied for WML content.
No rules are required for CSS content.
The ruleset is an XML document and the XML within it must be properly formed. When defining rules in a ruleset, follow these guidelines:
All rules need to be enclosed within the <ruleset> </ruleset> tags.
Include all rules to rewrite HTML content in the <HTML> </HTML> section of the ruleset.
Include all rules to rewrite XML content in the <XML> </XML> section of the ruleset.