Under Community Review

When parsing XML files, store the attribute name of the string for future reference

I have translatable strings stored in XML attributes (yes, I know this is not best practice). For example:

<BUTTON id="saveBTN" label="Save" tooltip="Save the page"/>

There is already a facility to store the element name of the string, but no means of storing the attribute name of the translatable string.

If an element contains 2 translatable attributes then it would be very usefull to know the context (attribute name) the string is stored in. 

There are 2 places i can think of where this could be stored for reference: the second one would appear to be less "disruptive" to existing parsers.

 

STORE THE INFORMATION IN THE STRING ID

Modify the "XML Data Element" dialog in the XML parser creation functionality. Add an extra check box saying: "Append attribute name to ID". This would only be relevant if the current data element was an attribute. If not this checkbox could be grayed out. 

An alternative modification on the same dialog would be to allow the user to decide the format of the ID column that appears in the translation list. E.g. 

ElementName, ElementName+ID, ID+ElementName, ElementName+ID+AttributeName, AttributeName+ID+ElementName etc

These masks could appear in a drop-down list.

 

STORE THE INFORMATION IN THE STRING PROPERTIES USING METADATA

Currently the metadata allows xpath statements evaluating to a node-set.

 

It would be useful if this could be changed to allow the storing of property/value pairs too! So I could use "attributeName=label"