I’m using XSLT 2.0. Here is my first file.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xalan="http://xml.apache.org/xslt" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:IAAXML="http://www.ibm.com/industries/financialservices/IAAXML">
<xsl:import href="address.xsl"/>
<xsl:template match="/">
<Claim>
<Contact>
<xsl:variable name="contact" select="//IAAXML:Invoice/IAAXML:roleInFinancialStatement/IAAXML:party[@xsi:type='IAAXML:Organization']/IAAXML:subOrganisation"/>
<xsl:call-template name="address">
<!-- <xsl:param name="contactParam" select="$contact"/> -->
<xsl:with-param name="contactParam" select="$contact"/>
</xsl:call-template>
</Contact>
</Claim>
</xsl:template>
</xsl:stylesheet>
Here is my second file.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xalan="http://xml.apache.org/xslt" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:IAAXML="http://www.ibm.com/industries/financialservices/IAAXML">
<xsl:param name="contactParam" select="'default'"/>
<!-- <xsl:param name="address" select="'default'"/> -->
<xsl:template match="/" name="address" >
<Address>
<xsl:variable name="address" select="$contactParam[IAAXML:type/IAAXML:name='Department']/IAAXML:partyContactPreferences/IAAXML:contactPoints" />
<AddressLine1>
<xsl:value-of select="$address/IAAXML:addressLines" />
</AddressLine1>
<City>
<xsl:value-of select="$address/IAAXML:city" />
</City>
<State>
<xsl:value-of select="$address/IAAXML:state" />
</State>
</Address>
</xsl:template>
</xsl:stylesheet>
I get the following error: IXJXE0781E: [ERR 0700][ERR XTSE0680] It is a static error to pass a parameter that is not a tunnel parameter ‘contactParam’ to a template that does not have a template parameter that has the same expanded QName.; SystemID: file:/C:/p4/xslPlay/partyTx/test.xsl; Line#: 10; Column# 62
What am I doing wrong? How can I accomplish the passing of the parameter to the other file? Thanks.
Shouldn’t your template have a parameter named contactParam in this case?:
I have a feeling that’s what the error is about.