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 with siblings

Posted 2/16/2025 4:06:40 AM

On Sun, 2025-02-16 at 00:12 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > > > > > On 16/02/2025 01:00, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: > > > > > On Sat, 2025-02-15 at 20:49 +0000, rick@xxxxxxxxxxxxxx wrote: > > > > > > > > Than . . . Read full entry »


Re: Grouping with siblings

Posted 2/16/2025 12:12:43 AM

On 16/02/2025 01:00, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: > On Sat, 2025-02-15 at 20:49 +0000,rick@xxxxxxxxxxxxxx wrote: >> Thank you very much Martin. That got me going in the right direction. > A quick note - in some cases group-by won't work well. An example can It was grou . . . Read full entry »


Re: Grouping with siblings

Posted 2/16/2025 12:00:15 AM

On Sat, 2025-02-15 at 20:49 +0000, rick@xxxxxxxxxxxxxx wrote: > Thank you very much Martin. That got me going in the right direction. A quick note - in some cases group-by won't work well. An example can be if the things to be wrapped are part of a longer sequence, so there's stuff outside the . . . Read full entry »


Re: Grouping with siblings

Posted 2/15/2025 8:49:26 PM

Thank you very much Martin. That got me going in the right direction. -----Original Message----- From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, February 15, 2025 3:09 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Grouping with siblin . . . Read full entry »


Re: Grouping with siblings

Posted 2/15/2025 8:08:21 PM

On 15/02/2025 20:49, rick@xxxxxxxxxxxxxx wrote: I have a flat file structure and am trying to add structure to it. Here is my XML: <?xml version="1.0" encoding="UTF-8"?> <root> <div type="book" sID="book1"> <chapter sID=&quo . . . Read full entry »


Re: Grouping with siblings

Posted 2/15/2025 8:07:34 PM

On Sat, Feb 15, 2025 at 07:49:50PM -0000, rick@xxxxxxxxxxxxxx scripsit: > I have a flat file structure and am trying to add structure to it. Here is > my XML: [snip] > <xsl:template match="div"> > <book> > <xsl:for-each-group > sel . . . Read full entry »


Grouping with siblings

Posted 2/15/2025 7:49:42 PM

I have a flat file structure and am trying to add structure to it. Here is my XML: <?xml version="1.0" encoding="UTF-8"?> <root> <div type="book" sID="book1"> <chapter sID="chapter1" n="1"/> < . . . Read full entry »


Re: Advantages and disadvantages of XSLT

Posted 2/15/2025 3:32:11 PM

Hello, Random Saturday-morning observations: XSLT (and XDM-based processing in general) effectively isolates the parsing-strings problem from the transformation problem. The difference is not and cannot be absolute, but it is important. If you do not have a new parsing problem, there is no reaso . . . Read full entry »


Re: Advantages and disadvantages of XSLT

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

On Sat, Feb 15, 2025 at 7:28b/AM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > What other advantages and disadvantages does XSLT have? An XML element as a container is a list and a map at the same time. IMO this is the optimal data structure for . . . Read full entry »


Re: Advantages and disadvantages of XSLT

Posted 2/15/2025 1:31:14 PM

On 15/02/2025 13:28, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I like XSLT. It is powerful at transforming small- to medium-sized XML documents. A few lines of XSLT code can do what hundreds of lines of Java code does. But XSLT does have disadvantages that one needs to be aware of (and . . . Read full entry »


Re: Advantages and disadvantages of XSLT

Posted 2/15/2025 1:13:59 PM

For me, without question, the import tree and import precedence is a tremendous advantage of XSLT. I have had numerous clients who, themselves, have numerous clients. Writing core XSL-FO stylesheets and then tweaking the core with onion-skin layers overriding the core (or each other) to create . . . Read full entry »


Advantages and disadvantages of XSLT

Posted 2/15/2025 12:27:55 PM

Hi Folks, I like XSLT. It is powerful at transforming small- to medium-sized XML documents. A few lines of XSLT code can do what hundreds of lines of Java code does. But XSLT does have disadvantages that one needs to be aware of (and I often forget): 1. XSLT is best suited for input data that is . . . Read full entry »


Re: xpath help?

Posted 2/13/2025 3:27:13 PM

In my early XSLT days (>20 years ago ;-), I found the axis diagrams in Michael Kaybs XPath book to be really helpful, illustrating what the axes meant in terms of tree traversal. If anyone is having trouble with XSLT 2, then his books (https://www.wiley.com/en-se/XSLT+2.0+and+XPath+2.0+Program . . . Read full entry »


Re: xpath help?

Posted 2/13/2025 3:08:26 PM

Hey Dan, Actually, you have (used the axes). Often people use XPath without knowing that's what they are doing. Every time you say 'div/h1' you are saying 'child::div/child::h1'. 'span/@class' is short for 'child::span/attribute::class'. Etc. Search for "XPath abbreviations" - for exa . . . Read full entry »


Re: xpath help?

Posted 2/13/2025 12:28:37 AM

Thanks, I don't think I've ever seen an XPath example with parents before. I've certainly never used them. This did fix the problem...thanks..danSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-ser . . . Read full entry »


Re: xpath help?

Posted 2/12/2025 11:22:55 PM

Try: /descendant::a[contains(@filepath, 'preface.html')][1]/@newid On Wed, Feb 12, 2025 at 5:53b/PM dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I have this xpath that returns more than one result > > //a[contains(@filepath, 'preface.html')]/@newid > > . . . Read full entry »


Re: xpath help?

Posted 2/12/2025 10:59:29 PM

//x[1] selects every x that is the first child of its parent. You want (//x)[1]. A well-known gotcha, disguised in your case by that intervening predicate. Michael Kay > On 12 Feb 2025, at 22:54, dvint@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I have this xpath . . . Read full entry »


Re: xpath help?

Posted 2/12/2025 10:58:13 PM

you are selecting all elements that are the first child of their parent use (//a[contains(@filepath, 'preface.html')])[1]/@newid or /descendant::a[contains(@filepath, 'preface.html')][1]/@newid David On Wed, 12 Feb 2025 at 22:53, dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx . . . Read full entry »


xpath help?

Posted 2/12/2025 10:53:52 PM

I have this xpath that returns more than one result //a[contains(@filepath, 'preface.html')]/@newid I thought adding [1] to it like this would get me the first entry, but the result doesn't change //a[contains(@filepath, 'preface.html')][1]/@newid Here is an example of the file I'm processing . . . Read full entry »


Re: [ADVERT] Saxonica is 21 and we have a special offe

Posted 2/8/2025 2:53:27 PM

I just ordered mine! On Fri, Feb 7, 2025 at 10:34b/AM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > It's 21 years since I created the Saxonica business, and we're holding a > flash sale to celebrate. You can buy a copy of Saxon-EE over this weekend . . . Read full entry »


[ANN] Webinar: Querying and Transforming JSON Document

Posted 2/7/2025 3:38:28 PM

Hello, I want to invite you to our live event, Querying and Transforming JSON Documents, taking place next Wednesday, on February 12th. In this session, youC"BBll discover how to efficiently transform JSON into XML, HTML, or other formats using the powerful XSLT and XQuery tools built in . . . Read full entry »


Re: [ADVERT] Saxonica is 21 and we have a special offe

Posted 2/7/2025 12:00:18 PM

Congratulations, I have a question, my current EE will expire in July, if I buy a copy now, will it extend my current licence (another 6 months)? Also I am a tax resident in Thailand, would it save me the UK VAT? Regards Jan Lalik On Fri, 7 Feb 2025 at 16:34, Michael Kay mike@xxxxxxxxxxxx < xs . . . Read full entry »


Re: [ADVERT] Saxonica is 21 and we have a special offe

Posted 2/7/2025 11:47:37 AM

Let me add to the 101,01 that &#x21; is an exclamation mark. Congratulations! Op 7 feb 2025, 10:34, om 10:34, "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> schreef: >It's 21 years since I created the Saxonica business, and we're holding >a fla . . . Read full entry »


Re: [ADVERT] Saxonica is 21 and we have a special offe

Posted 2/7/2025 9:38:25 AM

Happy Birthday On Fri, 7 Feb 2025 at 09:34, Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > It's 21 years since I created the Saxonica business, and we're holding a > flash sale to celebrate. You can buy a copy of Saxon-EE over this weekend > for t . . . Read full entry »


[ADVERT] Saxonica is 21 and we have a special offer to

Posted 2/7/2025 9:34:13 AM

It's 21 years since I created the Saxonica business, and we're holding a flash sale to celebrate. You can buy a copy of Saxon-EE over this weekend for the special price of B#101.01. Details are on the home page at www.saxonica.com. We look forward to many more years of serviing the XML user commun . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 6:55:19 PM

On Feb 6, 2025, at 12:25, Dave Pawson dave.pawson@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: o;?I wonder how we might mix (XML) metadata | documentationwith the XSLT of a stylesheet. Now has that been done before? ;-) Dunno, but I would write GRDDL transform to put . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 6:43:23 PM

https://mymind.com/ On Thu, Feb 6, 2025 at 4:19b/AM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > A few days ago, I needed some code to iterate over a set of folders and > then for each folder iterate over its files. > . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 6:27:52 PM

Hi Roger, It's a real problem, isn't it? My solution has been to keep version controlled directories of self-contained executable examples for all of my XSLT, XQuery, XProc, etc etc studies and efforts. Easily transferred between machines, easily navigable with either command line tools, file brow . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 6:24:57 PM

I wonder how we might mix (XML) metadata | documentation with the XSLT of a stylesheet. Now has that been done before? ;-) regards On Thu, 6 Feb 2025 at 18:16, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Thu, 2025-02-06 at 12:19 +0000, . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 6:16:40 PM

On Thu, 2025-02-06 at 12:19 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > What's the solution? Discipline? No matter how much I'm in a hurry, > stop and create an example. Is that the solution? Well, locate .xsl | grep $HOME | xargs grel -l expath will go a long way for me (Linu . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 6:07:47 PM

LOL!! Here's to that ticket finally getting addressed. Fascinating approach. - Anthony J. (Tony) Bufort Owner, AJB Consulting Renton, WA USA ------------------------------------------------------------------------ From: Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxx . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 6:06:27 PM

All excellent points by Wendell here. I'll chime in with two extra cents (fairly off-topic and yet prompted by Dimitrie's AI-generated code) and say that I have found Claude.ai (any model) to be superior to OpenAI regarding XSL and related matters (e.g. Saxon), most recently some great code regardi . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 5:02:08 PM

Hello, It is interesting to note the code Dimitre posted does not recurse into subfolders. Which might be fine, indeed his specification does not say to collect directories and process them the same way. For the AI to do that might be unexpected, and it might be wrong. But 'might be' is the oper . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 5:00:58 PM

In order to be able to quickly find XSLT code that ought to be on my disk, I once tried to index all .xsl files with BaseX. It ran into the problem that a database cannot hold more than 255 namespaces. The issue that I filed [1] will turn 11 next month. Gerrit [1] https://github.com/BaseXdb/basex . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 4:11:48 PM

Show example code of an XSLT transformation that uses the EXpath file module to iterate over a set of folders and then for each folder iterate over its files. ChatGPT said: Sure! Below is an example of an XSLT transformation that utilizes the *EXPath File Module* to iterate over a set of folders a . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 1:55:54 PM

This is actually what I've found AI engines to be 'pretty good at.' Do they need to come up with detailed-perfect code? Not really. And they'll certainly invent non-existent flags or functions or what not occasionally. But a lot of the time, what I'm looking for will be part of the results from . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 1:34:15 PM

I like Jim's suggestion to keep good documentation, but I haven't been consistent through the years (I am 66). However, I have found the silver lining to relearning: it helps me to solidify and increase my knowledge of the languages that I am using. Languages change and sometimes relearning gives m . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 1:20:40 PM

That is a good question (and not just for XSL :) ! ). As I've gotten older (and I AM really old now)....B I've gotten into the habit of writing documents... a LOT of documents... I call them my "journal notes"... when I work on something, and in those documents, I try to capture as much . . . Read full entry »


