Home Forums General XMetaL Discussion XMetaL annoyance: validation of mulitple instances of and IDREF to a missing ID Reply To: XMetaL annoyance: validation of mulitple instances of and IDREF to a missing ID

Derek Read

Reply to: XMetaL annoyance: validation of mulitple instances of and IDREF to a missing ID

I've thought about this a little bit more. You could perform an additional check and add additional messages to the Validation Log using script.

Another option would be to provide a form or toolbar (with scripts attached) that deals specifically with missing id values and perhaps guides the user with buttons to move to previous or next IDREF and/or ID, providing some means of copying a given IDREF value into an ID?

Or perhaps if you really want to go nuts a list of IDREF values on one side of a form (with some means to identify them, perhaps some portion of the PCDATA from their element), then a list of elements that don't have ID values but that should (if you can figure that out). I could then imagine a UI that would let you copy a value from the IDREF side to one of the items on the ID side, and perhaps vice-versa, then all of this would be set when the form is closed. What about elements that have an IDREF value that isn't set that should be? Or is that a real case?

Or keep reminding the user whenever they save that their document is invalid, but then we're sort of back to the fact that validation is turned off during save in your setup, so I guess this last one doesn't really help, except that you might provide a different nag screen that only shows missing IDs?

The requirements seem to be fairly unique: allow invalid documents to be saved, except that all IDREF attributes must have a matching ID — so that part of the validation must pass but anything else is let through.

Reply

Products
Downloads
Support