Element templates specify content which is intended to be modified by the user and then saved to disk. We are pretty happy about our element templates, except that:
* The average user should be able to copy to the clipboard any element he/she has created and then declare it to XXE as a named element template. That is, this is a basic need and the user should not need to edit a configuration file for that. * Element templates could contain dynamic parts (? la PHP/JSP/ASP). The problem that you describe is a *pure GUI problem*: users are puzzled by XXE text placeholders. (We can easily understand this. This happened to us too! XMLmind XML Editor is a ``very late descendant'' of an SGML editor called Grif and before becoming XXE developers, a looong time ago, we were simple Grif users.) In our opinion, * Such user-friendly placeholders should be specified in the CSS. * They should vanish as soon as the user *clicks* (or ``tabs'') on them. * If after that, the user decides to leave the placeholder without typing anything, such user-friendly placeholders should reappear by magic. * Same behavior when the user deletes all the text he/she has typed. * Of course, these placeholders would not be part of the document and therefore, the informative text they contain would not be saved to disk. The main problem is that we currently don't see how this could be implemented. (The fact that user-friendly placeholders vanish simply because the user has clicked on them.) John L. Clark wrote: > I was working on developing element templates for my users and I was > struck by how it can be confusing to see a set of empty boxes in a newly > generated XML document or element. I thought that it might be useful to > allow configurations to specify template text for initially created new > elements. > > When a user creates a new document or element, temporary text could be > placed within the elements (which allow textual children) indicating the > type of information that should go in that element; this temporary text > could receive a special CSS instruction so that it could be styled > differently to look temporary (such as perhaps greyed out), and it would > never be saved along with the document (or, alternatively, that could be > at user discretion). It could be implemented with an XXE configuration > element such as: > > <cfg:elementTemplate name="date" selectable="override"> > <date> > <cfg:templateContent> > Date of publication here (in YYYY-MM-DD format) > </cfg:templateContent> > </date> > </cfg:elementTemplate> > > And then when the user creates a new date, it would be populated with > the text "Date of publication here (in YYYY-MM-DD format)" until the > user interacts with the text content (such as beginning to type), in > which case it would disappear. Certainly there are some implementation > issues, but I think this could be useful for making XML documents more > usable and understandable. > Manuel Collado wrote: > Perhaps the problem can be tackled differently, not requiring any new feature > of XXE. > > The template can be annotated with XML comments explaining how to fill it. > Two different stylesheets could be used to edit the file showing or not the > annotations. If appropriate, a command or external utility can be used to > strip off the annotations, once the template has been filled. Or even to > strip the annotations of just the already filled elements, and not of the > still empty ones. > > The main difference with the above proposal is that comments are certainly > editable. But perhaps this could be avoided by rendering comments as > generated content.

