How is encoded the carriage return ?

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

How is encoded the carriage return ?

ricetrac

Hello,

 

In my form I have a textarea in which I input text with carriage returns.

I store these data in a database eXist. When I recovers data from the database (via a web service), and I re-display in my form, I have my carriage returns. But when I log this data via a debug in my XPL file, there is no carriage return, and when I serialize the XML data stream into an xml file, I also lost the newlines.

They are not also in the xforms-inspector.

 

 

So, my question, how is encoded carriage return?

 

Thank You.

 

Julien.


Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: How is encoded the carriage return ?

pappleby
Out of Office AutoReply: How is encoded the carriage return ?

I am out of the office until 26th July

***********************************************************************************************

This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.

 

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

 

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.

***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG

 

Reply | Threaded
Open this post in threaded view
|

Re: How is encoded the carriage return ?

Alessandro  Vernet
Administrator
In reply to this post by ricetrac
Julien,

In general, a carriage return is encoded as the "carriage return"
character, i.e. 
 if you were to write it in XML. You don't see
carriage returns in the XPL log because the XML is reformatted before
being logged, but the carriage return isn't lost. However, when you
serialize the data into a file, the carriage return should be kept.
How are you doing the serialization?

Alex

On Thu, Jul 22, 2010 at 9:33 AM, Bittard, Julien
<[hidden email]> wrote:

>
> Hello,
>
>
>
> In my form I have a textarea in which I input text with carriage returns.
>
> I store these data in a database eXist. When I recovers data from the database (via a web service), and I re-display in my form, I have my carriage returns. But when I log this data via a debug in my XPL file, there is no carriage return, and when I serialize the XML data stream into an xml file, I also lost the newlines.
>
> They are not also in the xforms-inspector.
>
>
>
>
>
> So, my question, how is encoded carriage return?
>
>
>
> Thank You.
>
>
>
> Julien.
>
> Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: How is encoded the carriage return ?

pappleby
Out of Office AutoReply: How is encoded the carriage return ?

I am out of the office until 26th July

***********************************************************************************************

This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.

 

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

 

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.

***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG

 

Reply | Threaded
Open this post in threaded view
|

RE: Re: How is encoded the carriage return ?

ricetrac
In reply to this post by Alessandro Vernet
Hello,

I call first the oxf:xml-converter  processor :
<p:processor name="oxf:xml-converter">
        <p:input name="config">
                <config>
                        <content-type>application/xml</content-type>
                        <encoding>iso-8859-15</encoding>
                        <version>1.0</version>
                </config>
        </p:input>
        <p:input name="data" href="aggregate('form', #instanceTraite#xpointer(/form/donneesDemande/Demande), #instanceTraite#xpointer(/form/donneesDemande/tiers))" debug="minaxx"/>
        <p:output name="data" id="donnees-xml"/>
</p:processor>

After, I construct the config of file-serializer processor with a xslt processor, and I call the file-serializer processor.
When I open the file xml result, there isn't carriage return character.


Thank you.


-----Message d'origine-----
De : Alessandro Vernet [mailto:[hidden email]]
Envoyé : vendredi 23 juillet 2010 01:40
À : ops-users
Objet : [ops-users] Re: How is encoded the carriage return ?

Julien,

In general, a carriage return is encoded as the "carriage return"
character, i.e. &#xA; if you were to write it in XML. You don't see carriage returns in the XPL log because the XML is reformatted before being logged, but the carriage return isn't lost. However, when you serialize the data into a file, the carriage return should be kept.
How are you doing the serialization?

Alex

On Thu, Jul 22, 2010 at 9:33 AM, Bittard, Julien <[hidden email]> wrote:

>
> Hello,
>
>
>
> In my form I have a textarea in which I input text with carriage returns.
>
> I store these data in a database eXist. When I recovers data from the database (via a web service), and I re-display in my form, I have my carriage returns. But when I log this data via a debug in my XPL file, there is no carriage return, and when I serialize the XML data stream into an xml file, I also lost the newlines.
>
> They are not also in the xforms-inspector.
>
>
>
>
>
> So, my question, how is encoded carriage return?
>
>
>
> Thank You.
>
>
>
> Julien.
>
> Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

--
Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet

Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: How is encoded the carriage return ?

Alessandro  Vernet
Administrator
Julien,

I am wondering if this comes from a bug in the aggregate(), which uses
Dom4j and an XPath 1.0 engine. Instead of building the input to the
XML converter this way, could you try doing it with XSLT (i.e. another
XSLT processor your run before the XML converter)?

