Unwired Accelerator allows you to customize XSL and XSLT templates on a per-user basis.
When you create XML applications, you specify an Extensible Style Language Transformation (XSLT) template for content transformation and a user interface (UI) template for presentation.
The XSLT template contains the language used in XSL style sheets to transform XML documents into other XML documents. The UI template specifies how to present the application; that is, shading, borders, and so on. You can customize these templates on a per-user basis for XML applications
Creating an XML sample application
Log in to Mobile Web Studio.
Select Build | Applications from the Mobile Web Studio left pane and select New from the Application Manager Status menu.
Right-click in the detail pane and select New Aggregated Application.
When the Application Builder displays, click the down arrow beside the Add button and select XML Element from the menu.
You see the XML Element Definition window.
Enter the following sample input:
XML URL –
http://p.moreover.com/ cgi-local/page?c=Biotech%20news&o=xml
Content XSLT – moreover_content_xsl
UI XSLT – pink_ui_xslt
Click Preview.
The content has a pink background, as specified in the UI XSLT. Any user who accesses an XML application that uses the specified UI XSLT sees a pink background.
Click Next until you reach the window where you enter the Element Name.
Enter “XML_sample” and click Finish to save the new element.
When the Application Builder reappears, click Save.
On the Finish window, enter an application name and select the J2EE roles:
Application Name – enter “XML_sample.”
J2EE Roles – click Add All.
Click Finish.
When you see the prompt “Application successfully saved,” click OK, then click Close to exit the Application Builder.
In the Application Manager, select New from the Status menu. You see the XML_sample application.
Approve and Activate the application by right-clicking the XML_sample application and selecting:
Active Status – Active.
Approval Status – Approved.
The application now displays under the Approved status.
Adding the XML_sample application to a page
You have created an XML_sample application that uses the XML_sample element and incorporates the pink_ui_xslt user interface. Now add the application to a page.
Select Build | Pages from the Mobile Web Studio main window and click New on the Page Builder menu bar.
When the Page Builder appears, click Add.
When the Search window appears, click Search.
Click XML_sample in the Results pane and click Add.
In the Page Builder, click Save As.
In the Save Page window:
Enter “XML_sample” for Name.
Click Add All for J2EE Roles.
Click OK.
When the “Page saved” prompt appears, click OK, then click Close to exit the Page Builder.
At the Mobile Web Studio main window, select New from the Manager Status menu.
Right-click XML_sample in the detail view and select Status | Approved from the pop-up. When the “Page saved” prompt appears, click OK.
Select Approved from the Page Manager Status menu.
Click XML_sample in the detail view and click Update from the Page Manager menu bar.
In the confirmation pop-up, click OK.
Portal Interface now has the page available for users.
Creating a user-specific UI XSLT template
Select Build | Templates and select Approved from the Template Manager Status menu.
Right-click the pink_ui_xslt template in the detail view and select Edit from the pop-up.
When the Template Editor appears, locate this line in the Code window:
<TD BGCOLOR="#ffccff">
Change the value from “#ffccff” to:
#ccffcc
Click Save As.
When the Save Template As dialog box displays, enter:
green_ui_xslt
Click OK.
When you see the prompt “Template saved,” click OK, then click Close to exit the Template Editor.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |