• Aucun résultat trouvé

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

• Editing Channel Layout

• Removing a Provider

• Replacing the XSL Transformation Engine

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

Creating a New Channel

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.

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

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)

Creating a New Channel

Chapter 12 Configuring XML Content 71

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

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, usecd to change to directory where channel templates are.

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.

TIP By default, XML content times out in 5 seconds.

Editing Channel Layout

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

4. Usecd to change to the new directory.

5. Make a directory for each supported client type.

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.

TIP For example, enter:

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

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

mkdir iplanetcomtestchannel

TIP For example, enter:

mkdir html chtml wml

Removing a Provider

Chapter 12 Configuring XML Content 73

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.

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.

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.

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.

TIP By default, XML content times out in 5 seconds.

TIP The default value 0 updates XML content every time.

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

Replacing the XSL Transformation Engine

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 theiwtJAXPJars.xml file.

3. In theiwtJAXPJars-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 For example, enter:

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

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.

Replacing the XSL Transformation Engine

Chapter 12 Configuring XML Content 75

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

/install_directory/SUNWips/bin ipsadmin delete component iwtJAXPJars

5. From the Portal Server installation directory, enter this command to create the componentiwtJAXPJars 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

Replacing the XSL Transformation Engine

Index 77

Index

A

address book provider access to address book 35 channel entry display 38 channel layout 39 channel name 13 class name 13 Administration Console

overview 15 URL 15 attributes

adding 21 changing 21 charset 18 clientType 17 content type 17 contentType 17 counterName 18 deleting 22 editing 21 escapeWML 18 escapeXML 18 fileIdentifier 18 filePath 18 genericHTML 18 ignoreHostHeader 18 lineLength 18 maxSize 18 removing 22

userAgent 17 authentication

adding module 26 client detection 19 client-specific 25, 26 disabling module 34 LDAP 26

login pages 29 menu 26

non-interactive 28 NoPassword 28 overview 25 pages 29 service 25 single sign-on 29

B

bookmark provider cHTML channel name 13 class name 13

creating new channel 41 editing channel attributes 43 bookmark provider WML

channel name 12 class name 13

creating new channel 41 editing channel attributes 43

C

caching 73 calendar provider

access to server 46 channel entry display 47 channel layout 47 channel name 13 class name 13 configuring server 45 channels

address book 13, 35 bookmark cHTML 13, 43 bookmark WML 12, 43 calendar 13, 45 mail 13, 51

personal note 13, 57 postit 13, 59 URL scraper 13, 61 user information 13, 67 XML content 14, 69 character set 18 charset 18 client attributes

see attributes client detection 26 client types supported 11 clientType 17

configutil command 52 content type 17 counterName 18

D

data object 19 desktop

and providers 12

Mobile Access Pack features 14 URL 14

documentation description 8 link 9

E

escapeWML 18 escapeXML 18

external LDAP server 30

F

file type 18 fileIdentifier 18 filePath 18

G

genericHTML 18

H

home page, user control 14 HTML content, serving as link 65

I

ignoreHostHeader 18

IP security check parameter 45, 51 iPlanet Portal Server 11

iwtAddressBookProvider 13 iwtCalendarProvider 13 iwtMailProvider 13 iwtPostitProvider 13 iwtUserInfoProvider 13

iwtWirelessBookmarkProvidercHTML 13 iwtWirelessBookmarkProviderWML 12 iwtWirelessURLScraperProvider 13 iwtXMLProvider 14

Index 79

L

LDAP

authentication 26 external server 30 lineLength 18 link

serving HTML content as 65 serving WML content as 64 login pages

adding 29

M

mail provider

channel header display 52 channel layout 53

channel name 13 class name 13 configuring server 51 maxSize 18

Messenger Express

address book channel 35 Mobile Access Pack

and Portal Server functions 11 documentation 8

overview 11 mobile client support

adding 18 removing 23 mobile client type 17 mobile device attributes

deleting 22 removing 22 mobile device support

adding 18 removing 23

mobile devices supported 11

N

non-interactive authentication 28

P

path to content files 18 personal note provider

channel name 13 class name 14 setting up channel 57 Portal Server 11 postit provider

channel name 13 class name 13 setting up channel 59 providers

address book 13, 35 bookmark cHTML 13, 41 bookmark WML 12, 41 calendar 13, 45 content sources 12 mail 13, 51 overview 12 personal note 13, 57 postit 13, 59 URL scraper 13, 61 user information 13, 67 XML content 14, 69

S

single sign-on address book 32 authentication 29 calendar 33 mail 30

Documents relatifs