[JBoss JIRA] (GTNPORTAL-3501) Introduce XML schema validation for gatein-resources.xml
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3501?page=com.atlassian.jira.pl... ]
RH Bugzilla Integration commented on GTNPORTAL-3501:
----------------------------------------------------
Tomas Kyjovsky <tkyjovsk(a)redhat.com> changed the Status of [bug 1103771|https://bugzilla.redhat.com/show_bug.cgi?id=1103771] from ON_QA to VERIFIED
> Introduce XML schema validation for gatein-resources.xml
> --------------------------------------------------------
>
> Key: GTNPORTAL-3501
> URL: https://issues.jboss.org/browse/GTNPORTAL-3501
> Project: GateIn Portal
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Reporter: Peter Palaga
> Assignee: Peter Palaga
> Fix For: 3.8.2.Final, 3.9.0.Final
>
>
> There are several lines of code that indicate that {{org.exoplatform.commons.xml.XMLValidator}} was originally designed to check if a given document complies with an XML schema declared in it:
> {code:java}
> factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", schemas);
> factory.setNamespaceAware(true);
> factory.setValidating(true);
> {code}
> However, there were no tests checking if the validation works and indeed, it does not. It is out of the present scope to investigate what is wrong with {{XMLValidator}} and how it can be corrected, because it is too general to be used for validating {{gatein-resources.xml}} at this point. The main problem is that if we have not validated so far, there must be a lot of schema-incompatible {{gatein-resources.xml}} out there in the wild that were silently accepted by the portal in the past. Therefore, we cannot start validating all {{gatein-resources.xml}} files now.
> To meet the natural expectation that inputs are properly validated to widest possible extent, I propose to start validating now, but only {{gatein-resources.xml}} documents that use the namespace {{http://www.gatein.org/xml/ns/gatein_resources_1_5}} or newer. {{gatein_resources_1_5.xsd}} will be introduced these days with fixing
> GTNPORTAL-3485 and GTNPORTAL-3487. In this way we can stay backwards-compatible and start validating from now on.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (GTNPORTAL-3454) Remove native AMD modules from requireJs config
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3454?page=com.atlassian.jira.pl... ]
RH Bugzilla Integration commented on GTNPORTAL-3454:
----------------------------------------------------
Petr Mensik <pmensik(a)redhat.com> changed the Status of [bug 1090470|https://bugzilla.redhat.com/show_bug.cgi?id=1090470] from ON_QA to VERIFIED
> Remove native AMD modules from requireJs config
> -----------------------------------------------
>
> Key: GTNPORTAL-3454
> URL: https://issues.jboss.org/browse/GTNPORTAL-3454
> Project: GateIn Portal
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Reporter: Peter Palaga
> Assignee: Peter Palaga
> Fix For: 3.8.0.Final
>
>
> RequireJs config is a json structure renderead inline in the HTML markup of every page returned by the portal. The recent "Native AMD Support" feature has brought the possibility to work with large third-party javascript frameworks such as Dojo containing thousands of JavaScript modules. The present implementation adds an entry for every native AMD module into RequireJs config. With a dojo portlet deployed, this causes an overhead of more than 400KB per page.
> Steps to Reproduce:
> 1. Compile and deploy the dojo portlet application from https://github.com/ppalaga/dojo-portlet
> 2. Import applications
> 3. Inspect the source of any portal page, e.g. /portal/classic/home
> 4. Locate the line starting with
> var require =
> Actual results: All dojo resources are there in the json structure assigned to the require variable.
> Expected results: No resources coming from Dojo should be there.
> Additional info: Not having the resources coming from Dojo in requireJS config is technically possible as the native AMD modules are implicitly SHARED and the baseUrl is set properly in the config.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months