Element control element - Web Content Integrator
The element control element populates elements stored in components, site areas and content items. The Web Content Integrator uses the following business logic to process each component element in the feed entry:
- It checks whether the component site area or content item contains a field whose name matches the value in the feed element's name attribute. This is a case-sensitive comparison so the names must match exactly.
- If a matching field is found, it checks whether the data type matches what was specified in the feed element's sub-element.
- If both the name and data type match, the element in the site area or content item will be updated to match the data contained the feed element.
- If an element is found which matches the feed element's name, but not its data type, the Web Content Integrator will remove the old field from the site area or content item and attempt to replace it with a new field that matches the data type specified in the feed.
- If no matching field can be found on the content, the Web Content Integrator will attempt to create a new element.
When creating elements in Web Content Manager using an authoring portlet, it is possible to specify a number of field validation criteria such as the maximum size of a text field or the allowable range of a date field. These are validated during the save operation. If the data in the field does not meet the validation criteria the entire save operation will fail, meaning that none of the changes in the feed entry will be applied. The Web Content Integrator does not have the ability to check that the data in the feed element is valid prior to attempting the save operation. If you elect to implement validations on the authoring templates, it is important for the feed producer to insure that the content is valid during the generation of the feed.
Text element
Element parameters: Details for this element: Applies to item types Site areas and content items Required for item types None. Allowable Values A text component should contain a plain text value. Required Attributes
- name
- The value of this attribute should match the name of an existing text element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "text". Not case sensitive.
- value
- The value of this sub-element should be plain text.
Optional sub-elements None
Example:
<ibmwcm:element name="Headline"> <ibmwcm:type>text</ibmwcm:type> <ibmwcm:value>New Product Released</ibmwcm:value> </ibmwcm:element>
HTML element
Element parameters: Details for this element: Applies to item types HTML components, site areas and content items Required for item types HTML components. Allowable Values The value of the value sub-element should be HTML which will be stored in the corresponding HTML element. The HTML can either be entity-encoded or contained within a CDATA element. Alternatively, the feed producer can provide a URL to an HTML file whose contents will be retrieved by the Web Content Integrator Required Attributes
- name
- The value of this attribute should match the name of an existing HTML element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "html".
- value
- Used when adding HTML markup that is either entity-encoded or contained within a CDATA element.
- source
- Used with a fully qualified URL to an HTML file. When the Web Content Integrator processes the feed it will retrieve the file and store its contents in the HTML element in the site area or content item.
Optional sub-elements None
Examples:
<ibmwcm:element name="footer"> <ibmwcm:type>html</ibmwcm:type> <ibmwcm:value> <strong>Copyright 2006</strong> </ibmwcm:value> </ibmwcm:element> <ibmwcm:element name="footer"> <ibmwcm:type>html</ibmwcm:type> <ibmwcm:value> <![CDATA[<strong>Copyright 2006</strong>]]> </ibmwcm:value> </ibmwcm:element> <ibmwcm:element name="footer"> <ibmwcm:type>html</ibmwcm:type> <ibmwcm:source> http://sourcecms.yourco.com/pages/footer.htm </ibmwcm:source> </ibmwcm:element>
Rich text element
Element parameters: Details for this element: Applies to item types Site areas and content items Required for item types None Allowable Values The value of the value sub-element should be HTML which will be stored in the corresponding rich text element. The HTML can either be entity-encoded or contained within a CDATA element. Required Attributes
- name
- The value of this attribute should match the name of an existing rich text element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "rich text". These values are not case sensitive.
- value
- The value of this sub-element should be HTML markup that is either entity-encoded or contained within a CDATA element.
Optional sub-elements None
Examples:
<ibmwcm:element name="body"> <ibmwcm:type>rich text</ibmwcm:type> <ibmwcm:value> <p>This is the content<p/p> </ibmwcm:value> </ibmwcm:element> <ibmwcm:element name="body"> <ibmwcm:type>rich text</ibmwcm:type> <ibmwcm:value> <![CDATA[<p>This is the content</p>]]> </ibmwcm:value> </ibmwcm:element>
File resource element
Element parameters: Details for this element: Applies to item types File resource components, site areas and content items Required for item types File resource components. Allowable Values The value should be a fully qualified URL pointing to the binary file which is to be uploaded into file resource element. Required Attributes
- name
- The value of this attribute should match the name of an existing file resource element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "file". These values are not case sensitive.
- source
- The value should be a fully qualified URL pointing to the binary file which is to be uploaded into a file resource element.
If the URL contains non-ascii charactors, the non-ascii characters must be encoded. For example: http://server:port/wps/%E4%B8%AD%E6%96%87/%E7%BB%84%E4%BB%B6.pdf
Optional sub-elements
- fileName
- The value of this sub-element should be the file name and extension to be applied to the file attachment when added to the file resource element. If this sub-element is present in the feed entry then its value will be used as the file name of the attachment in Web Content Manager regardless of what the name of the file was on the source server. This is useful if the URL to the binary file does not include the file name as is the case with some content management systems. If the fileName sub-element is not present in the feed then the Web Content Integrator will attempt to determine the file name from the URL in the value sub-element by taking all of the characters following the last forward slash in the URL.
Examples:
<ibmwcm:element name="attachment"> <ibmwcm:type>file</ibmwcm:type> <ibmwcm:source> http://sourcecms.yourco.com/files/plan.doc </ibmwcm:source> </ibmwcm:element> <ibmwcm:element name="attachment"> <ibmwcm:type>file</ibmwcm:type> <ibmwcm:source> http://sourcecms.yourco.com/files/plan.doc </ibmwcm:source> <ibmwcm:fileName>MktgPlan.doc</ibmwcm:fileName> </ibmwcm:element>
Image element
Element parameters: Details for this element: Applies to item types Image components, site areas and content items Required for item types Image components. Allowable Values The value should be a fully qualified URL pointing to the binary file which is to be uploaded into image element. Required Attributes
- name
- The value of this attribute should match the name of an existing image element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "image". These values are not case sensitive.
- source
- The value should be a fully qualified URL pointing to the binary file which is to be uploaded into an image element.
If the URL contains non-ascii charactors, the non-ascii characters must be encoded. For example: http://server:port/wps/%E4%B8%AD%E6%96%87/%E7%BB%84%E4%BB%B6.jpg
Optional sub-elements
- fileName
- The value of this sub-element should be the file name and extension to be applied to the file attachment when added to the image element. If this sub-element is present in the feed entry then its value will be used as the file name of the attachment in Web Content Manager regardless of what the name of the file was on the source server. This is useful if the URL to the binary file does not include the file name as is the case with some content management systems. If the fileName sub-element is not present in the feed then the Web Content Integrator will attempt to determine the file name from the URL in the value sub-element by taking all of the characters following the last forward slash in the URL.
Examples:
<ibmwcm:element name="image"> <ibmwcm:type>image</ibmwcm:type> <ibmwcm:source> http://sourcecms.yourco.com/images/logo.gif </ibmwcm:source> </ibmwcm:element> <ibmwcm:element name="image"> <ibmwcm:type>image</ibmwcm:type> <ibmwcm:source> http://sourcecms.yourco.com/images/logo.gif </ibmwcm:source> <ibmwcm:fileName>yourco_logo.doc</ibmwcm:fileName> </ibmwcm:element>
Date element
Element parameters: Details for this element: Applies to item types Date and time components, site areas and content items Required for item types Date and time components. Allowable Values A date or time value to be stored in a date and time element. Required Attributes
- name
- The value of this attribute should match the name of an existing date and time element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "date". Not case sensitive.
- value
- The value of this sub-element should be a date and time value in the RFC 822 format.
Optional sub-elements
- format
- This allows the feed producer to specify the format of the date or time. A value of "date" will cause the date and time element to be set to only display the date portion of the data. Likewise, a value of "time" will only display the time portion of the data. Any other value, or the absence of this sub-element, will result in the both portions of the data being displayed. The values for this sub-element are not case sensitive.
Example:
<ibmwcm:element name="StartDate"> <ibmwcm:type>date</ibmwcm:type> <ibmwcm:value> Thu, 14 Apr 1966 15:15:00 EDT </ibmwcm:value> <ibmwcm:format>date</ibmwcm:format> </ibmwcm:element>
Link element
Element parameters: Details for this element: Applies to item types Link components, site areas and content items Required for item types Link components. Allowable Values This component contains the information that is required to configure a link element. There are a number of optional sub-elements that can be used to set the various parameters of the Link field. Required Attributes
- name
- The value of this attribute should match the name of an existing link element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "link". Not case sensitive.
- format
- ExternalLink: creates a link to a URL external to the Web Content Manager system.
- ManagedContent: creates a link to another Web Content Manager item.
- ExistingLink: creates a link to a pre-existing link component
- value
- The value of this sub-element depends on what was specified in the "format" sub-element:
- ExternalLink: a URL.
- ManagedContent: the GUID of an existing Web Content Manager item.
- ExistingLink: the GUID of an existing link component.
Optional sub-elements
- linkText
- This sub-element allows the feed producer to specify what will be rendered between the <a href=""> and </a> portions of the anchor tag. Possible values include:
- a plain text string
- a string of HTML markup that is either entity-encoded or enclosed in a CDATA tag
- the GUID of a feed entry that describes an image component
A required type attribute indicates which of the previous value types to use. It can be set to "text", "html", or "imageGuid".
If the linkText sub-element is not included in the feed, the link text default to the value set in either "ExternalLink", "ManagedContent" or "ExistingLink".
- linkDescription
- This sub-element provides a mechanism to specify a description for the link element. If this sub-element is not present, the description on the link element will default to the value of the description of the site area or content item.
- linkTarget
- The sub-element is used to set the target browser window where the link will be displayed when it is clicked. Allowable values are: "none", "_blank", "_top", "_self", "_parent", and "{NEW_WINDOW_NAME}". If this element is not present in the feed the link target will default to "none" meaning that the link will open in the same browser window as the page containing it.
- queryString
- If present, the value of this sub-element will be appended to the generated HREF of the link. Should be encapsulated in a CDATA tag to prevent parsing problems.
- additionalAttributes
- The value of this sub-element will be inserted into the <a> tag as additional HTML attributes.
- allowClear
- This sub-element controls whether the value in the link element can be deleted. It should be set to either "true" or "false". It defaults to "true" if this element is not present in the feed.
- Simple Link to external URL for IBM.com
<ibmwcm:element name="Link"> <ibmwcm:type>link</ibmwcm:type> <ibmwcm:value>http://www.ibm.com</ibmwcm:value> <ibmwcm:format>ExternalLink</ibmwcm:format> <ibmwcm:linkText type="text">IBM</ibmwcm:linkText> </ibmwcm:element>
- Expanded link to external URL for IBM.com
<ibmwcm:element name="Link"> <ibmwcm:type>link</ibmwcm:type> <ibmwcm:value>http://www.ibm.com/search</ibmwcm:value> <ibmwcm:format>ExternalLink</ibmwcm:format> <ibmwcm:linkText type="text">RSS Feed Format Resources</ibmwcm:linkText> <ibmwcm:linkDescription>Search for RSS Feed Format</ibmwcm:linkDescription> <ibmwcm:queryString><![CDATA[?q=rss+feed+format]]></ibmwcm:queryString> <ibmwcm:linkTarget>_blank</ibmwcm:linkTarget> <ibmwcm:additionalAttributes>class="extLink"</ibmwcm:additionalAttributes> </ibmwcm:element>
- Simple link to a file resource component
<ibmwcm:element name="Link"> <ibmwcm:type>link</ibmwcm:type> <ibmwcm:value>63000001</ibmwcm:value> <ibmwcm:format>ManagedContent</ibmwcm:format> <ibmwcm:linkText type="imageGuid">290df293e20a</ibmwcm:linkText> <ibmwcm:allowClear>true</ibmwcm:allowClear> </ibmwcm:element>
- Simple Link to another content item
<ibmwcm:element name="Link"> <ibmwcm:type>link</ibmwcm:type> <ibmwcm:value>80220102</ibmwcm:value> <ibmwcm:format>ManagedContent</ibmwcm:format> <ibmwcm:linkText type="html"><![CDATA[<b>Marketing Plan</b>]]></ibmwcm:linkText> </ibmwcm:element>
Number element
Element parameters: Details for this element: Applies to item types Number components, site areas and content items Required for item types Number components. Allowable Values A numeric value to be stored in a number element. Required Attributes
- name
- The value of this attribute should match the name of an existing number element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "number". This value is not case sensitive.
- value
- A numeric value to be stored in a number element.
Optional sub-elements
- format
- This allows the feed producer to specify the format for the number element. For example, if a value of "integer" is specified, then only data in the format of whole numbers will be imported.
Example:
<ibmwcm:element name="FileSize"> <ibmwcm:type>number</ibmwcm:type> <ibmwcm:value>34082</ibmwcm:value> <ibmwcm:format>integer</ibmwcm:format> </ibmwcm:element>
Option selection element
Element parameters: Details for this element: Applies to item types Site areas and content items Required for item types None Allowable Values This component contains a list of values that will be set as the selected options in an option selection element. Required Attributes
- name
- The value of this attribute should match the name of an existing option selection element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "option". This value is not case sensitive.
Optional sub-elements
- optionType
- This is used to define the type of option selection element.
- Specify user when referencing from a list of user defined options.
- Specify taxonomy when referencing options from an existing taxonomy.
We can only specify one option type per option selection element. If no option type is defined, "user" will be used by default.
- selectedCategory
- This is used with the option type of "taxonomy" and is used to specify the path to a category to use in the option selection element. We can use as many selectedCategory elements as you require.
If the taxonomy exists in a different library from the option selection element, we can also specify the library name. For example:
<ibmwcm:selectedCategory library="shared"> Days/Monday</ibmwcm:selectedCategory>You must specify the name of each category and taxonomy to reference. If they do not exist, they will be created when the feed is processed.
- selectedOption
- This is used with the option type of "user" and is used to specify a list of user defined options. We can use as many selectedOption elements as you require.
- Example 1:
- Select a single category where the category is in the same library as the item. In this example "Days" is the name of a taxonomy and "Monday" is the name of a category.
<ibmwcm:element name="DayOfTheWeek"> <ibmwcm:type>option</ibmwcm:type > <ibmwcm:optionType>taxonomy</ibmwcm:optionType> <ibmwcm:selectedCategory>Days/Monday</ibmwcm:selectedCategory> < /ibmwcm:element>
- Example 2:
- Select multiple categories where the categories are in the same library as the item.
<ibmwcm:element name="DayOfTheWeek"> <ibmwcm:type>option</ibmwcm:type > <ibmwcm:optionType>taxonomy</ibmwcm:optionType> <ibmwcm:selectedCategory>Days/Monday</ibmwcm:selectedCategory> <ibmwcm:selectedCategory>Days/Tuesday</ibmwcm:selectedCategory> < ;/ibmwcm:element>
- Example 3:
- Select a single category where the category is in a different library to the item.
<ibmwcm:element name="DayOfTheWeek"> <ibmwcm:type>option</ibmwcm:type > <ibmwcm:optionType>taxonomy</ibmwcm:optionType> <ibmwcm:selectedCategory library="shared">Days/Monday</ibmwcm:selectedCategory> </ibmwcm:element>
- Example 4:
- Select a user defined option. In this example "False" is an option defined by a user on the Authoring Template for an item.
<ibmwcm:element name="Enable"> <ibmwcm:type>option</ibmwcm:type > <ibmwcm:optionType>user</ibmwcm:optionType> <ibmwcm:selectedOption>False</ibmwcm:selectedOption> </ibmwcm:element>
Component reference element
Element parameters: Details for this element: Applies to item types Site areas and content items Required for item types None Allowable Values This component contains the GUID of a component. Required Attributes
- name
- The value of this attribute should match the name of an existing component reference element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "reference". This value is not case sensitive.
- value
- This component contains the GUID of a component.
Optional sub-elements None
Example:
<ibmwcm:element name="Footer"> <ibmwcm:type>reference</ibmwcm:type> <ibmwcm:value>29bc2daf3289</ibmwcm:value> </ibmwcm:element>
User selection element
Element parameters: Details for this element: Applies to item types User selection components, site areas and content items Required for item types User selection components. Allowable Values A list of names of users to be selected in a user selection element. Required Attributes
- name
- The value of this attribute should match the name of an existing user selection element in a site area or content item.
Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "userSelect". This value is not case sensitive.
- value
- The value of this sub-element should be a comma-separated list of user names. When processed the Web Content Integrator will attempt to resolve each name to a valid portal user. If a name cannot be resolved it will be skipped.
Optional sub-elements None
Example:
<ibmwcm:element name="Users"> <ibmwcm:type>userSelect</ibmwcm:type> <ibmwcm:value>wpsadmin,John Smith</ibmwcm:value> </ibmwcm:element>
Style sheet element
Element parameters: Details for this element: Applies to item types Style sheet components Required for item types Style sheet components Allowable Values A URL that points to a CSS file which will be uploaded into a style sheet component. Required Attributes None Optional Attributes None Required sub-elements
- type
- The value of this sub-element must be "styleSheet". This value is not case sensitive.
- source
- A URL that points to a CSS file which will be uploaded into the style sheet component.
Optional sub-elements
- format
- This sub-element is used to specify the type of the style sheet. Valid options are: "preferred", "alternate", and "persistent". If this sub-element is not present in the feed, or if any value other than the previous values is specified, the type will default to "preferred".
- mediaType
- This sub-element specifies the media type of the style sheet. Valid values are: "all", "aural", "braille", "handheld", "print", "projection", "screen", "tty", "tv", and "unspecified". If the mediaType sub-element is not present in the feed, or if any value other than the previous values is specified, the media type will default to "unspecified".
- cssTitle
- The value of this sub-element should be a string which will be set as the value of the title attribute when the link to the CSS file is rendered.
Example:
<ibmwcm:element name="cssFile"> <ibmwcm:type>styleSheet</ibmwcm:type> <ibmwcm:source>http://www.yourco.com/styles/news.css</ibmwcm:source> <ibmwcm:format>alternate</ibmwcm:format> <ibmwcm:mediaType>print</ibmwcm:mediaType> </ibmwcm:element>