Issue with mixed type content.

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with mixed type content.

akmishra
In XML,  there are element which are complex type.
Means contain mixed data.
e.g.
<title>some text /italic text/ some text again </title>

Text Control or any other control doesn't display output when it loads title
element while executing the xform page.

Please refer the xform file attached here. issue-with-mixed-content.xhtml
<http://discuss.orbeon.com/file/t375711/issue-with-mixed-content.xhtml>  

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

akmishra
Hi Alex,

Did you able to get the chance to check this.
In our content mostly fields are having mixed type of content.

"<title>some text /italic/ some other text</title>"

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

akmishra
In reply to this post by akmishra
Hi Alex,

Did you able to get the chance to check this.
In our content mostly fields are having mixed type of content.

<title>some text &lt;i&gt;italic&lt;/i&gt; some other text</title>

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

Alessandro  Vernet
Administrator
Hi AK,

This illustrates how HTML is stored by the Formatted Text Area (which uses
the TinyMCE), and consequently how you should store it you are populating
the XML data:

<http://discuss.orbeon.com/file/t119778/value.png>

This is inline with what is done for the `<xf:output mediatype="text/html">`
per the XForms specification. Does this make sense?

-Alex


-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

akmishra
Hi Alex,

Thanks for your suggestion.

If we go to this way than inline element will be stored as a text in the
database.

Like as given below.

<form xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
fr:data-format-version="4.0.0">
    <section-1>
        <control-1>some text &lt;i&gt;italic character&lt;/i&gt; again some
text here &lt;a&gt;dfsadf&lt;/a&gt;</control-1>
        <control-2>some text &lt;i&gt;italic character&lt;/i&gt; again some
text here &lt;a&gt;dfsadf&lt;/a&gt;</control-2>
        <control-3>some text &lt;i&gt;italic character&lt;/i&gt; again some
text here &lt;a&gt;dfsadf&lt;/a&gt;</control-3>
    </section-1>
</form>

The inline content structure need to be preserve.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

akmishra

Content will be stored as text as given below.

Please suggest.



--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

Alessandro  Vernet
Administrator
Hi AK,

Yes, the HTML needs to be serialized as stored as a text in the XML
document. Did your "Please suggest" signal  that you had a follow-up
question about this? If so, what is the question?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

akmishra
Hi Alex,


In our XML content, most of the fields (element) are of mixed type.
Means these element can have text and custom inline elements (i.e. user
defined elements).

As per your solution, This data needs to be desalinize and serialize first -
before displaying and storing the data.

Does this software provide any help for deserialize and serialize.





 

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

Alessandro  Vernet
Administrator
AK, are you saying that you have in your XML document something like this?

    <field>Some *important* message</field>

Where does that come from? Since Orbeon Forms wouldn't generate this, how
are you "feeding" this to Orbeon Forms?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

Alessandro  Vernet
Administrator
OK, let me try this again… that snippet was meant to be:
https://gist.github.com/avernet/d007a74911cdf9267b0ea2eefa5c43a8

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

akmishra
Hi Alex,

We receive content in XML format from external resources in archive format
(like zip format).
Than we store XML present in zip format to Marklogic database.

Our main motive is to create an interface like form, so that content editor
can do editing.

For this I am binding required field with input control and trying to
display the existing data present in that field. So that content editor can
see the existing data and make changes as if required. Than save it to
database using submit button (.. submission process).

This worked for those field which contain only text data and won't work if
field are of mixed type content.

So this is the way we are doing the things.

Now I hope this make sense to you.

Please let me know if you need anything else.

Thanks,
AK

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

Alessandro  Vernet
Administrator
Hi AK,

Thank you for the precisions. What are you using to have Orbeon Forms access
your data in MarkLogic? Do you have an implementation of the Orbeon Forms
persistence API for MarkLogic?

Also, I imagine you had to change the format of the XML documents in
MarkLogic so they would correspond to what Orbeon Forms expects, correct? If
that is the case, as part of that process, you could serialize the content
of the elements with HTML to be edited by a Formatted Text control, could
you?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with mixed type content.

Alessandro  Vernet
Administrator
Hi AK, have you worked how to serialize the HTML? If not, do you have answers
to the questions in my previous message? ‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet