How to apply XSLT transformation in a BPEL process

孤人 提交于 2019-12-12 02:05:29

问题


From an answer to my previous question, I have this input XML:

<?xml version="1.0" encoding="UTF-8"?>
<Containers>
  <Container>
    <LocalDataContainer>
      <file>InputFile3</file>
    </LocalDataContainer>
  </Container>
  <Container>
    <LocalDataContainer>
      <file>InputFile2</file>
    </LocalDataContainer>
  </Container>
  <Container>
    <LocalDataContainer>
      <file>InputFile3</file>
    </LocalDataContainer>
  </Container>
</Containers>

Which when given to this XSLT:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="Container[LocalDataContainer/file != 'InputFile3']"/>
</xsl:stylesheet>

Produces this output XML:

<?xml version="1.0" encoding="UTF-8"?>
<Containers>
  <Container>
    <LocalDataContainer>
      <file>InputFile3</file>
    </LocalDataContainer>
  </Container>
  <Container>
    <LocalDataContainer>
      <file>InputFile3</file>
    </LocalDataContainer>
  </Container>
</Containers>

How can the XSLT be included technically into BPEL process? I am using Eclipse BPEL Designer where to put the XSLT file? Is the XSLT saved as .xsl file which is then just imported into project folder? And how does the Assign have to look like? I want to assign the new list to a variable of type datacontainerreferencelist (defined with XSD, which has exactly the structure of the given input XML, root element is Containers)

来源:https://stackoverflow.com/questions/27023842/how-to-apply-xslt-transformation-in-a-bpel-process

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!