0
解析WSDL时,遇到很多wsdl:import
和xsd:import
元素。我想解析导入并将@location
或@schemaLocation
传递给解析器。将参数传递给解析导入的文件
目的是在导入的文件导入文件例如filea.wsdl;filez.xsd;filev.xsd
时增加文件列表。这样我可以消除以前导入的文件。
我想的东西沿着这些线路:
<xsl:param name="file-list"/>
<xsl:template match="/">
<xsl:param name="file-list"/>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="wsdl:import">
<xsl:apply-templates select="document(@location)">
<xsl:with-param name="file-list" select="concat($file-list, ';', @location)`"/>
</xsl:apply-templates>
</xsl:template>