Srinivas Rallapalli

Greenhorn
+ Follow
since May 20, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Srinivas Rallapalli

Hello All,
I want to take java sun certification exam. But i dont know how to proceed. I want the details like where to apply for the exam, and where to pay the fees, where to write the exam and all. And please suggest me some good sites where i can find some material for the exam. please specify some sites for taking some mock exams.
I am from India/Bangalore.
thanks,
regards,
srinias.
Suppose i have an xml file.
i have to write an xsl file so that it should allow characters from
a-z and A-Z and numbers and '_' and '/'.
if the string is having any other character then it should display the string before the special character.
if the string is not having any other special characters then it should display normally.
my xml file is:
<?xml version="1.0"?>
<emp>
<name>srini$sdg</name>
<name>rama</name>
<name>rameshs@dg</name>
<name>r)amki</name>
<name>ragi</name>
</emp>
in this case the output should be :
srini
rama
rameshs
r
ragi
pease give a solution to this.
thanks
srini.
Suppose i have an XML file, it contains some strings, now i have to write an xsl file to display the strings. there are some constraints to display the strings.
1. it should not display the strings with some special characters like +,/,=, etc.
2. it should display strings only with characters and _ .
3. if it having any other special characters it should display only ?.
please help me.
How can we validate it?
suppose this is the xml file, here it should display only srinir and ramesh_l
<?xml version="1.0" encoding="UTF-8"?>
<emp>
<name>srini r</name>
<name>ralla+ srinu</name>
<name>(rama)</name>
<name>srinir</name>
<name>ramesh_l</name>
</emp>
please help me.
thanks in advance.
srini.
suppose i have an XML file like the following,
<?xml version="1.0" encoding="UTF-8"?>
<registers>
<register>
<name>ramesh</name>
<Bits><start>15</start></Bits>
</register>
<register>
<name>xxxxxxxx</name>
<Bits><start>12</start></Bits>
</register>
<register>
<name>srinivas</name>
<Bits><start>20</start><end>16</end></Bits>
</register>
<register>
<name>rajagopi</name>
<Bits><start>6</start><end>0</end></Bits>
</register>
<register>
<name>rama</name>
<Bits><start>10</start><end>7</end></Bits>
</register>
</registers>
here i have to find maximum string length. if i use the xsl file like the following i am getting the result as srinivas.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl utput method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:variable name="Length">
<xsl:for-each select="/employees/emp/name">
<xsl:sort select="string-length(.)" order="descending" data-type="number"/>
<xsl:if test="position() = 1">
<xsl:value-of select="string-length(.)"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
Max string is: <xsl:value-of select="$Length"/>
</xsl:template>
</xsl:stylesheet>
but here we have 3 registers( xxxxxxxx,srinivas,rajagopi) with max string length of 8.
here if i find the range of bits, like, start-end, for xxxxxxxx it is 1, because there is no end, and for srinivas it is 4(20-16) and for rajagopi it is 6(6-0). so in these kind of situations i have to give preference to xxxxxxxx, i.e max string length with range 1.
so if i get 2 or more strings with same string length and with various ranges,
then first
1. i have to get the string with max string length and range is 1.
otherwise
if max string length, strings with range 1 are not there, then
2. i should get the string with max string length and range is max.
for the second condition suppose i have srinivas and rajagopi with ranges 4 and 6, so i have to get rajagopi.
is it possible to get it? how i have to change my xsl file so that i will get this result?
please help me . i am trying for it since 3 days.
thanks,
srini.
suppose i have an XML file like the following,
<?xml version="1.0" encoding="UTF-8"?>
<registers>
<register>
<name>ramesh</name>
<Bits><start>15</start></Bits>
</register>
<register>
<name>xxxxxxxx</name>
<Bits><start>12</start></Bits>
</register>
<register>
<name>srinivas</name>
<Bits><start>20</start><end>16</end></Bits>
</register>
<register>
<name>rajagopi</name>
<Bits><start>6</start><end>0</end></Bits>
</register>
<register>
<name>rama</name>
<Bits><start>10</start><end>7</end></Bits>
</register>
</registers>
here i have to find maximum string length. if i use the xsl file like the following i am getting the result as srinivas.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl utput method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:variable name="Length">
<xsl:for-each select="/employees/emp/name">
<xsl:sort select="string-length(.)" order="descending" data-type="number"/>
<xsl:if test="position() = 1">
<xsl:value-of select="string-length(.)"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
Max string is: <xsl:value-of select="$Length"/>
</xsl:template>
</xsl:stylesheet>
but here we have 3 registers( xxxxxxxx,srinivas,rajagopi) with max string length of 8.
here if i find the range of bits, like, start-end, for xxxxxxxx it is 1, because there is no end, and for srinivas it is 4(20-16) and for rajagopi it is 6(6-0). so in these kind of situations i have to give preference to xxxxxxxx, i.e max string length with range 1.
so if i get 2 or more strings with same string length and with various ranges,
then first
1. i have to get the string with max string length and range is 1.
otherwise
if max string length, strings with range 1 are not there, then
2. i should get the string with max string length and range is max.
for the second condition suppose i have srinivas and rajagopi with ranges 4 and 6, so i have to get rajagopi.
is it possible to get it? how i have to change my xsl file so that i will get this result?
please help me . i am trying for it since 3 days.
thanks,
srini.
Hello all,
Please send me a program to use the jdbc dbc bridge using oracle8i database. I am new to this, i am trying this since new week, but i am failes to do that. please send an appropriate program to connect to the database using the jdbc dbc bridge.
thanks,
regards,
srini.
Hello all,
i am trying to do jdbc connectivity since 10 days. but i failed to do that. here i am using jdbc dbc bridge.
i am doing like this:
Class.forName ("sun.jdbc.odbc.OdbcDriver");
Connection conn = DriverManager.getConnection
("jdbc dbc snname", user, pass);
blah blah blah.
if i do like this i am getiing an error like class not found while running.
mine is oracle8i database. can anybody help me how i can do this and what are all the things i need to check before connection.
please tell me is there any other method of connecting to the database.
thanks,
regards,
srini.
suppose i have an xml file like the following:-
<registers>
<Register name="a1">
<RD_Table>
<RD_Body>
<RD_Row>
<Field>XF15</Field>
<Bits><Start>15</Start></Bits>
<AccType rowspan = "16">w</AccType>
<Desc rowspan = "16"><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF14</Field>
<Bits><Start>14</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF13</Field>
<Bits><Start>13</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF12</Field>
<Bits><Start>12</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF11</Field>
<Bits><Start>11</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF10</Field>
<Bits><Start>10</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF9</Field>
<Bits><Start>9</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF8</Field>
<Bits><Start>8</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF7</Field>
<Bits><Start>7</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF6</Field>
<Bits><Start>6</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF5</Field>
<Bits><Start>5</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF4</Field>
<Bits><Start>4</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF3</Field>
<Bits><Start>3</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF2</Field>
<Bits><Start>2</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF1</Field>
<Bits><Start>1</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF0</Field>
<Bits><Start>0</Start></Bits>
</RD_Row>
</RD_Body>
</RD_Table></Register>

