I've run into a problem that is somewhat annoying and is probably a 
common occurrence
for most users.  I changed my schema slightly so that one of the 
elements in my
existing documents would be invalid.  I opened the document in the 
editor and, of course,
it identified those elements as invalid.  What it didn't do is give me 
the correct
choices for which elements to insert.

For example, suppose I had an address element type which was very 
flexible and now
I've constrained the type to enforce at least a city and state.  So, if 
I had the
content

<address><city>Berkeley</city></address>

I now want the option when I select the city element to give me the 
valid sibling
choice of the 'state' element.

Unfortunately, as the document is invalid, every possible child of 
address is given.

Since I know the schema, I know which one to insert.  If I was the 
average author, this
might not be true.  Thus, the editor fails to help me "do the right 
thing".

I realize that the PSVI is totally useless when it comes to this kind 
of support as
once the element is invalid you lose type information for the children. 
  It would
seem that, within reason, the editor should make a "best-effort" to 
give the correct
options.  There is probably some kind of attrition point where the 
return is minimal or
the options available won't make anymore sense than what is currently 
implemented.

Basically, being able to handle partially valid documents is going to 
be a success
factor for content management.  For example, suppose you are a 
publisher and you
receive XML content from your authors.  You know, on a regular basis, 
you are going
to receive close-but-invalid content from your authors.  Refusal of the 
content isn't
always the best option.  At least you need to notify the author 
something like: "you
forgot the 'state' tag in your 'address' element."

Alex Milowski                FAX: (707) 598-7649                        
  alex at milowski.com

"The excellence of grammar as a guide is proportional to the paucity of 
the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics


Reply via email to