grouping following-siblings with same name and same attributes causes exception in saxon

后端 未结 1 1801
不思量自难忘°
不思量自难忘° 2021-01-27 09:36

I have some xml documents (similar to docbook) that have to be transformed to xsl-fo. Some of the documents contains poems, and the lines of the poems are written in separate p

1条回答
  •  无人及你
    2021-01-27 10:03

    This stylesheet:

    
        
            
                
                
                    

    With this input:

    Headline

    1st line of 1st verse

    2nd line of 1st verse


    1st line of 2nd verse

    2nd line of 2nd verse

    3rd line of 2nd verse

    Output:

    1st line of 1st verse

    2nd line of 1st verse

    1st line of 2nd verse

    2nd line of 2nd verse

    3rd line of 2nd verse

    With this input:

    Headline

    1

    1st line of 1st verse

    2nd line of 1st verse


    2

    1st line of 2nd verse

    2nd line of 2nd verse

    3rd line of 2nd verse

    Output:

    1st line of 1st verse

    2nd line of 1st verse

    1st line of 2nd verse

    2nd line of 2nd verse

    3rd line of 2nd verse

    So, this stylesheet:

    
        
            
                
                
                    

    With this input:

    Poems

    Headline

    1st line of 1st verse

    2nd line of 1st verse


    1st line of 2nd verse

    2nd line of 2nd verse

    3rd line of 2nd verse

    Headline

    1

    1st line of 1st verse

    2nd line of 1st verse


    2

    1st line of 2nd verse

    2nd line of 2nd verse

    3rd line of 2nd verse

    Output:

    1st line of 1st verse

    2nd line of 1st verse

    1st line of 2nd verse

    2nd line of 2nd verse

    3rd line of 2nd verse

    1st line of 1st verse

    2nd line of 1st verse

    1st line of 2nd verse

    2nd line of 2nd verse

    3rd line of 2nd verse

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