[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Random UUID in pure XSLT?

Subject: Re: Random UUID in pure XSLT?
From: "Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Nov 2020 20:56:31 -0000
Re:  Random UUID in pure XSLT?
XSL-List,

Thanks everyone for your answers so far. Very illuminating.

The good news seems to be as Dimitre reassures us that this is certainly
possible in some form. An extension function of some kind may be in order. I
like both of Mike Kaybs ideas. At its essence, however, this isnbt really
a question about how to extend XSLTbs native capability, but about how to
deploy and support such an extension. (While it seems that no one has anything
for RFC 4122 v4 already wired up.)

So yes (answering Liam), this is for SaxonHE or indeed bgeneric XSLT
3.0/XPath 3.1b, across a dispersed community of developers only a very few
of whom are XSLT-literate. A low-end, low-security option such as passing a
list of UUIDs in at runtime could even be a possibility, at least for some
subset of users.

Gratefully,
Wendell

From: Dimitre Novatchev dnovatchev@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, November 10, 2020 3:25 PM
To: xsl-list <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re:  Random UUID in pure XSLT?

Hi Wendell,

This question has definite answers even for XSLT 1.0, see for example this SO
question:


XSLT generate
UUID<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstacko
verflow.com%2Fquestions%2F8126963%2Fxslt-generate-uuid&data=04%7C01%7Cwendell
.piez%40nist.gov%7Ca79eb014ee294d31554908d885b6bb94%7C2ab5d82fd8fa4797a93e054
655c61dec%7C1%7C0%7C637406367190194961%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=r772TV7cRU6
B%2FBcaClDEAgqwAJL19DhnnNIw7NwyTdc%3D&reserved=0>

And we have had pure XSLT 1.0 random sequence generators since 2002 (FXSL):

Casting the Dice with FXSL: Random Number Generation Functions in
XSLT<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffxsl.so
urceforge.net%2Farticles%2FRandom%2FCasting%2520the%2520Dice%2520with%2520FXS
L-htm.htm&data=04%7C01%7Cwendell.piez%40nist.gov%7Ca79eb014ee294d31554908d885
b6bb94%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C637406367190204927%7CUnkn
own%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
6Mn0%3D%7C1000&sdata=3mA4ccpndiweGLuePpKUoDXuyxFqdbnKC8%2Bp4WHUOOA%3D&reserve
d=0>

HTH,
Dimitre

On Tue, Nov 10, 2020 at 8:36 AM Piez, Wendell A. (Fed)
wendell.piez@xxxxxxxx<mailto:wendell.piez@xxxxxxxx>
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list-service@xxxxxxxxxxxx
rytech.com>> wrote:
XSL Friends b

Today I write from the day job, where I am researching the question of how can
I go about producing random UUIDs, in dozens or hundreds, inside an XSLT
pipeline, without extension functions in Saxon. The Java randomUUID() function
works nicely when itbs available, but I need to distribute the capability
for SaxonHE and eventually SaxonJS.

We do not have an available implementation of RFC 4122 v4 brandom UUIDb in
pure XSLT do we, free to use (and study)? I know the functional nature of the
language makes randomness, um, problematic (when isnbt it?), which sometimes
means workarounds b thatbs all fine. Indeed so would calling out to a web
service if it is known to be reliable. I have thought about handing a list of
UUIDs in at runtime, but as I said, there may sometimes be hundreds and
perhaps thousands, which makes that approach seem a bit scary.

Any thoughts or perspective would be most welcome.

Thanks, Wendell



XSL-List info and
archive<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
mulberrytech.com%2Fxsl%2Fxsl-list&data=04%7C01%7Cwendell.piez%40nist.gov%7Ca7
9eb014ee294d31554908d885b6bb94%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C6
37406367190204927%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=k2OpxxvwfJ16INl2dBnOPVJ0mQcctMA1
mjDNdr0bBNM%3D&reserved=0>
EasyUnsubscribe<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2
F%2Flists.mulberrytech.com%2Funsub%2Fxsl-list%2F782854&data=04%7C01%7Cwendell
.piez%40nist.gov%7Ca79eb014ee294d31554908d885b6bb94%7C2ab5d82fd8fa4797a93e054
655c61dec%7C1%7C0%7C637406367190214878%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nY9GV%2BpS3
gpVvrDVKwEMXmm96bUVfKq%2BzwRIZ1VjvrE%3D&reserved=0> (by email)


--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what you're
doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write
all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

XSL-List info and
archive<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
mulberrytech.com%2Fxsl%2Fxsl-list&data=04%7C01%7Cwendell.piez%40nist.gov%7Ca7
9eb014ee294d31554908d885b6bb94%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C6
37406367190214878%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=bxaY3Jh3nClIid3558Ohd8gIHvxKVU9S
spysgcgFdT4%3D&reserved=0>
EasyUnsubscribe<https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2
F%2Flists.mulberrytech.com%2Funsub%2Fxsl-list%2F3302254&data=04%7C01%7Cwendel
l.piez%40nist.gov%7Ca79eb014ee294d31554908d885b6bb94%7C2ab5d82fd8fa4797a93e05
4655c61dec%7C1%7C0%7C637406367190224833%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL
jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Zvt1HFiJy3
3EuIQLE6H9q90cpDL7froQD8OHkVUV0gQ%3D&reserved=0> (by email<>)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.