Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member181955
Contributor
0 Kudos

Description


This weblog explains the usage and syntax of various xpath functions like translate(),concat(),Subsrting(),sum(),count() string() in xslt mapping with an example...


Here I would like explain the syntax and number of parameters accepted by each xpath funtion.


substring()


This Function is used to extract some portions of the string from the original string.It takes a specified number of characters out of a string


syntax:

substring("PRASAD BABU",1,6)


translate()


The translate function takes the string in the value argument,replaces all occurrecnes of a string specified in the string1 argument with substitue characters specified in string2 argument and returns the modified string.


syntax:

translate("prasad babu","abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")

string()


The string function converts the input to a string.


syntax:

string("prasad babu")


concat()


The concat function takes all the individual arguments,concatenates them together in order,and returns the resultstant string


syntax:

concat("prasad","babu")




sum()


The sum function converts PCDATA text to a numeric value


syntax:

sum(p2:marks/score)


count()


This function is used to count the nodes


syntax:

count(p2:marks/subjects)

Target Message Type






Source Message Type

4 Comments