Subscribe to the XSL-List Blog in XML format
RSS 2.0
Atom 0.3

The XSL-LIST Blog

The XSL-List Blog's mission is to increase the level of XSL knowledge and usage in the software development community. It's a service by Mulberry Technologies, and the list is by far the most popular XSL development forum in the world — in fact, some of the inventors of XSL hang out there and respond to questions. Got a stylesheet emergency? Want to contribute to the XSL community? visit the XSL-List blog today!


Re: Grouping based on child value

Posted 6/5/2025 8:18:53 PM

Hello, I might put starting-with="*[col1='PR']" if only because more concise more closely matches abstract logic (arguably) Of course one might also make the opposite argument. Regards, Wendell On Thu, Jun 5, 2025 at 3:30b/PM Terry Badger terry_badger@xxxxxxxxx < xsl-list-servic . . . Read full entry »


Re: Grouping based on child value

Posted 6/5/2025 7:29:44 PM

Slight change B <xsl:template match="root"> B B B B <xsl:copy> B B B B B B <xsl:for-each-group group-starting-with="record[col1[. = 'PG']]" select="record"> B B B B B B B B <group> B B B B B B B B B B <xsl:copy-of . . . Read full entry »


Re: Grouping based on child value

Posted 6/5/2025 7:13:56 PM

Thank you Martin. I forgot about group-starting-with using a pattern. >would do that. Remember, the group-starting-with is a pattern the element to start a group has to match. . . . Read full entry »


Re: Grouping based on child value

Posted 6/5/2025 6:56:00 PM

On 05/06/2025 20:49, rick@xxxxxxxxxxxxxx wrote: > > Here is my XML: > > <?xml version="1.0" encoding="UTF-8"?> > > <root> > > B B B <record> > > B B B B B B B <col1>PG</col1> > > B B B </record> > > . . . Read full entry »


Grouping based on child value

Posted 6/5/2025 6:48:47 PM

Hi all, Here is my XML: <?xml version="1.0" encoding="UTF-8"?> <root> <record> <col1>PG</col1> </record> <record> <col1>1</col1> </record> <record> <co . . . Read full entry »


