XSLT 2.0 creating incremental footnote numbers in HTML output through multi-stage transformation

后端 未结 1 1516
醉话见心
醉话见心 2021-01-28 17:10

This question builds on the responses to my original question, where it was suggested that I post a followup. This concerns attempting to integrate the XSL code from the previou

1条回答
  •  旧巷少年郎
    2021-01-28 17:52

    I think, unless you want to prefix all your paths in that template matching / with the variable I suggested to store the result of the marker insertion, one way to merge the existing code with my suggestion is to change the match from / to /* e.g. use

    
            
            

    Latin

    English

    French

    that would then mean that my suggestion to use

    
        
    
    

    can be kept and the XSLT processor would apply it.

    There is however the use of that variable $footnote-sources at the end of the template, as far as I can see from the snippet its use on nodes from the original input document would not be affected by the introduction of a temporary result adding markers but somehow to me it would feel wrong to at that place keep processing the original input while the rest works on the temporary result so I would be inclined to change the variable declaration to

    
    

    With those two changes I think my suggestion in the previous answer should then be applied. Although now looking again at the posted source with a tei root element I wonder how a global variable having paths starting with tei:text would select anything but perhaps that is an omission in the sample.

    0 讨论(0)
提交回复
热议问题