|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Usage of XSLT in the field of text replacement.
Hi Mukul and Ken, I am extremely happy with the analysis provide by
you people. Actually I want to know whether we can use XSLT in the
field to string manipulation with the help of third file (user
define). Right now we are doing this kind of process by Perl which is
a good for string manipulation.
An error (regular expression must not be one that matches a zero length string) is occurring while testing the xslt in the following line <xsl:analyze-string select="." regex="{$regex-pattern}"> > I think, Mukul, the original poster should be aware that with your proposed I think I must share my experience of string manipulation by Perl which will help you people to understand the concept. What we do in Perl is simple as follows:> solution the "temp.ini" file must express the "old" string value as a > regular expression and not a simple string. 1. read temp.ini and store it as an array 2. read a.xml file 3. apply 'FOR' loop and took each line in an array variable ($lineItem) 4. split variable ($lineItem) by | separator into $searchItem and $replaceItem 5. Search $searchItem in the input file (a.xml) and replace it with $replaceItem in the output file > If there are sensitive regular expression characters in those values the results may not be > as desired.For this purpose we replace these escape characters within $searchItem. (in this example [ & ] will be replaced by \[ & \] > Then again, the original poster may want the power of regular expressions inI want to use it as a string not as regular expression. Is something like this kind of concept (<xsl:variable name="regex-pattern" select="tokenize($replacement-data, '|')"/> I want to explore the usage of XSLT and thinking that upto what extend it is helpful to substitute of Perl. Thanks for the effort done by you, once again!!!> There are so many possible ways to approach the solution based on what the > original poster wanted that I felt his request was unclear.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








