intersection


<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors/>
</view>
<ROOT>
    <SERVICE name="s1">
        <VO id="dteam"/>
        <VO id="atlas"/>
    </SERVICE>
    <SERVICE name="s2">
        <VO id="dteam"/>
        <VO id="cms"/>
    </SERVICE>
</ROOT>

<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors>
        <aggregate context="/ROOT" function="count">
            <element name="nbServices" values="SERVICE"/>
        </aggregate>
    </processors>
</view>
<ROOT>
    <SERVICE name="s1">
        <VO id="dteam"/>
        <VO id="atlas"/>
    </SERVICE>
    <SERVICE name="s2">
        <VO id="dteam"/>
        <VO id="cms"/>
    </SERVICE>
    <nbServices>2.0</nbServices>
</ROOT>

<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors>
        <aggregate context="/ROOT" function="count">
            <element name="nbServices" values="SERVICE"/>
        </aggregate>
        <merge nodes="/ROOT"/>
    </processors>
</view>
<ROOT name="s1">
    <VO id="dteam"/>
    <VO id="atlas"/>
    <SERVICE name="s2">
        <VO id="dteam"/>
        <VO id="cms"/>
    </SERVICE>
    <nbServices>2.0</nbServices>
</ROOT>

<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors>
        <aggregate context="/ROOT" function="count">
            <element name="nbServices" values="SERVICE"/>
        </aggregate>
        <merge nodes="/ROOT"/>
        <remove nodes="/ROOT/SERVICE"/>
    </processors>
</view>
<ROOT name="s1">
    <VO id="dteam"/>
    <VO id="atlas"/>
    <nbServices>2.0</nbServices>
</ROOT>

<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors>
        <aggregate context="/ROOT" function="count">
            <element name="nbServices" values="SERVICE"/>
        </aggregate>
        <merge nodes="/ROOT"/>
        <remove nodes="/ROOT/SERVICE"/>
        <merge nodes="/ROOT/nbServices"/>
    </processors>
</view>
<ROOT name="s1">
    <VO id="dteam"/>
    <VO id="atlas"/>
    <nbServices nbServices="2.0"/>
</ROOT>

<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors>
        <aggregate context="/ROOT" function="count">
            <element name="nbServices" values="SERVICE"/>
        </aggregate>
        <merge nodes="/ROOT"/>
        <remove nodes="/ROOT/SERVICE"/>
        <merge nodes="/ROOT/nbServices"/>
        <move nodes="/ROOT/VO">
            <to-following name="nbServices"/>
        </move>
    </processors>
</view>
<ROOT name="s1">
    <nbServices nbServices="2.0">
        <VO id="dteam"/>
        <VO id="atlas"/>
    </nbServices>
</ROOT>

<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors>
        <aggregate context="/ROOT" function="count">
            <element name="nbServices" values="SERVICE"/>
        </aggregate>
        <merge nodes="/ROOT"/>
        <remove nodes="/ROOT/SERVICE"/>
        <merge nodes="/ROOT/nbServices"/>
        <move nodes="/ROOT/VO">
            <to-following name="nbServices"/>
        </move>
        <for nodes="/ROOT/nbServices/VO">
            <connector type="XMLConnector">
                <parameter name="content" eval="view('all_sets')"/>
            </connector>
            <processors/>
        </for>
    </processors>
</view>
<ROOT name="s1">
    <nbServices nbServices="2.0">
        <VO id="dteam">
            <ROOT>
                <SERVICE name="s1">
                    <VO id="dteam"/>
                    <VO id="atlas"/>
                </SERVICE>
                <SERVICE name="s2">
                    <VO id="dteam"/>
                    <VO id="cms"/>
                </SERVICE>
            </ROOT>
        </VO>
        <VO id="atlas">
            <ROOT>
                <SERVICE name="s1">
                    <VO id="dteam"/>
                    <VO id="atlas"/>
                </SERVICE>
                <SERVICE name="s2">
                    <VO id="dteam"/>
                    <VO id="cms"/>
                </SERVICE>
            </ROOT>
        </VO>
    </nbServices>
</ROOT>

<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors>
        <aggregate context="/ROOT" function="count">
            <element name="nbServices" values="SERVICE"/>
        </aggregate>
        <merge nodes="/ROOT"/>
        <remove nodes="/ROOT/SERVICE"/>
        <merge nodes="/ROOT/nbServices"/>
        <move nodes="/ROOT/VO">
            <to-following name="nbServices"/>
        </move>
        <for nodes="/ROOT/nbServices/VO">
            <connector type="XMLConnector">
                <parameter name="content" eval="view('all_sets')"/>
            </connector>
            <processors>
                <aggregate context="/ROOT" function="count">
                    <element name="nbVOs" values="SERVICE/VO[@id=current()/@id]"/>
                </aggregate>
            </processors>
        </for>
    </processors>
</view>
<ROOT name="s1">
    <nbServices nbServices="2.0">
        <VO id="dteam">
            <ROOT>
                <SERVICE name="s1">
                    <VO id="dteam"/>
                    <VO id="atlas"/>
                </SERVICE>
                <SERVICE name="s2">
                    <VO id="dteam"/>
                    <VO id="cms"/>
                </SERVICE>
                <nbVOs>2.0</nbVOs>
            </ROOT>
        </VO>
        <VO id="atlas">
            <ROOT>
                <SERVICE name="s1">
                    <VO id="dteam"/>
                    <VO id="atlas"/>
                </SERVICE>
                <SERVICE name="s2">
                    <VO id="dteam"/>
                    <VO id="cms"/>
                </SERVICE>
                <nbVOs>1.0</nbVOs>
            </ROOT>
        </VO>
    </nbServices>
</ROOT>

<view xmlns="http://software.in2p3.fr/lavoisier/config.xsd" name="intersection">
    <connector type="XMLConnector">
        <parameter name="content" eval="view('all_sets')"/>
    </connector>
    <processors>
        <aggregate context="/ROOT" function="count">
            <element name="nbServices" values="SERVICE"/>
        </aggregate>
        <merge nodes="/ROOT"/>
        <remove nodes="/ROOT/SERVICE"/>
        <merge nodes="/ROOT/nbServices"/>
        <move nodes="/ROOT/VO">
            <to-following name="nbServices"/>
        </move>
        <for nodes="/ROOT/nbServices/VO">
            <connector type="XMLConnector">
                <parameter name="content" eval="view('all_sets')"/>
            </connector>
            <processors>
                <aggregate context="/ROOT" function="count">
                    <element name="nbVOs" values="SERVICE/VO[@id=current()/@id]"/>
                </aggregate>
            </processors>
        </for>
        <!-- optimized version of XPath: /ROOT/nbServices/VO[ROOT/nbVOs/text()=../@nbServices]/@id -->
        <select nodes="/ROOT/nbServices/VO/@id">
            <if-descendant name="nbVOs" predicate="text()=ancestor::nbServices/@nbServices"/>
        </select>
    </processors>
</view>
<_entries_:entries xmlns:_entries_="http://software.in2p3.fr/lavoisier/entries.xsd">
    <_entries_:entry>dteam</_entries_:entry>
</_entries_:entries>