Alex

On Mon, Jul 26, 2010 at 1:01 AM, Bittard, Julien
<[hidden email]> wrote:

> Hello,
>
> I call first the oxf:xml-converter  processor :
> <p:processor name="oxf:xml-converter">
>        <p:input name="config">
>                <config>
>                        <content-type>application/xml</content-type>
>                        <encoding>iso-8859-15</encoding>
>                        <version>1.0</version>
>                </config>
>        </p:input>
>        <p:input name="data" href="aggregate('form', #instanceTraite#xpointer(/form/donneesDemande/Demande), #instanceTraite#xpointer(/form/donneesDemande/tiers))" debug="minaxx"/>
>        <p:output name="data" id="donnees-xml"/>
> </p:processor>
>
> After, I construct the config of file-serializer processor with a xslt processor, and I call the file-serializer processor.
> When I open the file xml result, there isn't carriage return character.
>
>
> Thank you.
>
>
> -----Message d'origine-----
> De : Alessandro Vernet [mailto:[hidden email]]
> Envoyé : vendredi 23 juillet 2010 01:40
> À : ops-users
> Objet : [ops-users] Re: How is encoded the carriage return ?
>
> Julien,
>
> In general, a carriage return is encoded as the "carriage return"
> character, i.e. &#xA; if you were to write it in XML. You don't see carriage returns in the XPL log because the XML is reformatted before being logged, but the carriage return isn't lost. However, when you serialize the data into a file, the carriage return should be kept.
> How are you doing the serialization?
>
> Alex
>
> On Thu, Jul 22, 2010 at 9:33 AM, Bittard, Julien <[hidden email]> wrote:
>>
>> Hello,
>>
>>
>>
>> In my form I have a textarea in which I input text with carriage returns.
>>
>> I store these data in a database eXist. When I recovers data from the database (via a web service), and I re-display in my form, I have my carriage returns. But when I log this data via a debug in my XPL file, there is no carriage return, and when I serialize the XML data stream into an xml file, I also lost the newlines.
>>
>> They are not also in the xforms-inspector.
>>
>>
>>
>>
>>
>> So, my question, how is encoded carriage return?
>>
>>
>>
>> Thank You.
>>
>>
>>
>> Julien.
>>
>> Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
> Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.
>
>
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: How is encoded the carriage return ?

ricetrac
Yes, it's good : the carriage return are kept now in the xml file, when I use an xslt processor instead the aggregate method to build my xml stream.

Thank You.

Julien.

-----Message d'origine-----
De : Alessandro Vernet [mailto:[hidden email]]
Envoyé : mardi 27 juillet 2010 02:54
À : ops-users
Objet : [ops-users] Re: RE: Re: How is encoded the carriage return ?

Julien,

I am wondering if this comes from a bug in the aggregate(), which uses Dom4j and an XPath 1.0 engine. Instead of building the input to the XML converter this way, could you try doing it with XSLT (i.e. another XSLT processor your run before the XML converter)?

Alex

On Mon, Jul 26, 2010 at 1:01 AM, Bittard, Julien <[hidden email]> wrote:

> Hello,
>
> I call first the oxf:xml-converter  processor :
> <p:processor name="oxf:xml-converter">
>        <p:input name="config">
>                <config>
>                        <content-type>application/xml</content-type>
>                        <encoding>iso-8859-15</encoding>
>                        <version>1.0</version>
>                </config>
>        </p:input>
>        <p:input name="data" href="aggregate('form',
> #instanceTraite#xpointer(/form/donneesDemande/Demande),
> #instanceTraite#xpointer(/form/donneesDemande/tiers))"
> debug="minaxx"/>
>        <p:output name="data" id="donnees-xml"/> </p:processor>
>
> After, I construct the config of file-serializer processor with a xslt processor, and I call the file-serializer processor.
> When I open the file xml result, there isn't carriage return character.
>
>
> Thank you.
>
>
> -----Message d'origine-----
> De : Alessandro Vernet [mailto:[hidden email]] Envoyé : vendredi
> 23 juillet 2010 01:40 À : ops-users Objet : [ops-users] Re: How is
> encoded the carriage return ?
>
> Julien,
>
> In general, a carriage return is encoded as the "carriage return"
> character, i.e. &#xA; if you were to write it in XML. You don't see carriage returns in the XPL log because the XML is reformatted before being logged, but the carriage return isn't lost. However, when you serialize the data into a file, the carriage return should be kept.
> How are you doing the serialization?
>
> Alex
>
> On Thu, Jul 22, 2010 at 9:33 AM, Bittard, Julien <[hidden email]> wrote:
>>
>> Hello,
>>
>>
>>
>> In my form I have a textarea in which I input text with carriage returns.
>>
>> I store these data in a database eXist. When I recovers data from the database (via a web service), and I re-display in my form, I have my carriage returns. But when I log this data via a debug in my XPL file, there is no carriage return, and when I serialize the XML data stream into an xml file, I also lost the newlines.
>>
>> They are not also in the xforms-inspector.
>>
>>
>>
>>
>>
>> So, my question, how is encoded carriage return?
>>
>>
>>
>> Thank You.
>>
>>
>>
>> Julien.
>>
>> Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
> Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.
>
>
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet

Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: How is encoded the carriage return ?

