* null.
*/
protected TextAssetReference getTextReferenceFromStyleValue(
Styles styles, final StyleProperty property) {
AssetResolver assetResolver = getExtractorContext().getAssetResolver();
StyleValue value = styles.getPropertyValues()
.getStyleValue(property);
TextAssetReference reference;
if (value == StyleKeywords.NONE) {
// No validation.
reference = null;
} else if (value instanceof StyleString) {
StyleString string = (StyleString) value;
reference = new LiteralTextAssetReference(string.getString());
} else if (value instanceof StyleComponentURI) {
StyleComponentURI uri = (StyleComponentURI) value;
reference = new DefaultComponentTextAssetReference(
(RuntimePolicyReference) assetResolver.evaluateExpression(
uri.getExpression()),
getMarinerPageContext().getAssetResolver());
} else {
throw new IllegalStateException(
"Unknown " +