노드 이름을 제거하려고하지만 내용을 유지하거나 노드의 내용을 상위 노드로 복사하려고합니다. SSRS에서 XML을 내보내고 보고서 RDL에 XSLT 파일을 첨부했습니다. 나는 내가 가지고있는 xslt와 가까운 sooo 인 것처럼 느낀다. 파일에서 자주 반복되는 노드 '셀'을 제거하려고합니다.XSLT 노드를 제거하고 내용을 유지하십시오.
<ReportSectionAPercentLabel>
<Cell>
<losPct>0.262158054711246</losPct>
</Cell>
</ReportSectionAPercentLabel>
는 다음과 같이하려면 :
<ReportSectionAPercentLabel>
<losPct>0.262158054711246</losPct>
</ReportSectionAPercentLabel>
이것은 XML에서 excert입니다 :
<?xml version="1.0" encoding="UTF8"?>
<Report xmlns="My_Report" Name="My report">
<ReportSectionATablix>
<ReportSectionARowGroup_Collection>
<ReportSectionARowGroup>
<losProvider>Your Enterprise</losProvider>
<ReportSectionAColumnGroup_Collection>
<ReportSectionAColumnGroup>
<ReportSectionAGroupLabel>07</ReportSectionAGroupLabel>
<ReportSectionACountLabel>
<Cell>
<ReportSectionACount>345</ReportSectionACount>
</Cell>
</ReportSectionACountLabel>
<ReportSectionAPercentLabel>
<Cell>
<losPct>0.262158054711246</losPct>
</Cell>
</ReportSectionAPercentLabel>
</ReportSectionAColumnGroup>
<ReportSectionAColumnGroup>
<ReportSectionAGroupLabel>814</ReportSectionAGroupLabel>
<ReportSectionACountLabel>
<Cell>
<ReportSectionACount>153</ReportSectionACount>
</Cell>
</ReportSectionACountLabel>
...
이는 XSLT이다
나는이합니다. 셀에 대한 Xpath가 잘못 되었습니까?<xsl:template match="node()|@*" >
<xsl:copy>
<xsl:apply-templates select="node()|@*" />
</xsl:copy>
</xsl:template>
<xsl:template match="Cell" >
<xsl:apply-templates select="*" />
</xsl:template>
는 설명 sooo를 감사합니다. A) 네임 스페이스에 대해 이해하지 못했습니다. B) SSRS 출력에 표준 템플릿을 사용하는 대신 각 네임 스페이스를 지정해야합니다. 감사! – BClaydon