The strange thing is the other parameters accept variables.
The category field is listed as a "logcategorylookup" which is of type string:
Code: Select all
<xs:element name="write_to_logbook">
<xs:annotation>
<xs:documentation>
Write an entry into the logbook
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attributeGroup ref="action" />
<xs:attribute name="category" type="logcategorylookup" use="required" />
<xs:simpleType name="logcategorylookup">
<xs:annotation>
<xs:documentation>
Logbook category
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="general" />
<xs:enumeration value="missions" />
<xs:enumeration value="news" />
<xs:enumeration value="upkeep" />
<xs:enumeration value="alerts" />
<xs:enumeration value="tips" />
</xs:restriction>
</xs:simpleType>
<param name="logbookCategory" default="upkeep" />
But this fails:
<write_to_logbook category="$logbookCategory"
<write_to_logbook category="'%s'.[$logbookCategory]"
and changing the param to include the single quotes also fails:
<param name="logbookCategory" default="'upkeep'" />
The only way I could get it to work is to use the literal string and supply variables for the remaining parameters:
<write_to_logbook category="upkeep" title="$logbookTitle" message="$logMsg" />