StackOverflow experiment for Orbeon Forms technical questions

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

StackOverflow experiment for Orbeon Forms technical questions

Erik Bruchez
Administrator
All,

We are planning to experiment with using StackOverflow
(http://stackoverflow.com/) to handle technical Orbeon Forms
questions.

If you don't know about StackOverflow yet: it's an amazing site for
technical questions and answers!

Reasons include:

* StackOverflow is easier to manage than a mailing-list for many
slightly-less technical users.
* The question/answer-oriented nature of the site is ideal to build a
knowledge base of Orbeon Forms questions.

So how to go about this?

* Post your question directly to StackOverflow, tag it with "xforms"
and we'll look at it. We don't have an "orbeon" tag yet but will have
one soon hopefully and at that point the "orbeon" tag can be used as
well.
* Optionally, post an email to ops-users with a link to the question
on StackOverflow so that users in ops-users are informed.

Of course ops-users remains available for questions and discussions
that are not appropiate for StackOverflow.

You can see the list of questions with the "xforms" tag with this link:

http://stackoverflow.com/questions/tagged/xforms

Once the "orbeon" tag is up, the following link will show the list of
"orbeon" questions:

http://stackoverflow.com/questions/tagged/xforms

So who asks the first question? ;) Here is a direct link to post a
question with the "xforms" tag:

http://stackoverflow.com/questions/ask?tags=xforms

-Erik


--
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
|

.xhtml files with UTF-8 encoding

Tambet Matiisen
  Hi everyone!

I wanted to share one problem I had with Orbeon and how I solved it. I
wanted to test Orbeon with simple .xhtml files first. To do that, I set
up a separate webapp as described here:
http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications

Then I dropped my .xhtml file into xforms-jsp directory and it seemed to
work OK, with one exception - the international characters didn't
display correctly, even tough I had correct XML header:
<?xml version="1.0" encoding="UTF-8"?>

I noticed, that if I add international characters into view.xhtml file
of any sample app, then it would work OK. But I didn't want to deal with
page flows etc.

Finally I tracked the problem down to
http://github.com/orbeon/orbeon-forms/blob/master/src/java/org/orbeon/oxf/servlet/OrbeonXFormsFilter.java

It seems, that when XForms is loaded from file system, the Content-Type
header only contains application/xhtml+xml and no encoding. And by
default encoding is assumed to be ISO-8859-1, regardless of what is in
XML header.

The solution was to alter Content-Type for .xhtml files (and in my case
also .xml files, as I keep texts in separate files) in Tomcat
configuration. I changed following lines in $CATALINA_HOME/conf/web.xml:

<mime-mapping>
<extension>xhtml</extension>
<mime-type>application/xhtml+xml; charset=UTF-8</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xml</extension>
<mime-type>application/xml; charset=UTF-8</mime-type>
</mime-mapping>

I would rather see, that encoding from XML header is preferred to
encoding from Content-Type header. And also default encoding for XML
files should be UTF-8.
http://www.opentag.com/xfaq_enc.htm#enc_default

Regards,
Tambet


--
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: .xhtml files with UTF-8 encoding

Erik Bruchez
Administrator
Tambet,

Thanks for sharing.

You say "when XForms is loaded from file system", but I am not sure
exactly when this happens?

-Erik

On Thu, Oct 7, 2010 at 12:22 AM, Tambet Matiisen
<[hidden email]> wrote:

>  Hi everyone!
>
> I wanted to share one problem I had with Orbeon and how I solved it. I
> wanted to test Orbeon with simple .xhtml files first. To do that, I set up a
> separate webapp as described here:
> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications
>
> Then I dropped my .xhtml file into xforms-jsp directory and it seemed to
> work OK, with one exception - the international characters didn't display
> correctly, even tough I had correct XML header:
> <?xml version="1.0" encoding="UTF-8"?>
>
> I noticed, that if I add international characters into view.xhtml file of
> any sample app, then it would work OK. But I didn't want to deal with page
> flows etc.
>
> Finally I tracked the problem down to
> http://github.com/orbeon/orbeon-forms/blob/master/src/java/org/orbeon/oxf/servlet/OrbeonXFormsFilter.java
>
> It seems, that when XForms is loaded from file system, the Content-Type
> header only contains application/xhtml+xml and no encoding. And by default
> encoding is assumed to be ISO-8859-1, regardless of what is in XML header.
>
> The solution was to alter Content-Type for .xhtml files (and in my case also
> .xml files, as I keep texts in separate files) in Tomcat configuration. I
> changed following lines in $CATALINA_HOME/conf/web.xml:
>
> <mime-mapping>
> <extension>xhtml</extension>
> <mime-type>application/xhtml+xml; charset=UTF-8</mime-type>
> </mime-mapping>
> <mime-mapping>
> <extension>xml</extension>
> <mime-type>application/xml; charset=UTF-8</mime-type>
> </mime-mapping>
>
> I would rather see, that encoding from XML header is preferred to encoding
> from Content-Type header. And also default encoding for XML files should be
> UTF-8.
> http://www.opentag.com/xfaq_enc.htm#enc_default
>
> Regards,
> Tambet
>
>
> --
> 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
>
>


--
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: .xhtml files with UTF-8 encoding

Tambet Matiisen
  On 8.10.2010 6:26, Erik Bruchez wrote:
> Tambet,
>
> Thanks for sharing.
>
> You say "when XForms is loaded from file system", but I am not sure
> exactly when this happens?
>
> -Erik

I mean when I use just .xhtml files, no JSP-s or servlets. Then Tomcat
reads those files directly and assigns Content-Type based on file
extension. The extension->Content-Type mapping can be altered in web.xml
file.

   Tambet



> On Thu, Oct 7, 2010 at 12:22 AM, Tambet Matiisen
> <[hidden email]>  wrote:
>>   Hi everyone!
>>
>> I wanted to share one problem I had with Orbeon and how I solved it. I
>> wanted to test Orbeon with simple .xhtml files first. To do that, I set up a
>> separate webapp as described here:
>> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-with-java-applications
>>
>> Then I dropped my .xhtml file into xforms-jsp directory and it seemed to
>> work OK, with one exception - the international characters didn't display
>> correctly, even tough I had correct XML header:
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> I noticed, that if I add international characters into view.xhtml file of
>> any sample app, then it would work OK. But I didn't want to deal with page
>> flows etc.
>>
>> Finally I tracked the problem down to
>> http://github.com/orbeon/orbeon-forms/blob/master/src/java/org/orbeon/oxf/servlet/OrbeonXFormsFilter.java
>>
>> It seems, that when XForms is loaded from file system, the Content-Type
>> header only contains application/xhtml+xml and no encoding. And by default
>> encoding is assumed to be ISO-8859-1, regardless of what is in XML header.
>>
>> The solution was to alter Content-Type for .xhtml files (and in my case also
>> .xml files, as I keep texts in separate files) in Tomcat configuration. I
>> changed following lines in $CATALINA_HOME/conf/web.xml:
>>
>> <mime-mapping>
>> <extension>xhtml</extension>
>> <mime-type>application/xhtml+xml; charset=UTF-8</mime-type>
>> </mime-mapping>
>> <mime-mapping>
>> <extension>xml</extension>
>> <mime-type>application/xml; charset=UTF-8</mime-type>
>> </mime-mapping>
>>
>> I would rather see, that encoding from XML header is preferred to encoding
>> from Content-Type header. And also default encoding for XML files should be
>> UTF-8.
>> http://www.opentag.com/xfaq_enc.htm#enc_default
>>
>> Regards,
>> Tambet
>>
>>
>> --
>> 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
>>
>>


--
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