Re: [xsl] How to tokenize a string that contains space-delimited tokens and a quoted string that must not be tokenized?

Subject: Re: [xsl] How to tokenize a string that contains space-delimited tokens and a quoted string that must not be tokenized?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Nov 2022 14:47:15 -0000
Am 11/28/2022 um 3:22 PM schrieb Roger L Costello costello@xxxxxxxxx:
Hi Folks,

I want to tokenize this string:

if machine = "Intel 386 or later processors and compatible processors" then
ground

into this sequence of tokens:


if
machine
=
Intel 386 or later processors and compatible processors
then
ground



Is there a simple way in XSLT/XPath to tokenize the string into the desired
sequence of tokens?


XPath 3:



analyze-string('if machine = "Intel 386 or later processors and compatible processors" then ground', '"[^"]*"|\S+')/*:match/string()

Current Thread