XPath list-rendering profile metadata keys | HCL Digital Experience
Some item attribute and list property declarations support metadata that can be associated by using corresponding metadata keys.
You can use them in combination with ItemAttribute, AssociatedItemAttribute, ConstructedItemAttribute, ComputedItemAttribute, and Listproperty
declarations that are listed under List-rendering profile keys. The following
list describes the supported metadata key values:
- Type
- Use this metadata key to specify whether the attribute value is of type
String,Date,XML, orNodeList. You can format values of typeDatein flexible ways. You do so by using the format parameter of the[AttributeResource attributeName="" format=""]tag. Values of typeXMLare written as serialized XML. Values of typeNodeListare typically meant to be processed further during the computation of computed item attributes. The Digital Data Connector (DDC) for HCL Portal plug-in can access the attribute value as an object of typeorg.w3c.dom.NodeList.Example:
xyz.ItemAttribute.updated=./atom:updated xyz.ItemAttribute.updated.Type=Date - Default
- Use this metadata key to specify a static default value that you want to be returned
if the appropriate value cannot be retrieved. Example:
xyz.ItemAttribute.rating=./avgRating xyz.ItemAttribute.rating.default=0.5 - Format
- Use this metadata key to specify the format that you want to use to parse an XML
fragment into a date object. Example:
xyz.ItemAttribute.updated=./atom:updated xyz.ItemAttribute.updated.Type=Date xyz.ItemAttribute.updated.Format=yyyy-MM-dd'T'HH:mm:ss.SSS'Z' - FormatLocale
- This metadata key is available starting with HCL Digital Experience V 8.5
Cumulative Fix 02. Use this metadata key to specify the locale that you want to use
for parsing an XML fragment into a date object. Example:
If you do not specify this metadata, the localexyz.ItemAttribute.updated=./atom:updated xyz.ItemAttribute.updated.Type=Date xyz.ItemAttribute.updated.Format=yyyy-MM-dd'T'HH:mm:ss.SSS'Z' xyz.ItemAttribute.updated.FormatLocale=deenis used by default. You can change the system-wide default locale value by specifying a custom property namedddc.date.format.default.localein the portal Configuration Service. To do so, access the WebSphere® Integrated Solutions Console, select the WP Config Service resource environment provider, and set the property to the required locale. - Depends
-
To enforce a specific computation order for the non-lazy computed item attributes and list properties in the current profile, set this metadata on the
ComputedItemAttributeandComputedListProperty. Such a computation order can be required if specific computed attributes must access the value of other computed attributed values. In this case, the attribute that requires the value of another computed attributed must list the other attribute in theDependsmetadata key. If the attribute depends on multiple other computed attributes, you can list multiple attribute names as a comma-separated list. Example: You defined computed attributes namedlinkandproxiedLink. You want to make sure that the value for thelinkattribute is computed before the value for theproxiedLinkattribute. In this case, specify as follows:xyz.ItemAttribute.link={computed} xyz.ItemAttribute.proxiedLink={computed} xyz.ItemAttribute.proxiedLink.depends=linkNote: You do not have to flag dependencies on non-computed attributes. Non-computed attributes are always extracted from the XML before the computed attributes are resolved. - Escape
- Use this metadata to define the escaping that you want applied when you write the
values of this attribute. Specify one of the values
xml,json,javascript, ornone. The default value isnone. - Use this metadata in context of
AssociatedItemAttributedeclarations to define the cache scope for the associated XML document. If this document can be shared among multiple users, you can set this metadata to the valuetrue. If the associated document can contain different data for different users, cache it per user. In this case, you can leave this metadata undefined or explicitly set it tofalse.Note: Associated documents are cached in thecom.ibm.workplace.wcm.pzn.plr.xml.DocumentCache. Associated documents that are cached in scopeSharedare not automatically invalidated during user login. - Processors
-
Use this metadata on an
ItemAttribute,AssociatedItemAttribute,ConstructedItemAttribute, orComputedItemAttributeto specify one or multiple IDs of attribute value processor plug-ins that you want to run when the attribute value is retrieved. The ID specified must reference the unique ID of attribute value processor plug-ins that are deployed to your system. If you specify multiple IDs, separate them using a comma. Example:
For more information, read Creating and deploying custom attribute value processor plug-ins.xyz.ItemAttribute.updated=./atom:title xyz.ItemAttribute.updated.Processors=com.acme.TransformText