0

Find the uuid usig the xslt

    <xsl:for-each select="item">
        <item id="{my:UUID4()}">
            <xsl:value-of select="." />
        </item>
    </xsl:for-each>
  • `my:UUID4()` is a custom function that needs to be defined in your stylesheet. And you need a processor that supports XSLT 2.0 in order to use it. Or an XSLT 1.0 processor that supports the `func:function` extension element (and the other extension functions) - in case you are trying to implement this: https://stackoverflow.com/a/60074845/3016153. --- Please post a [mcve], not snippets of code taken out of context. – michael.hor257k May 11 '23 at 09:29

1 Answers1

0

This looks like a Saxon error message, so I guess you are using Saxon as your XSLT processor.

Are you trying to call an external Java function? Calling conventions to call external Java code from XSLT vary from one XSLT processor to another, so this is relevant to your question. There are many things you might be doing wrong to cause this error message (for example, the function might not actually exist) so you're going to have to give us more information before we can help you identify the cause.

Information about writing Java extension functions for Saxon can be found at https://www.saxonica.com/documentation12/index.html#!extensibility/extension-functions-J

Michael Kay
  • 156,231
  • 11
  • 92
  • 164