You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Cordenier Christophe <Ch...@atosorigin.com> on 2008/04/02 17:12:06 UTC

Zone and block : xmlns problem

Hello,

I have a simple action link that update a zone with a Block.
I have implemented the Layout pattern and my Layout template starts with

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
...
</html>

If the block returned by the method associated with my actionlink contains HTML Markup like a simple div, I have this error :

[ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: Namespace prefix for URI 'http://www.w3.org/1999/xhtml' is not defined.
java.lang.RuntimeException: Namespace prefix for URI 'http://www.w3.org/1999/xhtml' is not defined.
...


Can a block contains HTML Markup ? I have take a look at the ZoneDemo sample given with the Tapestry sources, and block contains only text.

The errors seems to be due to the partial request handling, when a HTML element is transformed "toMarkup", it looks for the parent to know the mapping for the "http://www.w3.org/1999/xhtml" namespace and fails because parent is "null" due to partial rendering.

I'm working with Tapestry 5.0.11.

Thanks in advance,
Christophe.

________________________________

Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

RE: Zone and block : xmlns problem

Posted by Andy Blower <an...@proquest.co.uk>.
Thank you for this post, although I just spent 2 hours scratching my head on
this because I was having the error:

ERROR (RequestExceptionHandler:45  ) - Processing of request failed with
uncaught exception: Namespace prefix for URI 'http://www.w3.org/1999/xhtml'
is not defined.
java.lang.RuntimeException: Namespace prefix for URI
'http://www.w3.org/1999/xhtml' is not defined.

come up as soon as the block was rendered for the zone. The strange thing is
I don't have xmlns="http://www.w3.org/1999/xhtml" defined on any of my html
tags. Each of my pages/component templates start with simply:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">


So I've no idea where this 1999/xhtml stuff is coming from. Any clues are
very welcome. It now works as I added the xmlns attribute to the root ol tag
in my block. 

Also not having render vars not being useful in these partial renders is
irritating. e.g. "Component XYZ is not rendering, so render variable 'foo'
may not be updated."  Would this be easy to enable does anyone know?

Thanks,

Andy.


Cordenier Christophe wrote:
> 
> Hello Fernando,
> 
> Thank you for your answer.
> 
> In fact, I have tried to put the namespace in a root div element in the
> block, and it works fine.
> 
> Best Regards,
> Christophe.
> 
> -----Message d'origine-----
> De : Fernando Padilla [mailto:fern@alum.mit.edu]
> Envoyé : mercredi 2 avril 2008 18:00
> À : Tapestry users
> Objet : Re: Zone and block : xmlns problem
> 
> have you tried adding a second xmlns element deeper in the document,
> maybe around where the Zone is defined.  Somewhere the partial render
> will have it available?
> 
> The Namespace support is still not the best; though getting better bit
> by bit.  You should file this as a Jira bug even if you find a temporary
> work around.
> 
> 
> Cordenier Christophe wrote:
>> Hello,
>>
>> I have a simple action link that update a zone with a Block.
>> I have implemented the Layout pattern and my Layout template starts with
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>> ...
>> </html>
>>
>> If the block returned by the method associated with my actionlink
>> contains HTML Markup like a simple div, I have this error :
>>
>> [ERROR] RequestExceptionHandler Processing of request failed with
>> uncaught exception: Namespace prefix for URI
>> 'http://www.w3.org/1999/xhtml' is not defined.
>> java.lang.RuntimeException: Namespace prefix for URI
>> 'http://www.w3.org/1999/xhtml' is not defined.
>> ...
>>
>>
>> Can a block contains HTML Markup ? I have take a look at the ZoneDemo
>> sample given with the Tapestry sources, and block contains only text.
>>
>> The errors seems to be due to the partial request handling, when a HTML
>> element is transformed "toMarkup", it looks for the parent to know the
>> mapping for the "http://www.w3.org/1999/xhtml" namespace and fails
>> because parent is "null" due to partial rendering.
>>
>> I'm working with Tapestry 5.0.11.
> 

-- 
View this message in context: http://www.nabble.com/Zone-and-block-%3A-xmlns-problem-tp16453184p16496573.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Zone and block : xmlns problem

Posted by Cordenier Christophe <Ch...@atosorigin.com>.
Hello Fernando,

Thank you for your answer.

In fact, I have tried to put the namespace in a root div element in the block, and it works fine.

Best Regards,
Christophe.

-----Message d'origine-----
De : Fernando Padilla [mailto:fern@alum.mit.edu]
Envoyé : mercredi 2 avril 2008 18:00
À : Tapestry users
Objet : Re: Zone and block : xmlns problem

have you tried adding a second xmlns element deeper in the document,
maybe around where the Zone is defined.  Somewhere the partial render
will have it available?

The Namespace support is still not the best; though getting better bit
by bit.  You should file this as a Jira bug even if you find a temporary
work around.


Cordenier Christophe wrote:
> Hello,
>
> I have a simple action link that update a zone with a Block.
> I have implemented the Layout pattern and my Layout template starts with
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> ...
> </html>
>
> If the block returned by the method associated with my actionlink contains HTML Markup like a simple div, I have this error :
>
> [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: Namespace prefix for URI 'http://www.w3.org/1999/xhtml' is not defined.
> java.lang.RuntimeException: Namespace prefix for URI 'http://www.w3.org/1999/xhtml' is not defined.
> ...
>
>
> Can a block contains HTML Markup ? I have take a look at the ZoneDemo sample given with the Tapestry sources, and block contains only text.
>
> The errors seems to be due to the partial request handling, when a HTML element is transformed "toMarkup", it looks for the parent to know the mapping for the "http://www.w3.org/1999/xhtml" namespace and fails because parent is "null" due to partial rendering.
>
> I'm working with Tapestry 5.0.11.
>
> Thanks in advance,
> Christophe.
>
> ________________________________
>
> Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org




Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Zone and block : xmlns problem

Posted by Fernando Padilla <fe...@alum.mit.edu>.
have you tried adding a second xmlns element deeper in the document, 
maybe around where the Zone is defined.  Somewhere the partial render 
will have it available?

The Namespace support is still not the best; though getting better bit 
by bit.  You should file this as a Jira bug even if you find a temporary 
work around.


Cordenier Christophe wrote:
> Hello,
> 
> I have a simple action link that update a zone with a Block.
> I have implemented the Layout pattern and my Layout template starts with
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> ...
> </html>
> 
> If the block returned by the method associated with my actionlink contains HTML Markup like a simple div, I have this error :
> 
> [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: Namespace prefix for URI 'http://www.w3.org/1999/xhtml' is not defined.
> java.lang.RuntimeException: Namespace prefix for URI 'http://www.w3.org/1999/xhtml' is not defined.
> ...
> 
> 
> Can a block contains HTML Markup ? I have take a look at the ZoneDemo sample given with the Tapestry sources, and block contains only text.
> 
> The errors seems to be due to the partial request handling, when a HTML element is transformed "toMarkup", it looks for the parent to know the mapping for the "http://www.w3.org/1999/xhtml" namespace and fails because parent is "null" due to partial rendering.
> 
> I'm working with Tapestry 5.0.11.
> 
> Thanks in advance,
> Christophe.
> 
> ________________________________
> 
> Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.
> 
> This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org