Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Methode in Xslt?

Methode in Xslt?

Scheduled Pinned Locked Moved XML / XSL
xmljsonquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Ollie1986
    wrote on last edited by
    #1

    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!!

    G P 2 Replies Last reply
    0
    • O Ollie1986

      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!!

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • O Ollie1986

        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!!

        P Offline
        P Offline
        Paresh Chitte
        wrote on last edited by
        #3

        Use ... Please refer this[^] for more information. Regards, Paresh.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups