次のグラフがあります。
<?xml version="1.0" encoding="utf-8"?><graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<graph edgedefault="undirected">
<node id="a">
<data key="d0">some info</data>
</node>
<node id="b"/>
<node id="c">
<data key="d0">some more info</data>
</node>
<node id="d"/>
<edge source="a" target="b"/>
<edge source="a" target="c"/>
<edge source="b" target="c"/>
<edge source="b" target="d"/>
<edge source="c" target="d"/>
</graph>
</graphml>
そして、XSLT を使用して、 node に隣接するすべてのノードを含むグラフのサブセットを作成しようとしていますa
。
望ましい出力:
<?xml version="1.0" encoding="utf-8"?><graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<graph edgedefault="undirected">
<node id="b"/>
<node id="c">
<data key="d0">some more info</data>
</node>
<edge source="b" target="c"/>
</graph>
</graphml>
私は XSLT の専門家ではありませんが、段階的に行うことは可能ですか? つまり、最初に問題のあるエッジを削除してから、隣接しないノードを削除しますか?