A LinkDefinition is created using a Spring bean with the following attributes:
Attribute | Value | Description |
---|---|---|
id | User-defined | A unique ID for the bean. |
parent | xlink.rdf.linkDefinition.abstract | The parent bean. |
The LinkDefinition bean takes the following properties:
Property | Type | Mandatory | Description |
---|---|---|---|
role | String | Required | Used to categorize and filter the links in the Manage Links dialog. |
elements | Set <String> | Optional | List of elements that define the link. If the property is undefined, then the link can be defined by any element. The elements property must be defined if the attributes property is not. |
attributes | Set <String> | Optional | List of attributes (if any) that define the link. The attributes property must be defined if the elements property is not. |
attributeMappings | Map <String,QName> | Optional | Defines how the link element attributes (all attributes on the matched link element) should be mapped to predicates. By default, the href attribute is mapped to the qname.xlink.href predicate. One of the attributes must be mapped to the qname.xlink.href predicate in order for the link to be validated. Use a fully-qualified name with Clark notation as the key of the entry. |
<bean id="xhtml.linkDefinition.href" parent="xlink.rdf.linkDefinition.abstract"> <property name="role" value="hyperlink" /> <property name="attribute" value="href" /> <property name="attributeMappings"> <map> <entry key="href" value="{http://www.w3.org/1999/xlink}href" /> </map> </property> </bean>
To debug your LinkDefinition, add the following entry to your
log4j.properties
file:
log4j.logger.com.componize.xlink.rdf.pipeline.LinkDefinition=debug