Saxon 및 WildFly 10.0.0. 최종에 문제가 있습니다. 일부 XSLT를 작성했으며 단위 테스트를 실행할 때 제대로 작동하지만 Wildfly에서 동일한 코드를 실행하면 문제가 발생합니다. 내 pom.xml 파일에서Wildfly에서 Saxon을 올바르게 사용하는 방법?
나는 다음과 같은 종속성이 :
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.8.0-4</version>
</dependency>
나는 색슨의 몇 가지 버전을 시도하고 심지어는 Xalan을 위해 그것을 교환하지만 여전히 같은 문제를 얻고있다. 유닛 테스트에서는 작동하지만 Wildfly에서는 결코 작동하지 않습니다. 문제는 "Wildfly 케이스"가 단순히 XSLT의 일부를 무시한다는 것입니다. 예를 들어이 부분은 무시됩니다 :
<xsl:for-each select="$var33_Tracking/ns0:PartyIdentification/ns0:Location">
<xsl:variable name="var13_LatLong" as="node()" select="ns0:LatLong"/>
<xsl:variable name="var12_cur_as_string" as="xs:string" select="fn:string($var13_LatLong)"/>
<xsl:variable name="var14_result" as="xs:string?">
<xsl:choose>
<xsl:when test="(fn:string(fn:string-length($var12_cur_as_string)) > '0')">
<xsl:sequence select="$var12_cur_as_string"/>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="ns0:GeoLoc">
<xsl:sequence select="fn:string(.)"/>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select="$var14_result">
<LatitudinalHemisphere>
<xsl:choose>
<xsl:when test="(fn:substring-before(., ',') < '0')">
<xsl:sequence select="'S'"/>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="'N'"/>
</xsl:otherwise>
</xsl:choose>
</LatitudinalHemisphere>
</xsl:for-each>
</xsl:for-each>
그것은 일부 기능과 같습니다 fn:string-length
또는 fn:substring-before
이 문제가 발생할 수 있지만, 그 문제를 해결하는 방법을 알아낼 수 없습니다. 어떤 아이디어 또는 팁?
Wildfly에서 영향을받는 XSLT를 사용하려는 방법에 대한 정보가 없어도 여기 누구든지 답변을 시작할 수 있다면 놀라실 것입니다. 일반적으로 "일부 정보"는 [mcve] 여야합니다. 애플리케이션 서버에 전개 된 어떤 것에는 이것이 어려울 수 있음을 인정하지만, 확실하게 컨텍스트와 덜 복잡함을 모두 제공 할 수 있습니다. –