Methode in Xslt?
-
hay! I was wondering if I can use a methode in Xslt. I'm using 3 times the same display logic and I don't like that The 3 times: 1) I have to display a table (while headers) so for my first node I display the data in the nodes + the node attribute (the column name) 2) When I have One row I display the whole thing verticaly so I the same logic in another display logic 3) finally, when I have to display the rest of the rows (more then one) then they are just added tho the horizontal display (point 1 above) 3times the same logic... Can I do something about that? A methode? thx!!
-
hay! I was wondering if I can use a methode in Xslt. I'm using 3 times the same display logic and I don't like that The 3 times: 1) I have to display a table (while headers) so for my first node I display the data in the nodes + the node attribute (the column name) 2) When I have One row I display the whole thing verticaly so I the same logic in another display logic 3) finally, when I have to display the rest of the rows (more then one) then they are just added tho the horizontal display (point 1 above) 3times the same logic... Can I do something about that? A methode? thx!!
The structure of your XML will make transforming it into a table easy or hard. However, you can structure your XSLT to increase the number of columns or rows dynamically by using templates and recursion rather than by looping using for-each. If you want to use functions (methods), parse it in C#, VB.NET, C++/CLI, C++, C or Java. By the way, I cannot help you much since you didn't give me any clues about the code you written or about the XML you are trying to parse.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
hay! I was wondering if I can use a methode in Xslt. I'm using 3 times the same display logic and I don't like that The 3 times: 1) I have to display a table (while headers) so for my first node I display the data in the nodes + the node attribute (the column name) 2) When I have One row I display the whole thing verticaly so I the same logic in another display logic 3) finally, when I have to display the rest of the rows (more then one) then they are just added tho the horizontal display (point 1 above) 3times the same logic... Can I do something about that? A methode? thx!!