Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms"
      xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <head>
        <title>Hierarchy with a single-level repeat</title>
        <xforms:model>
            <xforms:instance>
                <root>
                  <element1>
                     <element2>
                        <element3>
                           <element1>
                              <element2>
                                 <element3/>
                              </element2>
                           </element1>
                        </element3>
                     </element2>
                  </element1>
                </root>
            </xforms:instance>
        </xforms:model>
    </head>
    <body>
        <xforms:repeat nodeset="//*">
            <xforms:output value="string-join(for $element in ancestor-or-self::* return '', ' → ')"/>
            <xforms:output value="name()"/>
            <br/>
        </xforms:repeat>
    </body>
</html>