Re: How do you avoid relearning the same coding techni

Posted 2/6/2025 12:23:19 PM

On Thu, 6 Feb 2025 at 12:19, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > A few days ago, I needed some code to iterate over a set of folders and > then for each folder iterate over its files. > > Over the years I hav . . . Read full entry »


How do you avoid relearning the same coding technique

Posted 2/6/2025 12:19:20 PM

Hi Folks, A few days ago, I needed some code to iterate over a set of folders and then for each folder iterate over its files. Over the years I have solved that problem--use the expath file module--many times. In my most recent need, I spent a few minutes searching my file system to find an XSLT . . . Read full entry »


Re: Copy XPATH

Posted 2/3/2025 10:42:17 PM

On 03/02/2025 23:32, Vasu Chakkera vasucv@xxxxxxxxx wrote: will this work? That depends on your requirements you would know better than we do. It all depends on how you want to process the "xpath" attribute value. <xsl:stylesheet version="3.0" B B xmlns:xsl="http:// . . . Read full entry »


Re:   Copy XPATH

Posted 2/3/2025 10:31:57 PM

will this work? <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="x"> <!-- Template to match all elements --> <xsl:templ . . . Read full entry »


XSL-List Guidelines

Posted 2/1/2025 4:12:11 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: [XSLT Streaming] I xsl:iterate over airport primar

Posted 1/31/2025 8:04:14 PM

I think the best approach is probably to make a copy-of() the current record within the xsl:iterate and pass it as a parameter to the next iteration. That basically gives you a one-record lookbehind window, so in the body of xsl:iterate you have access to both the current record and the previous on . . . Read full entry »


Re: [XSLT Streaming] I xsl:iterate over airport primar

Posted 1/31/2025 7:42:19 PM

On Fri, 2025-01-31 at 19:25 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > Static error at xsl:source-document on line 10 column 47 of create- > airports.xsl: > B XTSE3430B The body of the xsl:source-document instruction is not > streamable > B *B Cannot use the followi . . . Read full entry »


Re: [XSLT Streaming] I xsl:iterate over airport primar

Posted 1/31/2025 7:40:35 PM

On 31/01/2025 20:25, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I am stream-processing a huge air navigation file that contains, among other things, airport primary records: <ARINC> ... <record> <ARINC_424-18_4_1_7_1_Airport_Primary_Recor . . . Read full entry »


[XSLT Streaming] I xsl:iterate over airport primary r

Posted 1/31/2025 7:25:11 PM

Hi Folks, I am stream-processing a huge air navigation file that contains, among other things, airport primary records: <ARINC> ... <record> <ARINC_424-18_4_1_7_1_Airport_Primary_Records> data about an airport &l . . . Read full entry »


Re: [ANN] Webinar: AI-Powered Development, Part 2: En

Posted 1/31/2025 1:49:10 PM

It would seem that XML requires genuine intelligence. On Fri, Jan 31, 2025, 14:46 Octavian Nadolu octavian_nadolu@xxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > The name of the webinar is "AI-Powered Development, Part 2: Enhancing > Development Workflows with AI Posi . . . Read full entry »


Re: [ANN] Webinar: AI-Powered Development, Part 2: En

Posted 1/31/2025 1:46:23 PM

The name of the webinar is "AI-Powered Development, Part 2: Enhancing Development Workflows with AI Positron." There seems to have been an issue with the font. On 1/31/2025 3:39 PM, Octavian Nadolu octavian_nadolu@xxxxxxx wrote: Hello, I want to invite you next Wednesday, February 5th . . . Read full entry »


[ANN] Webinar: AI-Powered Development, Part 2: Enhanci

Posted 1/31/2025 1:33:13 PM

Hello, I want to invite you next Wednesday, February 5th, to join the "C0BBBC0BBB;C0BBB5C0BBB.C0BBB;C0BBB0C0BBB6C0BBB;C0BBB4 C0BBBC0BBB2C0BBBC0BBB2C0BBB9C0BBB<C0BBB=C0BBB:C0BBB2C0BBB;C0BBB C0BBB*C0BBB<C0BBB?C0BBB8C0BBB3C0BBB9C0BB . . . Read full entry »


Re: "Request for streaming ignored: this Saxon config

Posted 1/29/2025 10:20:15 PM

The message almost certainly means that it's not picking up your license file. Don't use the -jar option on the Java command line, use the -cp (or -classpath) option. Include both the Saxon JAR file and the *folder containing the Saxon license file* (not the file itself) on the classpath, separati . . . Read full entry »