[ANN] Come speak at Balisage 2025 (call for late-break

Posted 6/2/2025 3:33:02 PM

Balisage 2025 is all virtual and all live (August 4b8) See the preliminary peer-reviewed program at: https://www.balisage.net/2025/Program.html It is not too late to apply to speak this year! Balisage always leaves room in the schedule for late-breaking presentations. Have you just made a bre . . . Read full entry »


XSL-List Guidelines

Posted 6/1/2025 4:20:03 PM

This information is posted to the XSL-List (and the XSL-List Digest) at intervals under the subject line "XSL-List guidelines". INTRODUCTION TO XSL-LIST XSL-List hosts discussion of XSL itself, XSL applications and implementation, and XSL user questions. XSL-List is open to everyone, us . . . Read full entry »


[ANN] Balisage 2025 Preliminary Program Published

Posted 5/22/2025 10:19:03 PM

The program for the annual markup geekfest in August in now available*: https://balisage.net/2025/Program.html <https://balisage.net/2024/Program.html> Balisage 2025 will be: All virtual, live, technical, and interactive 4 - 8 August 2025 Balisage 2025 has developer insights, case stud . . . Read full entry »


[jats-list] upcoming 3-day online XSLT course

Posted 5/21/2025 10:55:01 PM

Hello! ibd said May but it ended up in June. Therebs still room. We will start with the fundamentals and aim to build confidence, joy, and delight with writing and maintaining XSLT 1, 2 and 3. This course does not go into the advanced XSLT 3 features that i cover in the XSLT 3 course, but shows . . . Read full entry »


Re: Using saxon-js to run a javasscript function from

Posted 5/20/2025 7:14:23 PM

This works (tested in https://martin-honnen.github.io/xslt3fiddle/), but the JS function is inlined in the stylesheet. Maybe you could use unparsed-text() to get the contents of the JS file, and then ixsl:eval() them. <?xml version="1.0" encoding="utf-8"?> <xsl:stylesh . . . Read full entry »


Re: Using saxon-js to run a javasscript function from

Posted 5/20/2025 6:07:42 PM

On Tue, 2025-05-20 at 17:46 +0000, dvint dvint@xxxxxxxxx wrote: > Based upon Michael Kay's response it is not possible to do this > without having the Javascript drive the process. One way might be to set up your node-based JS application to listen on localhost, and use wget or curl on the c . . . Read full entry »


Re: Using saxon-js to run a javasscript function from

Posted 5/20/2025 5:50:33 PM

On 20/05/2025 19:46, dvint dvint@xxxxxxxxx wrote: Based upon Michael Kay's response it is not possible to do this without having the Javascript drive the process. I already have a Python script running things in a similar way. What do you have, a Python script running XSLT 3.0 calling a JavaScript . . . Read full entry »


Re: Using saxon-js to run a javasscript function from

Posted 5/20/2025 5:46:18 PM

Based upon Michael Kay's response it is not possible to do this without having the Javascript drive the process. I already have a Python script running things in a similar way.Thanks..danSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "dvint dvint@xxxxxx . . . Read full entry »


Re: Using saxon-js to run a javasscript function from

Posted 5/20/2025 4:40:03 PM

That covers running in an html page and how to run xslt in Javascript. I'm trying to run an xslt from the command line that has a call to Javascript...danSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Michael Mueller-Hillebrand michael.mueller-hillebra . . . Read full entry »


Re: Using saxon-js to run a javasscript function from

Posted 5/20/2025 6:55:10 AM

> Error XPST0017: > Static error in XPath on line 20 in _betterXML/test-js.xsl {saxon:call('greet', $name)}: Unknown function Q{http://saxon.sf.net/}call() > Failed to compile stylesheet Use the ixsl:call() function documented at https://www.saxonica.com/saxonjs/documentation3/index.htm . . . Read full entry »


Re: Using saxon-js to run a javasscript function from

Posted 5/20/2025 6:23:30 AM

Hi Dan, regarding your "resources on the web", have you had a chance to look at https://github.com/Saxonica/SaxonJS-Tutorial-2021 ? This was very helpful for me in preparing a little demo while travelling to Markup UK in 2023. Best regards, Michael -----Original Message----- From: dvin . . . Read full entry »


Using saxon-js to run a javasscript function from XSLT

Posted 5/20/2025 5:09:20 AM

I'm trying to put this together from various sources on the web and none of them seem to be complete. Main piece missing is how to connect the js to the stylesheet. I'm just trying to get a simple exsmple working before tackling my main problem. This is my command line. I can't get the xslt3 co . . . Read full entry »


Re: xml-to-json: element found in the wrong namespace:

Posted 5/17/2025 4:24:50 AM

On Sat, May 17, 2025 at 04:05:19AM -0000, dvint@xxxxxxxxx scripsit: > <request > Quoting https://qt4cg.org/specifications/xpath-functions-40/Overview.html#json-to-xml-mapping "fn:xml-to-json Converts an XML tree, whose format corresponds to the XML representation of JSON defined in . . . Read full entry »


xml-to-json: element found in the wrong namespace: q{

Posted 5/17/2025 4:05:11 AM

I'm not finding this documented in the spec. I'm using xlst 3.0 and trying to send this content to xml-to-json. <request > <auth> <type>basic</type> <basic> <key>username</key> <value>{{adminAppID}}</value> <type>string< . . . Read full entry »


Re: how to avoid losing data when the transformation

Posted 5/15/2025 9:27:06 PM

I would convert the XSLT file so that the primary output is nothing, or is negligible, and the secondary output becomes the point of focus. Use <xsl:result-document> or file:write(), protecting those actions with the appropriate condition-checking, and message writing. Under this approach . . . Read full entry »


Re: how to avoid losing data when the transformation

Posted 5/15/2025 6:56:42 PM

On Thu, 2025-05-15 at 17:50 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > > What is the proper way to deal with this problem? In most cases the best way is to have Saxon output to a temporary file, check the status, and then rename the temporary file. However, within XSL . . . Read full entry »


Re: how to avoid losing data when the transformation

Posted 5/15/2025 6:50:46 PM

Hello Wolfhart, This gets XSLT into the area of workflow and resource (dependency) management, and it is a functional language, designed to work the same across different implementations (and architectures, including caching architectures). So you run up against all kinds of problems when you try . . . Read full entry »


Re: how to avoid losing data when the transformation

Posted 5/15/2025 6:03:51 PM

Is that an XSLT problem in that the XSLT processor really reads and writes the same file in a single transformation? Or should your "script" somehow note that the XSLT failed to produce a normal result and in that case not overwrite the input? Sorry for not having been clear. The situa . . . Read full entry »


Re: how to avoid losing data when the transformation

Posted 5/15/2025 5:54:11 PM

On 15/05/2025 19:50, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: Dear list, I would like to ask for your advice on the following problem: I have a script that modifies an existing XML file, drawing on external data, changing or complementing the existing data in the file. This means t . . . Read full entry »


how to avoid losing data when the transformation fails

Posted 5/15/2025 5:50:09 PM

Dear list, I would like to ask for your advice on the following problem: I have a script that modifies an existing XML file, drawing on external data, changing or complementing the existing data in the file. This means that the source and the output of the transformation are the same file. Now, . . . Read full entry »


Call for presentations Declarative Amsterdam 2025

Posted 5/15/2025 8:37:16 AM

Hi all, Following the success of the past six editions, the seventh edition of Declarative Amsterdam will once again take place at the Science Park, Amsterdam, on Thursday/Friday 6/7 November 2025. As usual, it will be a hybrid conference with the opportunity to attend live or online, for both att . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/14/2025 7:44:52 PM

On 14/05/2025 16:49, Michael Kay mike@xxxxxxxxxxxx wrote: [...] for the UK, a better rule is to use the address as listed by Royal Mail. The postal authorities always have what they consider to be the "official" version of an address. I think it's pragmatism: that is the address they fi . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/14/2025 3:48:37 PM

> IMNSHO never use abbreviations like St, Rd, Ave, etc because of the risk of misinterpretation in international contexts, eg > I agree that's good practice, but for the UK, a better rule is to use the address as listed by Royal Mail. For example the official postal address here is Chiltern . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/14/2025 2:24:09 PM

On Fri, 2025-05-02 at 12:07 +0000, Michael B Allen ioplex@xxxxxxxxx wrote: <address \xA0 street="123 Main St" \xA0 city="Townville" \xA0 state="PA"/> On 02/05/2025 18:33, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: A good rule of thumb for document-oriented inf . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/14/2025 10:49:27 AM

On 02/05/2025 18:33, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: On Fri, 2025-05-02 at 12:07 +0000, Michael B Allen ioplex@xxxxxxxxx wrote: <address CB street="123 Main St" CB city="Townville" CB state="PA"/> > A good rule of thumb for document-oriented . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 9:07:52 PM

On Tue, 2025-05-13 at 20:09 +0000, dvint@xxxxxxxxx wrote: > > I like this one > > replace($input, '[^a-z0-9]+', '-', 'i') > > > what does that 'i' and the end do? I thought replace only had 3 > parameters. Therebs a version of replace() that takes a $flags argument. The i . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 8:48:40 PM

Some general rules: * In an XML attribute using double quotes as delimiters, write double quotes as &quot; * In an XML attribute using single quotes as delimiters, write single quotes as &apos; The above replacements give you the string that XPath sees, which should then follow the rules: . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 8:08:59 PM

I like this one replace($input, '[^a-z0-9]+', '-', 'i') more generl and avoids the problem all together ;-) what does that 'i' and the end do? I thought replace only had 3 parameters. I wasn't able to get any of the quote options in the replace to work, not sure what I'm doing wrong there, so . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 7:19:53 PM

On 13/05/2025 21:05, dvint dvint@xxxxxxxxx wrote: Trplle apos does the trick for defining the variable, but doesn't work for the replace(). It is not clear what you want to replace and the second argument to replace is a regular expression anyway e.g. B replace($input, '["'']+', '') would r . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 7:19:21 PM

On Tue, 2025-05-13 at 18:40 +0000, dvint@xxxxxxxxx wrote: > much working > > <xsl:function name="ping:gen_id"> > <xsl:param name="INSTRING"/> > <xsl:value-of select="translate(replace(lower- > case($INSTRING), ' ', > '_'), > ':()',' . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 7:17:52 PM

one day I'll learn to type... that was supposed to say so you can use "foo 'example' bar" or 'foo ''example'' bar' to get the string foo 'example' bar On Tue, 13 May 2025 at 20:15, David Carlisle d.p.carlisle@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 7:15:11 PM

On Tue, 13 May 2025 at 20:04, dvint dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Trplle apos does the trick for defining the variable, but doesn't work for > the replace(). > to get a ' into an xpath string you either need a single ' in as "-quoted strin . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 7:04:49 PM

Trplle apos does the trick for defining the variable, but doesn't work for the replace().Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 5/13/25 11:51 AM (G . . . Read full entry »


Re: Creating strings with apos and replacing

Posted 5/13/2025 6:50:55 PM

On 13/05/2025 20:40, dvint@xxxxxxxxx wrote: My main question is the correct way to use replace() to remove special characters and spaces that appear in document titles. Some I just want to remove and others I want to translate to something else. I have this much working <xsl:function name=" . . . Read full entry »


Creating strings with apos and replacing

Posted 5/13/2025 6:40:35 PM

My main question is the correct way to use replace() to remove special characters and spaces that appear in document titles. Some I just want to remove and others I want to translate to something else. I have this much working <xsl:function name="ping:gen_id"> <xsl:param nam . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 6:24:09 PM

On Fri, May 2, 2025 at 11:18b/AM Tony Graham tgraham@xxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On 02/05/2025 14:37, Peter Flynn peter@xxxxxxxxxxx wrote: > > On 02/05/2025 13:07, Michael B Allen ioplex@xxxxxxxxx wrote: > > [...] > >> For example . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 5:32:52 PM

On Fri, 2025-05-02 at 12:07 +0000, Michael B Allen ioplex@xxxxxxxxx wrote: > > <address > B street="123 Main St" > B city="Townville" > B state="PA"/> A good rule of thumb for document-oriented information in XML is that anything user-facing sh . . . Read full entry »


Re: What is the correct xpath?

Posted 5/2/2025 5:03:47 PM

Yeah, sorry, I had cleaned the namespace out of all but that last example to make it simpler. I couldn't figure out the correct way to match the content in the xpath.I made a hack of getting to the correct context with a for-each and will replace that with this. Someone else actually proposed this . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 4:58:16 PM

IMO the trouble of designing and implementing such a custom approach would be greater than any benefit it would have over the standard json-to-xml(). On Fri, 2 May 2025 at 18.54, dvint dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I'm trying to find an xml result th . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 4:54:44 PM

I'm trying to find an xml result that is better than what json-to-xml() produces. I already have that approach working. I'm not trying for the perfect or correct interpretation of the json environment,B just something with more useful element names. Was that the map/map/map/string item, vs example . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 4:39:21 PM

Anyone remember James @id generation? Might be useful for valid element names. regards On Fri, 2 May 2025 at 17:34, Wendell Piez wapiez@xxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Dan, > > Given that you need something unencumbered by IP restrictions that . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 4:34:16 PM

Dan, Given that you need something unencumbered by IP restrictions that you know how to use and adapt, I would bet the easy way forward would be to add logical layers of your own (using XSLT) to the basic format provided for by the generic tool. You might be surprised at how rapidly you can put to . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 3:18:24 PM

On 02/05/2025 14:37, Peter Flynn peter@xxxxxxxxxxx wrote: On 02/05/2025 13:07, Michael B Allen ioplex@xxxxxxxxx wrote: [...] For example, it is commonplace to do something like the following: <address> \xA0\xA0 <street>123 Main St</street> \xA0\xA0 <city>Townville</city& . . . Read full entry »


Re: What is the correct xpath?

Posted 5/2/2025 3:11:45 PM

Not seeing anything regarding your need for the "j:" namespace. Might that be interfering with your expectations somehow? Popping your XML and XPath in oXygen works for me, provided I modify it slightly for the context in which I am running it. //array[@key='header']/map[string[@key=' . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 1:37:16 PM

On 02/05/2025 13:07, Michael B Allen ioplex@xxxxxxxxx wrote: [...] For example, it is commonplace to do something like the following: <address> \xA0 <street>123 Main St</street> \xA0 <city>Townville</city> \xA0 <state>PA</state> </address> IMO the . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 1:02:00 PM

Regarding bloading into a Docker image for the production implementationb, last year I presented at XML Prague<https://www.xmlprague.cz/day2-2024/#Containerizing> on containerizing XML build tools. You might try that path. You could easily build an image with Saxon and an XProc processor (l . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 12:49:03 PM

I keep thinking that if there was a standard declaring something like "json fit for xml" and/or "xml fit for json", at least there would be targets by which to do this without a lot of the bigger cruft things. That would require json keys to be valid qnames and for all array dem . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 12:07:22 PM

On Thu, May 1, 2025 at 6:35b/PM dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I know (and have been using) the xlst json-to-xml() function for this > purpose, but it is a pretty basic result. I happened to try the JSON to > XML funtion in oXygen and got what I' . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/2/2025 4:51:41 AM

Thanks, but this one is using the same xslt function I'm using niw and I'm trying to find something better...danSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martynas JuseviD ius martynas@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/1/2025 11:50:51 PM

On Thu, 2025-05-01 at 22:35 +0000, dvint@xxxxxxxxx wrote: > I know (and have been using) the xlst json-to-xml() function for this > purpose, but it is a pretty basic result. I happened to try the JSON > to > XML funtion in oXygen and got what I'd say is a much better result > where & . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/1/2025 11:49:43 PM

Maybe you can tweak/extend this: https://github.com/AtomGraph/JSON2XML On Fri, May 2, 2025 at 12:35b/AM dvint@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I know (and have been using) the xlst json-to-xml() function for this > purpose, but it is a pretty basic resu . . . Read full entry »


Re: Convert JSON to XML?

Posted 5/1/2025 10:42:42 PM

On 02/05/2025 00:35, dvint@xxxxxxxxx wrote: I know (and have been using) the xlst json-to-xml() function for this purpose, but it is a pretty basic result. I happened to try the JSON to XML funtion in oXygen and got what I'd say is a much better result where I had some unique elemeent names instead . . . Read full entry »


Convert JSON to XML?

Posted 5/1/2025 10:35:02 PM

I know (and have been using) the xlst json-to-xml() function for this purpose, but it is a pretty basic result. I happened to try the JSON to XML funtion in oXygen and got what I'd say is a much better result where I had some unique elemeent names instead of everything being a map or a string e . . . Read full entry »


XSL-List Guidelines

Posted 5/1/2025 4:54:03 PM

This information is posted to the XSL-List (and the XSL-List Digest) at intervals under the subject line "XSL-List guidelines". INTRODUCTION TO XSL-LIST XSL-List hosts discussion of XSL itself, XSL applications and implementation, and XSL user questions. XSL-List is open to everyone, us . . . Read full entry »


Re: What is the correct xpath?

Posted 4/30/2025 11:08:42 PM

On 01/05/2025 01:04, dvint@xxxxxxxxx wrote: I get to the right area with this "../array[@key='header']/map/string[@key='key']" I'm stuck on how to now match the value "Content-Type" and then findB the content of <string key="value">application/x-www-form-urlenco . . . Read full entry »


What is the correct xpath?

Posted 4/30/2025 11:04:30 PM

I have this XML <test> <string key="method">POST</string> <array key="header"> <map> <string key="key">Authorization</string> <string key="value">Basic {{solutionAppID:so . . . Read full entry »


Re: Way to print the current context?

Posted 4/25/2025 6:26:41 PM

Thanks all.B The fn:path() did the trick. I did also wrap that in a function to remove the namespace. I used the replace() function, took me a minute to realize the matching strings are regex values. I was getting an error about a bad character. The namespace url had {} characters that needed to be . . . Read full entry »


Re: Way to print the current context?

Posted 4/25/2025 1:00:40 PM

Hello, Just adding the obvious point that if you write yourself a function or set of templates to write an XPath (as Dmitre has done) you can also tune it to write better paths ('better' being relative to your case). Templates make this pretty easy too and a nice exercise for beginner-intermediat . . . Read full entry »


Re: Way to print the current context?

Posted 4/25/2025 1:11:03 AM

1. The standard XPath 3 function fn:path 2. This XSLT transformation I wrote years ago: https://stackoverflow.com/questions/4746299/generate-get-xpath-from-xml-in-ja va/4747858#4747858 Thanks, Dimitre. On Thu, Apr 24, 2025 at 3:40b/PM dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx& . . . Read full entry »


Re: Way to print the current context?

Posted 4/24/2025 11:18:18 PM

On 24/04/2025 23:58, Martin Honnen martin.honnen@xxxxxx wrote: [...] And of course in various context like Schematron people have written XSLT functions or templates to construct a path before XPath 3 introduced a function for that. Emacs, for example, has psgml-xpointer (from David Megginson) whic . . . Read full entry »


Re: Way to print the current context?

Posted 4/24/2025 10:58:24 PM

On 25/04/2025 00:40, dvint@xxxxxxxxx wrote: oXygen provides a nice utility where you place your cuursor on an element and it will give you an xpath to that element. /fn:map/fn:array[1]/fn:map[2]/fn:array[1]/fn:map[1]/fn:map[2]/fn:string[2] It doesn't give you any of the attribute values that are o . . . Read full entry »


Way to print the current context?

Posted 4/24/2025 10:40:17 PM

oXygen provides a nice utility where you place your cuursor on an element and it will give you an xpath to that element. /fn:map/fn:array[1]/fn:map[2]/fn:array[1]/fn:map[1]/fn:map[2]/fn:string[2] It doesn't give you any of the attribute values that are on the various elements for selecting, but . . . Read full entry »


Re: deep-equal behaves differently when node is stored

Posted 4/15/2025 11:01:29 PM

Thank you very much, Martin and Michael! I was not aware of the differences you point out. W. On 4/15/25 18:13, Michael Kay michaelkay90@xxxxxxxxx wrote: Or if you really want to variable to contain a copy of the node, rather than the original, then in place of xsl:sequence you could do <xsl: . . . Read full entry »


Re: deep-equal behaves differently when node is stored

Posted 4/15/2025 10:12:41 PM

Or if you really want to variable to contain a copy of the node, rather than the original, then in place of xsl:sequence you could do <xsl:variable name="person" as="node()"> <xsl:copy-of select="."/> </xsl:variable> But I find it hard to think of . . . Read full entry »


Re: deep-equal behaves differently when node is stored

Posted 4/15/2025 9:15:15 PM

On 15/04/2025 23:11, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: Dear list, I would like to ask for your help with the following puzzling behavior that I have encountered. The situation is that I am testing whether the context node, which is a <person> element with child element . . . Read full entry »


deep-equal behaves differently when node is stored in

Posted 4/15/2025 9:10:37 PM

Dear list, I would like to ask for your help with the following puzzling behavior that I have encountered. The situation is that I am testing whether the context node, which is a <person> element with child elements (first?, middle?, last), is deep-equal to one of a set of other nodes. I . . . Read full entry »


Re: Duplicate title issue

Posted 4/15/2025 4:17:29 PM

On 15/04/2025 17:58, J.S. Rawat jogarawat@xxxxxxxxx wrote: > Hi team no one found the solution You posted some input, some expected output and some incomplete XSLT, without explaining or at least telling us in what way your XSLT fails. The use of xsl:result-document suggests you use at least . . . Read full entry »


Re: Duplicate title issue

Posted 4/15/2025 3:57:41 PM

Hi team no one found the solution On Wed, 9 Apr 2025, 18:26 J.S. Rawat jogarawat@xxxxxxxxx, < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Team, > I am facing duplicate topicref problem. Please help. > Output > <map id="d1e1" xml:lang="en-us"> & . . . Read full entry »


[jats-list] upcoming XSLT course

Posted 4/14/2025 8:04:05 AM

Hello! Looks like i shall be running an XSLT course in May. We will start with the fundamentals and aim to build confidence, joy, and delight with writing and maintaining XSLT 1, 2 and 3. This course does not go into the advanced XSLT 3 features that i cover in the XSLT 3 course, but shows how th . . . Read full entry »


Re: I desire this function: substring-before(string,

Posted 4/14/2025 12:06:40 AM

Hi Roger, I desire this function: substring-before(string, regex charset) It's a shame that the value of $arg2 can't be a regex character set, e.g., You desire it, and guess what, contrary to your assertion, $arg2 *can* be a regex character. Just put the function together yourself, along lines . . . Read full entry »


Re: I desire this function: substring-before(string,

Posted 4/13/2025 4:16:22 PM

> Here is a single XPath 4 expression (I am surprised scan-left isn't standard in XPath 3.1 ? !!!): And here is a single XPath 3.1 expression - had to define scan-left inline: let $scan-left := function($input as item()*, $init as item()*, $action as function(item() . . . Read full entry »


Re: I desire this function: substring-before(string,

Posted 4/13/2025 4:04:04 PM

Hi Roger, > Below is my XSLT solution. It uses the replace idea that Liam provided a few weeks back, which is neat. > Whereas the SNOBOL solution takes only 2 lines of code, the XSLT solution requires many lines of code. > Is there a simpler, shorter solution? Here is a single XPath 4 (I . . . Read full entry »


Re: I desire this function: substring-before(string,

Posted 4/13/2025 2:10:04 PM

Am 13.04.2025 um 15:03 schrieb G. Ken Holman g.ken.holman@xxxxxxxxx: And, of course, the second function would just move the character class into the non-greedy search: B replace('THEN THE CURTAIN','(^.*?[AEIOU]).*$','$1') ... returns "THE". Or solely with a recursive function <xs . . . Read full entry »


Re: I desire this function: substring-before(string,

Posted 4/13/2025 1:56:03 PM

Am 13.04.2025 um 15:03 schrieb G. Ken Holman g.ken.holman@xxxxxxxxx: And, of course, the second function would just move the character class into the non-greedy search: B replace('THEN THE CURTAIN','(^.*?[AEIOU]).*$','$1') ... returns "THE". If we use regular expression like <xsl: . . . Read full entry »


Re: I desire this function: substring-before(string,

Posted 4/13/2025 1:03:32 PM

And, of course, the second function would just move the character class into the non-greedy search: replace('THEN THE CURTAIN','(^.*?[AEIOU]).*$','$1') ... returns "THE". At 13/04/2025 13:00 +0000, G. Ken Holman g.ken.holman@xxxxxxxxx wrote: Wouldn't the non-greedy '?' version of re . . . Read full entry »


Re: I desire this function: substring-before(string,

Posted 4/13/2025 12:59:44 PM

Wouldn't the non-greedy '?' version of regex in XPath help you here? replace('THEN THE CURTAIN FELL','(^.*?)[AEIOU].*$','$1') ... returns "TH". I hope this helps. But I haven't tested edge cases. . . . . . . Ken At 13/04/2025 12:43 +0000, Roger L Costello costello@xxxxxxxxx wrote: Hi . . . Read full entry »


I desire this function: substring-before(string, regex

Posted 4/13/2025 12:42:29 PM

Hi Folks, The XPath substring-before function returns "that part of the given input string that occurs before the first occurrence of the string given in $arg2." [definition from SAXON web page] substring-before($arg1 as xs:string?, $arg2 as xs:string?) --> xs:string It's a shame th . . . Read full entry »


Re: Flatten DITA conrefs

Posted 4/13/2025 12:30:59 AM

Thank you for the updated code. It was a mistake to return an empty sequence in my original code. Yours makes sense. Thank you also for the feedback on the Boolean functions. From: Michael Kay michaelkay90@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, April 12, 2025 3 . . . Read full entry »


Re: Flatten DITA conrefs

Posted 4/12/2025 5:01:03 PM

I was waiting for one of the DITA pros to ask...why not use DITA-OT [1]? As you probably know, the DITA processing rules are wonderfully complex to accommodate a variety of input structures and specializations. Any home-grown solution is likely to be limited to special cases of predictable inpu . . . Read full entry »


Re: Flatten DITA conrefs

Posted 4/12/2025 3:28:59 PM

According to the DITA specification, following CASMessages.dita concept topic is valid even if the @id="AFM-L-R-CAI-Selected-Off-status" attribute is duplicated. Only the concept/@id is defined as ID. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE concep . . . Read full entry »


Re: Flatten DITA conrefs

Posted 4/12/2025 7:50:19 AM

>bJavaScript: The Good Partsb and his counsel was to be as explicit as possible when programming so I like to use true() and false() when making comparisons. There's something to be said for avoiding reliance on "effective boolean value" conversions, but when you're testing the res . . . Read full entry »


Re: Flatten DITA conrefs

Posted 4/11/2025 10:24:44 PM

Thanks for the input, Martin. One of the influential programming books I read was, bJavaScript: The Good Partsb and his counsel was to be as explicit as possible when programming so I like to use true() and false() when making comparisons. id values are not required on all DITA elements, so I am . . . Read full entry »


Re: Flatten DITA conrefs

Posted 4/11/2025 10:06:38 PM

On 11/04/2025 21:21, rick@xxxxxxxxxxxxxx wrote: > > Hi All, > > I am working with a DITA transformation and I want to flatten some > conrefs. I have created a function to do this, and it is working, but > I am looking for feedback to see if there is a better approach. Here > is . . . Read full entry »


Flatten DITA conrefs

Posted 4/11/2025 7:21:30 PM

Hi All, I am working with a DITA transformation and I want to flatten some conrefs. I have created a function to do this, and it is working, but I am looking for feedback to see if there is a better approach. Here is my XML: <?xml version="1.0" encoding="UTF-8"?> &l . . . Read full entry »


Re: Pointers are weird

Posted 4/11/2025 5:51:34 PM

Thank you Elliotte. Roger, if you want to understand pointers, have a look at C or Assembly language. Indirection, double indirection are a little more clear than XML. regards On Fri, 11 Apr 2025 at 18:42, Elliotte Rusty Harold elharo@xxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> . . . Read full entry »


Re: Pointers are weird

Posted 4/11/2025 5:42:22 PM

No. XML does not have pointers, any more than it has ints or booleans. Elliotte Rusty Harold elharo@xxxxxxxxxxx On Fri, Apr 11, 2025 at 6:31b/AM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > Occasionally friends come over to . . . Read full entry »


Re: Pointers are weird

Posted 4/11/2025 1:20:36 PM

Roger, In HTML you can either reference a graphic with something like bimage.pngb or you can literally paste the base64 encoded image directly into the HTML as src=. Both the ref and the image are data. If you ask for the reference value you will get the 9 character string bimage.pngb. bim . . . Read full entry »


Re: Pointers are weird

Posted 4/11/2025 11:58:00 AM

Hello Roger, Here BELOW is a piece of disassembled code, from my archives, of very long ago ;-) , in another life ...) if the same byte could not be interpreted either as data or as pointer or as instruction depending on where "WE" are ... no microprocessor would function :-) It is . . . Read full entry »


Re: Pointers are weird

Posted 4/11/2025 11:05:36 AM

Unless the reference was "Roger the Shrubber". Now that would be weird. Don Yahoo Mail: Search, Organize, Conquer On Fri, Apr 11, 2025 at 5:50 AM, Michael Kay michaelkay90@xxxxxxxxx<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Isn't that weird? > > /Roge . . . Read full entry »


Re: Pointers are weird

Posted 4/11/2025 10:55:20 AM

On 11/04/2025 11:32, Roger L Costello costello@xxxxxxxxx wrote: XML has pointers, e.g., <Book ref="SK">...</Book> <Author id="SK">Stephen King</Author> The value of the ref attribute, "SK", points to <Author id="SK"> "SK . . . Read full entry »


Re: Pointers are weird

Posted 4/11/2025 10:50:47 AM

> Isn't that weird? > > /Roger No weirder than when you refer to yourself as "Roger". Michael Kay Saxonica . . . Read full entry »


Re: Pointers are weird

Posted 4/11/2025 10:38:56 AM

> On 11 Apr 2025, at 11:32, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I conclude that, in XML and HTML, a pointer is not a pointer at all. It's data. It's data that is repeated elsewhere in the document: ("SK" ... "SK" . . . Read full entry »


Pointers are weird

Posted 4/11/2025 10:31:49 AM

Hi Folks, Occasionally friends come over to my home and I take them on a walk around the neighborhood. When I see some thing interesting, I raise my hand and position my index finger in the direction of the interesting thing. That is, I point at the interesting thing. It seems to me, that that is . . . Read full entry »


Duplicate title issue

Posted 4/9/2025 12:56:14 PM

Hi Team, I am facing duplicate topicref problem. Please help. Output <map id="d1e1" xml:lang="en-us"> <title>1.0 Electrical</title> <topicref1 navtitle="1.0 Electrical" href="electrical.dita"> <topicref4 navtitle="1 . . . Read full entry »


Re: Indirect referencing in XSLT/XPath?

Posted 4/5/2025 10:13:51 PM

On Sat, 2025-04-05 at 14:35 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > The SNOBOL language has a wicked cool indirect referencing > capability. Is there an indirect referencing capability in > XSLT/XPath? . In XPath 3 you can use anonymous functions to wrap va . . . Read full entry »


Re: Indirect referencing in XSLT/XPath?

Posted 4/5/2025 8:23:23 PM

Peter's solution is nice. I revised his XML to be consistent with my original post: <Document> <AIRCRAFT xml:id="AIRCRAFT" ref="ALTITUDE"/> <ALTITUDE xml:id="ALTITUDE" ref="UNITS"/> <UNITS xml:id="UNITS">FLIGHT_L . . . Read full entry »


Re: Indirect referencing in XSLT/XPath?

Posted 4/5/2025 8:15:45 PM

let $aircraft := map {"altitude": map {"units" : "Flight_Level"} } return $aircraft?altitude?units Ah, that works perfect. Thank you, Martin. /Roger . . . Read full entry »


Re: Indirect referencing in XSLT/XPath?

Posted 4/5/2025 8:08:16 PM

On 05/04/2025 22:01, Roger L Costello costello@xxxxxxxxx wrote: Hello Dimitre, I ran your solution: let $aircraft := {"altitude": {"units" : "Flight_Level"} } return $aircraft?altitude?units in the Oxygen XPath bar and it gave me this error message: Unexpect . . . Read full entry »


Re: Indirect referencing in XSLT/XPath?

Posted 4/5/2025 8:00:52 PM

Hello Dimitre, I ran your solution: let $aircraft := {"altitude": {"units" : "Flight_Level"} } return $aircraft?altitude?units in the Oxygen XPath bar and it gave me this error message: Unexpected token "{" at start of expression. Do you know what is cau . . . Read full entry »


Re: Indirect referencing in XSLT/XPath?

Posted 4/5/2025 7:22:43 PM

> Is there any way to do indirect referencing in XSLT/XPath? Yes, but not assignments, as in XPath any created variable is immutable. For your particular example: let $aircraft := {"altitude": {"units" : "Flight_Level"} } return $aircraft?altitude?units produc . . . Read full entry »


Re: Indirect referencing in XSLT/XPath?

Posted 4/5/2025 5:49:05 PM

On 05/04/2025 15:35, Roger L Costello costello@xxxxxxxxx wrote: Is there any way to do indirect referencing in XSLT/XPath? The following returns the value "this". Is that the kind of thing you meant? Peter ======================== test.xml <test> <thing xml:id="foo" . . . Read full entry »


Re: Indirect referencing in XSLT/XPath?

Posted 4/5/2025 4:24:05 PM

On 05/04/2025 16:35, Roger L Costello costello@xxxxxxxxx wrote: Is there any way to do indirect referencing in XSLT/XPath? I think it would boil to having a parser and an evaluator that perhaps uses xsl:evaluate the number of times you findB a $ in front of what would be an variable/parameter na . . . Read full entry »


Indirect referencing in XSLT/XPath?

Posted 4/5/2025 2:35:32 PM

Hi Folks, The SNOBOL language has a wicked cool indirect referencing capability. Is there an indirect referencing capability in XSLT/XPath? Here is a brief description of SNOBOL's indirect referencing capability: First, let's assign UNITS the string METERS UNITS = "METERS" In that st . . . Read full entry »


XSL-List Guidelines

Posted 4/1/2025 3:01:29 PM

This information is posted to the XSL-List (and the XSL-List Digest) at intervals under the subject line "XSL-List guidelines". INTRODUCTION TO XSL-LIST XSL-List hosts discussion of XSL itself, XSL applications and implementation, and XSL user questions. XSL-List is open to everyone, us . . . Read full entry »


[ANN] Reminder: Balisage paper submissions due 4 April

Posted 3/31/2025 3:56:55 PM

Call for Participation "Balisage: The Markup Conference 2025b Balisage: ALL VIRTUAL, LIVE, TECHNICAL, INTERACTIVE Balisage: where serious markup practitioners and theoreticians meet every summer. Critical Dates - 4 April 2025 b Paper submissions due - 4 b 8 August 2025 b BALISAGE: THE . . . Read full entry »


Re: Finding an element without a particular attribute?

Posted 3/28/2025 5:51:54 PM

>I turn the value of the @key attribute into the element's name (supposing it is a NCName) and add a type attribute to reflect that it was an array, a map, a string, etc.. We often have a choice here: use an element name to say what kind of thing you've got, and an attribute to say what role it . . . Read full entry »


Re: Finding an element without a particular attribute?

Posted 3/28/2025 5:30:06 PM

Sorry about the hard spaces, introduced somehow when copy-pasting. They only became apparent when I received my own message. Computers.... Pieter Op 28 mrt 2025, 18:18, om 18:18, "Pieter Masereeuw pieter@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> schreef: >I recog . . . Read full entry »


Re: Finding an element without a particular attribute?

Posted 3/28/2025 5:18:18 PM

I recognize your problem. I mitigate it by some preprocessing (in an XProc pipeline, but anything else will do). In the preprocessing, I turn the value of the @key attribute into the element's name (supposing it is a NCName) and add a type attribute to reflect that it was an array, a map, a str . . . Read full entry »


Re: Finding an element without a particular attribute?

Posted 3/28/2025 5:13:54 PM

Hello, Except for at the top, in this model, 'map[not(@key)]' (or 'map[empty(@key)]' if you like) happens to coincide with 'array/map'. This is due to a property of JSON, namely that map properties (of any type) have keys, but not array members (of any type). If this is obvious or intrusive to n . . . Read full entry »


Re: Finding an element without a particular attribute?

Posted 3/28/2025 4:39:11 PM

On Fri, 28 Mar 2025 at 16:30, dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I'm processing content produced with json-to-xml(). So there are a buch > of <map> elements. Many have the @key attribute and are easy to match. > I'm drawing a blank on how to fi . . . Read full entry »


Finding an element without a particular attribute?

Posted 3/28/2025 4:30:07 PM

I'm processing content produced with json-to-xml(). So there are a buch of <map> elements. Many have the @key attribute and are easy to match. I'm drawing a blank on how to find map elements without the @key. <map key="mime"> <string key="type">array</ . . . Read full entry »


Re: Help regarding xsl:for-each-group

Posted 3/27/2025 3:33:58 PM

thanks Michael, I tried above code, but the result is as below" <idxentry id="idx1"><ie_f>Paragraph</ie_f><ie_s>Paragraph</ie_s><ie_t>Paragraph </ie_t></idxentry> <idxentry id="idx2"><ie_f>Entry1</ie_f><i . . . Read full entry »


Re: Help regarding xsl:for-each-group

Posted 3/26/2025 5:27:16 PM

I think you want something along the lines <xsl:for-each-group select="*" group-starting-with="w:p[.//@w:val='Indexentry']"> <idxentry id="idx{position()}"> <ie_t><xsl:value-of select=".//w:t"/></ie_t> <xsl:for . . . Read full entry »


Re: Help regarding xsl:for-each-group

Posted 3/26/2025 5:27:16 PM

I think you want something along the lines <xsl:for-each-group select="*" group-starting-with="w:p[.//@w:val='Indexentry']"> <idxentry id="idx{position()}"> <ie_t><xsl:value-of select=".//w:t"/></ie_t> <xsl:for . . . Read full entry »


Help regarding xsl:for-each-group

Posted 3/26/2025 4:37:21 PM

Hi All, I have generated the below output by another method in xsl version 1.0. Can we get this result by using for-each-group. INPUT <w:body> <w:p><w:pPr><w:pStyle w:val="ParaFL"/></w:pPr><w:r><w:t>Paragraph</w:t></w:r></w:p> & . . . Read full entry »


[ANN] Version 27.1 of the Oxygen XML Suite of Products

Posted 3/25/2025 8:36:27 AM

Hi everyone, We are excited to announce that Oxygen XML Developer/Editor version 27.1 is now available! Listing below some new features which may be useful for the XSL community: XSLT/XQuery ================================== * Oxygen now supports configuring a custom parser when transforming . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/24/2025 11:21:25 AM

Inventiveness requires constraint. Cheers, Wendell On Sun, Mar 23, 2025 at 7:57b/AM David Carlisle d.p.carlisle@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On Sun, 23 Mar 2025 at 11:16, Michael Kay michaelkay90@xxxxxxxxx < > xsl-list-service@xxxxxxxxxx . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/23/2025 11:57:23 AM

On Sun, 23 Mar 2025 at 11:16, Michael Kay michaelkay90@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > > > I'd probably have used > > > > > > replace($WORD, '^([^A]*)A', '$1E') > > > > But that relies on doing a negative mat . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/23/2025 11:16:01 AM

> I'd probably have used > > > replace($WORD, '^([^A]*)A', '$1E') > But that relies on doing a negative match, which is tricky to achieve it it's more than one character you're trying to replace. Michael Kay Saxonica . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/23/2025 10:57:43 AM

David Carlisle provided these simpler replace() functions for obtaining the first occurrence of pattern in WORD: replace($WORD, '^(.*?)A', '$1E') replace($WORD, '^([^A]*)A', '$1E') Awesome. Thank you, David. . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/23/2025 10:41:53 AM

Roger, > replace($WORD, concat('(^.*?)', 'A'), concat('$1','E')) is making it look more complicated the it needs to be, you don't need to use concat (you may want to build up the expression but that's a separate issue), and it's not any special trick just a normal regex replace as used in xpat . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/23/2025 10:23:50 AM

Thank you, Martin, and Liam for your excellent feedback. I updated my writeup to incorporate Martin and Liam's feedback. See below. If you see any errors in the writeup, please let me know. -------------------------------------------------------- Sometimes you want to search for occurrences of a p . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/22/2025 5:35:44 PM

On Sat, 2025-03-22 at 12:03 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > Suppose that you want to only replace the first match, i.e., we want > "BELANCE." I do not think that there is any way to configure the > XPath replace() function to "Replace only the first . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/22/2025 1:00:01 PM

On 22/03/2025 13:03, Roger L Costello costello@xxxxxxxxx wrote: Suppose that you want to only replace the first match, i.e., we want "BELANCE." I do not think that there is any way to configure the XPath replace() function to "Replace only the first match." Please correct me if . . . Read full entry »


Re: Replace the portion of text that matches pattern:

Posted 3/22/2025 12:28:10 PM

On 22/03/2025 13:03, Roger L Costello costello@xxxxxxxxx wrote: Suppose that you want to only replace the first match, i.e., we want "BELANCE." I do not think that there is any way to configure the XPath replace() function to "Replace only the first match." It might be a bit con . . . Read full entry »


Replace the portion of text that matches pattern: XPat

Posted 3/22/2025 12:03:15 PM

Sometimes you want to search for occurrences of a pattern in text and replace those substrings that match the pattern. For example, suppose WORD holds the text, "BAT" and we want to search for the pattern 'A' and replace it with 'E.' In XPath use the replace() function. The following XPat . . . Read full entry »


Re: Best practices when reorganizing content?

Posted 3/21/2025 10:11:39 PM

I've been studying this problem for a while now, and I think I have some of the answers but not all. XSLT 3.0 is certainly not especially good at processing JSON in the "recursive descent" style using template rules. One of the problems, as you say, is the absence of element names; anothe . . . Read full entry »


Re: Best practices when reorganizing content?

Posted 3/21/2025 9:13:50 PM

On 21/03/2025 21:37, dvint@xxxxxxxxx wrote: The other issues is that the content doesn't have any sort of model/scheam/dtd that is used to validate the results and it looks like anyone can add any structure (or not follow existing patterns) when ever they want. This structure has morphed over the l . . . Read full entry »


Re: Best practices when reorganizing content?

Posted 3/21/2025 8:44:36 PM

On Fri, 21 Mar 2025 at 20:37, dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > My general stylesheet design is to try and leverage templates that match > things and produce output as they are found in the document order. In > some cases the templates will process . . . Read full entry »


Best practices when reorganizing content?

Posted 3/21/2025 8:37:01 PM

My general stylesheet design is to try and leverage templates that match things and produce output as they are found in the document order. In some cases the templates will process the content and other times it will ignore/hide the content. If I'm worried the format will evolve I'll try and ad . . . Read full entry »


Re: XML to Json and escaped characters

Posted 3/18/2025 8:07:01 PM

Thanks, that did the trick, I was seeing it appear as text so wasn't think of it as tabs and newlines.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Michael Kay michaelkay90@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 3/18/25 . . . Read full entry »


Re: XML to Json and escaped characters

Posted 3/18/2025 6:10:54 PM

On 18/03/2025 18:56, dvint@xxxxxxxxx wrote: I checked the spec for xml-to-json() Note that the version 4 of that function allows an option to prevent escaping the slash/solidus e.g. xml-to-json(<string key="data" xmlns="http://www.w3.org/2005/xpath-functions">http://exam . . . Read full entry »


Re: XML to Json and escaped characters

Posted 3/18/2025 6:00:16 PM

The regular expression `\t` matches tab characters. To match the escape sequence `\t`, you want the regular expression `\\t`. Michael Kay Saxonica > On 18 Mar 2025, at 17:56, dvint@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I've recently started working with jso . . . Read full entry »


XML to Json and escaped characters

Posted 3/18/2025 5:55:59 PM

I've recently started working with json-to-xxml() to create a conversion to asciidoc format for documentation. I've now found a need to take some of that generated XML back to JSON as it is an actual example for an API call. Here is an XML snippet: <map key="actionCodes"> < . . . Read full entry »


Re: Can I create a key on elements in a non-primary XM

Posted 3/16/2025 3:32:48 PM

> Thank you, Martin. I implemented both versions and found that my XSLT program runs a little bit faster with the second one (22 seconds versus 21 seconds). Is there a reason for why the second one is a little faster? Unless you are doing very careful microbenchmarking, that's well within the . . . Read full entry »


Re: Can I create a key on elements in a non-primary XM

Posted 3/16/2025 2:45:29 PM

Martin wrote: > key('key-name', key-expression, $doc1) > or > $doc1 ! key('key-name', key-expression) Thank you, Martin. I implemented both versions and found that my XSLT program runs a little bit faster with the second one (22 seconds versus 21 seconds). Is there a reason for why th . . . Read full entry »


Re: Can I create a key on elements in a non-primary XM

Posted 3/16/2025 2:25:54 PM

On 16/03/2025 15:20, Roger L Costello costello@xxxxxxxxx wrote: Is it possible to create and use a key for a non-primary XML document? Yes, just understand that the key declaration doesn't name any document, does not refer to any document so just declare as you would declare it for a primary docu . . . Read full entry »


Can I create a key on elements in a non-primary XML d

Posted 3/16/2025 2:20:13 PM

Hi Folks, When I run my XSLT program, I provide it with an input XML document. I call that input XML document the "primary XML document." I successfully created keys on elements in the primary XML document. My XSLT program must also retrieve data from another, non-primary, XML document. . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/16/2025 12:12:41 AM

> I have. The performance benefits of using keys are substantial. > > I have two versions of a program to join the <row> elements in <ARPT> with the row elements in <ANAV> with the <row> elements in <BDRY>: > > 1. The first version uses an xsl:for-each w . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/15/2025 10:38:03 PM

> Haven't measured it [the performance benefits of keys] though. I have. The performance benefits of using keys are substantial. I have two versions of a program to join the <row> elements in <ARPT> with the row elements in <ANAV> with the <row> elements in <BDRY> . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/15/2025 9:58:59 PM

On Fri, Mar 14, 2025 at 04:48:23PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > > Tangentially, is there a use case where xsl:key is expected to be > > preferable in performance terms to using maps? > > No, I don't think so. Some people may find keys more intuitive, and they' . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 9:27:32 PM

Indeed (now having tested my faulty memory), to gloss further what Dimitre has just explained, with this input <dir> <cars> <car vin="101" color="red"/> <car vin="102" color="green"/> <car vin="103& . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 8:45:02 PM

> It definitely does not work in XSLT 1.0 even when using concat(). > The reason is that in XPath 1.0 it is invalid to have an path-step be a function call, > so key() cannot be a step in the proposed XPath expression - not in XPath 1.0. What works even with XSLT 1.0 is this (just the rel . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 8:31:11 PM

Wendell, > Where you have > > key('kBoundaryForNav', key('kNavForAirport', ARPT_IDENT)/(NAV_IDENT || '+' || NAV_CTRY || '+' || NAV_TYPE))/BDRY_IDENT > > could not this be > > key('kNavForAirport', ARPT_IDENT) / key('kBoundaryForNav', (NAV_IDENT || '+' || NAV_CTRY || '+' || . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 7:49:20 PM

Dimitre, Where you have key('kBoundaryForNav', key('kNavForAirport', ARPT_IDENT)/(NAV_IDENT || '+' || NAV_CTRY || '+' || NAV_TYPE))/BDRY_IDENT could not this be key('kNavForAirport', ARPT_IDENT) / key('kBoundaryForNav', (NAV_IDENT || '+' || NAV_CTRY || '+' || NAV_TYPE) ) / BDRY_IDENT which . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 5:50:55 PM

I would use even this (can be XSLT 2.0 if || is done using concat() ): <xsl:stylesheet version="3.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:key name="kNavForAirport&qu . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 4:53:10 PM

Martin provided this solution to joining three tables (ARPT --> ANAV --> BDRY): ------------------------------------------------- <xsl:sequence select=" key('ARPT-to-ANAV', ARPT_IDENT) ! key('ANAV-to-BDRY',(NAV_IDENT,NAV_CTRY,NAV_TYPE))[TYPE eq '08']/BDRY_IDENT" /> -- . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 4:27:02 PM

On 15/03/2025 17:19, Roger L Costello costello@xxxxxxxxx wrote: <xsl:template match="ARPT/ARPT/row"> <result> <xsl:for-each select="key('ARPT-to-ANAV', ARPT_IDENT)"> <xsl:sequence select="key('ANAV-to-BDRY',(NAV_IDENT,NAV_C . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 4:18:38 PM

Thank you, Martin for pushing me to create a simple sample input XML document along with the XSLT program. I have done so but cannot replicate the problem that I described earlier. However, I uncovered another problem that I hope you can help me with. Previously I described a join between the < . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 2:34:02 PM

On 15/03/2025 15:22, Roger L Costello costello@xxxxxxxxx wrote: Thank you. Below is a sample input document. The ANAV row with NAV_IDENT = HUM, NAV_CTRY = AR, NAV_TYPE = 1 matches two BDRY row elements and the result should be: <result> <BDRY_IDENT>Boundary 1</BDRY_IDENT> . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 2:25:23 PM

On 15/03/2025 15:22, Roger L Costello costello@xxxxxxxxx wrote: Thank you. Below is a sample input document. The ANAV row with NAV_IDENT = HUM, NAV_CTRY = AR, NAV_TYPE = 1 matches two BDRY row elements and the result should be: <result> <BDRY_IDENT>Boundary 1</BDRY_IDENT> . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 2:22:33 PM

Hello Martin, Thank you. Below is a sample input document. The ANAV row with NAV_IDENT = HUM, NAV_CTRY = AR, NAV_TYPE = 1 matches two BDRY row elements and the result should be: <result> <BDRY_IDENT>Boundary 1</BDRY_IDENT> <BDRY_IDENT>Boundary 2</BDRY_IDENT> . . . Read full entry »


Re: How to create xsl:key that has a composite value i

Posted 3/15/2025 2:06:23 PM

On 15/03/2025 14:19, Roger L Costello costello@xxxxxxxxx wrote: <result> <xsl:sequence select="key('ANAV-to-BDRY', (NAV_IDENT, NAV_CTRY, NAV_TYPE))/BDRY_IDENT"/> </result> That must be incorrect because the <result> element is erroneously populated with a < . . . Read full entry »


How to create xsl:key that has a composite value in it

Posted 3/15/2025 1:19:36 PM

Hi Folks, I have an XML document that contains <row> elements within a <BDRY> element: <BDRY> <row> <BDRY_IDENT>ABC</BDRY_IDENT> <NAV_IDENT>VOR1</NAV_IDENT> <NAV_CTRY>US</NAV_CTRY> <NAV_TYPE>1< . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/14/2025 9:46:15 PM

On Fri, 2025-03-14 at 15:57 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > My XSLT code must process N airport records. > > For each airport record, I must search through M air-nav records and > collect those that match on the ARPT_IDENT field. ok, so //record[ . . . Read full entry »


Re: Json to xml

Posted 3/14/2025 7:12:23 PM

On 14/03/2025 20:08, dvint@xxxxxxxxx wrote: I was just going to post that I found a way using tunnel paramters. I added this template in the included XSLT file and it does the trick because at this point I am now only dealing with XML content. B B B B <xsl:template match="/"> B B B . . . Read full entry »


Re: Json to xml

Posted 3/14/2025 7:08:30 PM

I was just going to post that I found a way using tunnel paramters. I added this template in the included XSLT file and it does the trick because at this point I am now only dealing with XML content. <xsl:template match="/"> <xsl:apply-templates> <xsl:with-param na . . . Read full entry »


Re: Json to xml

Posted 3/14/2025 7:01:09 PM

On 14/03/2025 18:20, dvint@xxxxxxxxx wrote: In trying to build a small sample I have found where the problem is coming from. It looks like this might be a timing issue of when the stylesheet is read vs when the json-to-sml() file is triggered and that XML becomes available to evaluate. At the top o . . . Read full entry »


Re: Json to xml

Posted 3/14/2025 6:50:35 PM

It is only processing one document, but the format is changing based upon the fact it is taken through the json-to-xml() which then changes how it us processed. Is there someway to get the json-to-xml() to be run before anything else starts?..danSent from my Verizon, Samsung Galaxy smartphone ----- . . . Read full entry »


Re: Json to xml

Posted 3/14/2025 6:38:53 PM

I'm trying to do something like this now: <xsl:variable name="PROERPTIES"> <xsl:if test="$RUNWITH='XML'"> <xsl:value-of select="/j:map/j:map[@key='properties']"/> </xsl:if> <xsl:if test="$RUNWITH='JSON'"> <xsl:va . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/14/2025 5:35:01 PM

> I would still think that XSLT 3 with composite keys > xsl:key name="key-name" match="foo" use="bar, baz" composite="yes" is easier than doing that with a map. Yes, nested-maps can be tricky. We have a proposal to allow as keys of a map not only atom . . . Read full entry »


Re: Json to xml

Posted 3/14/2025 5:26:57 PM

A global variable is always evaluated with the principal source document as the context item. If you're running with multiple documents, e.g. a multi-phase transformation, then it's best to avoid relying on this and instead always use global variables to refer to each document explicitly. Michael . . . Read full entry »


Re: Json to xml

Posted 3/14/2025 5:20:24 PM

In trying to build a small sample I have found where the problem is coming from. It looks like this might be a timing issue of when the stylesheet is read vs when the json-to-sml() file is triggered and that XML becomes available to evaluate. At the top of the included XSLT is this <!-- R . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/14/2025 4:49:15 PM

On 14/03/2025 17:37, Graydon graydon@xxxxxxxxx wrote: > On Fri, Mar 14, 2025 at 04:26:54PM -0000, Michael Kaymichaelkay90@xxxxxxxxx scripsit: >> Three options: >> >> (a) use xsl:key >> >> (b) use an XSLT processor that optimizes joins (such as Saxon-EE) (but you may . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/14/2025 4:48:17 PM

> Tangentially, is there a use case where xsl:key is expected to be > preferable in performance terms to using maps? No, I don't think so. Some people may find keys more intuitive, and they're probably easier to manage if you need one-index-per-document with multiple documents, but I don't . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/14/2025 4:37:12 PM

On Fri, Mar 14, 2025 at 04:26:54PM -0000, Michael Kay michaelkay90@xxxxxxxxx scripsit: > Three options: > > (a) use xsl:key > > (b) use an XSLT processor that optimizes joins (such as Saxon-EE) (but you may need to write the search using predicates, not using xsl:for-each and xsl:i . . . Read full entry »


Re: Help, my problem is n-cubed ... and so is my XSLT

Posted 3/14/2025 4:26:47 PM

Three options: (a) use xsl:key (b) use an XSLT processor that optimizes joins (such as Saxon-EE) (but you may need to write the search using predicates, not using xsl:for-each and xsl:if) (c) build your own indexes as maps, as you suggest. Michael Kay > On 14 Mar 2025, at 15:57, Roger L Cos . . . Read full entry »


Help, my problem is n-cubed ... and so is my XSLT code

Posted 3/14/2025 3:57:12 PM

Hi Folks, My XSLT code must process N airport records. For each airport record, I must search through M air-nav records and collect those that match on the ARPT_IDENT field. For each matched air-nav record, I must search through O boundary records and collect those that match on the NAV_IDENT, N . . . Read full entry »


Re: Analyzing text by extracting substrings that match

Posted 3/14/2025 9:52:37 AM

It isn't clear if you are just looking for xpath solutions or if xsl is OK. xsl:analyze-string was introduced for exactly this kind of use, it gives access to each substring matched by a ()-group in the regex. Newer xpath versions even have an xpath version of this as well https://qt4cg.org/spe . . . Read full entry »


Re: Json to xml

Posted 3/14/2025 6:55:11 AM

On 13/03/2025 19:25, dvint@xxxxxxxxx wrote: I'll try and see if I can make a small sample JSON and associated included XSLT. Please do that, I couldn't see any obviuous mistakes in the code you posted. . . . Read full entry »


Re: Analyzing text by extracting substrings that match

Posted 3/13/2025 11:31:25 PM

On Thu, 2025-03-13 at 22:01 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > In my opinion, SNOBOL provides a superior solution to the task of > extracting the substring of TEXT that matches PATTERN. This is not really a surprise - SNOBOL was a pattern matching language. On the othe . . . Read full entry »


Re: Analyzing text by extracting substrings that match

Posted 3/13/2025 10:43:25 PM

I missed the first part of this thread, so I need to look back at that.B Snobol matches what it calls patterns which are different from regular expressions. And I think up until recently, regular expressions have only just now caught up with the expressiveness of pattern matching. But thatbs just . . . Read full entry »


Re: Analyzing text by extracting substrings that match

Posted 3/13/2025 10:24:10 PM

On 13/03/2025 23:01, Roger L Costello costello@xxxxxxxxx wrote: > In my opinion, SNOBOL provides a superior solution to the task of extracting the substring of TEXT that matches PATTERN. It has some superior anecdote about is planned name (https://en.wikipedia.org/wiki/SNOBOL): According t . . . Read full entry »


Re: Analyzing text by extracting substrings that match

Posted 3/13/2025 10:12:35 PM

If you think SNOBOL provides a superior solution, why donbt you just use a current implementation of SNOBOL for that step? John Lumley Sent from my iPad > On 13 Mar 2025, at 22:01, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > In my opini . . . Read full entry »


Analyzing text by extracting substrings that match reg

Posted 3/13/2025 10:00:57 PM

One way of analyzing text is to look for patterns in the text-find the substrings that match the patterns. The following XPath determines if the string in $TEXT contains a vowel: matches($TEXT, 'A|E|I|O|U') If there is a match then which vowel was matched? A? E? I? O? or U? It may be desirable t . . . Read full entry »


Json to xml

Posted 3/13/2025 6:24:42 PM

I'm trying this for the forst time and it is generally working well, but I've come up with an odd result. My main stylesheet looks like this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs=&q . . . Read full entry »


Re: How to use xsl:key to make my XSLT program super-

Posted 3/12/2025 1:11:13 PM

On Wed, Mar 12, 2025 at 12:56:41PM -0000, Roger L Costello costello@xxxxxxxxx scripsit: > > Is this a change-the-element-names process or a rearrange-the-data > > process? > > Both. > > The elements in the target XML will contain data that is from diverse > elements (th . . . Read full entry »


Re: How to use xsl:key to make my XSLT program super-

Posted 3/12/2025 12:56:35 PM

Hello Graydon, > Is this a change-the-element-names process or a rearrange-the-data process? Both. The elements in the target XML will contain data that is from diverse elements (that have been substring'ed, length'ed, multiplied, divided, rounded, massaged) in the source XML. /Roger . . . Read full entry »


Re: How to use xsl:key to make my XSLT program super-

Posted 3/12/2025 12:46:40 PM

On Wed, Mar 12, 2025 at 11:50:52AM -0000, Roger L Costello costello@xxxxxxxxx scripsit: > I have a huge (1.2GB) XML document containing air navigation data. I > need to convert the XML document to another XML format, i.e., it is an > XML-to-XML translation task. ... > My XSLT needs to b . . . Read full entry »


Re: How to use xsl:key to make my XSLT program super-

Posted 3/12/2025 12:04:40 PM

On Wed, 12 Mar 2025 at 11:50, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > I have a huge (1.2GB) XML document containing air navigation data. I need > to convert the XML document to another XML format, i.e., it is an > X . . . Read full entry »


Re: How to use xsl:key to make my XSLT program super-

Posted 3/12/2025 12:01:02 PM

> Am 12.03.2025 um 12:51 schrieb Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: > > Hi Folks, > > I have a huge (1.2GB) XML document containing air navigation data. I need to convert the XML document to another XML format, i.e., it is an XML-to-X . . . Read full entry »


How to use xsl:key to make my XSLT program super-effi

Posted 3/12/2025 11:50:44 AM

Hi Folks, I have a huge (1.2GB) XML document containing air navigation data. I need to convert the XML document to another XML format, i.e., it is an XML-to-XML translation task. Deep within the source XML document is an <ARPT> element that contains <row> elements, one for each airpor . . . Read full entry »


Re: Rearrange order of processed nodes

Posted 3/12/2025 7:37:58 AM

Hi Sid and others, Thanks a lot for the feedback. On purpose we chose node() except b& because we wanted to keep especially processing instructions. It is my understanding that all node() other than the do-me-first-elements (great name!) are processed in document order. And yes, simplicity is . . . Read full entry »


Re: Is there a way in XSLT/XPath to find the portion o

Posted 3/11/2025 10:27:39 PM

On Tue, 2025-03-11 at 22:12 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Liam gave this wicked cool way to return the portion of a string that > matches a regex pattern: > > replace($input, '^.*(\d+).*$', '$1') > > However, I did some testing, and it's not returning the des . . . Read full entry »


Re: Is there a way in XSLT/XPath to find the portion o

Posted 3/11/2025 10:25:49 PM

On 11/03/2025 23:12, Roger L Costello costello@xxxxxxxxx wrote: Liam gave this wicked cool way to return the portion of a string that matches a regex pattern: replace($input, '^.*(\d+).*$', '$1') However, I did some testing, and it's not returning the desired results: <xsl:variable name= . . . Read full entry »


Re: Is there a way in XSLT/XPath to find the portion o

Posted 3/11/2025 10:12:04 PM

Liam gave this wicked cool way to return the portion of a string that matches a regex pattern: replace($input, '^.*(\d+).*$', '$1') However, I did some testing, and it's not returning the desired results: <xsl:variable name="TEXT" select="'The person put 12 dollars into the jar . . . Read full entry »


Re: Rearrange order of processed nodes

Posted 3/11/2025 5:29:11 PM

I think the only defence of my proposal is the DRY principle: don't repeat yourself. It's intrinsically a good idea if the list of "special" element names is in one place only. That's not to say I would do it this way in practice -- especially when only one element name is "special& . . . Read full entry »


Re: Rearrange order of processed nodes

Posted 3/11/2025 4:23:18 PM

I am wondering if anyone else thinks simplicity has its up side: <xsl:apply-templates select="elem1|elem2|elem3|elem4|elem5|elem6"/> <xsl:apply-templates select="node() except (elem1|elem2|elem3|elem4|elem5|elem6)"/> Or, if you have lots of elements in the 1st . . . Read full entry »


Re: Rearrange order of processed nodes

Posted 3/11/2025 1:07:11 PM

On 11.03.2025 13:39, Michael Mueller-Hillebrand michael.mueller-hillebrand@xxxxxxxxx wrote: Yes, I could collect the special elements in a variable and use this. <xsl:variable name="specialElems" select="(elem1|elem2|elem3|elem4|elem5|elem6)" as="element()+"/> . . . Read full entry »


Re: Rearrange order of processed nodes

Posted 3/11/2025 1:06:04 PM

You could have a function with a boolean result to test if an element is special or ordinary: <xsl:function name="f:is-ordinary" as="xs:boolean"> <xsl:param name="element" as="element()"/> <xsl:sequence select="not(self::(elem1 | el . . . Read full entry »


Rearrange order of processed nodes

Posted 3/11/2025 12:39:44 PM

Hello, dear colleagues, We have a task to process certain child elements before all other child nodes are processed. The obvious, simple solution would be something like: <xsl:apply-templates select="elem1, node() except elem1"/> But in our case, we have six named elements that s . . . Read full entry »


Re: Is there a way in XSLT/XPath to find the portion o

Posted 3/10/2025 11:25:33 PM

On Mon, 2025-03-10 at 22:08 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > > On 10/03/2025 23:04, Martin Honnen martin.honnen@xxxxxxx wrote: > > > B B analyze-string("The person put 12 dollars into the jar", > "[0-9]+")//*:match > > returns an elemen . . . Read full entry »


Re: Is there a way in XSLT/XPath to find the portion o

Posted 3/10/2025 10:08:06 PM

On 10/03/2025 23:04, Martin Honnen martin.honnen@xxxxxx wrote: On 10/03/2025 23:01, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, The following XPath determines if the string in $TEXT contains a vowel: matches($TEXT, 'A|E|I|O|U') If there is a match-the string in $TEXT contains a vowel-th . . . Read full entry »


Re: Is there a way in XSLT/XPath to find the portion o

Posted 3/10/2025 10:04:02 PM

On 10/03/2025 23:01, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, The following XPath determines if the string in $TEXT contains a vowel: matches($TEXT, 'A|E|I|O|U') If there is a match-the string in $TEXT contains a vowel-then which vowel was matched? A? E? I? O? or U? It may be desirab . . . Read full entry »


Is there a way in XSLT/XPath to find the portion of a

Posted 3/10/2025 10:01:34 PM

Hi Folks, The following XPath determines if the string in $TEXT contains a vowel: matches($TEXT, 'A|E|I|O|U') If there is a match-the string in $TEXT contains a vowel-then which vowel was matched? A? E? I? O? or U? It may be desirable to know that. Another example: an XSLT program wants to know . . . Read full entry »



PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

Learn Stylus Studio in 6 Minutes

Can six minutes change your life? A new action-packed online video demonstration covers how to use Stylus Studio in just six minutes! Watch this video and change the way you develop XML applications forever!

Why Pay More for XML Tools?

With Stylus Studio® X14 XML Enterprise Suite, you get the most comprehensive XML tool suite at one incredibly low price. Value: it's just one of many reasons why smart XML developers are choosing Stylus Studio!

 
Free Stylus Studio XML Training: