I am using Tapestry 5.2.6, and I am trying to get rid of shape attributes on tags.
Tapestry generates tag like this :
<a shape="rect"...>
I can't find anything online so if you have any idea how to ?
Thank you.
This problem was reported in Tapestry's JIRA and resolved in Tapestry 5.3.5. The offender was the SAX parser used, which automatically appends default values defined for HTML attributes in the DTD used. A check was then introduced in org.apache.tapestry5.internal.services.XMLTokenStream class to "filter out attributes that are not present in the XML input stream, but were instead provided by DTD defaulting".
See the corresponding ticket for more details: https://issues.apache.org/jira/browse/TAP5-1976.
Unfortunately, in your case, there is no clean solution to fix that (assuming you have to work with Tapestry 5.2.6). The only way would be to make your own patch or fork of Tapestry 5.2.6 to report the correction...
Related
Let we have Facelet 1.xhtml. This facelet contains following line
xmlns:h="http://xmlns.jcp.org/jsf/html"
What "http://xmlns.jcp.org/jsf/html" does mean? If we dont internet accesing application will work anyway.
Its a XML namespace. In your case, you are defining a XML namespace prefix h with a URI of http://xmlns.jcp.org/jsf/html. The URI is just a way of uniquely naming the namespace, the parser wont load it, so to answer you question. No. You do not need internet :)
http://en.wikipedia.org/wiki/XML_namespace
I have a XSL/XML parser to produce jsp/html code.
Using MVC model I need to accees spring library in order to perform i18n translation.
Thus, given the xml
<a>
...
<country>EN</country>
...
</a>
and using <spring:message code="table_country_code.EN"/> tag, choose based on the browser language, the transalation into England, Inglaterra, etc...
However, the XSL do not support <spring:message> tag.
The idea is to have a XSLT with something like this
<spring:message code="table_country_code.><xsl:value-of select="country"/>"/>`
to have the final code <spring:message code="table_country_code.EN"/> and be recognized in the final JSP/HTML based on i18n translation.
I also tried to create the spring tag in Java when I make a parse to create the XML but I sill have the same error.
The prefix "spring" for element "spring:message" is not bound.
[EDIT]
I saw some questions here, like using bean:spring but still have the same problem.
any pointers?
XSLT has to be namespace well formed XML, so you need to declare the namespace and you can not use < in attribute values.
Spring 3 - Accessing messages.properties in jsp
suggests the namespace should be
http://www.springframework.org/tags
so presumably you want an XSLT code of
<spring:message
xmlns:spring="http://www.springframework.org/tags"
code="table_country_code.{country}"
/>
where {} is an attribute value template that evaluates the XPath country
I have been using struts framework i have to implement HTML 5 on the application is is possibke have makje changes in struts tag library?
since i have embeded all html tags like this
<html:form action="action.jsp" type="sample" name="applyform" >
can any one help?
There is no html5 specific taglib for Struts 1.x. (you tagged with 'struts', so I'm assuming that is what you are using). But you could write your own by extending the standard struts taglib. It shouldn't prove too difficult. Another option is to just use regular JSP EL/JSTL.
Sruts 2 supports HTML5 elements in its tag library, see for example the reference for textfield:
Type: (…) Specifies the html5 type element to display. e.g. text, email, url
I'm using the DOM library for JAVA and some entries XHTML encounter this problem:
[Fatal Error] tree.xml:238:185: Attribute "itemprop" was already specified for element "span".
This is the XHTML part with problems:
<span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person' itemprop='name'>Rodrigo</span>
Exists some option to allow duplicate attributes in DOM?
Thanks!
My understanding is that the Microdata specification only allows one itemprop per HTML element, meaning that the DOM library you're using is properly marking it as invalid markup. If you want to specify multiple values, they need to be space-separated, like this:
<span class='fn' itemprop='author name' itemscope='itemscope' itemtype='http://schema.org/Person'>Rodrigo</span>
Incidentally, the class attribute works the same way.
In struts custom tags we can generate HTML elements like <input> using TextTag.
Do we have any alternate to this in spring or jsp custom tags?
spring mvc has <form:input> which has similar features as <s:input> in struts
I digged more and here are my findings.
In Spring we can extend InputTag for customize results but limitation is element that you are specifying for value of input tag should be in commandBean. Otherwise will throw Bind error.
Second option is to create a JSP Tag with all flexibility, you can take some of implementation form InputTag and it works gr8.
I used second option.