Re: "Request for streaming ignored: this Saxon config

Posted 1/29/2025 10:17:43 PM

On 29/01/2025 22:53, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > I am trying to get a simple XSLT streaming program to work. > > I am using SAXON-EE 12.5 > > The SAXON documentation says this: > > There are two main ways to initiate a streaming transformati . . . Read full entry »


"Request for streaming ignored: this Saxon configurati

Posted 1/29/2025 9:53:16 PM

Hi Folks, I am trying to get a simple XSLT streaming program to work. I am using SAXON-EE 12.5 The SAXON documentation says this: There are two main ways to initiate a streaming transformation: 1. Using the xsl:source-document instruction, with the attribute streamable="yes". Here th . . . Read full entry »


Re: How to transform a 5GB input XML document?

Posted 1/29/2025 12:27:46 PM

> Have you transformed huge XML documents? How did you do it? > I've done 50Gb using Saxon-EE in XSLT streaming mode, but once you're streaming, there are no hard limits. I wrote up one use case in 2009 - see https://blog.saxonica.com/mike/2009/09/analyzing-dependencies-in-a-class-libr ary- . . . Read full entry »


Re: How to transform a 5GB input XML document?

Posted 1/29/2025 11:57:47 AM

How much memory does it use? What values have you measured? 5 GB isn't that big in 2025. There are other ways to do this, but at 5 GB I might just get a machine with more memory and increase the heap size a lot, especially if it's only something you do every day or two on one machine. On Wed, Jan . . . Read full entry »


Re: How to transform a 5GB input XML document?

Posted 1/29/2025 11:51:48 AM

On 29/01/2025 12:45, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, My input XML document is 5GB. I need to transform the document; the resulting output XML document will be at least that size. Have you transformed huge XML documents? How did you do it? XSLT requires the entire input XML do . . . Read full entry »


How to transform a 5GB input XML document?

Posted 1/29/2025 11:45:32 AM

Hi Folks, My input XML document is 5GB. I need to transform the document; the resulting output XML document will be at least that size. Have you transformed huge XML documents? How did you do it? XSLT requires the entire input XML document be loaded into memory; my experience is the XSLT process . . . Read full entry »


Re: Match Parents Element ID

Posted 1/27/2025 9:30:16 AM

On 27/01/2025 09:58, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote: Hi, We have multiple XML files which need to fetch parent elements with attributes only from one file. Find below my xsl and input files. ID File: <!-- Take chapter based on the section file --> <gd id="RB_A"& . . . Read full entry »


Match Parents Element ID

Posted 1/27/2025 8:58:10 AM

Hi, We have multiple XML files which need to fetch parent elements with attributes only from one file. Find below my xsl and input files. ID File: <!-- Take chapter based on the section file --> <gd id="RB_A"> <act id="RB_C"> <title> . . . Read full entry »


Re: v4 mode

Posted 1/24/2025 12:07:59 PM

