Output the version with name as text

zillazny

New Member
This is my input xml. The xml can have maximunm three nodes and minimum 1 node. The minimum nodes, the input xml can have, like below \[code\]<Root> <node>uniquename</node></Root>\[/code\]The maximum nodes, the input xml can have is below. Uniquename containing node will be there always.my sample input xml for the below sample desired output\[code\]<Root> <node>abc</node> <node>e1</node> <node>uniquename2</node></Root>\[/code\]The value 'abc' is common for all the input xmls. the value e1, is like a version number. It can have e1 through e9. It can also have a minor version like e1.1 through e9.9. The third node is unique. My output should be the text below, sample below as desired output\[code\]Unique name with version from the xml - uniquename2e1version number - e1common name - Present in the input\[/code\]The order of the input xml nodes varies, ie sometimes the version number can come at the top and sometimes the unique name can come at the top. Same is true with the common name. Nevertheless my output should have uniquename followed by version number. In case there is no common name in the input xml, the output text should indicate, it is absentIf the version number is not there in the input, the version number line can be blank from the output\[code\]Unique name with version from the xml - uniquename3common name - Present/Absent in the input.\[/code\]Though I dont have xslt 2.0 processor, my xslt processor supports xmlns:regexp="http://exslt.org/regular-expressions", I was thinking to use this for finding the versioning part. EDIT The unique name is something which is not following the version number pattern \[code\]^e\d(\.\d)*$\[/code\] or not the common name
 
Back
Top