Friday, 15 July 2011

strings and math operations in xslt -


I'm looking to fix some tables using XSLT. I need to use the Colspan attribute, but the code I changed with using namest and nameend and nameend I am doing

Example:

  & lt; Entrance named = "Call 1" named = "call3" & gt;   

Let me give it to & lt; Td colspan = "3" & gt; Need to change in . I thought about setting up Val and then thought of using the substring ($ var, 4,1) to get the number at the end of col3 / col1 and then math math- By decreasing the number from the name, adding numbers from the nominee and then adding one but this does not work.

If the entry is the reference node, the difference between the following expression is " Call "value plus you are searching for Callspain value:

  substrings (@ named, 4) - substrings (@namest, 4) + 1   < P>  substring (@attr, 4)  returns sub-returns of  @attr  starting from the fourth character until the substrings are converted into zero by zero operators in number is done.  

xmllint of Libex SLT

  $ echo '& lt; Testing the expression with the entry: Namest = "col1" nameend = "col3" /> '& Gt; So .xml $ xmllint --shell so.xml / & gt; CD entry entry & gt; Xpath substring (@nameend, 4) - substring (@nemst, 4) + 1 object is a number: 3    

No comments:

Post a Comment