Alessandro  Vernet
Administrator
Julien,

Excellent, thank you for confirming this. And even if more verbose,
this is likely to more efficient than the "old" Dom4j/Jaxen code used
by XPath expressions you put directly in the href="" attribute.

Alex

On Tuesday, July 27, 2010, Bittard, Julien <[hidden email]> wrote:

> Yes, it's good : the carriage return are kept now in the xml file, when I use an xslt processor instead the aggregate method to build my xml stream.
>
> Thank You.
>
> Julien.
>
> -----Message d'origine-----
> De : Alessandro Vernet [mailto:[hidden email]]
> Envoyé : mardi 27 juillet 2010 02:54
> À : ops-users
> Objet : [ops-users] Re: RE: Re: How is encoded the carriage return ?
>
> Julien,
>
> I am wondering if this comes from a bug in the aggregate(), which uses Dom4j and an XPath 1.0 engine. Instead of building the input to the XML converter this way, could you try doing it with XSLT (i.e. another XSLT processor your run before the XML converter)?
>
> Alex
>
> On Mon, Jul 26, 2010 at 1:01 AM, Bittard, Julien <[hidden email]> wrote:
>> Hello,
>>
>> I call first the oxf:xml-converter  processor :
>> <p:processor name="oxf:xml-converter">
>>        <p:input name="config">
>>                <config>
>>                        <content-type>application/xml</content-type>
>>                        <encoding>iso-8859-15</encoding>
>>                        <version>1.0</version>
>>                </config>
>>        </p:input>
>>        <p:input name="data" href="aggregate('form',
>> #instanceTraite#xpointer(/form/donneesDemande/Demande),
>> #instanceTraite#xpointer(/form/donneesDemande/tiers))"
>> debug="minaxx"/>
>>        <p:output name="data" id="donnees-xml"/> </p:processor>
>>
>> After, I construct the config of file-serializer processor with a xslt processor, and I call the file-serializer processor.
>> When I open the file xml result, there isn't carriage return character.
>>
>>
>> Thank you.
>>
>>
>> -----Message d'origine-----
>> De : Alessandro Vernet [mailto:[hidden email]] Envoyé : vendredi
>> 23 juillet 2010 01:40 À : ops-users Objet : [ops-users] Re: How is
>> encoded the carriage return ?
>>
>> Julien,
>>
>> In general, a carriage return is encoded as the "carriage return"
>> character, i.e. &#xA; if you were to write it in XML. You don't see carriage returns in the XPL log because the XML is reformatted before being logged, but the carriage return isn't lost. However, when you serialize the data into a file, the carriage return should be kept.
>> How are you doing the serialization?
>>
>> Alex
>>
>> On Thu, Jul 22, 2010 at 9:33 AM, Bittard, Julien <[hidden email]> wrote:
>>>
>>> Hello,
>>>
>>>
>>>
>>> In my form I have a textarea in which I input text with carriage returns.
>>>
>>> I store these data in a database eXist. When I recovers data from the database (via a web service), and I re-display in my form, I have my carriage returns. But when I log this data via a debug in my XPL file, there is no carriage return, and when I serialize the XML data stream into an xml file, I also lost the newlines.
>>>
>>> They are not also in the xforms-inspector.
>>>
>>>
>>>
>>>
>>>
>>> So, my question, how is encoded carriage return?
>>>
>>>
>>>
>>> Thank You.
>>>
>>>
>>>
>>> Julien.
>>>
>>> Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>>
>>
>> --
>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>>
>> Please help
--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet