Previous     Contents     Index     Next     
iPlanet Portal Server: Mobile Access Pack Administration Guide



Chapter 12   Configuring XML Content


The Mobile Access Pack XML content provider allows you to deliver channels with XML content to users who access your portal site using HTML browsers or mobile devices. The XML content provider can deliver transformed content using an XSL file for the following types of XML input:

  • A file URL pointing to an XML file

  • An HTTP or HTTPS URL pointing to a server providing XML data

This chapter discusses how to use the Administration Console to set up XML content channels for your portal site. It explains the following tasks:



Creating a New Channel

Creating a new channel from the XML provider consists of two steps:

  1. Setting up a new channel

  2. Setting up XSL template files


Setting Up a Channel

You use the Mobile Access Pack's desktop channel wizard to create an XML content provider channel. You provide the provider's name and type and then you define the attributes for the new channel.

To set up an XML content provider channel, complete the following steps:

  1. As root, log in to the Administration Console and select Manage Domains.

  2. Select the link for your server's domain name, where the new channel is to be.

  3. Select the Desktop Channel Wizard link to display the Desktop Channel Wizard page.

  4. In the Channel Name text box, specify the name of the channel.

  5. In the Channel Description text box, provide a description of the channel content.

  6. From the Provider pull-down menu, select XML Content.

  7. Select Next to display the user attributes for the XML content provider.

  8. In the XML Content URL text field, specify the URL of the XML data.



    Tip

    The URL can be any of the following formats:

    1. http://

    2. https://

    3. file:/// (for XML source on a local UNIX file system)



  9. In the XSL Filename text field, specify the name of the XSL template file.



    Tip

    Provide one of these for the XSL filename:

    • An absolute path to the XSL file

    For example: /export/home/xsl/TOC.xsl

    This uses the specified XSL template file on the local file system. If the file is not present or if the absolute path name is invalid, the display of XML content fails with an error message.

    • The XSL file name, without path information

    For example: TOC.xsl

    This uses a device-specific XSL template file, based on the requesting client type, and uses it to display the transformed XSL content.

    For more information on file lookup, see the "How is Content Delivered to the Client?" section in the Overview of the iPlanet Portal Server: Mobile Access Pack Programmer's Guide and the "File Lookup" section in the Release Notes for iPlanet Portal Server 3.0, Service Pack 3a.



  10. In the Content Timeout text field, specify the amount of time in seconds for the XML content display.



    Tip

    By default, XML content times out in 5 seconds.



  11. Select Finish.

  12. Select Continue.


Setting Up XSL Template Files

Serving client-specific XML content in a new channel requires you first to write and set up an XSL template file for your XML source (for each markup language) and then to put the template file in a specific directory for device-dependent data files.

To set up an XSL template file, complete the following steps:

  1. Create the XSL template file.

  2. As root, use cd to change to directory where channel templates are.



    Tip

    For example, enter:

    cd /etc/opt/SUNWips/desktop/default/



  3. Make a new directory with the new channel name.



    Tip

    If your new channel name is iplanetcomTestChannel, for example, enter:

    mkdir iplanetcomtestchannel



  4. Use cd to change to the new directory.

  5. Make a directory for each supported client type.

    Tip

    For example, enter:

    mkdir html chtml wml



  6. Copy the client-specific XSL template files to their respective directories.



Editing Channel Layout

You can control the appearance of entries in an XML content channel by specifying name, background color, width and refresh timing, in addition to defining other channel layout attributes.

To configure the layout of a new XML content channel, complete the following steps:

  1. As root, log in to the Administration Console and select Manage Domains.

  2. Select the link for your server's domain name.

  3. Select the icon next to the Applications heading to display the Applications list.

  4. Select the Desktop link to display the profile for the desktop.

  5. From the list of available channels, select XML content provider by name.

  6. Select Edit Channel to display the XML content provider attributes.

  7. Select Show Advanced Options to display additional attributes.

  8. In the Title text field, specify a name for the channel.

    This is the name with which the specified XML content channel will be displayed.

  9. In the Background Color text field, specify a background color for the channel.

  10. In the Content Timeout text field, specify the amount of time for the XML content channel display.



    Tip

    By default, XML content times out in 5 seconds.



  11. From the Width list, specify the width of the channel.

  12. Select the Detached check box to detach the channel from the desktop.

  13. Select the Minimized check box to minimize the channel in the desktop.

  14. In the Refresh Time text field, specify the frequency for updating or refreshing content in the channel.



    Tip

    The default value 0 updates XML content every time.



  15. Select the Framed check box to frame the channel in the desktop.

  16. In the Column text field, specify which column the channel is to appear in.

  17. In the Row text field, specify which row the channel is to appear in.

  18. Deselect the XSL Cache Enable check box to deactivate preprocessing of XSL templates.



    Tip

    Caching is selected by default. Cache cleanup is performed if this option is deselected.



  19. Select Submit and then select Continue.



Removing a Provider

You can delete an XML content channel so that it is no longer available on your portal site.

To delete an XML content channel, complete the following steps:

  1. As root, log in to the Administration Console and select Manage Domains.

  2. Select the link for your server's domain name.

  3. Select the icon next to the Applications heading to display the Applications list.

  4. Select the Desktop link to display the desktop profile attributes.

  5. From the list of available channels, select the name of the XML content provider that you want to remove.

  6. Select Delete to remove the provider.

  7. Select Submit and then select Continue.



Replacing the XSL Transformation Engine

The XML content provider uses JAXP 1.1 reference implementation for transforming XML. You can choose to replace your XSL transformation engine with one of your own transformation engines as long as it is JAXP 1.1 compliant.

To set up all XML content channels to use new transformation engine jar files, complete the following steps:

  1. As root, log in to the Portal Server instance that the Mobile Access Pack is running on.

  2. Make a copy of the iwtJAXPJars.xml file.



    Tip

    For example, enter:

    cp /etc/opt/SUNWips/xml/iwtJAXPJars.xml iwtJAXPJars-new.xml



  3. In the iwtJAXPJars-new.xml file, change the values of the attribute iwtJAXPJars-jaxpJars by replacing the JAXP reference implementation jar files with the new jar files.



    Tip

    Specify the relative path from the Portal Server installation directory to the jar files.

    See Chapter 8 of the iPlanet Portal Server: Mobile Access Pack Programmer's Guide for more information about the iwtJAXPJars-jaxpJars attribute.



  4. From the Portal Server installation directory, enter this command to remove the old iwtJAXPJars component:

    /install_directory/SUNWips/bin ipsadmin delete component iwtJAXPJars

  5. From the Portal Server installation directory, enter this command to create the component iwtJAXPJars with the new values:

    /install_directory/SUNWips/bin ipsadmin create component iwtJAXPJars iwtJAXPJars-new.xml

  6. Enter this command to restart the server to load the new jar files:

    /etc/init.d/ipsserver start


Previous     Contents     Index     Next     
Copyright © 2001 Sun Microsystems, Inc. All rights reserved.

Last Updated November 20, 2001