This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Mozilla XML > October 2005 > Will Moz-Xform be able to support some form of deep copy?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Will Moz-Xform be able to support some form of deep copy?
|
|
| Adam FLinton 2005-10-18, 6:25 am |
| Dear All,
I am trying to write an Xforms app which allows a user to add & change
annotations written in XHTML where the annotation is contained within a
textarea
If I use a repeat e.g.:
<xf:repeat id="r2" style="" nodeset="mif:class/mif:attribute">
<tr>
<td>
<xf:output ref="@name">
</xf:output>
</td>
<td
style="width: 50%; text-align: left; vertical-align: top;">
<xf:textarea id="annotation" ref="mif:annotation/*" />
</td>
</tr>
</xf:repeat>
Then I just get the first bit of text etc but the moment it rus into an
xhtml element (e.g. <p> </p> then that's the end.
IF there is no scope for this in XForms now then there it will need to
be added unless you are expecting all the users of forms to use plain
text for writing in textareas.
At the moment if an annotation contains
"This is very <B>important<B/>"
They will only see "This is very".
It is not just doing XHTML editiing either. Imagine you have an SVG
tree/structure within a model. How do you simply pass the text between
<SVG> & </SVG> to a svg rendering tool with out having to use Javascript
to examine the actual model & do all the owrk (which rather destroys the
point of XForms).
i.e. any form of "multi format editor/form" will need it much like:
http://www.alphaworks.ibm.com/tech/cxde
So long as I can supply an external to XForms editor/viewer (JScript or
Object/plugin) with the relevant fragment as a string /deep copy then it
should be able to handle the display/editing of that fragement & pass it
back for storage in the model.
Adam
| |
| Allan Beaufour 2005-10-21, 7:21 am |
| Tuesday 18 October 2005 10:59 skrev Adam FLinton:
> I am trying to write an Xforms app which allows a user to add & change
> annotations written in XHTML where the annotation is contained within a
> textarea
Did you get a sufficient answer on www-forms?
btw, many of your problems can be solved with a "Mozilla solution" by doing
custom controls: http://developer.mozilla.org/en/doc...Custom_Controls
It would be nice to see an implementation for <xforms:textarea
appearence="richedit"/>. Should be doable. Any volunteers? :-)
--
Allan Beaufour
Linux Software Engineer
Novell, Inc.
Software for the Open Enterprise
www.novell.com/open
| |
| Adam FLinton 2005-10-21, 6:38 pm |
| Allan Beaufour wrote:
> Tuesday 18 October 2005 10:59 skrev Adam FLinton:
>
>
>
> Did you get a sufficient answer on www-forms?
>
> btw, many of your problems can be solved with a "Mozilla solution" by doing
> custom controls: http://developer.mozilla.org/en/doc...Custom_Controls
>
> It would be nice to see an implementation for <xforms:textarea
> appearence="richedit"/>. Should be doable. Any volunteers? :-)
>
<G>
At the moment I am having to back off & go for the tomcat running local
route as to edit the XHTML in the textarea (at present) I have to pass
it as HTML so as to allow the JScript editors to work.
i.e I am putting an "edit" button within each editable textarea which
contains the Xpath to the annotation & fires up a html popup window
which gets the annotation text from tomcat & then saving goes back
through tomcat to the xml.
Also in a converstation with David Landwehr he mentioned that :
"Repeats within repeats/within a table.
No this don't work and that is because IE will not allow for any other
tag under table than tr or thead. The xforms:repeat element is placed in
a wierd place in the DOM and that is the reason it is not working.
I have not been able to solve this scenario in a suitable way and simply
have to say that since xhtml does not allow for xforms:repeat under
table that the document must be regarded as invalid and therefore should
not work. That xforms:repeat cannot be under table is correct and
therefore you might in the future see that the functionality in firefox
removed.
I know this is a big problem and there is no real workaround for it. For
a full CSS 2 implementation one could have used CSS tables, but with IE
that isn't implement and therefore useless.
"
But he did pass me some javascript which deals with the extract & then
put back the contents of an element :
"In my plug-in you can get to the bound node for a control, get the xml
modify it and write it back on the node (you have to parse it also).
After you have done that for must do rebuild, recalculate, revalidate
and refresh on the model. "
I would prefer however that there was a specified method for this within
the XForms std bcause you need to be able to:
A) Extract the text
B) Be able to explicitly save the text as otherwise you're locked into a
battle between the editor try to edit & the plugin trying to keep track
of changes.
Adam
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|