Generating xpath with xslt



I am trying to generate xpaths for elements in an xml document. I found this solution Generate/get xpath from XML node java which is very close to what I need except I would like for it to list all of the elements attributes in one path instead of regenerating the same path. For example



/root/elemA[2][@attribute1='first'][@attribute2='second']


instead of



/root/elemA[2][@attribute1='first']
/root/elemA[2][@attribute2='second']


I am very new to xslt and have been playing with this template, but I cannot seem to figure out how to change the output.


No comments:

Post a Comment