Fetching attribute index

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • apurvaG
    New Member
    • Apr 2007
    • 14

    Fetching attribute index

    Hi All,

    I need to fetch index of particular attribute of a XMLNode using xslt. I know one we can do it by iterating through the arrtribute collection and then comparing the attribute name to get corresponding index.

    But is there any in built function supported in xslt that returns index of an attribute.

    Here is an expalme that will illustrate my problem.
    I have a node as ....
    <state name='new jersey' capital='trento n' code='nj' population='8,5 00,000' nickname='njsta te'/>

    Now suppose I want to fetch the index for the attribute "code". then how to do that? I dnt want to iterate thr the attribute collection or something like that. Is there any inbuilt function for this ?


    Thanks in advance,
    Apurva G.
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    ?? you mean state/@code?

    I don't know what you're talking about in this case. Iteration depends on what type of XSLT processor you're using, and then, you can't really control it that well.

    Comment

    Working...