List-rendering profile metadata keys
Some item attribute and list property declarations support metadata that can be associated using corresponding metadata keys.
Use them in combination with ItemAttribute, AssociatedItemAttribute, ConstructedItemAttribute, ComputedItemAttribute, and Listproperty declarations listed under List-rendering profile keys. The following list describes the supported metadata key values:
Metadata key Description Type Whether the attribute value is of type String, Date, XML, or NodeList. [AttributeResource attributeName="" format=""]
String Written as plain text. Boolean Values returned as true or false. Date We can format values of type Date using the format tag... [AttributeResource attributeName="" format=""] tag
XML Written as serialized XML. NodeList Values of type NodeList are typically meant to be processed further during the computation of computed item attributes. The DDC plug-in can access the attribute value as an object of type org.w3c.dom.NodeList.
Example:
xyz.ItemAttribute.updated=./atom:updated
xyz.ItemAttribute.updated.Type=DateDefault Static default value to be returned if the appropriate value cannot be retrieved. Example: xyz.ItemAttribute.rating=./avgRating xyz.ItemAttribute.rating.default=0.5
Format Format 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'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 ComputedItemAttribute and ComputedListProperty. 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 the Depends metadata key. If the attribute depends on multiple other computed attributes, we can list multiple attribute names as a comma-separated list. Example: We defined computed attributes named link and proxiedLink. You want to verify the value for the link attribute is computed before the value for the proxiedLink attribute. In this case, specify as follows:
xyz.ItemAttribute.link={computed}
xyz.ItemAttribute.proxiedLink={computed}
xyz.ItemAttribute.proxiedLink.depends=linkWe 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 Define the escaping to have applied when writing the values of this attribute. Specify one of the values xml, json, javascript, or none. The default value is none. Shared Use in context of AssociatedItemAttribute declarations to define the cache scope for the associated XML document. If this document can be shared among multiple users, we can set this metadata to the value true. If the associated document can contain different data for different users, cache it per user. In this case, we can leave this metadata undefined or explicitly set it to false. Associated documents are cached in the com.ibm.workplace.wcm.pzn.plr.xml.DocumentCache. Associated documents that are cached in scope Shared are not automatically invalidated during user login.