[gatein-issues] [JBoss JIRA] Commented: (GTNPC-70) Behavioral change: New portlet metadata parser silently discards unexpected elements.

Chris Laprun (JIRA) jira-events at lists.jboss.org
Thu Sep 1 07:15:27 EDT 2011


    [ https://issues.jboss.org/browse/GTNPC-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625714#comment-12625714 ] 

Chris Laprun commented on GTNPC-70:
-----------------------------------

Potential technical solution would involve adding the possibility to validate the portlet.xml files in development mode (so as not to slow down portlet.xml parsing in production environment, where portlet.xml files are presumably valid) using a XML Schema validator.
Possible solutions:
- http://javaclue.blogspot.com/2010/09/fast-xml-schema-validator.html
- Use Woodstox as the StAX parser (http://woodstox.codehaus.org/) as it can validate from XML Schema.
- ...

> Behavioral change: New portlet metadata parser silently discards unexpected elements.
> -------------------------------------------------------------------------------------
>
>                 Key: GTNPC-70
>                 URL: https://issues.jboss.org/browse/GTNPC-70
>             Project: GateIn Portlet Container
>          Issue Type: Enhancement
>          Components: API, Documentation
>    Affects Versions: 2.3.0-Beta05
>            Reporter: Chris Laprun
>              Labels: metadata, parser
>             Fix For: 2.3.0-GA
>
>
> portlet.xml parsing was previously very tolerant with respect to out-of-order elements (XSD kinda sucks for this), thus silently allowing portlet.xml that were not strictly valid according to portlet-app_2_0.xsd. The new staxnav parser, on the other hand, is a lot stricter (while still not validating) meaning that it will silently discard unexpected (in particular, out-of-order) elements, resulting in portlet metadata that previously was imported, now being silently discarded. While this is not strictly a bug (after all, the portlet.xml that result in errors are invalid), this is a rather big behavioral change compounded with the fact that the new parser silently discards information resulting in errors showing up much later than the parsing process and without any informational context that the user could use to fix the issue... :(

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the gatein-issues mailing list