The values of static final fields are not generated.
A patch for this:
in xml2fo.xsl:
replace
<fo:inline font-weight="bold"><xsl:value-of
select="concat(' ', @name)" /></fo:inline>
</fo:block>
<!-- field comments -->
by
<fo:inline font-weight="bold"><xsl:value-of
select="concat(' ', @name)" /></fo:inline>
<xsl:if test="@value and @primitive = 'true' and @final
= 'true'">
<xsl:value-of select="concat(' = ', @value)" />
</xsl:if>
</fo:block>
<!-- field comments -->
and in XMLGenerator.java
add attribute and method:
private static String[] primitiveTypes =
{ "boolean", "char", "byte", "short", "int", "long", "float", "
double", "void"};
private static boolean isPrimitive(String type) {
int i = type.indexOf('[');
if (i>=0) {
type = type.substring
(0,i);
}
for (i = 0; i <
primitiveTypes.length; i++) {
if (primitiveTypes
[i].equals(type)) return true;
}
return false;
}
in method buildFieldList
replace
xmlTree.append(fieldDoc.isVolatile());
xmlTree.append("\" ");
by
xmlTree.append(fieldDoc.isVolatile());
xmlTree.append("\" value=\"");
xmlTree.append(fieldDoc.constantValueExpression());
xmlTree.append("\" primitive=\"");
xmlTree.append(isPrimitive(fieldDoc.type
().qualifiedTypeName()));
xmlTree.append("\" ");
(rian.wouters@philips.com)