Oracle Portal-to-Go Implementation Guide Release 1.0.2.2 A86635-02 |
|
This document describes the XML formats Portal-to-Go uses to represent service content and its internal objects. Topics include:
Extensible Markup Language (XML) is a standards-based language for creating structured documents. In an XML document, markup tags describe the content of the document, rather than its visual presentation:
<account_dept> <employee> <emp_name>Scott</emp_name> <emp_ID>20</emp_ID> </employee> <employee> <emp_name>Laura</emp_name> <emp_ID>30</emp_ID> </employee> </account_dept>
Because it isolates content from presentation, XML is an ideal language for exchanging data between diverse platforms. Transformers, in the form of XSLT stylesheets or Java classes, render the data in the format best suited to a particular platform.
Portal-to-Go uses the Oracle XML Parser for Java, version 2.0.2.8. The parser supports the W3C XML 1.0 Standard Recommendation. While the parser supports various character encoding standards, Portal-to-Go uses UTF-8 character encoding.
Version 2.0.2.8 of the parser requires a version attribute in the XSL stylesheet, while prior versions do not. If you have created your own result and/or device transformers, you have to include the XML version number in the XSL stylesheet.
For example:
<xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Without the version attribute, you will receive a runtime error in the Portal-to-Go log file in the form of "missing version attribute from the stylesheet."
The Oracle XML Parser exposes two interfaces:
To improve performance and usability, the APIs reside in a single archive. The Oracle XML Parser is provided as a .jar file comprising the following four packages:
In addition to the standard interfaces, the parser provides numerous extensions. For more information on the extension, see the Portal-to-Go API specifications.
In Portal-to-Go, XML serves two primary functions: to define the format of service content and to define repository objects. The content formats include the following:
The Simple Result DTD defines the format of deliverable service content. Adapter Result is an intermediary format for service content.
The object formats include:
The Provisioning DTD defines the structure of user objects. You can use the Provisioning DTD to transfer user information between Portal-to-Go and an external provisioning system.
Repository XML is not defined by a DTD, since repository objects can have extended attributes which cannot be validated. An extended attribute can be an XML document, such as XSLT, or a Java program. Transformer and adapter objects have extended attributes.
Portal-to-Go XML is intended to be extensible. You can modify the DTDs that Portal-to-Go provides, or create your own. This enables you to implement specialized functionality or to customize Portal-to-Go object characteristics.
This document contains references for the Portal-to-Go XML formats. The references list the attributes and subelements for every element in the Simple Result and Provisioning DTDs. It uses the following DTD symbols to indicate the usage of subelements.
The Adapter Result (also called raw result) format is a simplified, user interface-independent content format. Adapter Result documents must be converted to Simple Result format prior to conversion to their final target format. This intermediary step, called preprocessing, enables you to apply a service-specific transformation to the content returned by an adapter. Result transformers convert Adapter Result documents. Adapter Result format provides an efficient means of exchanging data between chained services.
Note: Currently, only services based on the Web Integration adapter can use the Adapter Result format. |
Portal-to-Go does not specify an Adapter Result DTD. You can define the content any way you like. While the content is not validated by Portal-to-Go, it must be well-formed. The only element Portal-to-Go requires in Adapter Result content is the <AdapterResult>
tag. The remaining structure of the content is important only to the transformer that processes it. For example:
<AdapterResult> <Value name="target"> /parm/epayment/amex </Value> <Value name="creditcard"> Please enter your credit card no: </Value> <Value name="expdate"> Please enter expiration date: </Value> </AdapterResult>
The sample uses a single element type, the Value
tag. The first Value
element contains a link to another service in the Portal-to-Go repository tree (using JNDI-naming format).
A result transformer converts the Adapter Result content as follows:
<SimpleResult> <SimpleForm link="/parm/epayment/amex"> <SimpleFormItem name="creditcard" description="Please enter your credit card no:"/> <SimpleFormItem name="expdate" description="Please enter expiration date:"/> </SimpleForm> </SimpleResult>
The elements in the Simple Result DTD represent the elements of an abstract user interface. These include text items, menus, forms, and tables. When converting source content to Simple Result format, adapters map the source content to the appropriate Simple Result element. Likewise, when converting the content from Simple Result format to the target format, transformers map the Simple Result elements to the appropriate elements in the target format.
The Simple Result DTD defines the following content model.
Appendix A, "Simple Result DTD Notes", describes the content of the Simple Result DTD in detail and in a clear format.
This section describes the components of the Simple Result DTD.
The SimpleResult
element is the root element of a Portal-to-Go service request. This element contains the actual content delivered to the end user.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
(SimpleContainer
SimpleText
SimpleMenu
SimpleForm
SimpleTable
SimpleImage
SimpleBreak
SimplePhone
SimpleEmail
SimpleHref
SimpleHelp)+
The SimpleContainer
element is used as a logical container for one or more elements.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
(SimpleText
SimpleMenu
SimpleForm
SimpleTable
SimpleImage
SimpleBreak
)+
The SimpleText
element contains one or more blocks of plain text.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
SimpleTextItem
+
The SimpleTextItem
element represents a block of plain text, typically a single paragraph.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
#PCDATA
The SimpleMenu
element represents a simple menu with selectable menu items.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
SimpleMenuItem+
The SimpleMenuItem
element represents a single, selectable option in a menu. The option may be another SimpleMenu
element.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
The link target for this item.
Used by the WIDL adapter. This is the section identifier within the WIDL file.
A separator to precede or follow a menu item. Possible values:
The default is none
.
The SimpleForm
element displays one or more input fields.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
The link target for this item.
Used by the WIDL adapter. This is the section identifier within the WIDL file.
(SimpleFormItem
SimpleFormSelect
)+
The SimpleFormItem
element is a single input item in a form. The content of this element, which is in parsable character format, specifies default values for the form item.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
Provides a default value for optional fields. The default value is used only if the field is empty.
Indicates whether the form item is mandatory. Possible values are:
The default is no
.
Specifies a maximum input length.
#PCDATA
The SimpleFormSelect
element is a selectable option menu in a form. The content of this element, which is in parsable character format, specifies default values for the form item.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
SimpleFormOption
+
The SimpleFormOption
element is an item in a selectable option menu. The content of this element, which is in parsable character format, specifies default values for the form item.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
The actual value, as character data, assigned when the user selects this option.
#PCDATA
The contents of this element comprise the text of the option.
The SimpleTable
element represents simple tablular data.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
SimpleTableHeader?
SimpleTableBody
The SimpleTableHeader
element represents column headings.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
SimpleCol+
The SimpleTableBody
element contains the actual tabular data.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
SimpleRow+
The SimpleRow
element contains a single row of data.
This element includes the general attributes.
SimpleCol+
The SimpleCol
element represents a single table cell. It stores a single value for a table cell.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
#PCDATA
The SimpleImage
element references an external image.
The link target for the image.
The SimpleBreak
element provides a logical break in the layout. This is an empty element.
The SimplePhone
element references a phone number.
The phone number
The SimpleEmail
element references an email address.
The email address
The SimpleHref
element provides an anchor to another resource.
The link target for the reference.
The SimpleHelp
element indicates a help text.
The Portal-to-Go repository holds the persistent Portal-to-Go objects, such as end users, user groups, services, adapters, and transformers. Internally, Portal-to-Go stores these objects as database objects in an Oracle8i database. In most cases, you create or modify repository objects using the Service Designer. However, you can also export, modify, and import the repository as an XML file, using utilities provided by Portal-to-Go. To use these utilities, you must understand the XML structure of the repository, as described in this section.
Portal-to-Go provides an XML editor that you can use to modify the XML definitions of objects directly in the repository. You can also modify objects in an XML file. To do so, you export the repository using LoadXml
or the download
utility, and edit the resulting XML file. When finished, you re-import the file into the repository, committing your changes. See "XML Tools" for more information on using the XML Editor or the LoadXML
utility.
Repository XML enables you to distribute populated repositories easily. It also enables you to access the repository programmatically, and to integrate Portal-to-Go with other systems.
Important: Changes made directly to the repository XML are not validated by the Service Designer. Use caution to ensure that the changes you make do not cause conflicts or errors. |
The Provisioning DTD defines the XML format for Portal-to-Go users. You can use it to import users into the repository programmatically, or to import a large number of users at once. As illustrated in the following content model, the Provisioning DTD declares only two elements:
The PanamaObjects
element is the root provisioning document element.
PUSR_LIST
The Portal-to-Go user list.
PUSR+
The PUSR
element represents a Portal-to-Go user.
A user's unique identifier in an external provisioning system. For example, this may be a telephone number or an account number. You can use this attribute to tie a Portal-to-Go user to another account. This is an optional attribute.
User's display name. This is an optional attribute.
Indicates whether the user is enabled. Possible values are:
The user's password. In exported repositories, this appears in encrypted form. For uploading, this can be either an encrypted or plain text password. If the string is greater in length than 32 characters, and all uppercase, Portal-to-Go assumes that it is an encrypted password.
Indicates whether the user has administrator privileges. Possible values are:
Indicates whether the user has designer privileges. Possible values are:
The Portal-to-Go user identifier.
Indicates whether the user is anonymous. Possible values are:
The users home folder.
The name of the group to which the user belongs.
The XML file you import into the repository must contain appropriately formatted repository objects. Since objects in the repository, such as transformers, can have extended attributes, Portal-to-Go does not validate repository XML documents. Therefore, Portal-to-Go does not define a Repository DTD.
Your XML definition should use the following elements for repository objects.
The PanamaObjects
element is the root element.
PGRP_LIST
PUSR_LIST
TRAN_LIST
The Portal-to-Go group list.
The name of the element. This is an optional attribute.
The title of the element. This is an optional attribute.
A link for this element. This is an implied link and should not be used for mandatory links in an element. It should be used for "see also" type links only.
PGRP
The PGRP
element represents a Portal-to-Go user group.
The name of the element. This is an optional attribute.
The Portal-to-Go user list.
PUSR
The PUSR
element represents a Portal-to-Go user.
External identifier. This is an optional attribute.
User's display name. This is an optional attribute.
Indicates whether the user is enabled. Possible values are:
The user's password. In exported repositories, this appears in encrypted form. For uploading, this can be either an encrypted or plain text password. If the string is greater in length than 32 characters, and all uppercase, Portal-to-Go assumes that it is an encrypted password.
Indicates whether the user has administrator privileges. Possible values are:
Indicates whether the user has designer privileges. Possible values are:
The user name.
Indicates whether the user is anonymous. Possible values are:
The user's home folder.
The name of the group to which the user belongs.
The Portal-to-Go transformer list.
XTRA
JTRA
The XTRA
element represents an XSLT Portal-to-Go transformer.
The name of the element.
EXT_ATTR
Extended attribute. The actual XML element that comprises the XSLT implementation.
The JTRA
element represents a Portal-to-Go Java transformer.
The name of the element.
The complete class name including attributes.
The Portal-to-Go logical device list.
LDEV
The LDEV
element represents a Portal-to-Go logical device.
Indicates whether the logical device needs URL caching. If true, URL-encoding request parameters are cached on the server and only small pointers are encoded within the URL that is sent to the logical device. Use this option for devices with limited memory. Possible values are:
The name of the logical device.
MIME type.
Character encoding format, such as UTF-8 or ASCII.
The default transformer used by the logical device.
A string inserted in front of the output from the transformer, such as an XML document type.
The Portal-to-Go adapter list.
ADAP
The ADAP
element represents a Portal-to-Go adapter.
Indicates whether the adapter is valid (accessible). Possible values are:
The adapter name.
The Java class name.
The Portal-to-Go service object list.
FOLD
LINK
MAST
BOMA
The FOLD
element represents a Portal-to-Go service folder.
The location of the service folder, relative to the root URL of the service tree. This attribute is set by the Portal-to-Go system. It cannot be edited.
The service folder name.
Indicates whether the folder is visible. Possible values are:
Indicates whether the folder is valid (available). Possible values are:
The master folder where the service folder is located.
The user name of the folder owner.
A value which determines whether a folder is visible, depending on a user's physical location.
The user group that is allowed to access the folder. This is an optional attribute.
The LINK
element represents a Portal-to-Go service link.
The location of the service link, relative to the root URL of the service tree. This attribute is set by the Portal-to-Go system. It can not be edited.
The service link name.
Indicates whether the link is visible. Possible values are:
Indicates whether the link is valid (accessible). Possible values are:
The folder where the link is located.
The user name of the link owner.
Name of the linked service.
The MAST
element represents a Portal-to-Go master service.
The location of the master service, relative to the root URL of the service tree. This attribute is set by the Portal-to-Go system. It can not be edited.
The master service name.
Indicates whether the master service is visible. Possible values are:
Indicates whether the master service is valid (accessible). Possible values are:
The folder where the master service is located.
The user name of the master service owner.
A value identifying the geographic location of the user.
The amount charged for using the service.
The adapter used by the master service.
The BOMA
element represents a bookmark.
The location of the bookmark, relative to the root URL of the service tree. This attribute is set by the Portal-to-Go system. It can not be edited.
The bookmark name.
Indicates whether the bookmark is visible. Possible values are:
Indicates whether the bookmark is valid (accessible). Possible values are:
The folder where the bookmark is located.
The URL of the external datasource.
The Portal-to-Go user agent list.
AGEN
The AGEN
element represents a Portal-to-Go user agent.
The address of the user agent.
The name of the user agent.
The Portal-to-Go user associated with the user agent.
The logical device.
An identifying attribute set by Portal-to-Go.
Portal-to-Go includes the following tools for working directly with the XML interface:
The Portal-to-Go XML Editor is a text editor that allows you to create, modify, and delete repository objects using the XML object interface. The XML Editor provides a graphical navigation tree for accessing objects in the repository.
To use the XML Editor, you must have an RMI server running on the Portal-to-Go server.
oracle.panama.util.client.xmleditor.XmlEditor
To start the XML Editor:
Java oracle.panama.util.client.xmleditor.XmlEditor
The XML Editor Screen appears.
To edit a repository object:
To remove an object from the repository:
When the query mode check box is selected, the XML Editor refreshes object definitions from the repository database each time an object is selected. This is recommended, especially when more than one user may be editing repository objects. You can also use the Refresh button to refresh an object definition from the repository database.
The LoadXML
utility allows you to download and upload Portal-to-Go repository objects as XML files.
LoadXml
reads from stdin
and writes to stdout
. All logging and error messages are written to stderr
. The XML in the file you import with LoadXml
must conform to the Repository XML.
The upload function performs the following:
LoadXml
updates the objects.
LoadXml
creates new objects.
In the unload XML result all objects have an attribute called _objectId
, this is the system unique object key. You must look up objects by unique name attribute and not the object key. If you start the program without giving an option, all options are listed.
LoadXML
imports and exports the repository identified by the database connect string in the System.properties file. In the development environment, this file is located in the classes/oracle/panama/core/admin directory.
Portal-to-Go does not validate the XML file you import into the repository with LoadXml
. To avoid errors, work in an XML file that you have exported from the repository. This gives you a "known good" Repository XML framework for adding, removing, and modifying individual elements.
oracle.panama.core.util.LoadXml [-l username/password] [-x[adgnstu] [expr]] [-c#
[-p]]
The LoadXml
utility takes the following options:
In this example, XML data is written to standard output.
java oracle.panama.core.util.LoadXml -l adm/adm -x > outputfile.xml
In this example, XML data is read from standard input. It must contain all referenced objects.
prompt$ java oracle.panama.core.util.LoadXml -l adm/adm -c0 < inputfile.xml
You can use the upload
and download
utilities to import and export the Portal-to-Go repository as an XML file. These utilities invoke LoadXml
. They are located in the ServiceDesigner/sample directory of your development environment. You invoke upload
from a command prompt as follows:
upload.bat repository.xml
This loads the contents of the file repository.xml into the repository. It accesses the repository specified by the connect string in the client-side System.properties file.
To download
a repository:
download.bat repository.xml
This places the contents of the repository in a file named repository.xml.
|
Copyright © 2000 Oracle Corporation. All Rights Reserved. |
|