Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Ramnarayan

    Problem with xsl style sheet

    Thanks K5tm!. But currently it is going to process any thing that comes in the tag. if there are certain tags to be omitted from processing, what is the appropriate xslt equivalent term? For eg, <abs> <p> This is a paragraph</p> <sct>This is a section Title</sct> <p>This is a second para</p>...
  2. Ramnarayan

    Problem with xsl style sheet

    Thanks for the wonderful tip. However when I run the above xsl script you gave, I get the output below which is really what I want. <?xml version="1.0" encoding="utf-8"?><abstract> <p> This is a paragraph</p> <title>This is a section Title</title> <p>This is a second para</p> </abstract> But...
  3. Ramnarayan

    Problem with xsl style sheet

    Thanks Tom. But the issue is that If <sct> is not present, then the <p> part will not be executed. Your code will work nicely for the example I gave. But when we consider the scenario that you have the case as below: <abs> <p> This is a paragraph</p> <sct>This is a section Title</sct> <p>This...
  4. Ramnarayan

    Problem with xsl style sheet

    Hi, I am trying to parse the xsl sheet against this raw data as below: This is a raw data: <abs> <sct>This is the section title</sct> <p>This is a paragraph</p> <sct> This is another section Title</sct> <p>This is a second paragraph</p> </abs> Here is the xsl sheet i am using: <xsl:template...
  5. Ramnarayan

    How to put a tag at the end of the line after reading a file

    How do I use a Tie:File module. ANy pointers will be great!
  6. Ramnarayan

    How to put a tag at the end of the line after reading a file

    Hi, I have a unique situation. WHen I open a txt file, I know that the end of the file has to have a closing tag. So that means when I read the file, I want to automatically go to the end of the line and put the tag as below: Line 1: this is a Line 2: test file and Line 3: has many lines Line...
  7. Ramnarayan

    to_char(function, 'DD-MM'YYYY') giving strange errors

    Yes, I checked the sql statement in Oracle sql plus and it works fine. ONly problem is through perl!.
  8. Ramnarayan

    to_char(function, 'DD-MM'YYYY') giving strange errors

    Hi, I have written the below code snippet which selects the value of date from a table. Now it is working fine. But when I give to_char function, it is giving uninitialized value. Can someone help me here why PERL is not processing when Oracle works fine! HEre is the code: my $sth =...
  9. Ramnarayan

    How to find if a string has more than 50 characters?

    Hi, I am trying to parse a file that has multiple lines in a xml format. Now I have to find out if a line is starting with a tag like <B> or <I>. If the number of characters i.e. alpha numeric, puctuation, spaces starting from <B> is more than 50 characters, I have to output the line to a file...
  10. Ramnarayan

    Numbers to Ordinal format

    Hi, I need to write a script to convert numbers to their ordinal form. AN example is given below: 1: 1st 2: 2nd 3: 3rd 4: 4th 5: 5th 6: 6th 7: 7th 8: 8th 9: 9th 0: 0th For example 3: 3rd 22: 22nd 517: 517th 60: 60th 19993: 19993rd I searched on the CPAN and could not find any Modules which...
  11. Ramnarayan

    Julian Date Calculator from YYYY-MM-DD

    Hey Tony, Thanks for the tip. However when I execute your statement, It is returning $ymd as 2006-02-19!. Is there some numbers to be changed inorder to get the correct julian date. Yes I mean the julian day for the year. Hence for today, (2006-01-16), the julian day is 16.
  12. Ramnarayan

    Julian Date Calculator from YYYY-MM-DD

    I have already seen this. I think I did not pose the correct question. It should have been the other way round. I.e. to calculate the date from the julian date! So if the julian date is 13, it should prompt me the date corresponding to this julian date i.e. 2006-01-13. The perl sub gives the...
  13. Ramnarayan

    Julian Date Calculator from YYYY-MM-DD

    Hi, I am trying to write a script to calculate the Julian date of the year from the given string which is of the format "YYYY-MM-DD". Can someone help me out here. I am at a lost after going through all the various Date::Calc modules and nothing seems to work for me. Can someone be kind enough...
  14. Ramnarayan

    Counter to count the exceptions

    Thanks a Bunch Rick!
  15. Ramnarayan

    Counter to count the exceptions

    Thanks man for the useful tip. However an error came up i.e. "An unhandled exception of type 'System.NullReferenceException' occurred. Additional Information: Object reference not set to an instance of an object. How to remove this error?
  16. Ramnarayan

    Counter to count the exceptions

    Hi Rick, Thanks for the tip. But how do I keep track of the counter from the base class i.e. centrigadetoFarenheit class. Note that i already put the code in the main class as : Dim ctr As ExceptionCounter = New ExceptionCounter But when an exception is thrown, which is under : Catch...
  17. Ramnarayan

    Counter to count the exceptions

    Hi, I am trying to keep track of counting the # of times the program throws an exception. When the number crosses 3, It should throw an exception saying that number of tries are 3 and program is exiting. Here is the main class (Centrigade to farenheit) Imports System.Windows.Forms Public...
  18. Ramnarayan

    File Test operator in an array

    Hi, I am trying to figure why PERL is giving a warning "Use of uninitialized value in -e at abc.pl line 16". I wantedly made sure that I tested that the script should work for gml files present under sss/ directory. But if they are not there, it should issue the errror "Can't find any GML...
  19. Ramnarayan

    Parsing of a Line in XML File

    Hi, I have a xml file which has a part of the output as below: <SD> <DT> lskdjflasd lsdajflksdjf sldkjflsadkjf </DT> <DS>XSD</DS> </SD> <SD> <DT> some text here and there </DT> <DS>P</DS> </SD> Now I am trying to write a piece of software that should take the text such that wherever...
  20. Ramnarayan

    Puzzling word count after removing tags

    Thanks for everyone to give their responses. However Duncan's response is very good. $xml =~ s|<[^>]+>||g; But you need to pass the output of the $xml to a array and count the words. This worked correctly compared to the pattern search given by others ($xml =~ s|<[^>]+>||g;) As for Paul...

Part and Inventory Search

Back
Top