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: 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 »


What VAST areas of knowledge must be integrated to cre

Posted 3/10/2025 4:33:09 PM

Hi Folks, Last week there was a discussion on using XSLT to display the set of Unicode characters denoted by a regular expression. Unicode? Regular expressions? Those are two VAST areas of knowledge. An XSLT processor implementor must have a mastery of them and must know how to incorporate Unic . . . Read full entry »


Imagine that the semantics of concatenating two regex

Posted 3/9/2025 10:21:17 AM

Hi Folks, Here is XPath that determines if the value of variable TEXT matches the pattern 'A' (that is, does 'A' occur anywhere within the value of TEXT): matches($TEXT, 'A') The result of evaluating the expression is true or false. String Oriented Symbolic Language (SNOBOL) is best known for i . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 8:17:52 PM

On Sat, 2025-03-08 at 15:23 +0000, Roger L Costello costello@xxxxxxxxx > > Workaround: prevent parse-xml() from doing any DTD/DOCTYPE access; > disable DTD/DOCTYPE (https://saxonica.plan.io/issues/6711#note-12) It is important to understand that the vulnerability only applies when using S . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 3:43:28 PM

On 08/03/2025 16:23, Roger L Costello costello@xxxxxxxxx wrote: Sorry Martin, but may I ask of you one more time to review this for accuracy: SAXON has a configuration property allowedProtocols that can be set to "https,http" to allow only HTTPS and HTTP URIs to be resolved, while file . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 3:23:13 PM

> the original posting you had did use parse-xml with an external entity, > I am not sure why you now bring up unparsed-text Eek, that was a typo. I meant parse-xml. Sorry Martin, but may I ask of you one more time to review this for accuracy: SAXON has a configuration property allowedPro . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 3:00:50 PM

On 08/03/2025 15:50, Roger L Costello costello@xxxxxxxxx wrote: > Thank you again, Martin. I want to be certain that I have this correct, so I can give my colleagues accurate information. > > > > Is this accurate: > > > > SAXON has a configuration property allowedProtocol . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 2:50:09 PM

Thank you again, Martin. I want to be certain that I have this correct, so I can give my colleagues accurate information. Is this accurate: SAXON has a configuration property allowedProtocols that can be set to "https,http" to allow only HTTPS and HTTP URIs to be resolved, while file UR . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 2:19:09 PM

On 08/03/2025 14:51, Roger L Costello costello@xxxxxxxxx wrote: > Thank you, Martin. > > > > Is this accurate: > > > > SAXON has a configuration property allowedProtocols that can be set to "https,http" to allow only HTTPS and HTTP URIs to be resolved, while fil . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 1:50:39 PM

Thank you, Martin. Is this accurate: SAXON has a configuration property allowedProtocols that can be set to "https,http" to allow only HTTPS and HTTP URIs to be resolved, while file URI access should fail. However, currently, when doing this: unparsed-text('file:///Windows/win.ini') . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 1:30:01 PM

On 08/03/2025 13:55, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, Below is my writeup of the vulnerability. Please let me know of any inaccuracies. /Roger I think that an XML document can have entities declared that access the file system is a known feature, not necessarily a security . . . Read full entry »


Re: Saxon vulnerability

Posted 3/8/2025 12:55:28 PM

Hi Folks, Below is my writeup of the vulnerability. Please let me know of any inaccuracies. /Roger Below is an XSLT program that reads the Windows/win.ini file. A bad actor could use the program to read and display the contents of any file on your machine. This is a vulnerability. The SAXON team . . . Read full entry »


Re: Saxon vulnerability

Posted 3/7/2025 9:57:17 PM

> Is a call to parse-xml being done "behind the scene" by any popular applications that might be using Saxon internally, such as Oxygen and or some XSLT/XPath extensions to VS.Code? > > If so, we should probably also be cautious to use these, before this vulnerability has been fi . . . Read full entry »


Re: Saxon vulnerability

Posted 3/7/2025 9:08:19 PM

Is a call to parse-xml being done "behind the scene" by any popular applications that might be using Saxon internally, such as Oxygen and or some XSLT/XPath extensions to VS.Code? If so, we should probably also be cautious to use these, before this vulnerability has been fixed and they c . . . Read full entry »


Saxon vulnerability

Posted 3/7/2025 8:09:18 PM

If you are using Saxon to run untrusted XSLT or XQuery code, please note the security vulnerability in parse-xml() identified by @Martin Honnen at https://saxonica.plan.io/issues/6711, and apply the workaround noted in comment #12. The effect of the vulnerability is to allow an attacker to execut . . . Read full entry »


Re: Over the years, have you created an XSLT library?

Posted 3/6/2025 4:31:37 PM

+1 --dal > On Mar 6, 2025, at 2:16b/AM, Alan Painter alan.painter@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Pardon me if I missed it being mentioned already, but I haven't seen any mention of functx, Priscilla Walmsley's venerable library of xpath functions. I . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/6/2025 2:00:57 PM

Alan, thanks for mentioning FunctX. Its example shows that a good library is useful not only as a toolbox, but also a reference work. (A 'library'?) Didn't someone also mention Joel K's excellent library? There is also Transpect (Gerrit and co), Erik Siegel's xtpxlib (XProc with lots of XSLT) and . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/6/2025 7:16:21 AM

Pardon me if I missed it being mentioned already, but I haven't seen any mention of functx, Priscilla Walmsley's venerable library of xpath functions. I regularly refer to it for inspiration. I've even made a monetary contribution to its maintenance. https://www.datypic.com/xsl/ Functx is the po . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

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

On 06/03/2025 00:31, Lizzi, Vincent vincent.lizzi@xxxxxxxxxxxxxxxxxxxx wrote: Seeing as XSLT 4.0 is in development now, is it possible to consider adding an option to xsl:next-match that could enable passing along all parameters? This option might take the form of a new optional attribute on xsl:ne . . . Read full entry »


Re: Over the years, have you created an XSLT library?

Posted 3/5/2025 11:31:40 PM

Hi folks, An XSLT "library" can be useful when working with standardized (or substantially similar) formats across different projects. For example, I have written a set of XSLTs for transformations between different versions of JATS which is named jats_from_jats. When I need to produce . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/5/2025 5:08:08 PM

On Wed, 2025-03-05 at 10:47 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > Would you give an example of an XPath function that solves a common > task and you would put in a library? Like some others here, i donbt have a library, but code that ibve written for clients can often be . . . Read full entry »


Re: Over the years, have you created an XSLT library?

Posted 3/5/2025 5:01:49 PM

>> Would you give an example of an XPath function that solves a common task and you would put in a library? >> When I saw your question I found it hard to think of any functions or templates I have reused across multiple projects in unrelated fields, though of course I have often reus . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/5/2025 4:41:24 PM

(Most likely) Dimitre has more 'library' entries than any of us Roger. regards On Wed, 5 Mar 2025 at 16:37, Dimitre Novatchev dnovatchev@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Would you give an example of an XPath function that solves a common task > and y . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/5/2025 4:37:02 PM

> Would you give an example of an XPath function that solves a common task and you would put in a library? All of the FXSL functions are such examples. As for new functions, my recent Medium articles may give us an idea: - "Generators in Xpath", https://medium.com/@dimitrenov . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/5/2025 10:46:46 AM

Dimitre wrote: > If I were lucky enough to have my daily work in an XPath-based > programming environment, I would definitely develop libraries > of functions that are useful for solving common tasks Would you give an example of an XPath function that solves a common task and you would p . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/4/2025 11:05:36 PM

On 04/03/2025 23:00, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > The lack of response leads me to conclude that developers do not create their own XSLT libraries. I just think that those (other than Dimitre) that have created libraries haven't found the time to respond. The . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/4/2025 10:31:29 PM

Hi Roger, I just saw your first post on this topic and replied to it. > The lack of response leads me to conclude that developers do not create their own XSLT libraries. I think that if there are a few standard and well-thought libraries of XPath functions that everybody can use, this signif . . . Read full entry »


Re: Over the years, have you created an XSLT library?

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

On Tue, Mar 4, 2025 at 3:17b/AM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > Over the years, as you've written many XSLT programs, have you created a > library of user-defined functions? https://fxsl.sourceforge.net/ Fo . . . Read full entry »


Re: Re: Over the years, have you created an XSLT libra

Posted 3/4/2025 10:10:55 PM

I program with XSLT and ExtendScript (Adobe's version of JavaScript). My "library" simply consists of code that I have written for clients. When I am looking for something for reuse, I use a program called Agent Ransack (free) or FileLocator Pro to search my folder structure for code that . . . Read full entry »


Re: Over the years, have you created an XSLT library?

Posted 3/4/2025 10:00:08 PM

Hi Folks, The lack of response leads me to conclude that developers do not create their own XSLT libraries. In other programming languages it is common to create a continually expanding grab-bag of functions, utilities, and small programs that may be used over and over from project to project. Wha . . . Read full entry »


Over the years, have you created an XSLT library?

Posted 3/4/2025 11:17:20 AM

Hi Folks, Over the years, as you've written many XSLT programs, have you created a library of user-defined functions? If yes, then I have two questions for you: 1. What functions in your library do you find yourself using most often? 2. As your library gets richer and richer, do you find that i . . . Read full entry »


Re: Imagine that the semantics of comparison operation

Posted 3/2/2025 9:29:30 PM

On Sun, 2025-03-02 at 15:24 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > <xsl:variable name="isDifferent" select="$FIRST ne $SECOND" > as="xs:boolean"/> > <xsl:variable name="APPEND" as="xs:string?"> > B B B < . . . Read full entry »


Re: Imagine that the semantics of comparison operation

Posted 3/2/2025 5:07:29 PM

> <xsl:variable name="isDifferent" select="$FIRST ne $SECOND" as="xs:boolean"/> > <xsl:variable name="APPEND" as="xs:string?"> > <xsl:if test="$isDifferent eq true()"> > <xsl:sequence sele . . . Read full entry »


Re: Imagine that the semantics of comparison operation

Posted 3/2/2025 3:36:06 PM

> I would express that as > > <xsl:variable name="APPEND" as="xs:string?" select="($FIRST || > $SECOND)[$isDifferent]"/> . . . Read full entry »


Re: Imagine that the semantics of comparison operation

Posted 3/2/2025 3:30:54 PM

On 02/03/2025 16:24, Roger L Costello costello@xxxxxxxxx wrote: To achieve the same functionality with XSLT and XPath, we would do this: <xsl:variable name="isDifferent" select="$FIRST ne $SECOND" as="xs:boolean"/> <xsl:variable name="APPEND" as=&qu . . . Read full entry »


Imagine that the semantics of comparison operations wa

Posted 3/2/2025 3:24:41 PM

Hi Folks, Here is XPath that compares two string variables to determine if they differ: $FIRST ne $SECOND The result of evaluating the expression is true or false. The programming language called String Oriented Symbolic Language (SNOBOL) can also compare two string variables to determine if th . . . Read full entry »


10 reasons why I love coding

Posted 3/2/2025 11:23:14 AM

Hi Folks, I love coding because: 1. Writing a program gives me a goal, something to achieve. I like goals and once a goal is achieved, it is very satisfying. 2. Writing code compels me to focus and discipline my mind. Whenever I am undisciplined and have a mental lapse, it leads to mistakes. I l . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/2/2025 7:55:27 AM

There is a foolproof way to avoid errors in code. Write no code. The frogs have a dictum, roughly: "Only people who do nothing make no mistakes." I personally adhere to the notion that keeping code clean and understandable makes it easier to avoid errors. Keep technical debt to a minim . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/2/2025 5:44:05 AM

I assume that when I write code, I will make mistakes and lots of them. I define mistakes as any discrepancy between what I mean versus what I say. When you write code you always say what you say. That's inevitable. But we don't always say what we mean. And it's critically important we find wa . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/1/2025 8:46:44 PM

Thank you, Michael for pointing me to your blog articles. I finished reading the first one, "Bugs: How Well Are We Doing?" (https://blog.saxonica.com/mike/2017/02/bugs-how-well-are-we-doing.html) and I enjoyed it very much. Terrific writing style. Great information. I will recommend it to . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/1/2025 8:38:41 PM

On Sat, 2025-03-01 at 14:49 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > <xsl:for-each select="/root/record[position() gt 2"> > > See the mistake? > > I should have written position() ge 2 or position() gt 1 What i noticed first was a missing ] at the end . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/1/2025 8:15:14 PM

At 01/03/2025 19:44 +0000, Michael Kay michaelkay90@xxxxxxxxx wrote: At 01/03/2025 14:50 +0000, Roger L Costello costello@xxxxxxxxx wrote: Have you thought about these types of questions? What answers did you come up with? XSLT 2.0 introduced stronger type-checking as a response to this requireme . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/1/2025 7:43:37 PM

> Have you thought about these types of questions? What answers did you come up with? > There is of course a vast literature on software engineering that attempts to answer your questions, but you may be interested in reading some of my thoughts on the subject: https://blog.saxonica.com/mi . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/1/2025 7:11:53 PM

Hi Roger, I like mechanisms that let me efficiently capture and validate my assumptions while coding bin the momentb, such as type annotations and assertions. These capture more coding errors than I would like to admit. * Chris From: Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-se . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/1/2025 6:44:31 PM

> How to avoid making mistakes? Is it even possible? It depends on the definition of "mistake" ... If "mistake" means any case where one's expectations contradict reality, then again we have the same problem, because now we need to define "reality"... And probabl . . . Read full entry »


XSL-List Guidelines

Posted 3/1/2025 5:20:30 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: How to never make mistakes when coding?

Posted 3/1/2025 5:20:25 PM

Thank you Jean-Luc, I appreciate very much you pointing me to Knuthbs paper. I am reading it now. The Introduction is awesome: I make mistakes. I always have, and I probably always will. But I like to think that I learn something every time I go astray. In fact, one of my favorite poems consists . . . Read full entry »


Re: How to never make mistakes when coding?

Posted 3/1/2025 5:01:51 PM

Hello Roger, have you read Chapter 34 of D.E.Knuth's /Digital Typography/ (1999)? The title is "The Final Errors of TeX" (chapter written in August 1998) It refers to an earlier article on "The errors of TeX", written in 1988, and reprinted as Chapter 10 of /Literate Program . . . Read full entry »


How to never make mistakes when coding?

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

Hi Folks, A few days ago I found a mistake in my code. The input data to my code contained a sequence of records and my code should iterate over all the records after the first record. I wrote this: <xsl:for-each select="/root/record[position() gt 2"> See the mistake? I should h . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 2:46:44 PM

First reply got blocked for being too long.. Unicode 16 appears to have 850 characters with category P... <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:output method=" . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 2:22:21 PM

>> Number of punctuation symbols = 632 >> That's over 100. ChatGPT was right. Michael Kay . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 1:39:44 PM

On 28/02/2025 14:00, Roger L Costello costello@xxxxxxxxx wrote: > Using Martin's brute force XSLT program: > > > > Number of punctuation symbols = 632 > Example fiddle <https://martin-honnen.github.io/cheerpj3-saxonhe12-fiddle/?code=%3C%3Fxml+ve rsion%3D%221.0%22+encoding%3D%22 . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 1:17:14 PM

On 28/02/2025 14:00, Roger L Costello costello@xxxxxxxxx wrote: Using Martin's brute force XSLT program: Number of punctuation symbols = 632 As noted in the other answers, what a punctuation character is or rather what all is considered a punctuation character depends on the Unicode version so . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 1:07:06 PM

Here's the beginning of the list of characters denoted by \p{P}, courtesy of Martin's XSLT program: Dec Chr 33 ! 34 " 35 # 37 % 38 & 39 ' 40 ( 41 ) 42 * 44 , 45 - 46 . 47 / 58 : 59 ; 63 ? 64 @ 91 [ 92 \ 93 ] 95 _ 123 { 125 } 161 B! 167 B' 171 B+ 182 B6 . . . Read full entry »


Re: How to output the characters denoted by the regex

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

Using Martin's brute force XSLT program: Number of punctuation symbols = 632 . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 12:53:43 PM

ChatGPT: > Please list all the characters denoted by the regular expression \p{P} The regular expression \p{P} is a Unicode property that matches any punctuation character. This includes a wide range of symbols used in writing to separate sentences and words, indicate pauses, or convey other s . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 12:39:57 PM

A colleague of mine recently told me that he asked AI (Copilot) to generate a number of examples that would match a given regular expression. Maybe that helps. Pieter On 2/28/25 13:09, Martin Honnen martin.honnen@xxxxxx wrote: On 28/02/2025 12:50, Roger L Costello costello@xxxxxxxxx wrote: Hi F . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 12:08:46 PM

On 28/02/2025 12:50, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, In XML Schema \p{P} denotes the set of punctuation characters. Is there a way in XSLT to output (display) the characters denoted by \p{P} With "brute force", like this, perhaps? B <xsl:template match="/ . . . Read full entry »


Re: How to output the characters denoted by the regex

Posted 2/28/2025 12:05:13 PM

No. Although XSD defines the semantics of a regular expression as denoting a set of strings, there is no way to enumerate that set, the only functionality is to determine whether a given string is a member of that set. Indeed, for some regular expressions the set of strings they denote is infinite. . . . Read full entry »


How to output the characters denoted by the regex \p{P

Posted 2/28/2025 11:50:12 AM

Hi Folks, In XML Schema \p{P} denotes the set of punctuation characters. Is there a way in XSLT to output (display) the characters denoted by \p{P} /Roger . . . Read full entry »


Re: Grouping with siblings

Posted 2/22/2025 6:03:27 PM

I wanted to try solving this problem and then using Oxygen's new AI to help with documentation. It seems to explain the templates reasonably well. I added one comment to explain the key logic I used which is the first comment. The following XSL creates the required output. <?xml version="1 . . . Read full entry »


Re: xsl:for-each is not a loop <-- right?

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

On Thu, 20 Feb 2025 at 22:12, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > Suppose that I create a parameterized boolean function which tests its > parameter to see if it is greater than zero: > > <xsl:function nam . . . Read full entry »


Re: xsl:for-each is not a loop <-- right?

Posted 2/20/2025 10:29:26 PM

On 20/02/2025 23:12, Roger L Costello costello@xxxxxxxxx wrote: shorthand for applying an expression to each item in a list If you used "sequence" instead of "list" and wanted a short description for the XPath 3.1 map operator "!" I could easily agree with that. But . . . Read full entry »


Re: xsl:for-each is not a loop <-- right?

Posted 2/20/2025 10:20:51 PM

On 20/02/2025 23:12, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > Suppose that I create a parameterized boolean function which tests its parameter to see if it is greater than zero: > > <xsl:function name="f:GT_Zero" as="xs:boolean"> > . . . Read full entry »


xsl:for-each is not a loop <-- right?

Posted 2/20/2025 10:12:14 PM

Hi Folks, Suppose that I create a parameterized boolean function which tests its parameter to see if it is greater than zero: <xsl:function name="f:GT_Zero" as="xs:boolean"> <xsl:param name="value"/> <xsl:sequence select="$value gt 0" . . . Read full entry »


[ANN] Calling Users of XML, XSLT, XPath, XForms, or iX

Posted 2/18/2025 4:53:01 PM

Do you use XML, XSLT, XPath, XForms, or iXML to help you do your real work? Is the XML stack a source of tools that support your research or daily job? Do you speak at topic-related conferences about your area of expertise but not about the markup tools you use to do that work? Balisage is the pla . . . Read full entry »


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 »



PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

Learn XQuery in 10 Minutes!

Say goodbye to 10-minute abs, and say Hello to "Learn XQuery in Ten Minutes!", the world's fastest and easiest XQuery primer, now available for free!

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: