Hi,

Thank you very much for taking care of both the issues. I am able to download 
the version.

Regards
Ravi

From: Listas [mailto:lis...@informatica.info]
Sent: Wednesday, February 02, 2011 1:33 AM
To: dom4j-dev@lists.sourceforge.net
Subject: Re: [dom4j-dev] CSS4J : Specifity not working

The fix is included in CSS4J 0.11, now available for download:

http://informatica.info/downloads/css4j-0.11.zip

or

http://informatica.info/downloads/css4j-0.11-src.zip (source only)

Changelog: http://informatica.info/projects/css/CHANGES.txt
Release Notes: http://informatica.info/projects/css/RELEASE_NOTES.TXT

Regards,
Carlos Amengual

On 31/01/11 05:15, Gopalan, V Ravi wrote:

Hi,



I am using CSS4j 0.10 version. I had a problem while using the getComputedStyle 
method where in the specifity of certain styles were not handled properly.



I was looking at the DOMCSSStyleRule.java and specifity() method in the class 
Specifity was not handling Selector.SAC_DESCENDANT_SELECTOR, 
Selector.SAC_CHILD_SELECTOR, Selector.SAC_DIRECT_ADJACENT_SELECTOR. So i had 
changed the method as follows:



private void specifity(Selector selector) {

                                   switch (selector.getSelectorType()) {

                                   case Selector.SAC_ELEMENT_NODE_SELECTOR:

                                   case Selector.SAC_PSEUDO_ELEMENT_SELECTOR:

                                               names_pseudoelements_count++;

                                               break;

                                   case Selector.SAC_CONDITIONAL_SELECTOR:

                                               Condition cond = 
((ConditionalSelector) selector)

                                                                       
.getCondition();

                                               switch (cond.getConditionType()) 
{

                                               case 
Condition.SAC_CLASS_CONDITION:

                                               case 
Condition.SAC_ATTRIBUTE_CONDITION:

                                               case 
Condition.SAC_ONE_OF_ATTRIBUTE_CONDITION:

                                               case 
Condition.SAC_PSEUDO_CLASS_CONDITION:

                                                           
attrib_classes_count++;

                                                           break;

                                               case Condition.SAC_ID_CONDITION:

                                                           id_count++;

                                                           break;

                                               }

                                               specifity(((ConditionalSelector) 
selector).getSimpleSelector());

                                               break;

                                   case Selector.SAC_DESCENDANT_SELECTOR:

                                   case Selector.SAC_CHILD_SELECTOR:

                                               specifity( ((DescendantSelector) 
selector).getSimpleSelector() );

                                               specifity( ((DescendantSelector) 
selector).getAncestorSelector() );

                                               break;

                                   case Selector.SAC_DIRECT_ADJACENT_SELECTOR:

                                               specifity ( ((SiblingSelector) 
selector).getSiblingSelector() );

                                               specifity ( ((SiblingSelector) 
selector).getSelector() );

                                               break;

                                   }

                       }



Can this be incorporated into a patch? please help.



Looking forward for a positive reply from you.



Regards

Ravi


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to