Marc van Grootel wrote:
> 
> We have supplied XMLMind with a CSS stylesheet that renders most XML
> elements as text boxes. 

This is quite unusual. This defeats the whole purpose of using XMLmind
XML Editor.



> One of our developers found out that, inside
> text boxes, many standard XMLMind functionalities behave in an
> unexpected way. These are his findings:
> 
> ?       The text in the text boxes seems not to be consistent with the
> content of the underlying XML element. For instance, we found out that
> the XPath function string-length(.) returns an incorrect number (the
> number of characters before modification of the content of the text
> box). The number that is returned becomes correct as soon as the text
> box looses focus and is selected again.
> 
> ?       A text selection inside a text box is not recognized (as can be
> inferred from the contents of the $selectedChars variable). This causes
> the command convertCase not to work.
> 
> ?       Key bindings do not work inside text fields. Outside text
> fields, or in a different view (CSS), they do work.
> 
> ?       Context menus (right clicking) do not work inside text fields.
> As with key bindings, right clicking works well.
> 
> Before attempting a different configuration of XMLMind, we would like to
> be informed if these issues are known to you and, if so, how we can work
> around them or if there are updates planned that affect/change these
> behaviours.

XMLmind XML Editor has no known issues (which are our fault and thus,
which could be fixed by us) whatsoever.



> 
>  If you need as to provide sample material to reproduce our findings,
> please let us know.
> 

The behavior you describe is absolutely normal because the textarea
control is just a *foreign* *text* *editor* embedded in the styled
document view.

As such, this textarea control has its own key bindings, its own
selection and possibly its own right click menu.

The only interactions between such foreign text editor and XMLmind XML
Editor are:

* The textarea control is created and destroyed along with the element
it represents.

* The textarea control read and writes its data from/to XMLmind XML Editor.

* The textarea control is forced to write its data to  XMLmind XML
Editor when the editing context changes and also just before the
document is validated or saved. (This explains your string-length(.) issue.)

You need to change your CSS stylesheet in order to render your XML
elements using

display:block;

and *no* *replaced* *content* (that is, render your XML elements
normally), instead of using something like

content:text-area(columns,40,rows,5,wrap,word);

Reference:
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/text-area.html




Reply via email to