Reply to: Well-Formed Check In XMAXNovember 15, 2011 at 8:33 pm
There is an API for checking that XMAX is running in “well formed editing mode” but I don't think that is what you are looking for. Generally, for XMAX to open a file in that mode you must specifically tell it to do so when calling LoadFromString or LoadFromFile.
A document must be well-formed as a prerequisite for it to be valid, so doing an additional check to see that it is well-formed would not give you any further information.
I see that a processing instruction with a target of “1234” is being allowed by XMAX (ie: no validation error is added to the ValidationErrorList property). That is incorrect according to the XML Recommendation, which states that the target is supposed to be a “name” and names do not allow digits (0-9) as the first character (among many other restrictions). I assume that is what you are really getting at.
I will log a bug with development for this.
In the meantime you could do a specific scripting check to validate PI targets yourself. The simplest way to do that may be using a regular expression in JScript. Coming up with the right regular expression is likely the hard part. To obtain the value of a PI target you can use the API DOMProcessingInstruction.target.
If this is truly a show stopper for you and you need some kind of immediate solution, I could try to write such a script. Let me know.