On Fri, Jan 24, 2025 at 11:47:17AM -0000, Michael Kay michaelkay90@xxxxxxxxx scripsit: > > On 24 Jan 2025, at 11:02, Graydon graydon@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Under what circumstances would we want a built-in funtion (necessarily > > stat . . . Read full entry »


Re: v4 mode

Posted 1/24/2025 11:47:10 AM

> On 24 Jan 2025, at 11:02, Graydon graydon@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > Under what circumstances would we want a built-in funtion (necessarily > statically provided with a mode, presumably one of #all, #default, or > #unnamed) not work so . . . Read full entry »


Re: v4 mode

Posted 1/24/2025 11:02:19 AM

On Fri, Jan 24, 2025 at 10:32:21AM -0000, Andre Cusson akhu01@xxxxxxxxx scripsit: > Yet, could/should functions feasibly be mode-scoped (or even mode-scoped & > mode-sensitive ;)? Under what circumstances would we want a built-in funtion (necessarily statically provided with a mode, pres . . . Read full entry »


Re: v4 mode

Posted 1/24/2025 10:56:21 AM

Yes, I encountered this myself and raised an issue on it: https://github.com/qt4cg/qtspecs/issues/1537 Your support will encourage me to progress it. Are you using 4.0 in anger? Any other feedback? Michael Kay Saxonica > On 24 Jan 2025, at 10:32, Andre Cusson akhu01@xxxxxxxxx <xsl-list-s . . . Read full entry »


v4 mode

Posted 1/24/2025 10:32:13 AM

Hi, Just a note about the neat structuring or organizing feature of embedding respective mode related templates inside the mode declaration: Functions used exclusively by the mode templates, need to be outside the mode ... In grouping mode processing in respective stylesheets (include/import), th . . . Read full entry »


Re: Stylesheet works in oXygen fails in Python with S

Posted 1/22/2025 1:26:40 PM

Respectfully, these sorts of responses don't seem like the best way to grow the ever dwindling XML-stack community. However someone finds their way to "the right tool for the job", e.g., using SaxonC rather than BeautifulSoup to process some XML, is fine with me. As the original poster n . . . Read full entry »


Re: Stylesheet works in oXygen fails in Python with S

Posted 1/22/2025 9:40:30 AM

Hi, In terms of documentation, a good place to start for writing XSLT applications in Python is here: https://www.saxonica.com/documentation12/index.html#!using-xsl/saxonc-transfo rmation/python-api-transformation Kind regards, O'Neil > On 21 Jan 2025, at 23:34, dvint dvint@xxxxxxxxx <x . . . Read full entry »


Re: Running XSLT from Python

Posted 1/22/2025 1:21:31 AM

Ok, here are the messages I've been getting. This is from my program and lxml: Traceback (most recent call last): File "/Users/danvint/pubsrc/adoc2PDF/02-write-single-html-to-xml.py", line 213, in <module> doc.body.append(BeautifulSoup(str(build_content(soup_nav)), features=& . . . Read full entry »


Re: Stylesheet works in oXygen fails in Python with S

Posted 1/21/2025 11:34:02 PM

You have to start somewhere.B The sample file provided no documentation on what it did or why the method was selected for getting started with python and saxon.B I also wasn't expecting to have multiple ways to run a stylesheet against content. The sample ran and created output and I swapped my pi . . . Read full entry »


Re: Stylesheet works in oXygen fails in Python with S

Posted 1/21/2025 11:14:38 PM

>I was just following a sample file I found. > That's the way people write code these days. Copy and paste, no need to understand it. Either that, or ask ChatGPT to do it for them. I guess ChatGPT looks at more examples and is therefore more likely to get it right. Who knows, it might even r . . . Read full entry »


Re: Stylesheet works in oXygen fails in Python with S

Posted 1/21/2025 11:05:57 PM

Thanks that did the trick. Didn't realize there were multiple ways to run a stylesheet in against content. I was just following a sample file I found. ..dan On 2025-01-21 14:09, Martin Honnen martin.honnen@xxxxxx wrote: On 21/01/2025 23:07, Martin Honnen martin.honnen@xxxxxx wrote: You seem to . . . Read full entry »


Re: Stylesheet works in oXygen fails in Python with S

Posted 1/21/2025 10:09:06 PM

On 21/01/2025 23:07, Martin Honnen martin.honnen@xxxxxx wrote: You seem to have a global variable or parameter that tries to access the global context item, so far you have only set the initial-match selection, use e.g. B xdm_doc = proc.parse_xml(xml_file_name='nav-short.xml') and then set both t . . . Read full entry »


Re: Stylesheet works in oXygen fails in Python with S

Posted 1/21/2025 10:07:31 PM

On 21/01/2025 22:58, dvint@xxxxxxxxx wrote: (base) danvint@mac-PHFW3L52 samples % python3 /Users/danvint/pubsrc/adoc2PDF/_saxon-test.py SaxonC-HE 12.5 from Saxonica Error at char 9 in expression in xsl:variable/@select on line 13 column 62 of 02a-build_content-short.xslt: B XPDY0002B Finding root . . . Read full entry »


Stylesheet works in oXygen fails in Python with Saxonc

Posted 1/21/2025 9:58:14 PM

I have a stylesheet that works fine in oXygen and Python using lxml/etree. I'm experimenting with switching the Pythion config over to Saxon. Currently I'm just testing a simple Python config to run the stylesheet as follows: from saxonche import * with PySaxonProcessor(license=False) as proc: . . . Read full entry »


Re: I love programs that output programs

Posted 1/21/2025 9:06:56 PM

> On 19 Jan 2025, at 22:47, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On Sun, 2025-01-19 at 22:22 +0000, Joel Kalvesmaki > director@xxxxxxxxxxxxx wrote: >> Just to say that I frequently use multiple modes on one template. > . . . Read full entry »


Re: Running XSLT from Python

Posted 1/20/2025 4:34:40 PM

Thanks for the update. Until this last year I didn't really have anywhere I could have used xproc so I didn't really keep up with what was going.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-servi . . . Read full entry »


Re: Running XSLT from Python

Posted 1/20/2025 3:29:03 PM

Martin, you're right, with apologies to Achim. I never used Morgana before the v3 version ... Thanks for the correction - Wendell On Mon, Jan 20, 2025 at 9:20b/AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On 20/01/2025 15:15, Wendell P . . . Read full entry »


Re: Running XSLT from Python

Posted 1/20/2025 2:23:10 PM

On 20/01/2025 15:20, Martin Honnen martin.honnen@xxxxxx wrote: There was/is XML Calabash 1 https://xmlcalabash.com/archive-1.x/ and MorganaXProc 1 https://xmlcalabash.com/archive-1.x/ for XProc 1, no? The second link was supposed to be https://sourceforge.net/projects/morganaxproc/files/, sorry a . . . Read full entry »


Re: Running XSLT from Python

Posted 1/20/2025 2:19:56 PM

On 20/01/2025 15:15, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: While XProc 1 could be made to work effectively, there was only one processor (tmk) There was/is XML Calabash 1 https://xmlcalabash.com/archive-1.x/ and MorganaXProc 1 https://xmlcalabash.com/archive-1.x/ for XProc 1, no? . . . Read full entry »


Re: Running XSLT from Python

Posted 1/20/2025 2:14:58 PM

Dan, This is XSL-List and there are plenty of XProc links to be found.However, your experience warrants a brief summary of the big differences between XProc 3 (today) and XProc 1.0 (ten years ago and more): While XProc 1 could be made to work effectively, there was only one processor (tmk) and it . . . Read full entry »


Re: Running XSLT from Python

Posted 1/20/2025 2:04:47 AM

On 1/19/25 12:19, Michael Kay michaelkay90@xxxxxxxxx wrote: Oh - I should qualify - *in public* - we don't know what people are doing who are not talking about it. That's a very big qualification: I think we only see the tip of the iceberg on the public internet, and most IT activity is conducted . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 10:47:20 PM

On Sun, 2025-01-19 at 22:22 +0000, Joel Kalvesmaki director@xxxxxxxxxxxxx wrote: > Just to say that I frequently use multiple modes on one template. Hmm, <xsl:mode name="sago" base="tapioca"> . . . </xsl:mode> to be the equivalent of extracting xsl:mode[@ . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 10:22:37 PM

Just to say that I frequently use multiple modes on one template. Yes, I can do the conditional work through tunnel parameters, but sometimes I prefer multiple modes to handle that, since it reduces number of lines (and therefore potential clutter) in my XSLT code, and it helps me think about p . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 9:51:10 PM

On Sun, Jan 19, 2025 at 08:43:50PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > I would be interested in your use case for having a template rule in multiple > modes. It's something I have very rarely seen a need for. I suspect that where > you are using this, I would probably be using . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 9:11:43 PM

Maybe parameters would do it by refactoring. I had a situation where I was processing content in multiple ways and I started by assigning a mode initially. For instance handling links in different ways for instance based upon the current mode.Why were multiple modes allowed on templates then? Sure . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 8:43:43 PM

> Recently I've started applying multiple modes to one template. This has simplified my stylesheets where I have several modes going on. Will that be supported with this new mode element? No. I would be interested in your use case for having a template rule in multiple modes. It's something I . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 8:24:59 PM

On 19/01/2025 20:48, dvint dvint@xxxxxxxxx wrote: Recently I've started applying multiple modes to one template. This has simplified my stylesheets where I have several modes going on.B Will that be supported with this new mode element? The enclosing mode is a single mode see https://qt4cg.org/sp . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 7:48:00 PM

Recently I've started applying multiple modes to one template. This has simplified my stylesheets where I have several modes going on.B Will that be supported with this new mode element?B This new element will make it easier to deal with stylesheets with an editor like oxygen where you can collaps . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 7:05:30 PM

On Sun, 2025-01-19 at 11:16 +0000, Dave Pawson dave.pawson@xxxxxxxxx wrote: > Modes: > B Now 'enclosing modes' > Am I the only one thinking xslt4 is miles away (and of less use due > complexity)B from XSLT? This change is actually a simplification. You can now write <xsl:mode na . . . Read full entry »


Re: Running XSLT from Python

Posted 1/19/2025 6:22:31 PM

Personally, I tried xproc about 10yrs ago. I was successful after much stumbling. I was building in oxygen and setting it up to run within that environment. I documented the setup and tried to have a coworker run the xproc. For some reason I was never able to get it to work in their environment. I . . . Read full entry »


Re: Running XSLT from Python

Posted 1/19/2025 6:19:09 PM

> Oh - I should qualify - *in public* - we don't know what people are doing who are not talking about it. > That's a very big qualification: I think we only see the tip of the iceberg on the public internet, and most IT activity is conducted in private. Further, the bigger and longer-duratio . . . Read full entry »


Re: Running XSLT from Python

Posted 1/19/2025 5:56:00 PM

Hello Dan, What you describe (devs skittish about XSLT) is a widespread problem, and a severe one. . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 12:36:57 PM

Hi Folks, Readability is a fascinating subject. I am reading the book titled, The Prize, the Epic Quest for Oil, Money & Power by Daniel Yergin. Here is a passage from the book (p. 91): bThe congressman had a bright idea. A presidential author might certainly be subject to flattery, especial . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 12:19:02 PM

That was an extremely cool story, Mike, thank you! 1998 - and pushing a young XSL as hard, and as creatively, as all that. "when it was written, they could safely assume that everyone would be using the same browser, a situation which rapidly changed." *head to forehead* Did it ever! . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 11:26:47 AM

> This really works well, much better than generating XSLT code again and again The first XSLT application I ever came across (it was still called XSL at the time, this was 1998) was an on-line banking application. A key part of the requirement was that they should be able to create different b . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 11:15:59 AM

Modes: Now 'enclosing modes' Am I the only one thinking xslt4 is miles away (and of less use due complexity) from XSLT? regards On Sun, 19 Jan 2025 at 11:11, Michael Kay michaelkay90@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > in XSLT 4 as proposed, you can put . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 11:11:15 AM

> in XSLT 4 as proposed, you can put all templates for a given mode inside the xsl:mode element (although i am not sure you can enforce that... Yes, it is enforced. In an "enclosing mode" all templates applicable to the mode must be children of the xsl:mode element. Except that you'r . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 7:55:47 AM

On Sat, Jan 18, 2025 at 9:22b/PM Dimitre Novatchev dnovatchev@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > As Dmitre notes, itbs easy to write things that are hard to read, so > > you do have to be careful not to overdo it. > > In my practice I have do . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 7:25:59 AM

On Sun, 2025-01-19 at 07:22 +0000, Anthony J (Tony) Bufort ajbufort@xxxxxxxxxxxxxxxx wrote: > Indeed Liam,B file:write() is one of my go-tos.B My main one, in > fact.B Ought to have mentioned that in my original message. cool. Actually maybe i am muddling up Reston & Renton, Renton mi . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 7:21:50 AM

Indeed Liam, file:write() is one of my go-tos. My main one, in fact. Ought to have mentioned that in my original message. Good point re XSLT 4 and aggregating modes within the tag itself. And as regards Renton, that's very cool. :) Thanks, -Tony Anthony J. (Tony) BufortOwner, AJB Consulting Rento . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 6:42:16 AM

On Sun, 2025-01-19 at 06:05 +0000, ajbufort@xxxxxxxxxxxxxxxx wrote: > B And if you output the file as XML first, and THEN want to try to re- > ingest it and process it within the same transform, you will run > across the Saxon protective measure of prohibiting ingesting a file > you hav . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 6:05:01 AM

I have great interest in, and experience with, dynamic transform creation. Ibll add to this thread that it can get tricky if a transformation starts out ingesting plain text and then transforms it to XML, and THEN expects to continue processing that result within the same transform. If it is a . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 5:33:23 AM

On Sun, 2025-01-19 at 05:22 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > > there was no one that could understand what this was doing, but me > ... In programming, a readable but incorrect program is generally better than a correct but unreadable one. Requirements change, bugs . . . Read full entry »


Re: I love programs that output programs

Posted 1/19/2025 5:22:40 AM

> As Dmitre notes, itbs easy to write things that are hard to read, so > you do have to be careful not to overdo it. In my practice I have done something more practical and convenient than writing an XSLT transformation ( a set of stylesheets) that generates another XSLT transformation ( . . . Read full entry »


Re: Running XSLT from Python

Posted 1/19/2025 1:26:27 AM

I hadn't but part of my problem is the team is not xml aligned any more. I was trying to avoid xslt by using Python when that seemed to fail me.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-servic . . . Read full entry »


Re: Running XSLT from Python

Posted 1/18/2025 10:44:52 PM

Dan, Have you considered XProc 3.0? It is able to read HTML the same as it does XML. While bad inputs are bad inputs, it is also good for detecting and/or repairing them. It can embed and use Schematron and XSLT; you might also find many of the things you need to do are achievable by XProc alone. . . . Read full entry »


Re: Running XSLT from Python

Posted 1/18/2025 4:59:21 PM

Let me switch the code up a bit and use Saxon as I will be comparing apples to apples then.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 1/18/25 8:08 AM ( . . . Read full entry »


Re: Running XSLT from Python

Posted 1/18/2025 4:08:21 PM

On 18/01/2025 01:33, dvint dvint@xxxxxxxxx wrote: From oxygen i get a message about the specific element that is wrong. From python I get a bit of a dump and then the name of the file where the problem is. I need to give the writers at least the element in the file with the problem. Right now, I go . . . Read full entry »


Re: Running XSLT from Python

Posted 1/18/2025 11:12:50 AM

On 18/01/2025 00:29, dvint dvint@xxxxxxxxx wrote: Tidy was failing because of some bad unknown elements. There is a config file somewhere and I think it lets you add bogus element types. From oxygen i get a message about the specific element that is wrong. From python I get a bit of a dump and th . . . Read full entry »


Re: I love programs that output programs

Posted 1/18/2025 5:46:11 AM

On Fri, 2025-01-17 at 20:22 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > Recently I was reading Brian Kernighan's new book on AWK, Awksome! I hadn't known there was one. One of the first complex text processing programs i wrote was to read a bunch of text files, iden . . . Read full entry »


Re: Running XSLT from Python

Posted 1/18/2025 12:32:59 AM

. . . Read full entry »


Re: Running XSLT from Python

Posted 1/18/2025 12:28:40 AM

Tidy was failing because of some bad unknown elements. I had tried that early on. The html has to be modified though to get links to work properly. I also add the navigation file so the pdf has a toc.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Peter . . . Read full entry »


Re: Running XSLT from Python

Posted 1/17/2025 11:54:44 PM

On 17/01/2025 23:16, dvint@xxxxxxxxx wrote: First off, is anyone aware of a good way to merge a bunch of HTML techdoc pages into a single HTML so a PDF file can be generated with something like Prince or Weasyprint? If I understand you right, you want to catenate the contents of the <body> . . . Read full entry »


Re: Running XSLT from Python

Posted 1/17/2025 11:23:52 PM

On 18/01/2025 00:15, dvint@xxxxxxxxx wrote: First off, is anyone aware of a good way to merge a bunch of HTML techdoc pages into a single HTML so a PDF file can be generated with something like Prince or Weasyprint? I didn't find anything so I went down this the following path. For this effort I de . . . Read full entry »


Running XSLT from Python

Posted 1/17/2025 11:15:40 PM

First off, is anyone aware of a good way to merge a bunch of HTML techdoc pages into a single HTML so a PDF file can be generated with something like Prince or Weasyprint? I didn't find anything so I went down this the following path. For this effort I decided to see what coPilot would come up . . . Read full entry »


Re: I love programs that output programs

Posted 1/17/2025 9:41:21 PM

Another note: People may want to generate not xslt-code, but pure XPath code (and evaluate it with xsl:evaluate in XSLT, or using fn:load-xquery module, if they don't have an xslt-capable host. https://qt4cg.org/specifications/xpath-functions-40/Overview.html#func-load-x query-module On Fri, Jan 1 . . . Read full entry »


Re: I love programs that output programs

Posted 1/17/2025 9:36:43 PM

Hi Roger, > <axsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"> > <axsl:template match="/"> > <axsl:for-each select="/passwds/passwd"> > & . . . Read full entry »


Re: I love programs that output programs

Posted 1/17/2025 8:43:33 PM

I recently modified an XSLT the converted Word ML to LaTeX, very cool!! Also, you may want to check out the old langagues Snobol4/Spitbol. Many of the pattern matching and data types inspired AWK! fyi, Russ On Friday, January 17, 2025 at 02:22:27 PM CST, Roger L Costello costello@xxxxxxxxx < . . . Read full entry »


Re: I love programs that output programs

Posted 1/17/2025 8:29:28 PM

On 17/01/2025 21:22, Roger L Costello costello@xxxxxxxxx wrote: Recently I was reading Brian Kernighan's new book on AWK, and it showed a wicked cool AWK program that outputs an AWK program. Below is the AWK program, followed by the equivalent XSLT program. The task is to run some checks on a passw . . . Read full entry »


I love programs that output programs

Posted 1/17/2025 8:21:58 PM

Hi Folks, Recently I was reading Brian Kernighan's new book on AWK, and it showed a wicked cool AWK program that outputs an AWK program. Below is the AWK program, followed by the equivalent XSLT program. The task is to run some checks on a password file. Here is a sample password file: root:qyxR . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/13/2025 4:36:15 PM

Another XPath 3.1 solution - uses fold-left and is not exactly compact: (fold-left($values, [map {}, []], function($acc as array(*), $n as xs:string) { let $map := $acc(1), $result := $acc(2), $isDupe := ($map($n)) return if (empty($isDupe)) then [ map:put($map, $n, false()), $result] else if ($is . . . Read full entry »


Announcing Balisage 2025 - Mark Your Calendars

Posted 1/7/2025 4:18:53 PM

Balisage 2025 will be: 4 - 8 August 2025 all virtual all live interactive solidly technical More details, including the Call for Participation are coming soon. More about Balisage 2025, programs and proceedings of previous conferences, and Balisage news at https://balisage.net/index.htmlo?< Q . . . Read full entry »


Upcoming virtual courses from Delightful Computing, Q1

Posted 1/6/2025 5:46:37 AM

Hello! Ibm running some XML and Web courses. Exact dates depend on the people taking the courses. (1) Introduction to XSLT B B B With a focus on maintaining and exploring B B B existing XSLT. Gentle. Includes perspective/context on when B B B to use Schematron, XSD, RelaxNG, DTD, XProc, and mo . . . Read full entry »


Complexity, big-O notation [Was: Re: Get the duplicate

Posted 1/4/2025 12:49:09 PM

"In the context of big-O notation, "complexity" has a meaning very different from its everyday meaning. It basically means "scaleability" - how does the time taken by the task vary with the size of the input? It's a rather unfortunate choice of term. In particular, it has n . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/4/2025 12:01:30 PM

First, the question asked for a solution, not for a solution that is efficient or scaleable. I fear that the discussion may be at cross-purposes because the word "complexity" has different meanings. In the context of big-O notation, "complexity" has a meaning very different fro . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 11:14:09 PM

Liam wrote: > I read it as wanted something easy to understand: human efficiency rather than computational efficiency. Correct. /Roger . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 10:24:59 PM

On Fri, 2025-01-03 at 22:13 +0000, Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx wrote: > > All well and good, and thank you for that, Liam (Like some others > here, I understandwhat it means to be O(1) vs O(n) vs O(nB2), but am > not much at figuring it out.) > > > That said, isnbt t . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 10:13:04 PM

All well and good, and thank you for that, Liam (Like some others here, I understand what it means to be O(1) vs O(n) vs O(nB2), but am not much at figuring it out.) That said, isnbt this post about efficiency as opposed to complexity? Not that I think we have a very solid definition of complexit . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 10:03:31 PM

On Fri, 2025-01-03 at 12:50 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > B > I would hope that the map:merge is ensured to be more efficient than > that count($fieldnames[. eq $f]) gt 1 First, Dmitrebs solution is great. On complexity - if a map is implemented as a hash table, i . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 5:11:09 PM

That's just beautiful. Nice work Dmitre. - Chris On Fri, Jan 3, 2025 at 11:47b/AM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Dimitre provided this gorgeous solution to getting a list of the > duplicates in $fieldnames (a sequence of str . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 4:56:42 PM

"Partly because it's an expression, not an instruction" Thanks, Michael. Understood. On Fri, Jan 3, 2025 at 10:30b/AM Michael Kay michaelkay90@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > Off topic, but following a train of thought: Was there a . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 4:47:20 PM

Dimitre provided this gorgeous solution to getting a list of the duplicates in $fieldnames (a sequence of strings): $fieldnames[index-of($fieldnames,.)[2]] Well done Dimitre. /Roger . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 3:30:45 PM

> Off topic, but following a train of thought: Was there a particular reason behind the design decision that XPath *if* expressions would require an *else* clause? > Partly because it's an expression, not an instruction: if you look at conditional expressions (like the dreadful ternary opera . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 3:22:49 PM

Off topic, but following a train of thought: Was there a particular reason behind the design decision that XPath *if* expressions would require an *else* clause? On Jan 3, 2025, at 9:51b/AM, Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: o;? &g . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 2:51:16 PM

> b& why empty-string-and-discard rather than just empty sequence? [paraphrased] Because I didnbt think of it! Thanks for the improvement p ________________________________ Are there significant advantages to your suggestions over the following? ( ( for $f in $fieldnames return if ( . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 2:33:48 PM

On 03/01/2025 10:52, Roger L Costello costello@xxxxxxxxx wrote > $fieldnames is a list of strings, e.g., > > ('TYPE', 'USAGE_CD', 'DIR', 'WGS_LAT', 'TYPE', 'WGS_LONG', 'TURN_DIR', 'DIR', 'TYPE') > > I want a list of the duplicates in $fieldnames: > > ('TYPE', 'DIR') <-- . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 2:20:49 PM

On Fri, Jan 03, 2025 at 02:01:33PM -0000, Roger L Costello costello@xxxxxxxxx scripsit: > It is interesting that such a simple problem requires such complex code. It is sometimes necessary to consider that one's construction of complex might be in need of revision. <xsl:for-each-group selec . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 2:16:56 PM

Hi Roger, This is a short and simple solution - just 19 characters: $f[index-of($f,.)[2]] Just try it :) Can also be found here, and was answered in 2008: https://stackoverflow.com/questions/133092/how-do-you-identify-duplicate-valu es-in-a-numerical-sequence-using-xpath-2-0/287360#287360 . . . Read full entry »


Re: Get the duplicates in a list

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

It is interesting that such a simple problem requires such complex code. . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 1:50:52 PM

In pure XPath 3.1 you could also try: let $s := sort($in) return distinct-values(for-each-pair($s, tail($s), function($a, $b){$a[. = $b]) ) It's pretty obscure but it's likely to be quite efficient. Michael Kay > On 3 Jan 2025, at 10:52, Roger L Costello costello@xxxxxxxxx <xsl-list-servi . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 12:50:19 PM

Am 03.01.2025 um 13:38 schrieb Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx: > Martin & Liam b > Are there significant advantages to your suggestions over the following? > > ( > B ( for $f in $fieldnames returnB if ( count( $fieldnames[ . eq $f ] ) > gt 1 ) then $f else '' ) > B . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 12:37:51 PM

Martin & Liam b Are there significant advantages to your suggestions over the following? ( ( for $f in $fieldnames return if ( count( $fieldnames[ . eq $f ] ) gt 1 ) then $f else '' ) => distinct-values() )[. ne ''] I admit it is not simple, but strikes me as simpler. (Note that inste . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 11:23:07 AM

On Fri, 2025-01-03 at 10:52 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > $fieldnames is a list of strings, e.g., > > ('TYPE', 'USAGE_CD', 'DIR', 'WGS_LAT', 'TYPE', 'WGS_LONG', > 'TURN_DIR', 'DIR', 'TYPE') > > I want a list of the duplicates in $fieldname . . . Read full entry »


Re: Get the duplicates in a list

Posted 1/3/2025 11:04:45 AM

Am 03.01.2025 um 11:52 schrieb Roger L Costello costello@xxxxxxxxx: Hi Folks, $fieldnames is a list of strings, e.g., ('TYPE', 'USAGE_CD', 'DIR', 'WGS_LAT', 'TYPE', 'WGS_LONG', 'TURN_DIR', 'DIR', 'TYPE') I want a list of the duplicates in $fieldnames: ('TYPE', 'DIR') <-- I don't want any . . . Read full entry »


Get the duplicates in a list

Posted 1/3/2025 10:52:16 AM

Hi Folks, $fieldnames is a list of strings, e.g., ('TYPE', 'USAGE_CD', 'DIR', 'WGS_LAT', 'TYPE', 'WGS_LONG', 'TURN_DIR', 'DIR', 'TYPE') I want a list of the duplicates in $fieldnames: ('TYPE', 'DIR') <-- I don't want any duplicates in this list Is there a simple XPath expression to obt . . . Read full entry »


Re: How to retrieve the element with value DIR and not

Posted 1/3/2025 2:32:19 AM

> Or contains(concat(',', field, ','), 'DIR') but then you are sensitive > to values like > "DIR , OTHER" > (a leading or trailing space should be removed by the XML parser, > though) Not a problem if spaces can occur only within the delimiters - just use: contains . . . Read full entry »


Re: How to retrieve the element with value DIR and not

Posted 1/3/2025 1:16:37 AM

On Thu, 2025-01-02 at 23:04 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > > contains-token tokenizes on pure whitespace, no? With that comma in > there I don't think it helps. oh, i didn't look closely enough, you're right. No, tokenize() it is. Or contains(concat(',', field, ','), . . . Read full entry »


Re: How to retrieve the element with value DIR and not

Posted 1/2/2025 11:04:37 PM

XPath 1.0: /*/*/field[contains(concat(',', .), ',DIR,')] On Thu, Jan 2, 2025 at 2:35b/PM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > I want to retrieve the <row> whose <field> has the string DIR. In the > fo . . . Read full entry »


Re: How to retrieve the element with value DIR and not

Posted 1/2/2025 11:04:16 PM

On 02/01/2025 23:55, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: On Thu, 2025-01-02 at 22:35 +0000, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I want to retrieve the <row> whose <field> has the string DIR. In the following example, I want the second <row> retrieved. Is . . . Read full entry »


Re: How to retrieve the element with value DIR and not

Posted 1/2/2025 10:55:39 PM

On Thu, 2025-01-02 at 22:35 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > I want to retrieve the <row> whose <field> has the string DIR. In the > following example, I want the second <row> retrieved. Is there a > simple XPath expression to achiev . . . Read full entry »


Re: How to retrieve the element with value DIR and not

Posted 1/2/2025 10:41:26 PM

On 02/01/2025 23:36, Roger L Costello costello@xxxxxxxxx wrote: I want to retrieve the <row> whose <field> has the string DIR. In the following example, I want the second <row> retrieved. Is there a simple XPath expression to achieve this? <Test> <row> & . . . Read full entry »


How to retrieve the element with value DIR and not the

Posted 1/2/2025 10:35:45 PM

Hi Folks, I want to retrieve the <row> whose <field> has the string DIR. In the following example, I want the second <row> retrieved. Is there a simple XPath expression to achieve this? <Test> <row> <field>TURN_DIR, PT_TRN_DIR, NX_TRN_DIR</field& . . . Read full entry »


Re: Programming languages for manipulating, transformi

Posted 1/1/2025 6:53:11 PM

> Want to have a great set of tools in your toolbox for manipulating, transforming, and analyzing data? > Then master XSLT, XPath, AWK, and R. What is notably missing in the proposed set of languages/tools is: Rx (ReactiveX, Reactive Extensions). https://en.wikipedia.org/wiki/ReactiveX Rx p . . . Read full entry »


XSL-List Guidelines

Posted 1/1/2025 5:49:13 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: Programming languages for manipulating, transformi

Posted 1/1/2025 12:03:53 PM

Am 01.01.2025 um 12:58 schrieb Liam R. E. Quin liam@xxxxxxxxxxxxxxxx: On Wed, 2025-01-01 at 11:40 +0000, Roger L Costello costello@xxxxxxxxx wrote: XSLT and XPath are great languages for manipulating and transforming data--provided the data is formatted as XML. For non-XML data, AWK is a great lang . . . Read full entry »


Re: Programming languages for manipulating, transformi

Posted 1/1/2025 11:58:17 AM

On Wed, 2025-01-01 at 11:40 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > XSLT and XPath are great languages for manipulating and transforming > data--provided the data is formatted as XML. > > For non-XML data, AWK is a great language. XSLT can also be good f . . . Read full entry »


Re: Programming languages for manipulating, transformi

Posted 1/1/2025 11:53:26 AM

Am 01.01.2025 um 12:40 schrieb Roger L Costello costello@xxxxxxxxx: XSLT and XPath are great languages for manipulating and transforming data--provided the data is formatted as XML. A bit of heresy on the XSL list perhaps, but XQuery is also great at manipulating and transforming XML data, and wit . . . Read full entry »


Programming languages for manipulating, transforming,

Posted 1/1/2025 11:40:05 AM

Hi Folks, XSLT and XPath are great languages for manipulating and transforming data--provided the data is formatted as XML. For non-XML data, AWK is a great language. Neither XSLT, XPath nor AWK are good for statistical analysis of data--the R language (I've heard) is well-suited for this. Want . . . Read full entry »


Re: Aw:  How to collect the content of the inline sibl

Posted 12/28/2024 6:13:38 AM

Hello Rajagopal, Well done sharing both the source XML and desired output; that makes everything easier. As usual, Martin has provided the solution. However, my own tests indicate that the mixed content involved adds additional complexity (no surprise there). So I find that additionally are requir . . . Read full entry »


Re: How to collect the content of the inline siblings

Posted 12/28/2024 6:03:24 AM

On Sat, 2024-12-28 at 05:37 +0000, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: > > Here's a version using a recursive function, for XSLT 1. Haha it's late an di'm tired, probably it should have an empty template to match blank text nodes between strong elements and remove them: <xsl:t . . . Read full entry »


Re: How to collect the content of the inline siblings

Posted 12/28/2024 5:37:43 AM

On Sat, 2024-12-28 at 04:26 +0000, Rajagopal CV cvr3@xxxxxxxxxxxxxxxx wrote: > > I want the followingB output. I want to flatten out the <strong> > element.B It looks like you want to join adjacent strong elements, deleting spaces between them. In XSLT 2 or 3 you can probably use . . . Read full entry »


Aw:  How to collect the content of the inline siblings

Posted 12/28/2024 5:03:40 AM

With XSLT 2 or higher, in a template matching "*[strong]", use eg <xsl:for-each-group select="*" group-adjacent="boolean(self::strong)">, check the current-grouping-key() inside with xsl:choose/when to output a single strong element if it is true and populate by . . . Read full entry »


How to collect the content of the inline siblings into

Posted 12/28/2024 4:26:18 AM

Kindly assist me with an XSL code needed to generate the output I have shared below. Thanks, Rajagopal *Input XML * <?xml version="1.0"?> <root> <content> <p>Some text before</p> <div> <strong>First</st . . . Read full entry »


Re: ChatGPT front-end to XML?

Posted 12/26/2024 10:23:02 AM

You are describing RAG here (Retrieval-Augmented Generation). The most promising approach is hybrid RAG IMO, which combines: - LLM-generated structured queries (in this case probably XQuery) that would be able to give exact answers to questions like "What airport has the longest runway?" . . . Read full entry »


Re: ChatGPT front-end to XML?

Posted 12/26/2024 2:51:42 AM

> The one and only motivation for such lunacy is to satisfy a brainless > investor asking "what's your AI strategy?" +100 On Wed, Dec 25, 2024 at 6:26b/PM Paul Tyson phtyson@xxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > The one and only motivation fo . . . Read full entry »


Re: ChatGPT front-end to XML?

Posted 12/26/2024 2:26:02 AM

The one and only motivation for such lunacy is to satisfy a brainless investor asking "what's your AI strategy?" There are any number of ways a well-curated database can be made to satisfy the reasonable curiosity of its users, none of which involve "ai" or LLMs. (Unfortuna . . . Read full entry »


Re: ChatGPT front-end to XML?

Posted 12/26/2024 12:08:57 AM

Well the OP was using data that are facts and organizing those facts. This answer while 100% correct denies the fact that outside of programming FOR you, nit has many uses that are undeniable. Taking off a programming hat and putting on something a bit wider will reveal that. Kevin Brown . . . Read full entry »


Re: ChatGPT front-end to XML?

Posted 12/25/2024 11:59:56 PM

Why would one trust ChatGPT? Especially for critical data in real, critical applications? The best ChatGPT can do is provide an answer, if such exists, scraped from Stack Overflow or any internet site. Even in this task ChatGPT produces mediocre results, in cases when the source data isn't similar . . . Read full entry »


ChatGPT front-end to XML?

Posted 12/25/2024 10:32:06 PM

Hi Folks, I have an XML document containing data about all the airports in the world. I want to put a ChatGPT front-end to the XML document, so that users can ask questions about its data, such as, "What airport has the longest runway?" or "Please provide a list of civilian airport . . . Read full entry »


Re: Status of FOP

Posted 12/25/2024 2:52:24 PM

On Mon, Dec 25, Nikolai Grigoriev wrote: Somewhat previous to that, Arved Sandstrom wrote: >> What's gotten me a little bit riled up is the use of FOP as a basis of >> comparison for commercial implementations. I think this is unfair to the user >> community. FOP is not pretendin . . . Read full entry »


Status of FOP

Posted 12/24/2024 4:13:58 PM

Hi, all, and best of the season I want to shed some light on Apache XML FOP. My perspective is biased, but I'm trying to take that into account. First, FOP is not currently the fastest, the most optimizing, or the most feature-complete XSL-FO processor. The members of this project have never sugg . . . Read full entry »


[ANN] Markup UK 2025: Call for Papers & Registration

Posted 12/23/2024 7:09:28 PM

Dear all, Markup UK will take place from Thursday 5th to Saturday 7th June 2025. [1] The venue will be King's College, London. [2] The Call for Papers is now open. [3] We encourage and welcome submissions from both seasoned and first-time contributors alike. [4] Registration is also now open. [5 . . . Read full entry »


Re: String contains a regex and then junk ... how to

Posted 12/16/2024 2:08:51 PM

Isit really "junk" which seems hard to define (as more or less any list of characters is a legal fragment of regex, matching itself.) Is [a-z]+JUNK the regex [a-z]+ followed by JUNK or the regex [a-z]+JUNK ? Or do you just want to strip a trailing <KEYWORDS HERE> which is easie . . . Read full entry »


Re: String contains a regex and then junk ... how to

Posted 12/16/2024 1:43:04 PM

> I wrote a recursive function to do this. See below. Is there is a simpler way to do it? If the regex is always in parens, and if the junk that follows never contains a b)b, then just look for the last b)b. If the regex is always in parens, but the junk might include b(b and/or b)b th . . . Read full entry »


Re: String contains a regex and then junk ... how to

Posted 12/16/2024 1:41:25 PM

A good case for Invisible XML, though sadly we don't have it integrated into Saxon yet. The first step here is finding a matching closing paren. The second step is dealing with backslash-escaped parens. For the first step, I would use xsl:iterate iterating over the characters of the string (in 4. . . . Read full entry »


String contains a regex and then junk ... how to remov

Posted 12/16/2024 1:24:18 PM

Hi Folks, I want to convert this: <REG_EXP>(([\W\w]{1,80})?) &lt;INFO&gt;</REG_EXP> to this: <REG_EXP>(([\W\w]{1,80})?)</REG_EXP> Convert this: <REG_EXP>([A-Z]{2}[0-9A-Z ]{0,13}) &lt;ARF ID&gt;</REG_EXP> to this: <REG_EXP>([A-Z]{2}[0 . . . Read full entry »


Re: document nodes [in Saxon xsl:message].

Posted 12/13/2024 9:03:54 AM

> I guess we could try and be smarter about the error recovery, specifically, by putting a filter in front of the complex content constructor to modify invalid content (like attribute nodes) before they get in there and trigger the error. > In fact there already is such a filter - it attempt . . . Read full entry »


Re: document nodes.

Posted 12/13/2024 8:37:32 AM

The spec, unfortunately, is clear: If the xsl:message instruction contains a sequence constructor, then the sequence obtained by evaluating this sequence constructor is used to construct the content of the new document node, as described in 5.7.1 Constructing Complex Content. and 5.7.1 says that . . . Read full entry »


Re: document nodes.

Posted 12/13/2024 1:00:24 AM

Hi Andr\xE9, This is due to a change in how Saxon implements xsl:message. The change has been introduced in Saxon 10. Before, xsl:message has output (I believe) the string value or some other serialization of attributes. Now the items that xsl:message outputs are wrapped in a document node. It w . . . Read full entry »


Re: document nodes.

Posted 12/13/2024 12:59:58 AM

You can cast the attribute to a string: <xsl:message select="xs:string($struct/@title)"/> From: Andre Cusson akhu01@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, December 12, 2024 7:44 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: document nodes. . . . Read full entry »


document nodes.

Posted 12/13/2024 12:43:51 AM

Hi, There is some Saxon/Oxygen behavior that I do not seem to grasp. I made a simplified use case to present it. I have an xml document (thingtest.xml) that looks somewhat like this: <?xml version="1.0" encoding="UTF-8"?> <thing id="main" title="someth . . . Read full entry »


Re:   json-to-xml namespace

Posted 12/12/2024 1:05:30 AM

HI, Interesting considerations. There is no blame, only evlution strategy development. Just to wrap up the initial issue, removing the ns on import and putting it back on export wasn't quite ... satisfying, so I reconsidered and cut json out of the project. Its semantics were twisting mine. Now, . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 4:30:00 PM

It has been more then 40 years, but I LOVED SNOBOL! It was useful for doing what I wanted to do. Came to it after IBM assembler and fortran, and it opened my eyes. --Debbie > On Dec 11, 2024, at 11:12b/AM, Peter Flynn peter@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 4:12:15 PM

On 11 December 2024 15:33:25 G. Ken Holman <g.ken.holman@xxxxxxxxx> wrote: > But who has "spare" time these days? When I retired from the day job, people said "You'll be able to do so many things in all that free time." Hah. Learning SNOBOL was not on the list but m . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 4:09:42 PM

I know the whole 'no time' for anything problem. As I technical writer, I almost regularly have a need to process text in some form or another.B Thx, Russ On Wednesday, December 11, 2024 at 09:33:26 AM CST, G. Ken Holman g.ken.holman@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> w . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 3:33:02 PM

Thank you, Russ. From what you say, I probably would find SNOBOL far more interesting today now that I know XSLT/XPath. But who has "spare" time these days? At 11/12/2024 15:21 +0000, russurquhart1@xxxxxxxxxxx russurquhart1@xxxxxxxxxxx wrote: Patterns, and the pieces that make up a p . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 3:20:18 PM

Patterns, and the pieces that make up a pattern, do have an underlying grammar, but I can understand that putting various pieces together it may not be obviously clear what is going to happen or what the side effects will be. Also, there is a temptation to want to put EVERYTHING into one glorious . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 2:45:41 PM

I did mean something else, sorry. Lexically, yes, strings need to be closed. It was a long time ago, but my recollection is that the syntax allowed any combination of tokens and that combination would mean something. I wouldn't get a syntax error that the order of tokens was wrong, or that decl . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 2:19:39 PM

I love Snobol/Spitbol and have used it from my college days to the present for text processing of non-xml files. I love it and am so confortable with using it. As I learned Snobol before GREP was available, I never go into Regular expression very much. I'm not sure what you mean that there are no . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 12:48:10 PM

> What I hated about SNOBOL (in 1979? 1978?) was that there was no such thing as a syntax error. Regular expressions seem to have inherited that tradition. Michael Kay Saxonica . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 12:44:47 PM

What I hated about SNOBOL (in 1979? 1978?) was that there was no such thing as a syntax error. Everything you expressed meant *something*. I couldn't wait until the next Wednesday when we moved on to yet another programming language in the course overviewing programming languages. Yuck! At 11/ . . . Read full entry »


Re:   json-to-xml namespace

Posted 12/11/2024 12:27:06 PM

>> The XML representation of JSON that XSLT 3 and XPath 3.1 define and share puts those elements into that namespace, like most XML vocabularies use a namespace. > > Wow. That's a shockingly bad choice of namespace URL, as if namespaces > weren't confusing enough already. Let's take . . . Read full entry »


Re: XSLT is a pattern-action language. So is AWK. What

Posted 12/11/2024 12:12:49 PM

First one I came across, back in the early 70s, was SNOBOL - but I never used it in anger. There was a system that was popular in the 70s in the UK called FILETAB - the basic idea being "decision tables", where you write a spreadsheet with conditions on one axis and actions on the other. . . . Read full entry »


Re: json-to-xml namespace

Posted 12/11/2024 11:42:36 AM

On 11/12/2024 12:37, Elliotte Rusty Harold elharo@xxxxxxxxxxx wrote: > On Tue, Dec 10, 2024 at 8:48b/AM Martin Honnenmartin.honnen@xxxxxx > <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: >> The XML representation of JSON that XSLT 3 and XPath 3.1 define and share puts those ele . . . Read full entry »


Re:   json-to-xml namespace

Posted 12/11/2024 11:36:51 AM

On Tue, Dec 10, 2024 at 8:48b/AM Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > The XML representation of JSON that XSLT 3 and XPath 3.1 define and share puts those elements into that namespace, like most XML vocabularies use a namespace. Wow. . . . Read full entry »


Re: json-to-xml namespace

Posted 12/11/2024 11:32:25 AM

Is that really what it does? You might be misunderstanding how namespaces work in XML. Then again the function might be buggy. Do you have some example source code and output? On Tue, Dec 10, 2024 at 8:22b/AM Andre Cusson akhu01@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > . . . Read full entry »


XSLT is a pattern-action language. So is AWK. What ot

Posted 12/11/2024 10:57:51 AM

Hi Folks, I love programming languages that offer this style of programming: "if the input matches this pattern, then do that action." That is, I love pattern-action languages. XSLT is a pattern-action language. So is AWK. What other languages are pattern-action? /Roger . . . Read full entry »


Re:   json-to-xml namespace

Posted 12/10/2024 11:42:47 AM

Hi, These are firewall configurations and rules that get imported, processed, managed and exported back. Naturally, I would rather put the data in the proper ns than have to remove one to give it another one, on import, and then reverse everything on export. It is not a big deal, a few templates . . . Read full entry »


Re:   json-to-xml namespace

Posted 12/10/2024 9:24:48 AM

Sorry, meant to write *json-to-xml()*. On Tue, Dec 10, 2024 at 10:23b/AM Alan Painter alan.painter@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Also, going back to your original question: > > > This root element has local-name() "map". xslt maps are fu . . . Read full entry »


Re:   json-to-xml namespace

Posted 12/10/2024 9:23:17 AM

Also, going back to your original question: > This root element has local-name() "map". xslt maps are functions, but this is an element not an xslt map. There is some confusion in this question between the *"map"* type in XPath/XSLT and an XML element with a local-name of * . . . Read full entry »


Re:   json-to-xml namespace

Posted 12/10/2024 9:09:41 AM

Adding to what Martin Honnen has mentioned in his mail: The function *xml-to-json()* is defined here in the spec: https://www.w3.org/TR/xpath-functions-31/#func-xml-to-json As shown in the definition, the XML elements produced by the conversion function are in the *xpath-functions* namespace. ht . . . 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

What's New for X14?

New XQuery & Web Services Tools, Support for MySQL, PostgreSQL, HL7 EDI, Microsoft .NET Code Generation and much more!

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: