HTML character encoding

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

HTML character encoding

BitByter
Hi,

I'm using XForms within JSP/JSF pages with Orbeon Forms. Now my problem is
that Orbeon Forms seems to not allow the usage of specially encoded
characters like " ", "©" or those for the german umlauts
("ä", "ö" and "ü").

Whenever such an encoded character is used, Orbeon Forms complains "Fatal
error: The entity "ouml" was referenced, but not declared.".

And it seems it doesn't matter whether the character is used as element or
attribute value.

Wheres when those special characters are encoded numerically (e.g. "Ä"
instead of "Ä"), everything works fine.

Now my problem is, that I have to use JSP/JSF taglibs that produce such
specially encoded characters, thus I can't avoid them.

So I'd like to know if this is a bug in Orbeon Forms 3.5.1.200705030906, and
if there is a workaround for this problem.

Hope someone can help!

- bitbyter





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Joseph Lawrence
Hello Bitbyter,
          try declaring entities on top of your page as follows:
 
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#x00A0;">
]>
Thanks
Joseph Lawrence
Stabilix Solutions

BitByter <[hidden email]> wrote:
Hi,

I'm using XForms within JSP/JSF pages with Orbeon Forms. Now my problem is
that Orbeon Forms seems to not allow the usage of specially encoded
characters like " ", "©" or those for the german umlauts
("ä", "ö" and "ü").

Whenever such an encoded character is used, Orbeon Forms complains "Fatal
error: The entity "ouml" was referenced, but not declared.".

And it seems it doesn't matter whether the character is used as element or
attribute value.

Wheres when those special characters are encoded numerically (e.g. "Ä"
instead of "Ä"), everything works fine.

Now my problem is, that I have to use JSP/JSF taglibs that produce such
specially encoded characters, thus I can't avoid them.

So I'd like to know if this is a bug in Orbeon Forms 3.5.1.200705030906, and
if there is a workaround for this problem.

Hope someone can help!

- bitbyter




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[2]: HTML character encoding

BitByter
Hello Joseph,

Friday, May 11, 2007, 11:10:38 AM, you wrote:

> Hello Bitbyter,
>             try declaring entities on top of your page as follows:
>    
>   <!DOCTYPE xsl:stylesheet [
> <!ENTITY nbsp "&#x00A0;">

I'll give that a try. But is this a bug in Orbeon Forms?

Currently Orbeon Forms is complaining "Fatal error: The element type "br"
must be terminated by the matching end-tag "</br>"." But I can't find a <br>
tag in my document. Thus I'd like to know if it is possible to log/dump the
complete  XML document that is being parsed by Orbeon Forms? That would be a
great help!  :)

- bitbyter





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Hank Ratzesberger
In reply to this post by BitByter

One option is to specify a document type to pick up
the entity references. e.g.:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

--Hank

Quoting BitByter <[hidden email]>:

> Hi,
>
> I'm using XForms within JSP/JSF pages with Orbeon Forms. Now my problem is
> that Orbeon Forms seems to not allow the usage of specially encoded
> characters like "&nbsp;", "&copy;" or those for the german umlauts
> ("&auml;", "&ouml;" and "&uuml;").
>
> Whenever such an encoded character is used, Orbeon Forms complains "Fatal
> error: The entity "ouml" was referenced, but not declared.".
>
> And it seems it doesn't matter whether the character is used as element or
> attribute value.
>
> Wheres when those special characters are encoded numerically (e.g. "&#196;"
> instead of "&Auml;"), everything works fine.
>
> Now my problem is, that I have to use JSP/JSF taglibs that produce such
> specially encoded characters, thus I can't avoid them.
>
> So I'd like to know if this is a bug in Orbeon Forms 3.5.1.200705030906, and
> if there is a workaround for this problem.
>
> Hope someone can help!
>
> - bitbyter
>
>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Erik Bruchez
Administrator
In reply to this post by BitByter
BitByter wrote:

