尝试在Java UUID类的帮助下生成随机数。
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs" xmlns:uuid="java:java.util.UUID">
<xsl:template match="/">
<xsl:variable name="uid" select="uuid:randomUUID()"/>
<ClientPK><xsl:value-of select="$uid"/></ClientPK>
错误
Cannot find a matching 0-argument function named {java:java.util.UUID}randomUUID().
Note that direct calls to Java methods are not available under Saxon-HE
答案 0 :(得分:4)
请参阅http://saxonica.com/documentation/index.html#!extensibility,如果您想使用Saxon 9并具有该功能(称为反身扩展功能),则需要PE或EE许可。