问题
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