0

I am new to xslt, my requirement is to generate a unique 9 digit code whenever my program runs so that i can assign that number in the output.Since I am novice i reviewed several posts but none of them worked as expected. Can anyone suggest me how to proceed or can anyone share a sample xml code?

Thanks, Sridhar

  • 1
    XSLT 2.0 cannot generate a random number. Also, it's not clear what you mean by "unique". A randomly generated number cannot be guaranteed to be unique. – michael.hor257k Feb 03 '20 at 22:11
  • If your using XSLT 2.0 you might as well update to XSLT 3.0 like in https://stackoverflow.com/questions/55832760/using-fnrandom-number-generator-to-produce-random-numbers-more-than-once – Alejandro Feb 03 '20 at 22:18
  • Hi Mike, Thanks for the input. I am actually looking for a unique number every time I call. Like a GUID in oracle. Is it possible in XSLT ? SELECT SYS_GUID() FROM dual; Thanks, Sridhar – sridhar Feb 04 '20 at 16:20

0 Answers0