Jump to content

shwetharaya

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by shwetharaya

  1. Thanks for the reply.Can u please send the code .....it would be of great help. thanks a lot
  2. Hi all, Can anyone send me the logic or code to have a roating text with 3sec (to change for every text )and can control the text change on mouseover control. please can anyone send me the code imm.....its an urgent issue. and also can we have next and previous button to control the flow of text.IN detail, we have set of text say 3 textwhich will keep changing one after the other every 3sec one its changes to the last 3rd text it will again come back to the 1text and process continues. so mean while when its changing can we have mouse over control . i.e when the user places the mouse on th etext its should pause and on mouse out it should contiue the text rotation . is it possible to have a next button control and previous button control to read the text or control the floe of text.please help me out.thanks
  3. Hi Robot,This is my code.<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:user="http://mycompany.com/mynamespace" xmlns:wsml="urn:org:wsml:2003:html" xmlns:str="http://exslt.org/strings" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/> <msxsl:script language="javascript" implements-prefix="user"> <![CDATA[ function Rolecheck(roles,like,fullstrings) { var splitstring = fullstrings.split(";"); var testing = roles.split(";"); var matching = like.split(";"); var testbool = 0; var k=0; for(;matching[k] { if (matching[k] == 'no') { var i=0; var j=0; for (;splitstring { for (;testing[j] { if (testing[j] == splitstring) testbool = 1; if (testbool == 1) break; j++; } i++; } if (testbool == 1) return 'yes'; else return 'no'; } else { for (i=0;i<splitstring.length-1;) { for(j=0;j<testing.length-1;) { var idx=splitstring.indexOf(testing[j]) if(idx==0) testbool = 1; if (testbool == 1) break; j++; } i++; } if (testbool == 1) return 'yes'; else return 'no'; } } k++; } ]]> </msxsl:script> <xsl:template match="/"> <html> <body> <h2>Roles</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">Role Name</th> <th align="left">Role Desc</th> </tr> </table> <xsl:variable name="fullstring"> <xsl:for-each select="/User/Roles/Role"> <xsl:value-of select="Rolename"> </xsl:value-of>;</xsl:for-each> </xsl:variable> <xsl:value-of select="$fullstring" /><br/> <xsl:variable name="setrole"> <values>ggg</values> <values>abc</values> <values>eag</values> <values>def</values> </xsl:variable> <xsl:variable name="display_role"> <xsl:for-each select="msxsl:node-set($setrole)/values"> <xsl:value-of select="."/> <xsl:text>;</xsl:text> </xsl:for-each> </xsl:variable> <xsl:value-of select="$display_role"/><br/> <xsl:variable name="match"> <values>yes</values> <values>no</values> <values>no</values> <values>yes</values> </xsl:variable> <xsl:variable name="match_role"> <xsl:for-each select="msxsl:node-set($match)/values"> <xsl:value-of select="."/> <xsl:text>;</xsl:text> </xsl:for-each> </xsl:variable> <xsl:value-of select="$match_role"/> <p> <xsl:variable name = "test"> <xsl:value-of select="user:Rolecheck(string($display_role),string($match_role),string($fullstring))"/> </xsl:variable> <br/> <xsl:value-of select = "$test"></xsl:value-of> </p> </body> </html> </xsl:template></xsl:stylesheet>.let me explain u the requirment.I have to create a common template. where i have set of user role which is taken from XML and set of roles which will be given by the extenal user to check aganist this set of user roles taken from XML.<xsl:value-of select="user:Rolecheck(string($display_role),string($match_role),string($fullstring))"/> </xsl:variable>this is where i call my javascript passing string($display_role),parameter which is an (array)string where the external user has passed the set of rolesstring($match_role),this paramtere is an (array)string which has one to one mapping with the above array, which say's whether it has to check the roles aganist user roles for exact match or like match.this inputs are again given by external user .string($fullstring), this paramter is nothing but user roles taken from XMLso basically wat i am trying to do here is , i have to check the a set of roles aganist a set of user roles whichis always taken from XML , whether the role passed by the external user (set of roles) is present in the ser of user roles taken from XML , if present it has to return me YES or NO staisfying the 2 condition here :they are:1. along with checking it has to check for whether the user wants to check for exact match or like match. i.e for example : ANY ROLE WHICH STARTS FROM ABC WILL BE LIKE MATCH . A ROLE SHOULD BE MATCT EXACTLY AS IT IS EX:ABCDEF So i am using an array here to have a one to one mapping with array of set of roles given the external user .even this match array is given by the external user whether the role he is checking is for exact match or like match.2. I need check one more condition is for AND or OR condtion. Say i have a condtion (xsl:if test =( "( role1 & role2) || (role4 & role5)") something like this . ii need to replace this whole by a common template which will check whether these rolesi.e role 1 role2 role3 role4 these are given by extenal user array . we need to check whether these roles are present in the set of roles taken from XML and also check whether the external user is checking for LIkE or EXact match. and also check for the AND or OR condition along with parenthesis satisifying. after checking for the all these condition it shoukd return me YES or NO. please let me know if it is possible.
  4. Hi All,How to create an array in xslt.<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="http://mycompany.com/mynamespace"> <xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/> <msxsl:script language="javascript" implements-prefix="user"> <![CDATA[ function Rolecheck(roles,like,fullstrings) { var splitstring = fullstrings.split(";"); var testbool = 0; if (like == 'no') { var i=0; for (;splitstring { if (roles == splitstring) testbool = 1; if (testbool == 1) break; i++; } if (testbool == 1) return 'yes'; else return 'no'; } else { var i=0; for (;splitstring { var idx=splitstring.indexOf(roles) if(idx==0) testbool = 1; if (testbool == 1) break; i++; } if (testbool == 1) return 'yes'; else return 'no'; } } ]]> </msxsl:script> <xsl:template match="/"> <html> <body> <h2>Roles</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">Role Name</th> <th align="left">Role Desc</th> </tr> </table> <xsl:variable name="fullstring"> <xsl:for-each select="/xslt-info/user-info/user-core/profile/entitlement-roles/entitlement-role"> <xsl:value-of select="entitlement-role-code"> </xsl:value-of>;</xsl:for-each> </xsl:variable> <xsl:value-of select="$fullstring" /> <p> <xsl:variable name = "test"> <xsl:value-of select="user:Rolecheck('test','no',string($fullstring))"/> </xsl:variable> <br/> <xsl:value-of select = "$test"></xsl:value-of> </p> </body> </html> </xsl:template></xsl:stylesheet>This is my code. i want to send an array from my xslt to java script. can u tell me how to create an array in xslt and how it can be passed to java script
  5. i guess u didnt get my question .Let me say I want to check the value 3 aganist a set of values say (1,2,3,4,5,6).so wat i am thinking is i will have a template where i will pass the value 3 from outside to the template where it will check for all these set of values once it matches with the value 3 from the set of values defined in the template it should return me yes or no value. and i want this template to be used for all diffrent values to check and return yes or no value. can u please help on this.
  6. Hi All,I have to create a template ,where u r passing a parameter inisde the template and matching it with a set of values and if its equal it should return me a yes or no value.is it possible to do.or is there any other way to do it.My problem here is , I have a value to check aganist a set of values for equality i.e to see if the values are same. once it finds any match aganist a set of value .it should return me a value.
×
×
  • Create New...