<Register name="a2">
<RD_Table>
<RD_Body>
<RD_Row>
<Field>XF7</Field>
<Bits><Start>7</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF6</Field>
<Bits><Start>6</Start></Bits>
<AccType>r</AccType>
<Desc><LongName>xx</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF5</Field>
<Bits><Start>5</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF4</Field>
<Bits><Start>4</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF3</Field>
<Bits><Start>3</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF2</Field>
<Bits><Start>2</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF1</Field>
<Bits><Start>1</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF0</Field>
<Bits><Start>0</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
</RD_Body>
</RD_Table></Register>

<Register name="a3">
<RD_Table>
<RD_Body>
<RD_Row>
<Field>XF7</Field>
<Bits><Start>7</Start></Bits>
<AccType rowspan="2">w</AccType>
<Desc rowspan="2"><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF6</Field>
<Bits><Start>6</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF5</Field>
<Bits><Start>5</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF4</Field>
<Bits><Start>4</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF3</Field>
<Bits><Start>3</Start></Bits>
<AccType rowspan="4">r</AccType>
<Desc rowspan="4"><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF2</Field>
<Bits><Start>2</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF1</Field>
<Bits><Start>1</Start></Bits>
</RD_Row>
<RD_Row>
<Field>XF0</Field>
<Bits><Start>0</Start></Bits>
</RD_Row>
</RD_Body>
</RD_Table></Register>
here there 3 register elements.
in the first register "RD_Row" element it is having an AccType and Desc element with rowspan attribute value 16.
the rest of the "RD_Row" is not having any AccType and Desc elements.
in the second register all RD_Row elements are having AccType and Desc elements.
in the third register some RD_Row elements are having AccType and Desc elements with rowspan attribute. and some RD_Row elements are not having AccType and Desc elements.
here in the first register the rowsapn value is 16. it means AccType and Desc values are common to all remining 15 elements.
in the same way in the 3rd register first RD_Row is having an AccType element with rowspan value 2, now it is common to first 2 RD_Row elements, similarly second one is having 4 as rowspan value. there it is common for 4 elements.
now i want to generate an xml file like the following:-

<registers>
<Register name="a1">
<RD_Table>
<RD_Body>
<RD_Row>
<Field>XF15</Field>
<Bits><Start>15</Start></Bits>
<AccType rowspan = "16">w</AccType>
<Desc rowspan = "16"><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF14</Field>
<Bits><Start>14</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF13</Field>
<Bits><Start>13</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF12</Field>
<Bits><Start>12</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF11</Field>
<Bits><Start>11</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF10</Field>
<Bits><Start>10</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF9</Field>
<Bits><Start>9</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF8</Field>
<Bits><Start>8</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF7</Field>
<Bits><Start>7</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF6</Field>
<Bits><Start>6</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF5</Field>
<Bits><Start>5</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF4</Field>
<Bits><Start>4</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF3</Field>
<Bits><Start>3</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF2</Field>
<Bits><Start>2</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF1</Field>
<Bits><Start>1</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF0</Field>
<Bits><Start>0</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
</RD_Body>
</RD_Table></Register>

