Home Forums General XMetaL Discussion Attribute with empty string value Reply To: Attribute with empty string value

Derek Read

Reply to: Attribute with empty string value

This is a use case the Attribute Inspector does not support, or put another way, it has a feature that is breaking this (on purpose). When you set the value for any attribute to “” (empty string) the Attribute Inspector “helpfully” removes the attribute (entirely). This behaviur cannot be altered with any settings.

The reason this feature is in the product (implemented around 3.0) is due to client requests (actually many complaints).

Your particular case seems unique (no complaints that I recall and no official requests to implement an alternative). I could see us implementing some option but I think we'd need to have some serious demand for it.

Changing the Schema to be more “normal” (as you suggest) is one option but perhaps the best solution is to add a script to On_Before_Document_Save or On_Before_Document_Validate that adds the value for any elements that don't already have anything set. Then users only need concern themselves with setting the value if they need it to have a “real” string value.

Reply

Products
Downloads
Support