XMLdebug
Personalization in XperienCentral depends on a number of things:
- The HTML of the page
- The XML containing session and request information
- The XSL used to reformat the page based on personalization expressions
These three are combined on the server side, which results in plain HTML being sent out to the visitor of the website.
It is possible to view the combined XML of the page and session information. Based on this XML you can create your own personalization expressions. To see the XML, add the parameter xmldebug=true
to the URL of the page. You will have to request the page on the backend server and you have to be logged in with the Tomcat Administrative Login to get access. For example:
http: //<backend>/web/show/id=123456?xmldebug=true |
With the latest Tomcat versions you may have some difficulty using the tool. To be able to use the ssidebug
or xmldebug
tools, follow these steps:
- Open the URL
http://<backend server name>/web/admin/status
. - Log in with the proper credentials
- Verify that you see the Status page.
- Open the URL
.http:
//<backend server name>/web/show/id=...?xmldebug=true
<root> <system> <cookies> <cookie> <name>__utma</name> <value>217805784.1823725186.1200192408.1233385445.1224757719.11</value> </cookie> <cookie> <name>JSESSIONID</name> <value>A67C338CCC9C80FB2C818443038E66FB</value> </cookie> </cookies> <headers> <header> <name>host</name> <value>localhost</value> </header> <header> <name>user-agent</name> <value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3</value> </header> </headers> <requestparameters> <parameter> <name>xmldebug</name> <value>true</value> </parameter> </requestparameters> <date>2008-12-05</date> <time>12:47:59</time> <url></url> </system> <showhtml> <![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8" /> <title>Home</title> </head> <body> <div>Hello ]]> </showhtml> <wm-user-username /> <showhtml> <![CDATA[ , how are you today?</div> </body> </html> ]]> </showhtml> </root>
The code sample above has been shortened to make it more understandable. You can see the system information and the HTML as it is escaped in CDATA
tags. If you want to view the XSL that transforms this XML, use the XSLdebug parameter. See /wiki/spaces/PD/pages/24707099 for some practical examples of everyday expressions.