你能帮我实现这个 XSLT 转换吗?这更像是扭转关系...
我有 Offer/Offer*/TrimLine*/PRNumber* ---> 我想将其转换为 PRNumbers/PRNumber*/TrimLine*/Offer*
输入:
<offerStructures>
<offerStructure>
<productId>1</productId>
<brandName>OS</brandName>
<trimLines>
<trimLine>
<productId>12</productId>
<trimLineName>12TL</trimLineName>
<prNumbers>
<prNumber>
<productId>1</productId>
<countryCode>IN</countryCode>
<brandName>OKI</brandName>
</prNumber>
<prNumber>
<productId>2</productId>
<countryCode>US</countryCode>
<brandName>LOP</brandName>
</prNumber>
</prNumbers>
</trimLine>
<trimLine>
<productId>13</productId>
<trimLineName>13TL</trimLineName>
<prNumbers>
<prNumber>
<productId>1</productId>
<countryCode>IN</countryCode>
<brandName>PYU</brandName>
</prNumber>
<prNumber>
<productId>3</productId>
<countryCode>AU</countryCode>
<brandName>ABC</brandName>
</prNumber>
</prNumbers>
</trimLine>
</trimLines>
</offerStructure>
../Multiple Offer Structure
</offerStructures>
所需输出:
<prNumbers>
<prNumber>
<productId>1</productId>
<countryCode>IN</countryCode>
<brandName>PYU</brandName>
<trimLine>
<productId>13</productId>
<trimLineName>13TL</trimLineName>
<offerStructure>
<productId></productId>
</offerStructure>
<offerStructure>
<productId></productId>
</offerStructure>
</trimLine>
<trimLine>
<productId>12</productId>
<trimLineName>12TL</trimLineName>
</trimLine>
</prNumber>
<prNumber>
<productId>2</productId>
<countryCode>US</countryCode>
<brandName>LOP</brandName>
<trimLine>
<productId>12</productId>
<trimLineName>12TL</trimLineName>
<offerStructure>
<productId></productId>
</offerStructure>
</trimLine>
</prNumber>
<prNumber>
<productId>3</productId>
<countryCode>AU</countryCode>
<brandName>ABC</brandName>
<trimLine>
<productId>13</productId>
<trimLineName>13TL</trimLineName>
</trimLine>
</prNumber>
</prNumbers>
谢谢