You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2009/04/18 00:26:14 UTC
[jira] Commented: (TAP5-592) An error occurs when parsing a
template with a Block component as root component.
[ https://issues.apache.org/jira/browse/TAP5-592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700359#action_12700359 ]
Howard M. Lewis Ship commented on TAP5-592:
-------------------------------------------
Workaround: use a <t:content> or <t:container> element, place the <t:block> inside.
> An error occurs when parsing a template with a Block component as root component.
> ---------------------------------------------------------------------------------
>
> Key: TAP5-592
> URL: https://issues.apache.org/jira/browse/TAP5-592
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.18
> Reporter: Briac Pilpré
> Priority: Minor
>
> When trying to parse a component description containing a single Block declaration, Tapestry throws an exception:
> org.apache.tapestry5.ioc.internal.util.TapestryException
> Failure parsing template classpath:my/app/components/HelloBlock.tml: Element <block> does not support an attribute named ''. The only allowed attribute name is 'id'.
> <?xml version="1.0"?>
> <t:block xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" t:id="helloBlock">
> Hello.
> </t:block>
> The TemplateParserImpl.findSingleParameter allows only a single attribute but the xmlns:t attribute is taken into account. I guess we could patch this correct by skipping xmlns attributes (like the xml:space attribute is skipped).
> Partial Stack trace
> * org.apache.tapestry5.internal.services.TemplateParserImpl.findSingleParameter(TemplateParserImpl.java:500)
> * org.apache.tapestry5.internal.services.TemplateParserImpl.startBlock(TemplateParserImpl.java:445)
> * org.apache.tapestry5.internal.services.TemplateParserImpl.startTapestryElement(TemplateParserImpl.java:396)
> * org.apache.tapestry5.internal.services.TemplateParserImpl.startElement(TemplateParserImpl.java:352)
> * org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.