xsl-list
[Top] [All Lists]

<![CDATA[ Confusions

2005-07-28 14:47:41
Can someone tell me how this Javascript should be properly formatted
within an XSL <![CDATA[ tags?? My "" keep getting converted into &quot; 

<script LANGUAGE="JavaScript">

                 function selectAll(formObj, invert){ 
        with (formObj) {
                for (var i=0;i < elements.length;i++){
                        fldObj = elements[i];
                        if(fldObj.type == "checkbox"){
                                if(invert){
                                        fldObj.checked = false;
                                }else{
                                        fldObj.checked = true;
                                }
                        }
                }
        }
}
                                        
function invert(button) { 
        if (button.value == "Select All") { 
                button.value = "Unselect All"; 
                selectAll(button.form,false);
        } else { 
                button.value = "Select All"; 
                selectAll(button.form,true);
        } 
} 
                  //  End 
          </script>

    -------------------------
John Bruso
Web Developer
ph  307.674-6446-2608

  
        
 
 
 

-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Sent: Thursday, July 28, 2005 3:33 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] is there a String indexOf() function in Xpath?

XSLT 2.0 and XQuery both provide the ability to write your own
functions,
and as DC showed, this one can be written as a simple composition of two
functions in the core library. The WG has been trying to keep the number
of
functions down to a minimum, and anything that can be constructed so
easily
from existing functions tends to get short shrift. (With a few
exceptions
like exists() and empty(), of course...)

Michael Kay
http://www.saxonica.com/
 

-----Original Message-----
From: Arian Hojat [mailto:arianhojat2000(_at_)yahoo(_dot_)com] 
Sent: 28 July 2005 20:25
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] is there a String indexOf() function in Xpath?

hey I searched around and I couldn't find an xpath
function to return what the index of a strings'
character/substring is located.

Want to do something like this...
substring($titleText, 
indexOf($titleText, ' findThisTextsIndex ')+5 , 
indexOf($titleText, 'toHere') )





              
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>