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>...
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...
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...
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...
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...
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 =...
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...
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...
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.
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...
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...
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?
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.