ngeldenhuys-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-10 22:57 UTC
prototype $$ and namespaces
Hi All It looks like the css selectors of prototype does not support namespaces. e.g. div[ns|attribute] Are there any plans on implementing namespace support? http://www.w3.org/TR/css3-namespace/ I quickly looked at the code to see if I could add some basic support for namesapces, but it will take me a while to begin to understand it. Perhaps somebody can think of a workaround without loosing the namespaces on the element attributes? I tried div[ns:attribute] div[ns\:attribute] div[''ns:attribute''] etc Using prototype 1.5.1 Mozilla/5.0 (X11; U; Linux x86_64; af; rv:1.8.1.3) Gecko/20070411 Firefox/2.0.0.3 My test code: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:test="http:// www.example.com/test"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="js/prototype.js"></script> </head> <body> <div test:attribute1="1" id="test1"> <div test:attribute2="1" id="test2"> </div> </div> <div id="normal"></div> <script type="text/javascript"> alert($$("div[test|attribute1]")); </script> </body> </html> Nicolaas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---