<Register name="a2">
<RD_Table>
<RD_Body>
<RD_Row>
<Field>XF7</Field>
<Bits><Start>7</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF6</Field>
<Bits><Start>6</Start></Bits>
<AccType>r</AccType>
<Desc><LongName>xx</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF5</Field>
<Bits><Start>5</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF4</Field>
<Bits><Start>4</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF3</Field>
<Bits><Start>3</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF2</Field>
<Bits><Start>2</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF1</Field>
<Bits><Start>1</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF0</Field>
<Bits><Start>0</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
</RD_Body>
</RD_Table></Register>

<Register name="a3">
<RD_Table>
<RD_Body>
<RD_Row>
<Field>XF7</Field>
<Bits><Start>7</Start></Bits>
<AccType rowspan="2">w</AccType>
<Desc rowspan="2"><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF6</Field>
<Bits><Start>6</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF5</Field>
<Bits><Start>5</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF4</Field>
<Bits><Start>4</Start></Bits>
<AccType>w</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF3</Field>
<Bits><Start>3</Start></Bits>
<AccType rowspan="4">r</AccType>
<Desc rowspan="4"><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF2</Field>
<Bits><Start>2</Start></Bits>
<AccType>r</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF1</Field>
<Bits><Start>1</Start></Bits>
<AccType>r</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
<RD_Row>
<Field>XF0</Field>
<Bits><Start>0</Start></Bits>
<AccType>r</AccType>
<Desc><LongName>???</LongName></Desc>
</RD_Row>
</RD_Body>
</RD_Table></Register>

this means finally i should get an xml file in such a way that all "RD_Row" must contain 4 elements i.e Field,Bits,AccType,Desc

please help me , i am trying since 3 days, but i am not getting. this is very urgent for me. please help me.
thanks,
regards,
srinivas.
is it possible to know the name of the next element.
suppose i have an XML file, which contains an element which contains sub elements like
<bits>
<start>10</start><start>5</start><end>3</end>
</bits>
now i want to know the meaning of the next element of start.
first element is always be start.
after that it may be either end or start.
please help me.
thanks
srini.
i have an xml page, i have written an xsl for it. in the xml page i have some elements called <bits> in this bits element again there may be 2 or 1 elements like this:<start> or <start></start><end></end>
there may be more sumber of start elements in the same bits elements, or more number of their combinations,
like:
1.<start>2</start><start>1</start>9<start></start>.
2.<start>24</start><end>15</end><start>12</start><end>10</end>.
3.<start>8</start><end>6</end><start>24</start>
4.<start>24</start><start>8</start><end>6</end>
5.<start>24</start><start>8</start><end>6</end><start>2</start>
like this there may be lot of combinations.
my xsl code for taking numbers in this is:
<xsl:for-each select="Bits/Start">
<xsl:variable name="actual_pos"><xsl:value-of select="position()"/>
</xsl:variable>
<xsl:variable name="start_val">
<xsl:value-of select="."/>
</xsl:variable>
<xsl:variable name="DStartEnd">
<xsl:choose>
<xsl:when test=" contains($start_val, '(' )">
<xsl:value-of select="substring-after($start_val, '(' )"/>:
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start_val"/>:
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="../End[position()=$actual_pos]">
<xsl:variable name="end">
<xsl:value-of select="../End[position()=$actual_pos]"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($end, ')' )">
<xsl:value-of select="substring-before($end, ')')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$end"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start_val"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="addElement2">
<xsl:with-param name="DStartEnd" select="$DStartEnd"/>
<xsl:with-param name="name" select="../../Field"/>
<xsl:with-param name="access" select="../../AccType"/>
<xsl:with-param name="DescLongName" select="../../Desc/LongName"/>
<xsl:with-param name="DescText" select="../../Desc/DescriptionText"/>
</xsl:call-template>
</xsl:for-each>
it is working for all the conditions except for the 4th and 5th conditions.
i found that it is due to, the first start element is looking for the end element, after the first start element if again start element is there, it is not taking care of the second start element but it is taking the end element of second start element.
so please give me an idea, how to do for the elements like 4th and 5th.
thanks.
srini.

Edit Comment:
Disabled smiles....;)
- madhav
[ September 05, 2003: Message edited by: Madhav Lakkapragada ]
what is the difference between XALAN,MSXML,SAXON processors. which is best out of these 3 XSLT Processors.
what are the reasons for one of them to be best.
please help me.
is there any difference between inheritance and composition. which is better to use.
20 years ago
Congratulations.
Regards
Srinivas.
I have an xml file.Now i have to write an xsl file so that,it should copy only some elements of the input xml file. please help me.this is urgent

Thanks,
srinivas
Dear All,
I have two xml files.I have to write an xsl file so that it should search for an element in the first xml file and then that element should be replaced with another element in the second xml file. Please help me,this is urgent.
Thanks,
srinivas