Hi Andi, hi Kristian!

We solved the puzzle several days ago, but unfortunately the mail never appeared in the mailing list even my phone tells me it is sent :-(

See below

Thanks Jens



Von meinem iPhone gesendet

Anfang der weitergeleiteten E‑Mail:

*Von:* "mailingl...@j-b-s.de <mailto:mailingl...@j-b-s.de>" <mailingl...@j-b-s.de <mailto:mailingl...@j-b-s.de>>
*Datum:* 7. Mai 2014 08:51:12 MESZ
*An:* Tapestry users <users@tapestry.apache.org <mailto:users@tapestry.apache.org>>
*Betreff:* *Re: QName::=(NCName':')?NCName error when tml is parsed*

It looks like the library mapping name is causing this effect: in case the name begins with a digit as first character like "1st" component rendering fails. Using "first" instead fixes the problem and everything works as expected.

To me it looks like bug, but if it is expected behaviour I would prefer an "Illegal libray mapping name" exception. What do you think?

Jens







Von meinem iPhone gesendet

Am 06.05.2014 um 00:42 schrieb Jens Breitenstein <mailingl...@j-b-s.de <mailto:mailingl...@j-b-s.de>>:

Hi T5 Users!

I am struggling with an strange error in T5.3.7 and hopefully one of you can give me a hint how to track it down..

I wrote a "Icon" component to show bootstrap glyphicons:

public class Icon
{
  @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
  @Property private String _name;

  boolean beginRender(final MarkupWriter writer)
  {
      // <span class="glyphicon glyphicon-log-in"/>
      writer.element("span", "class", "glyphicon glyphicon-" + _name);
      writer.end();
      return true;
  }
}


So it's possible to show a glyphicon in a page by

<t:Icon name="exclamation-sign"/>

Everthing worked fine until I moved to component to a "common library package". After starting Jetty and accessing a page which uses this component I get:

Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure parsing template classpath:de/xyz/application/client/pages/DataManaging.tml: Element or attribute do not match QName production: QName::=(NCName':')?NCName. [at classpath:de/xyz/application/pages/DataManaging.tml, line 9] at org.apache.tapestry5.internal.services.SaxTemplateParser.parse(SaxTemplateParser.java:173) at org.apache.tapestry5.internal.services.TemplateParserImpl$1.invoke(TemplateParserImpl.java:61) at org.apache.tapestry5.internal.services.TemplateParserImpl$1.invoke(TemplateParserImpl.java:58) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
  ... 98 more
Caused by: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.
  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.tapestry5.internal.services.XMLTokenStream.parse(XMLTokenStream.java:317) at org.apache.tapestry5.internal.services.SaxTemplateParser.parse(SaxTemplateParser.java:163)


Even more confusing is the fact the error never appears again it only occurs on first access.


Thanks in advance


Jens




Reply via email to