简体   繁体   中英

XSLT java functions in curly braces

I am learning XSLT and I see some codes like the following:

  <node id="{java:next($idgen)}:state" pred="should" mood="dcl">

where next is a java function. What are the curly braces used for?

Besides I am quite confused at how java functions are called in XSLT. In my sample code, XSLT just calls java functions like above without specifying the location of the java class file, even the class name is not specified.

您已经显示了带有属性值模板文字结果元素 ,其中属性值模板内的XPath表达式使用某些XSLT处理器特定的机制来调用变量$idgen 的Java方法

What are the curly braces used for?

The curly braces have nothing to do with Java. They indicate to the processor that the contents are to be evaluated as an expression - see: https://www.w3.org/TR/xslt/#attribute-value-templates

Besides I am quite confused at how java functions are called in XSLT.

That depends on your specific processor. Calling Java functions is not part of the XSLT standard, and only some processors support it as an extension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM