[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [wsrp] Portlet specific CSS and JS files
You are right that browsers are forgiving about such imports within the body of the html. However, I tried validation with several styles of DTDs (strict, transitional, loose etc.), and documents fail validation. I think these leaves with two conclusions: a. If the only consumer of the markup is a browser, and none of the intermediaries process the markup, we have no issues. b. If a consumer wants to generate valid markup for whatever business/technical reasons, they cannot do so currently. The question of portlets impacting other parts of the page is interesting, and I agree that we may be able to fitin a solution. Regards, Subbu Rich Thompson wrote: > > The testing we did when finalizing v1.0 determined that all the common > browsers supported style and js references within an html body despite > the specification restricting such includes to the head. I don't know if > anyone has tested what happens if the doctype says strict and such an > element appears within the body. > > On a larger scale, we do have a proposal for allowing portlets to impact > other parts of the page which we chose not to work on for v2. Presumably > any resolution of that request will cover adding needed elements to the > head. > > Rich > > > *Subbu Allamaraju <subbu@bea.com>* > > 02/02/2005 11:50 AM > > > To > wsrp@lists.oasis-open.org > cc > > Subject > Re: [wsrp] Portlet specific CSS and JS files > > > > > > > > > Mike, > > Comments below. You bring up some good points. > > Regards, > > Subbu > > > > Within the WSRP 1.0 spec you can specify the <link> tag and pull in a > > stylesheet via a WSRP resource url. Also within that you can specify sub > > stylesheets as long as they are url encoded to the WSRP spec as the > > resources should be rewritten. > > Aren't those <link> tags supposed to be in side the <head> element? I > think it is invalid to include <link> tags anywhere in the <body>. > > > Performance shouldn't be too bad as long as the resource stylesheet is > > cached, but you still get issues over conflicts between the Consumer CSS > > (WSRP styles) as well as Consumer specific styles. There is also a > problem > > with different portlets if they too are overriding styles or have > > conflicting styles. I think the last stylesheet processed overrides all > > others until a new stylesheet is processed. Thus if portlets are moved > > around on the page or are placed in different orders within the Consumers > > HTML page some pages may be different each time they are rendered. > > It is possible, but I'm not sure if the protocol can prevent it. > > > I would say that no portlet should override the WSRP CSS styles, only > > include there own custom styles so they don't effect any other portlets, > > really the class names should be namespaced in some manner. > > We can make some recommendations, but can't really prevent. > > > This is also true of a JScript file it can be a WSRP resource too. > > > > As you said performance may be an issue as well as the ordering, and > > conflicts, but it seems it can be done right now if I understand you > > correctly. > > > > Mike > > ----- Original Message ----- > > From: "Subbu Allamaraju" <subbu@bea.com> > > To: "wsrp" <wsrp@lists.oasis-open.org> > > Sent: Wednesday, February 02, 2005 10:51 AM > > Subject: [wsrp] Portlet specific CSS and JS files > > > > > > >I would like to know if there is an interest in addressing the > following > > >issues. > > > > > > WSRP1.0 has the following limitations: > > > > > > a. Portlets can not ask Consumers to load specific js files. The only > > > option is to inline the JavaScript within the HTML. > > > > > > b. Portlets are restricted to use Consumer-specified CSS styles or > > inline > > > styles, but cannot ask Consumers to load additional styles from css > > files. > > > > > > In most applications, CSS files and JavaScript are maintained outside > > > markup. Some applications share these css/js files across multiple > > pages. > > > Such sharing will also improve performance since browsers can cache > > those > > > files, and markup will be less bloated. > > > > > > For the 2.0 spec, I think we have the right plumbing to solve > these use > > > cases. Here is one possibility: > > > > > > a. Portlets advertise a number of resource IDs or resource URLs. > > > b. Consumers aggregate thoese resources into the page 's head element. > > > > > > There are some open questions: > > > > > > a. What happens if portlets duplicate any css definitions that are > > already > > > defined by the consumer? The consumer should be allowed to win, I > think. > > > > > > b. How to deal with the MEDIA attribute? AFAIK, these are not > > > well-supported by browsers. Are there other user agent devices that > > > support these? > > > > > > Any comments? > > > > > > Regards, > > > > > > Subbu > > > > > > > > > To unsubscribe from this mailing list (and be removed from the > roster of > > > the OASIS TC), go to > > > > > > http://www.oasis-open.org/apps/org/workgroup/wsrp/members/leave_workgroup.php. > > > > > > > > > > > > > > > > > To unsubscribe from this mailing list (and be removed from the roster of > > the OASIS TC), go to > > > http://www.oasis-open.org/apps/org/workgroup/wsrp/members/leave_workgroup.php. > > > > > To unsubscribe from this mailing list (and be removed from the roster of > the OASIS TC), go to > http://www.oasis-open.org/apps/org/workgroup/wsrp/members/leave_workgroup.php. > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]