我是 XSLT 的新手,在合并节点列表时遇到问题。感谢您对以下情况的帮助:
输入:
> <A Id="1"> > <B Id="4"> > <Attr> > <someAttr1>2</someAttr1> > <someAttr2>1</someAttr2> > </Attr> > <C Id="7"> > <Attr> > <someAttr3>2</someAttr3> > <someAttr4>1</someAttr4> > <someAttr5>7</someAttr5> > </Attr> > </C> > </B> > <B Id="9"> > <Attr> > <someAttr1>6</someAttr1> > <someAttr2>0</someAttr2> > </Attr> > <C Id="11"> > <Attr> > <someAttr3>1</someAttr3> > <someAttr4>3</someAttr4> > <someAttr5>5</someAttr5> > </Attr> > </C> > </B> > </A>
输出:
<A Id="1"> <B Id="4"> <Attr> <someAttr1>2</someAttr1> <someAttr2>1</someAttr2> <someAttr3>2</someAttr3> <someAttr4>1</someAttr4> <someAttr5>7</someAttr5> </Attr> </B> <B Id="9"> <Attr> <someAttr1>6</someAttr1> <someAttr2>0</someAttr2> <someAttr3>1</someAttr3> <someAttr4>3</someAttr4> <someAttr5>5</someAttr5> </Attr> </B> </A>