How to use an incremented counter to provide a unique id in XSLT?

后端 未结 4 1982
故里飘歌
故里飘歌 2021-01-20 01:40

I am using XSLT to convert a very large XML document into (X)HTML. For some of the tags I am converting them to a

. I would like to be able to create
4条回答
  •  后悔当初
    2021-01-20 02:39

    As suggested several times before, you need position(), but you have to iterate over the items using xsl:for-each:

    
        
            

    This will produce something like:

    book1
    book2
    book3

    for

    
        book1
        book2
        book3
    
    

提交回复
热议问题