> Hello Joseph,
>
> Friday, May 11, 2007, 11:10:38 AM, you wrote:
>
>> Hello Bitbyter,
>>             try declaring entities on top of your page as follows:
>>    
>>   <!DOCTYPE xsl:stylesheet [
>> <!ENTITY nbsp "&#x00A0;">
>
> I'll give that a try. But is this a bug in Orbeon Forms?
XML itself does not support HTML entities except &quot;, &lt; and &gt;.
Orbeon Forms reads your document as XML so does not have any other HTML
entities available.

Now you raise a good point, which is that if you do specify an XHTML
DOCTYPE, Orbeon Forms should ideally load the DTD and the associated
entities. But this is not done at present.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Hank Ratzesberger

I just tested this, and at least this docytpe is
working for me.  I edited the standard epilogue to
only use the "plain" style.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I tried &quot; &acute; and &cent; and &copy;

--Hank



----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Friday, May 11, 2007 8:22 AM
Subject: Re: [ops-users] HTML character encoding


> BitByter wrote:
>> Hello Joseph,
>>
>> Friday, May 11, 2007, 11:10:38 AM, you wrote:
>>
>>> Hello Bitbyter,
>>>             try declaring entities on top of your page as follows:
>>>    
>>>   <!DOCTYPE xsl:stylesheet [
>>> <!ENTITY nbsp "&#x00A0;">
>>
>> I'll give that a try. But is this a bug in Orbeon Forms?
>
> XML itself does not support HTML entities except &quot;, &lt; and &gt;.
> Orbeon Forms reads your document as XML so does not have any other HTML
> entities available.
>
> Now you raise a good point, which is that if you do specify an XHTML
> DOCTYPE, Orbeon Forms should ideally load the DTD and the associated
> entities. But this is not done at present.
>
> -Erik
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Alessandro Vernet
Administrator
On 5/11/07, Hank Ratzesberger <[hidden email]> wrote:
>
> I just tested this, and at least this docytpe is
> working for me.  I edited the standard epilogue to
> only use the "plain" style.
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> I tried &quot; &acute; and &cent; and &copy;

This is a nice trick. Maybe we should consider adding this to the
standard epilogue. Erik, any opinion on this?

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Erik Bruchez
Administrator
In reply to this post by Hank Ratzesberger
Ah, then that's good news if it works out of the box!

Bitbyter, did you try the XHTML doctype?

-Erik

Hank Ratzesberger wrote:

>
> I just tested this, and at least this docytpe is working for me.  I
> edited the standard epilogue to only use the "plain" style.
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> I tried &quot; &acute; and &cent; and &copy;
>
> --Hank
>
>
>
> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
> To: <[hidden email]>
> Sent: Friday, May 11, 2007 8:22 AM
> Subject: Re: [ops-users] HTML character encoding
>
>
>> BitByter wrote:
>>> Hello Joseph,
>>>
>>> Friday, May 11, 2007, 11:10:38 AM, you wrote:
>>>
>>>> Hello Bitbyter,
>>>>             try declaring entities on top of your page as follows:
>>>>      <!DOCTYPE xsl:stylesheet [
>>>> <!ENTITY nbsp "&#x00A0;">
>>>
>>> I'll give that a try. But is this a bug in Orbeon Forms?
>>
>> XML itself does not support HTML entities except &quot;, &lt; and
>> &gt;. Orbeon Forms reads your document as XML so does not have any
>> other HTML entities available.
>>
>> Now you raise a good point, which is that if you do specify an XHTML
>> DOCTYPE, Orbeon Forms should ideally load the DTD and the associated
>> entities. But this is not done at present.
>>
>> -Erik
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>
>>
>> --
>> 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
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Erik Bruchez
Administrator
In reply to this post by Alessandro Vernet
Alessandro Vernet wrote:

> On 5/11/07, Hank Ratzesberger <[hidden email]> wrote:
>>
>> I just tested this, and at least this docytpe is
>> working for me.  I edited the standard epilogue to
>> only use the "plain" style.
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>
>> I tried &quot; &acute; and &cent; and &copy;
>
> This is a nice trick. Maybe we should consider adding this to the
> standard epilogue. Erik, any opinion on this?
Hank, where do you put the DOCTYPE, and where do you use the entities?
In the view or in the epilogue?

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Hank Ratzesberger

I put the doctype at the top of an xhtml view view.  
It was a template created in Dreamweaver which some
people use around here.

The views have the xsl="2.0" attribute.  I don't
recall ever having a problem using xslt.

The attaches is the home page to :

http://nees.ucsb.edu/

It has the &copy; entitity, e.g.

There's no xforms on this page, I can send an
example of that if you wish, but basically,
I haven't had a problem with entities using
this format.  But I've only used the 'theme-plain'
in the epilogue.

Cheers,
Hank

<!-- home page -->
<page path-info="/"
view="oxf:/index.xhtml"
model="oxf:/default.xpl" />



----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Friday, May 11, 2007 12:19 PM
Subject: Re: [ops-users] HTML character encoding


> Alessandro Vernet wrote:
>> On 5/11/07, Hank Ratzesberger <[hidden email]> wrote:
>>>
>>> I just tested this, and at least this docytpe is
>>> working for me.  I edited the standard epilogue to
>>> only use the "plain" style.
>>>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>>
>>> I tried &quot; &acute; and &cent; and &copy;
>>
>> This is a nice trick. Maybe we should consider adding this to the
>> standard epilogue. Erik, any opinion on this?
>
> Hank, where do you put the DOCTYPE, and where do you use the entities?
> In the view or in the epilogue?
>
> -Erik
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>


>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

default.xpl (820 bytes) Download Attachment
index.xhtml (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Alessandro Vernet
Administrator
On 5/11/07, Hank Ratzesberger <[hidden email]> wrote:
> I put the doctype at the top of an xhtml view view.

Yes, makes sense. The "entity not declared" exception is thrown by
Xerces when it parses the XML file, so adding something to the
epilogue won't solve the problem. This needs to be added to the file
where the HTML entity is used.

But this is still a nice trick. Better than just declaring the
entities we need. FAQ-worthy.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[2]: HTML character encoding

BitByter
In reply to this post by Erik Bruchez
Hi Erik,

no I haven't tried that yet. I'll try it out as soon as I get the current
"Fatal error: The element type "br" must be terminated by the matching
end-tag "</br>"." fixed. It's not that easy as a lot of the (X)HTML is being
generated by some taglibs or file includes. Thus I'm missing a possibility
to dump/log the complete XML file that is being parsed by Orbeon Forms. Is
there a way to do this? It would be a great help! Maybe something like the
"instance inspector"?

- bitbyter



Friday, May 11, 2007, 8:15:08 PM, you wrote:

> Ah, then that's good news if it works out of the box!

> Bitbyter, did you try the XHTML doctype?

> -Erik

> Hank Ratzesberger wrote:
>>
>> I just tested this, and at least this docytpe is working for me.  I
>> edited the standard epilogue to only use the "plain" style.
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>
>> I tried &quot; &acute; and &cent; and &copy;
>>
>> --Hank
>>
>>
>>
>> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Friday, May 11, 2007 8:22 AM
>> Subject: Re: [ops-users] HTML character encoding
>>
>>
>>> BitByter wrote:
>>>> Hello Joseph,
>>>>
>>>> Friday, May 11, 2007, 11:10:38 AM, you wrote:
>>>>
>>>>> Hello Bitbyter,
>>>>>             try declaring entities on top of your page as follows:
>>>>>      <!DOCTYPE xsl:stylesheet [
>>>>> <!ENTITY nbsp "&#x00A0;">
>>>>
>>>> I'll give that a try. But is this a bug in Orbeon Forms?
>>>
>>> XML itself does not support HTML entities except &quot;, &lt; and
>>> &gt;. Orbeon Forms reads your document as XML so does not have any
>>> other HTML entities available.
>>>
>>> Now you raise a good point, which is that if you do specify an XHTML
>>> DOCTYPE, Orbeon Forms should ideally load the DTD and the associated
>>> entities. But this is not done at present.
>>>
>>> -Erik
>>>
>>> --
>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>>> http://www.orbeon.com/
>>>
>>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>>
>>
>>>
>>> --
>>> 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
>>> ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re[2]: HTML character encoding

BitByter
In reply to this post by Alessandro Vernet
Declaring the <DOCTYPE> as mentioned also works for me basically. If you
intend to write this to the FAQ, you also should mention that links/URLs
also need to be encoded, e.g. param1=value1&param2=value2 to
param1=value1&amp;param2=value2.

- bitbyter



Saturday, May 12, 2007, 8:17:09 PM, you wrote:

> On 5/11/07, Hank Ratzesberger <[hidden email]> wrote:
>> I put the doctype at the top of an xhtml view view.

> Yes, makes sense. The "entity not declared" exception is thrown by
> Xerces when it parses the XML file, so adding something to the
> epilogue won't solve the problem. This needs to be added to the file
> where the HTML entity is used.

> But this is still a nice trick. Better than just declaring the
> entities we need. FAQ-worthy.

> Alex






--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: HTML character encoding

Erik Bruchez
Administrator
In reply to this post by BitByter
Unfortunately, there is no possibility right now to dump all parsed
documents to the logs!

-Erik

BitByter wrote:

> Hi Erik,
>
> no I haven't tried that yet. I'll try it out as soon as I get the current
> "Fatal error: The element type "br" must be terminated by the matching
> end-tag "</br>"." fixed. It's not that easy as a lot of the (X)HTML is being
> generated by some taglibs or file includes. Thus I'm missing a possibility
> to dump/log the complete XML file that is being parsed by Orbeon Forms. Is
> there a way to do this? It would be a great help! Maybe something like the
> "instance inspector"?
>
> - bitbyter
>
>
>
> Friday, May 11, 2007, 8:15:08 PM, you wrote:
>
>> Ah, then that's good news if it works out of the box!
>
>> Bitbyter, did you try the XHTML doctype?
>
>> -Erik
>
>> Hank Ratzesberger wrote:
>>> I just tested this, and at least this docytpe is working for me.  I
>>> edited the standard epilogue to only use the "plain" style.
>>>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>>
>>> I tried &quot; &acute; and &cent; and &copy;
>>>
>>> --Hank
>>>
>>>
>>>
>>> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Friday, May 11, 2007 8:22 AM
>>> Subject: Re: [ops-users] HTML character encoding
>>>
>>>
>>>> BitByter wrote:
>>>>> Hello Joseph,
>>>>>
>>>>> Friday, May 11, 2007, 11:10:38 AM, you wrote:
>>>>>
>>>>>> Hello Bitbyter,
>>>>>>             try declaring entities on top of your page as follows:
>>>>>>      <!DOCTYPE xsl:stylesheet [
>>>>>> <!ENTITY nbsp "&#x00A0;">
>>>>> I'll give that a try. But is this a bug in Orbeon Forms?
>>>> XML itself does not support HTML entities except &quot;, &lt; and
>>>> &gt;. Orbeon Forms reads your document as XML so does not have any
>>>> other HTML entities available.
>>>>
>>>> Now you raise a good point, which is that if you do specify an XHTML
>>>> DOCTYPE, Orbeon Forms should ideally load the DTD and the associated
>>>> entities. But this is not done at present.
>>>>
>>>> -Erik
>>>>
>>>> --
>>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>>>> http://www.orbeon.com/
>>>>
>>>>
>>>
>>> --------------------------------------------------------------------------------
>>>
>>>
>>>
>>>> --
>>>> 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
>>>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>>>
>
>
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws