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!


[ANN] Thinking and Talking about Markup, XML, and rela

Posted 7/17/2024 11:19:20 PM

--~---------------------------------------------------------------- . . . Read full entry »


Re: Announce: xjslt, an XSLT 2.0 compiler in TypeScrip

Posted 7/11/2024 3:23:46 AM

Multiple result documents are now supported :) best, Erik On Mon, Jul 8, 2024 at 8:39b/AM Erik Hetzner ehetzner@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Right now it returns a single DOM tree, no reason why it can't support > multiple result trees, but it's no . . . Read full entry »


Re: Announce: xjslt, an XSLT 2.0 compiler in TypeScrip

Posted 7/8/2024 3:39:20 PM

Right now it returns a single DOM tree, no reason why it can't support multiple result trees, but it's not something I've done yet. best, Erik On Mon, Jul 8, 2024 at 8:31b/AM Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On 08/07/2024 17: . . . Read full entry »


Re: Announce: xjslt, an XSLT 2.0 compiler in TypeScrip

Posted 7/8/2024 3:31:26 PM

On 08/07/2024 17:21, Erik Hetzner ehetzner@xxxxxxxxx wrote: Hi all, I have written an XSLT 2.0 compiler (targeting JavaScript) in TypeScript. It was written to see if it was possible, and I don't know how useful it will prove, or how complete it will ever be, but it does work (with quirks, mistake . . . Read full entry »


Announce: xjslt, an XSLT 2.0 compiler in TypeScript

Posted 7/8/2024 3:21:06 PM

Hi all, I have written an XSLT 2.0 compiler (targeting JavaScript) in TypeScript. It was written to see if it was possible, and I don't know how useful it will prove, or how complete it will ever be, but it does work (with quirks, mistakes and missing pieces). If you are interested, please have a . . . Read full entry »


Re: Does starts-with() convert the strings to codepoin

Posted 7/8/2024 2:13:12 PM

> Does the starts-with() function convert the strings to codepoints and then checks that codepoint[i] in the <name> string equals codepoint[i] in the <Airport_Name> string? > No, it doesn't. Like everything else in XSLT, it operates on the XDM data model. (Surely as an experienc . . . Read full entry »


Re: How to get the trailing spaces in a string?

Posted 7/8/2024 1:22:10 PM

Hm, how about replace(Airport_Name,'^.*\S','') Enjoy, Wendell -----Original Message----- From: Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Monday, July 8, 2024 8:42 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: How to get the trailing spaces in a . . . Read full entry »


Re: How to get the trailing spaces in a string?

Posted 7/8/2024 1:07:32 PM

On 08/07/2024 13:49, John Lumley john@xxxxxxxxxxxx wrote: Sorry - misread your requirement: replace(AirportName,'^(.*[^ ])?( +$)','$2') where $2 will any trailing spaces after an optional sequence ending in a non-space. I'm sure there's a shorter one.... > On 08/07/2024 13:41, Roger L Coste . . . Read full entry »


Re: How to get the trailing spaces in a string?

Posted 7/8/2024 12:49:13 PM

On 08/07/2024 13:41, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > The value of this element contains trailing spaces: > > <Airport_Name>LOWELL FLD </Airport_Name> > > A few days ago Martin showed how to obtain the string before the t . . . Read full entry »


Re: How to get the trailing spaces in a string?

Posted 7/8/2024 12:48:19 PM

On 08/07/2024 14:41, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, The value of this element contains trailing spaces: <Airport_Name>LOWELL FLD </Airport_Name> A few days ago Martin showed how to obtain the string before the trailing spaces. (Thanks Martin!) . . . Read full entry »


How to get the trailing spaces in a string?

Posted 7/8/2024 12:41:11 PM

Hi Folks, The value of this element contains trailing spaces: <Airport_Name>LOWELL FLD </Airport_Name> A few days ago Martin showed how to obtain the string before the trailing spaces. (Thanks Martin!) Now I need to obtain the trailing spaces. How to do that? /Ro . . . Read full entry »


Re: Does starts-with() convert the strings to codepoin

Posted 7/8/2024 12:27:44 PM

> <Airport_Name>B &amp; B BOYS RANCH </Airport_Name> > <name>B &#x26; B BOYS RANCH</name> > > Notice the former uses the XML ampersand entity whereas the latter uses hex character entity for ampersand. This expression: Thatbs just two diffe . . . Read full entry »


Re: Does starts-with() convert the strings to codepoin

Posted 7/8/2024 12:15:08 PM

On 08/07/2024 14:08, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I have a question about the meaning of the starts-with() function. Consider the strings in these two elements: <Airport_Name>B &amp; B BOYS RANCH </Airport_Name> <name>B &#x26; B BOYS R . . . Read full entry »


Does starts-with() convert the strings to codepoints?

Posted 7/8/2024 12:08:13 PM

Hi Folks, I have a question about the meaning of the starts-with() function. Consider the strings in these two elements: <Airport_Name>B &amp; B BOYS RANCH </Airport_Name> <name>B &#x26; B BOYS RANCH</name> Notice the former uses the XML ampersand ent . . . Read full entry »


Re: Seek an XPath expression that removes trailing spa

Posted 7/6/2024 1:09:45 PM

Martin Honnen wrote: Use 'replace' e.g. Airport_Name => replace('\s*$', '') Wow! A couple minor tweaks are needed: \s is more than just the space (x20) character. So, instead of \s I will use a space. When I executed the expression, I got this error message: FORX0003 The regular expres . . . Read full entry »


Re: Seek an XPath expression that removes trailing spa

Posted 7/6/2024 12:51:17 PM

On 06/07/2024 14:48, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > I want to convert this: > > <Airport_Name>LOWELL FLD </Airport_Name> > > to this: > > <name>LOWELL FLD</name> Use `replace` e.g. B Airport_Name . . . Read full entry »


Seek an XPath expression that removes trailing spaces

Posted 7/6/2024 12:47:56 PM

Hi Folks, I want to convert this: <Airport_Name>LOWELL FLD </Airport_Name> to this: <name>LOWELL FLD</name> The value of the <name> element must be identical to the value of the <Airport_Name> element, except without the trailing spaces. . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 9:47:14 PM

Martin, your alphabetic renderer is better than mine. Apologies, Wendell From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, July 2, 2024 5:40 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: targeting the 'first' instance of the same elemen . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 9:40:00 PM

On 02/07/2024 23:33, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx wrote: > Did anyone put up > > <xsl:template match="head[. Is /descendant::head[1]]"/> Is "Is" an XPath operator or an Apple product? . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 9:33:16 PM

Hello, Did anyone put up <xsl:template match="head[. Is /descendant::head[1]]"/> ? Apologies if I have forgotten the actual requirement -- Cheers, Wendell -----Original Message----- From: Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sen . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 8:51:36 PM

On Tue, 2024-07-02 at 11:42 +0000, Jean-Paul Rehr rehrjb@xxxxxxxxx wrote: > > > > > > > for $div in $mydoc//body/div > > > return > > > B B B transform:transform($div, $myxsl, ()) > > > So, you want to match the first head element in each fragment . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:50:04 AM

On 02/07/2024 13:42, Jean-Paul Rehr rehrjb@xxxxxxxxx wrote: >That sounds as ifB match="(body/div//head)[1]" should do as the XSLT processor should still see the parent (or perhaps not, what is transform:transform?, BaseX or exist-db, would need to check how their XSLT function works e . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:41:50 AM

>That sounds as if match="(body/div//head)[1]" should do as the XSLT processor should still see the parent (or perhaps not, what is transform:transform?, BaseX or exist-db, would need to check how their XSLT function works exactly). It's eXist-db's XSLT transformation function, that . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:40:57 AM

On 02/07/2024 13:32, Martin Honnen martin.honnen@xxxxxx wrote: > > > On 02/07/2024 13:28, Jean-Paul Rehr rehrjb@xxxxxxxxx wrote: >> >Or can the outer div appear at any level/with any nesting and parent >> container? >> >> The fragments I pass to the transformer a . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:32:20 AM

On 02/07/2024 13:28, Jean-Paul Rehr rehrjb@xxxxxxxxx wrote: > >Or can the outer div appear at any level/with any nesting and parent > container? > > The fragments I pass to the transformer always start with <div>. > > But toB explain the larger context: > > These &l . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:28:45 AM

>Or can the outer div appear at any level/with any nesting and parent container? The fragments I pass to the transformer always start with <div>. But to explain the larger context: These <div> fragments are all *direct children* of a single <body>, but for a few reasons I ca . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:24:15 AM

Ah! I was reading carelessly. Itbs a pattern, rather than an expression, so it matches independently on each div that has descendant heads. You should be able to fine-tune it by adding a predicate, but perhaps therebs a more elegant pattern that Ibm overlooking, and that someone else will sugges . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:22:56 AM

On 02/07/2024 13:18, David Carlisle d.p.carlisle@xxxxxxxxx wrote: Note you asked originally for an xpath not an xslt pattern (which is why I suggested select="(.//head)[1] ") It was not quite clear what was asked for but I took "I have put in red the <head> element I want to . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:18:16 AM

On Tue, 2 Jul 2024 at 12:14, Jean-Paul Rehr rehrjb@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >How about <xsl:template match="(div/descendant::head)[1]"> ? > > same result as Martin's solution, alas. > Note you asked originally for an xpath . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:16:52 AM

On 02/07/2024 13:05, Jean-Paul Rehr rehrjb@xxxxxxxxx wrote: > At first Martin's solutionB <xsl:template match="(div//head)[1]"> > looked like it would work. But then I started to test the various > documentsB I have to work with, in particular at the most problematic. > . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:14:09 AM

>How about <xsl:template match="(div/descendant::head)[1]"> ? same result as Martin's solution, alas. On Tue, Jul 2, 2024 at 1:08b/PM David Birnbaum djbpitt@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > How about <xsl:template match="(div/desce . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:08:37 AM

How about <xsl:template match="(div/descendant::head)[1]"> ? On Jul 2, 2024, at 7:04b/AM, Jean-Paul Rehr rehrjb@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: o;?At first Martin's solution <xsl:template match="(div//head)[1]"> looked like . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 11:04:54 AM

At first Martin's solution <xsl:template match="(div//head)[1]"> looked like it would work. But then I started to test the various documents I have to work with, in particular at the most problematic. Below is an actual fragment, but I've put it in this Fiddle <https://martin-ho . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 10:41:18 AM

On 02/07/2024 12:34, Jean-Paul Rehr rehrjb@xxxxxxxxx wrote: > Dear XSL list, > > I am trying to target a specific <head> which can appear nested within > a variable number of <div> and possible <list> elements. In the three > examples below I have put in red the < . . . Read full entry »


Re: targeting the 'first' instance of the same element

Posted 7/2/2024 10:35:59 AM

select="(.//head)[1]" On Tue, 2 Jul 2024 at 11:34, Jean-Paul Rehr rehrjb@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Dear XSL list, > > I am trying to target a specific <head> which can appear nested within a > variable number of <div> and . . . Read full entry »


targeting the 'first' instance of the same element in

Posted 7/2/2024 10:33:59 AM

Dear XSL list, I am trying to target a specific <head> which can appear nested within a variable number of <div> and possible <list> elements. In the three examples below I have put in red the <head> element I want to target with the same XSL template. In my way of thinkin . . . Read full entry »


Re: xslide [Was: Rexsel — A simpler way of writing XS

Posted 7/2/2024 7:42:59 AM

> The code on GitHub has included Norm's packaging of Mohamed's XSLT 3.0 > schema for about 11 years: > > https://github.com/tkg/xslide Ibm planning to update that to cover XSLT 4.0 in due course. Unless Mohamed gets there first, of course! :-) . . . Read full entry »


Re: xslide [Was: Rexsel — A simpler way of writing XS

Posted 7/2/2024 1:27:38 AM

Count me as another 2-decade user of xslide, also unaware of the github site. Every few years I find myself setting up a new emacs environment, and every time I search for "xslide emacs", but this is the first time the github site has appeared in the top hits. Can https://sourceforge. . . . Read full entry »


Re: xslide [Was: Rexsel — A simpler way of writing XS

Posted 7/1/2024 8:27:05 PM

On 01/07/2024 14:16, Tony Graham tgraham@xxxxxxxxxxxxx wrote: On 01/07/2024 11:11, Peter Flynn peter@xxxxxxxxxxx wrote: On 01/07/2024 09:41, Tony Graham tgraham@xxxxxxxxxxxxx wrote: On 30/06/2024 17:26, Peter Flynn peter@xxxxxxxxxxx wrote: Good to see that someone else is still using it: 'xslide', . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT — thinking

Posted 7/1/2024 7:16:40 PM

> For those of us who _like_ XML, at least overall, or who work routinely > with complex documents, or both :), XSLT is a small step and a very > welcome one. But we have to remember that this is not universal, > strange as it sometimes seems! Definitely! In fact, tree-processing can . . . Read full entry »


Re: Re: Rexsel - A simpler way of writing XSLT

Posted 7/1/2024 4:08:00 PM

Hi Wendell, Not yet... there is some elegance I still hope for, one day in my current tool stack. omnimark FIND rules offer regular expressions in a declarative way very much like templates in XSLT and if your target would be SGML or XML you can get feedback from the parser for conditionals on y . . . Read full entry »


XProc 3.0 alternatives, was Re: Aw: Re: Rexsel — A si

Posted 7/1/2024 3:28:28 PM

Martin, That is an awesome question (XProc 3.0 under Python) and I am going to track it. Unfortunately I have no answer today. Its a little off-topic here  or maybe it isnt  but I have a project underway, one of whose goals to make XProc 3.0 easier to run and use, starting with Achim Berndzen . . . Read full entry »


XSL-List Guidelines

Posted 7/1/2024 2:45:23 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 »


Aw: Re: Rexsel — A simpler way of writing XSLT

Posted 7/1/2024 2:35:48 PM

Good point in general, but is there a good and easy way to use XProc 3 from/with Python ? Am 01.07.24, 16:30 schrieb "Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: Hello, Or, today, to process HTML into an XSLT pipeline, one might op . . . Read full entry »


Re: Re: Rexsel — A simpler way of writing XSLT

Posted 7/1/2024 2:29:50 PM

Hello, Or, today, to process HTML into an XSLT pipeline, one might opt for XProc 3.0. What with plain-text, JSON and HTML inputs, and with XSLT streaming and accumulators, maybe XSLT has finally caught up with Omnimark? Regards, Wendell -----Original Message----- From: Martin Honnen martin.honn . . . Read full entry »


Re: xslide [Was: Rexsel — A simpler way of writing XS

Posted 7/1/2024 1:15:37 PM

On 01/07/2024 11:11, Peter Flynn peter@xxxxxxxxxxx wrote: On 01/07/2024 09:41, Tony Graham tgraham@xxxxxxxxxxxxx wrote: On 30/06/2024 17:26, Peter Flynn peter@xxxxxxxxxxx wrote: Good to see that someone else is still using it: 'xslide', Updating it for XSLT3 would be nice, though. The code on Git . . . Read full entry »


Re: xslide [Was: Rexsel — A simpler way of writing XS

Posted 7/1/2024 10:11:08 AM

On 01/07/2024 09:41, Tony Graham tgraham@xxxxxxxxxxxxx wrote: On 30/06/2024 17:26, Peter Flynn peter@xxxxxxxxxxx wrote: Good to see that someone else is still using it: 'xslide', Updating it for XSLT3 would be nice, though. I doubt that Peter would ever stop using Emacs. Probably not. Using a si . . . Read full entry »


xslide [Was: Rexsel — A simpler way of writing XSLT]

Posted 7/1/2024 8:40:45 AM

On 30/06/2024 17:26, Peter Flynn peter@xxxxxxxxxxx wrote: ... I'm speaking in ignorance of other editors here, as I've been using Emacs with xslide-mode for two decades, and it both colourises and indents XSLT pretty well, as well as the usual auto-complete. I had always assumed other editors di . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT — thinking

Posted 7/1/2024 12:45:31 AM

On Sun, 2024-06-30 at 22:19 +0000, Graydon graydon@xxxxxxxxx wrote: > On Sun, Jun 30, 2024 at 10:06:01PM -0000, Liam R. E. Quin > liam@xxxxxxxxxxxxxxxxx scripsit: > > A companion question is also interesting though - an > > XSLT that is useful for, and appeals to, curly-brace-prog . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 10:19:17 PM

On Sun, Jun 30, 2024 at 10:06:01PM -0000, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx scripsit: > A companion question is also interesting though - how do you made an > XSLT that is useful for, and appeals to, curly-brace-programming > people? I think Rexsel moves in that direction, but to get t . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 10:05:54 PM

On Sun, 2024-06-30 at 19:23 +0000, Michael Kay mike@xxxxxxxxxxxx wrote: > > > My only contact with Omnimark was that (around 1997 perhaps?) it > looked like just the thing we needed for a project, so I made > inquiries, and they sent over a sales rep, and quoted me a price that > . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 9:34:23 PM

On Sun, 2024-06-30 at 20:24 +0000, Peter Flynn peter@xxxxxxxxxxx wrote: > On 30/06/2024 20:46, Liam R. E. Quin liam@xxxxxxxxxxxxxxxxx wrote: > > > And Peter gets the tee-shirt award, > > bbecause life is too short > > to use W3C Schemasb > > > > https://www.red . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 8:50:42 PM

On 30/06/2024 19:20, Chris Papademetrious chrispitude@xxxxxxxxx wrote: Nowadays I mostly process HTML in Python. The funny thing is, I would kill for a way to natively process HTML5 in XSLT (without resorting to XHTML) because the content processing I do would fit a template based approach very wel . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 8:24:31 PM

On 30/06/2024 20:46, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: And Peter gets the tee-shirt award, bbecause life is too short to use W3C Schemasb https://www.redbubble.com/shop/ap/162489585 Thank you very much, I shall wear it everywhere. It can join my TEI tee-shirt, "Yesterday's Inform . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 8:21:38 PM

On 30/06/2024 20:23, Michael Kay mike@xxxxxxxxxxxx wrote: My only contact with Omnimark was that (around 1997 perhaps?) it looked like just the thing we needed for a project, The pricing was a problem when the CELT project started: it was the same as an entire year's funding. Fortunately Brian Tr . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 7:45:59 PM

On Sun, 2024-06-30 at 18:49 +0000, Hugh Field-Richards hsfr@xxxxxxxxxx wrote: > > Most editors will be syntax aware and colourise/indent XSLT. But what > they donbt do is perform any analysis of variables andB named > templatesB used and referenced as well as duplicates. For example, & . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 7:23:13 PM

> I started with OmniMark (and SGML, but that is another story) before XSLT arrived and used that for some years finally going over to XSLT. Main reason being the cost of the former after they withdrew a free version. Irritating because OmniMark could process free text, not just tagged text such . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 6:57:16 PM

Slip of the memory I fear b wonbt see the right side of 75 years again :-) I started with OmniMark (and SGML, but that is another story) before XSLT arrived and used that for some years finally going over to XSLT. Main reason being the cost of the former after they withdrew a free version. Irrit . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 6:48:48 PM

> On 30 Jun 2024, at 17:26, Peter Flynn peter@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >> Clearly I should have done some more homework on this, sighb& >> The thing that prompted me to design Rexsel was all the >> years spent on using OmniMark . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 5:19:46 PM

Hi everyone, I don't do as much XSLT these days (I moved from technical writing to AI), but I empathize with how intimidating the XSLT syntax/approach/everything can be for newcomers. I appreciate that others are looking for ways to make our little corner of the universe a bit more approachable. . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 4:26:06 PM

On 30/06/2024 14:22, Hugh Field-Richards hsfr@xxxxxxxxxx wrote: Clearly I should have done some more homework on this, sighb& The thing that prompted me to design Rexsel was all the years spent on using OmniMark, then crossing over to XSLT, and then needing to bpretty-printb some XSLT to mak . . . Read full entry »


Re: Need a little help with xsl:evaluate

Posted 6/30/2024 3:03:04 PM

n<#secure method=pgpmime mode=sign> "Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > Martin wrote: > >>> Set the context item with e.g. >>> <xsl:evaluate xpath="." context-item="."/> & . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 1:22:08 PM

Clearly I should have done some more homework on this, sighb& The thing that prompted me to design Rexsel was all the years spent on using OmniMark, then crossing over to XSLT, and then needing to bpretty-printb some XSLT to make it a bit more readable. Finally a light-bulb moment to realise . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 11:30:47 AM

Join the club. There have been a number of attempts to do this over the years, most of which have disappeared without trace. The most recent contribution was by Fredrik OLhrstroLm at XML Prague 2024, see page 85 of https://archive.xmlprague.cz/2024/files/xmlprague-2024-proceedings.pdf I think . . . Read full entry »


Re: Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 11:23:46 AM

On Sun, 30 Jun 2024 at 12:03, Hugh Field-Richards hsfr@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi > > I have been working with XSLT/XML for sometime > now (>25 years) XSL Transformations (XSLT) Version 1.0 W3C Recommendation 16 November 1999 Diffic . . . Read full entry »


Rexsel — A simpler way of writing XSLT

Posted 6/30/2024 11:03:24 AM

Hi I have been working with XSLT/XML for sometime now (>25 years) and have been minded to look at alternative ways of generating XSLT scripts. As a result I have produced a language REXSEL that provides a simpler means of writing XSLT stylesheets. More information, downloads and news can be fo . . . Read full entry »


Re: Need a little help with xsl:evaluate

Posted 6/30/2024 10:50:53 AM

> Okay, I did that. It resulted in the following error message. Is this a bug in Saxon? > Looks like this one, fixed nearly 3 years ago: https://saxonica.plan.io/issues/4975 Michael Kay Saxonica . . . Read full entry »


Aw: Re: Need a little help with xsl:evaluate

Posted 6/30/2024 10:18:19 AM

I can't reproduce that with Saxon 12.4 HE.On line fiddle.Which Saxon version is that? Gesendet: Sonntag, 30. Juni 2024 um 12:08 Uhr Von: "Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> An: "xsl-list@xxxxxxxxxxxxxxxxxxxxxx" <xsl-list@xxxx . . . Read full entry »


Re: Need a little help with xsl:evaluate

Posted 6/30/2024 10:08:26 AM

Martin wrote: >> Set the context item with e.g. >> <xsl:evaluate xpath="." context-item="."/> Okay, I did that. It resulted in the following error message. Is this a bug in Saxon? java.lang.NullPointerException at java.base/java.util.Objects.requir . . . Read full entry »


Re: Need a little help with xsl:evaluate

Posted 6/30/2024 9:19:05 AM

On 30/06/2024 11:15, Roger L Costello costello@xxxxxxxxx wrote: > What am I doing wrong? How to fix it? Set the context item with e.g. B B <xsl:evaluate xpath="." context-item="."/> . . . Read full entry »


Need a little help with xsl:evaluate

Posted 6/30/2024 9:15:23 AM

Hi Folks, I want to evaluate the XPath expression that is inside the <predicate> element: <mappings> <mapping> <Airport_Name>GENERAL EDWARD LAWRENCE LOGAN </Airport_Name> <name>GENERAL EDWARD LAWRENCE LOGAN</name> <predicate . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/29/2024 3:06:39 PM

Roger, I've posted here about this schematron validation solution a couple times, most recently in response to a question of yours! [1]. Reviewing that post, I see I actually wrote a separate stylesheet to generate schematron. That's a traditional QA black box approach. Ideally, the mind that . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/29/2024 12:20:17 PM

Another solution I would mention is to use xsl:message as a side-channel. Certainly with Saxon, it's easy enough to capture the xsl:message output in a separate XML file. The order of events passed to xsl:message isn't predictable in theory, but that's rarely a problem in practice. Michael Kay Sax . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/29/2024 12:17:21 PM

> I would represent the log as a global map variable and place any action there as an entry like {action-key, action-info}, immediately on completing each action. > > Finally, when the processing is finished, we can produce from the log-map a single result-document that contains all ent . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/29/2024 9:49:14 AM

On 29/06/2024 00:39, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > I would represent the log as a global map variable and place any > action there as an entry likeB {action-key, action-info}, immediately > on completing each action. Is that possible to have such a map as a global vari . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/29/2024 9:29:22 AM

On 28/06/2024 23:39, Roger L Costello costello@xxxxxxxxx wrote: > Is there anyway that I can achieve what I desire -- output to one > document the result of mapping the old form to the new form and output > to another document metadata that describes the mapping steps that were > taken? . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/29/2024 7:15:57 AM

Paul Tyson wrote: > Will your "metadata" output be further machine > processed to prove the transformation integrity? Ha! That is exactly what I am planning to do! I will do the mapping and verify the mapping. > Years ago when I was asked to verify my transform > was correc . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/29/2024 12:43:44 AM

This is an interesting sort of problem. Will your "metadata" output be further machine processed to prove the transformation integrity, or just human inspected? Years ago when I was asked to verify my transform was correct, I wrote out a schematron result-document with rules stating w . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/28/2024 10:55:24 PM

Alternatively, one could create a separate result-document (with different name) for every log entry and write these result-documents in a specially - dedicated to the transformation "log-directory". One could probably hope that in the event of an error that causes the transformation to . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/28/2024 10:39:00 PM

I would represent the log as a global map variable and place any action there as an entry like {action-key, action-info}, immediately on completing each action. Finally, when the processing is finished, we can produce from the log-map a single result-document that contains all entries of the l . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/28/2024 10:13:53 PM

Roger, Yes, what Martin said. If you don't like separate modes because you want your tracing logic coupled closely to your transformation logic, the classic 'XSLT approach' would be to build a unified tree in one pass, then post-process that tree twice, once for main outputs (filtering out the lo . . . Read full entry »


Re: How to incrementally add to a result document?

Posted 6/28/2024 9:43:56 PM

On 28/06/2024 23:39, Roger L Costello costello@xxxxxxxxx wrote: > Is there anyway that I can achieve what I desire -- output to one > document the result of mapping the old form to the new form and output > to another document metadata that describes the mapping steps that were > taken? . . . Read full entry »


How to incrementally add to a result document?

Posted 6/28/2024 9:38:51 PM

Hi Folks, I have an XSLT program that converts an old form to a new form. My XSLT program has a template rule that converts this old form: <Airport_Name>Boston Logan Airport</Airport_Name> to this new form: <name>Boston Logan Airport</name> My XSLT program has a templat . . . Read full entry »


[ANN] Balisage 2024 Program Adds Late-breaking News

Posted 6/24/2024 7:11:45 PM

Balisage 2024 Program Adds Late-breaking News The Balisage 2024 program is now complete! When the peer-reviewed Balisage program was scheduled, a few slots were reserved for bLate-breakingb material. The late-breaking papers have been added to a rearranged schedule: Program: https://balisage.ne . . . Read full entry »


Re: Is there any benefit to creating a variable and s

Posted 6/17/2024 6:20:36 AM

I have often been saved by an error if an XPath expression returned a sequence of more than one items, while the as= clause declared the parameter or the value to allow just one. So it is not only the datatype that matters, but also the number of items. Pieter Masereeuw On 6/17/24 08:07, Micha . . . Read full entry »


Re: Is there any benefit to creating a variable and s

Posted 6/17/2024 6:06:36 AM

> On 17 Jun 2024, at 02:41, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > >> > > >> That "as" clause says the ICAO param is a string value. Well, everything is a string. > > > > Nonsense. . . . Read full entry »


Re: Is there any benefit to creating a variable and s

Posted 6/17/2024 1:41:04 AM

> >> That "as" clause says the ICAO param is a string value. Well, everything is a string. > > Nonsense. Saying as="xs:string" stops the caller from supplying (say) a boolean, a number, or a map. I was under the impression that the quoted global parameter dec . . . Read full entry »


Re: Need help with grouping

Posted 6/10/2024 9:10:23 PM

Is there any need for grouping? It seems you have the `figure` elements already in a `chapter` parent so processing each `chapter` and inside each `figure` and then the `foldout`s should allow you to have the right "grouping"/nesting for the result. On 10/06/2024 23:05, Charlie 0 charlie . . . Read full entry »


Need help with grouping

Posted 6/10/2024 9:05:39 PM

I am writing FO style sheets where I have foldout figure (11x17) interspersed with "regular" figures. In the output, the foldout figures are placed at the end of each chapter. I have that done. I need to create a List of Illustrations where the figures are rendered first, followed by . . . Read full entry »


Re: Is there any benefit to creating a variable and s

Posted 6/10/2024 6:16:44 AM

>> That "as" clause says the ICAO param is a string value. Well, everything is a string. Nonsense. Saying as="xs:string" stops the caller from supplying (say) a boolean, a number, or a map. >> >> Bonus question: The value to populate the ICAO param should be . . . Read full entry »


Re: Is there any benefit to creating a variable and s

Posted 6/9/2024 3:51:52 PM

On 09/06/2024 17:38, Roger L Costello costello@xxxxxxxxx wrote: > What is the right way to get a parameter validated against an XSD type? See below (use the as attribute with the simple type name, make sure if it is in a namespace that you declare a prefix and qualify the type name with the pr . . . Read full entry »


Re: Is there any benefit to creating a variable and s

Posted 6/9/2024 3:37:44 PM

Martin wrote: ------------------------------ In schema-aware XSLT 2 or later I think you might be able to import a schema that defines a type with some restrictions so that some of your constraints are ensured and use that type in the "as" attribute. ------------------------------ That s . . . Read full entry »


Re: Is there any benefit to creating a variable and s

Posted 6/9/2024 9:53:16 AM

Am 09.06.2024 um 11:25 schrieb Martin Honnen martin.honnen@xxxxxx: Am 09.06.2024 um 11:19 schrieb Roger L Costello costello@xxxxxxxxx: I have this xsl:param at the top of my XSLT program: <xsl:param name="ICAO" /> Is there any benefit to adding this "as" clause: <xs . . . Read full entry »


Re: Is there any benefit to creating a variable and s

Posted 6/9/2024 9:25:11 AM

Am 09.06.2024 um 11:19 schrieb Roger L Costello costello@xxxxxxxxx: I have this xsl:param at the top of my XSLT program: <xsl:param name="ICAO" /> Is there any benefit to adding this "as" clause: <xsl:param name="ICAO" as="xs:string"/> That & . . . Read full entry »


Is there any benefit to creating a variable and speci

Posted 6/9/2024 9:18:47 AM

Hi Folks, I have this xsl:param at the top of my XSLT program: <xsl:param name="ICAO" /> Is there any benefit to adding this "as" clause: <xsl:param name="ICAO" as="xs:string"/> That "as" clause says the ICAO param is a string value . . . Read full entry »


XSL-List Guidelines

Posted 6/1/2024 2:45:58 PM

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


[ANN] Balisage 2024: Call for Late-breaking News

Posted 5/28/2024 3:38:28 PM

Have you just made a breakthrough in your markup-related project? Do you have a sudden insight into a markup problem? Can you report on a project thatbs ready to go public? The formal papers that went through peer review have been selected for this yearbs Balisage, but we always leave some slots . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/26/2024 5:38:26 PM

> The requirement asked for elegance, not efficiency. > > And this is the way we identify new optimization opportunities: > > (a) (1 to n, n+1 to m) ==> 1 to m. > > (b) deep-equal(a to b, x to y) ==> a=x and b=y. Thanks, and I am glad to have contributed something for . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/26/2024 4:53:11 PM

The requirement asked for elegance, not efficiency. And this is the way we identify new optimization opportunities: (a) (1 to n, n+1 to m) ==> 1 to m. (b) deep-equal(a to b, x to y) ==> a=x and b=y. MK > On 26 May 2024, at 16:31, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-se . . . Read full entry »


Re: Re: Seeking an elegant XSLT function to check that

Posted 5/26/2024 3:43:08 PM

On Sat, May 25, 2024 at 2:18b/PM Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote: > > Recall the problem: determine if an integer range has no gaps in it. > > This is not the problem you provided to us. > > A sequence of overlapping intervals may be connected, but it violate . . . Read full entry »


Re: Re: Seeking an elegant XSLT function to check that

Posted 5/26/2024 3:31:15 PM

On Sun, May 26, 2024 at 7:15b/AM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Another mind-blowing solution. This one from Michael Kay: > > <!-- > Determine if the ranges in $seq are consecutive. > $seq = (0-2, 3-7, 8, 9-15 . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/26/2024 2:15:18 PM

Another mind-blowing solution. This one from Michael Kay: <!-- Determine if the ranges in $seq are consecutive. $seq = (0-2, 3-7, 8, 9-15) returns true $seq = (0-3, 3-7, 8, 9-15) returns false --> <xsl:function name="f:isConsecutive" as="xs:boolean"> . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/26/2024 9:03:54 AM

You could do <xsl:variable name="seq" as="xs:integer*"> <xsl:evaluate xpath="//Range ! replace(., '-', ' to ') => string-join(',')"/> </xsl:variable> <xsl:sequence select = deep-equal($seq, $seq[1] to $seq[last()])"/> Michael Kay Sa . . . Read full entry »


Re: Re: Seeking an elegant XSLT function to check that

Posted 5/25/2024 9:18:36 PM

> Recall the problem: determine if an integer range has no gaps in it. This is not the problem you provided to us. A sequence of overlapping intervals may be connected, but it violates the requirements for "consecutiveness". Thanks, Dimitre On Sat, May 25, 2024 at 2:02b/PM Roger L . . . Read full entry »


Re: Re: Seeking an elegant XSLT function to check that

Posted 5/25/2024 9:12:39 PM

> It seems like XSLT should provide a built-in function that evaluates a sequence (such as the one shown above) for connectedness isn't that what most of the answers did? take an expression that checks a pair and then applies it to a sequence using xpath's every $r in <the sequence> sati . . . Read full entry »


Re: Re: Seeking an elegant XSLT function to check that

Posted 5/25/2024 9:11:20 PM

On 25/05/2024 23:02, Roger L Costello costello@xxxxxxxxx wrote: > If we extract all the ranges, we get this sequence: > > > > (0-2, 3-7, 8, 9-15) Is that a sequence to you in terms of the XSLT/XPath data model? What is the type of the sequence, what is the type of an item in the se . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 9:02:25 PM

Fantastic responses - thank you! Recall the problem: determine if an integer range has no gaps in it. Till now, I have been thinking that the way to solve the problem is to perform a series of checks on pairs of ranges. But maybe there is a more general way of looking at the problem ... Recall th . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 8:24:05 PM

> My guess is that this is not the case with this problem, otherwise they would have chosen another range delimiter, for example "~". And in this case the expression becomes: let $ranges := /*/*/*, $starts := $ranges/xs:integer(substring-before(. || '~', '~')), $ends := $ran . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 8:20:02 PM

> This XPath expression is lovely, but what if the start of the range is a negative integer? My guess is that this is not the case with this problem, otherwise they would have chosen another range delimiter, for example "~". Thanks, Dimitre On Sat, May 25, 2024 at 1:13b/PM Jeffrey . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 8:13:12 PM

This XPath expression is lovely, but what if the start of the range is a negative integer? On Sat, May 25, 2024 at 11:30b/AM Dimitre Novatchev dnovatchev@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Here is a pure XPath solution - 7 lines well-formatted expression: > . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 6:29:54 PM

Here is a pure XPath solution - 7 lines well-formatted expression: let $ranges := /*/*/*, $starts := $ranges/xs:integer(substring-before(. || '-', '-')), $ends := $ranges/xs:integer(if(contains(., '-')) then substring-after(., '-') else .) return every . . . Read full entry »


Re: Re: Seeking an elegant XSLT function to check that

Posted 5/25/2024 5:37:19 PM

Oops, I got them backwards, of course. Copy/paste error. That's what unit tests are for. Enough! Wendell On Sat, May 25, 2024 at 1:21b/PM Wendell Piez wapiez@xxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > <xsl:function name="r:do-ranges-connect" as . . . Read full entry »


Re: Re: Seeking an elegant XSLT function to check that

Posted 5/25/2024 5:21:06 PM

<xsl:function name="r:do-ranges-connect" as="xs:boolean" xmlns:r=" roger.org"> <xsl:param name="previous-range"/> <xsl:param name="current-range"/> <xsl:sequence select=" tokenize . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 5:05:19 PM

Wow! Below is David Carlisle's solution. He solved the problem in a single statement. Totally mind-blowing! Pure elegance! <xsl:function name="f:do-ranges-connect" as="xs:boolean"> <xsl:param name="previous-range"/> <xsl:param name="current . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 5:00:04 PM

following-sibling::Record should be following-sibling::Record [1] On Sat, 25 May 2024 at 17:50, Roger L Costello <costello@xxxxxxxxx> wrote: > Ohhh! That is a wicked cool solution. Thank you David! > > > > *From:* David Carlisle d.p.carlisle@xxxxxxxxx < > xsl-list-s . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 4:13:48 PM

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0"> <xsl:template match="Document"> <xsl:sequence select="every $r in //Range satisfies not($r/../following-sibling . . . Read full entry »


Re: Seeking an elegant XSLT function to check that a p

Posted 5/25/2024 4:11:54 PM

I wrote the test in Schematron, not XSLT (as it seems to me this is a constraint on the business rules of the input document, but to each his own), but should be pretty similar, no? <sch:rule context="Range[following::Range]"> <!-- my maximum is either my value or, if . . . Read full entry »


Seeking an elegant XSLT function to check that a pair

Posted 5/25/2024 3:51:24 PM

Hi Folks, I have an XML document that contains a series of records and each record contains a numeric range: <Document> <Record> <Range>0-2</Range> </Record> <Record> <Range>3-7</Range> </Record> <Record& . . . Read full entry »


Re: Ant XSLT task issues - redo

Posted 5/21/2024 12:37:58 PM

Sorry to be late to the party... On 19/02/2024 15:39, dvint dvint@xxxxxxxxx wrote: I posted her as an XSLT adjacent question. I figured if anyone was using ant with xslt it would be here. I would have thought so, too. Since posting, I continued to work on the problem. For the record, I dropped t . . . Read full entry »


[ANN] Balisage 2024 Preliminary Program Published

Posted 5/20/2024 7:11:38 PM

The program for the annual markup geekfest in August in now available*: https://balisage.net/2024/Program.html Balisage 2024 has developer insights, case studies, and war stories concerning all things markup: Improving your testing with XPath constructs you may not have considered Querying a . . . Read full entry »


xsl 3.0 transformations with xalan-j

Posted 5/20/2024 5:37:18 PM

Hi all, I've just thought that, this may be an _useful_ information for this list. Xalan-J's xslt 3.0 dev build supports various XSLT 3.0 language instructions and associated XPath 3 functions. I've setup to try this at following link. Either free registration to this link, or via google logi . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/15/2024 8:51:28 AM

On 14/05/2024 22:38, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: [snip excellent examples] Sometimes completeness matters less than disallowing all but expected and handled data and manually dealing with the rest. XML's level of completeness would seem to be a good start. But it's taking a while . . . Read full entry »


CFP Declarative Amsterdam 2024

Posted 5/15/2024 7:14:07 AM

Call for papers, Declarative Amsterdam conference, 2024 The sixth edition of Declarative Amsterdam will take place on 7 and 8 November 2024 at the Science Park, Amsterdam. It will be a hybrid conference with the opportunity to attend live or online, for both attendees and presenters. Declarat . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/14/2024 9:38:12 PM

On Tue, 2024-05-14 at 20:45 +0000, Peter Flynn peter@xxxxxxxxxxx wrote: > > There is precedent for a non-alpha non-punctuation character: Tom > Lehrer's song character HEN3RY (I think) Some of the First Nations people in North America use non-alpha characters, for example to represent glo . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/14/2024 8:44:13 PM

On 14/05/2024 15:13, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: Of course, where people can choose their own names, someone could choose to use one in their name. There is precedent for a non-alpha non-punctuation character: Tom Lehrer's song character HEN3RY (I think) Peter . . . Read full entry »


Re: Question about position()

Posted 5/14/2024 6:03:26 PM

You're missing the fact that the value of position() is context-sensitive: inside square brackets, it means the position of the item you are examining, which is different from the value of position() outside the predicate. Michael Kay Saxonica > On 14 May 2024, at 16:33, rick@xxxxxxxxxxxxxx &l . . . Read full entry »


Re: Question about position()

Posted 5/14/2024 3:44:37 PM

$features[1] means (more or less) $features[position()=1] and so selects the first tem $features[position()] means (more or less) $features[position()=position()] and so selects the full sequence as the filter is alway true. David On Tue, 14 May 2024 at 16:32, rick@xxxxxxxxxxxxxx < xsl- . . . Read full entry »


Question about position()

Posted 5/14/2024 3:32:55 PM

Hi All, I am creating sorted variable in order to use as a lookup later. Later, I want to loop through the nodes and return its code attribute value one at a time. When I use the position() function as a predicate, it returns all of the attributes instead of the one at that position. If I put a . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/14/2024 2:12:34 PM

On Tue, 2024-05-14 at 07:21 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > 2.B B B Although the left curly b might be appropriate for data like > O'Neil, it isnbt appropriate for data like this: > W H 'BUD' BARRON, i.e., W H bBUDb BARRON doesnbt seem right. This should be . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/14/2024 10:10:16 AM

On 14/05/2024 08:20, Roger L Costello costello@xxxxxxxxx wrote: Peter Flynn wrote: * Use a curly apostrophe b in the data, not a unidirectional one ' That is an interesting idea. However, I have two concerns with it: 1.That is changing the data. Isnbt there some kind of XML law which says, . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/14/2024 7:20:08 AM

Peter Flynn wrote: * Use a curly apostrophe b in the data, not a unidirectional one ' That is an interesting idea. However, I have two concerns with it: 1. That is changing the data. Isnbt there some kind of XML law which says, bthou shall not change the datab? 2. Although the . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/13/2024 3:03:14 PM

Hi Martin, Indeed, and now I am thinking about how I could get the serializer to rewrite the stuff coming in before bringing it through, as it were. Alas, I haven't the time to research at the moment how to get the processor to use two different character maps in the same run. Because Roger coul . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/13/2024 2:56:31 PM

On 13/05/2024 16:50, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx wrote: > > Use a character map so the apos character in "O'Neil" is rewritten into some escaped form? That wouldn't work as there is not only the single quote in the data (e.g. "O'Neil") but also in the surr . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/13/2024 2:49:49 PM

Roger, Use a character map so the apos character in "O'Neil" is rewritten into some escaped form? But Peter's solution is the best, assuming all your apos are actually rsquo. Cheers, Wendell -----Original Message----- From: Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxx . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/13/2024 2:00:34 PM

On 13/05/2024 14:06, Roger L Costello costello@xxxxxxxxx wrote: $legacy-elmt-value = 'O'Neil' That is an error (unmatched single quote). What is the best way to fix this error? Use a curly apostrophe b in the data, not a unidirectional one ' Peter . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/13/2024 1:13:51 PM

You need to specify what you want to happen. As written "string value between single quotes" then there is no error. If you want to specify that single quotes within the content are escaped in some way, you need to say what that should be xpath style doubling '' xml entity ref &apos; . . . Read full entry »


Re: What is a bulletproof way to assign a variable thi

Posted 5/13/2024 1:13:14 PM

On 13/05/2024 15:05, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, The value of $legacy-elmt is this element: <test>Hello, world</test> Create a variable which holds between single quotes the value of the element that $legacy-elmt holds. Do this using a two-step process . . . Read full entry »


What is a bulletproof way to assign a variable this v

Posted 5/13/2024 1:05:27 PM

Hi Folks, The value of $legacy-elmt is this element: <test>Hello, world</test> Create a variable which holds between single quotes the value of the element that $legacy-elmt holds. Do this using a two-step process: <xsl:variable name="tmp-legacy-elmt-value" as=&qu . . . Read full entry »


Re: Is a Java program more likely to succeed in creati

Posted 5/8/2024 12:00:51 PM

> Is a Java program more likely to succeed in creating an in-memory representation of the input document than an XSLT processor? Why should it? Especially if the XSLT processor is itself a Java program? Of course, if you design your own Java data structure then you have more control over the t . . . Read full entry »


Re: Is a Java program more likely to succeed in creati

Posted 5/8/2024 11:36:41 AM

On 08/05/2024 13:28, Roger L Costello costello@xxxxxxxxx wrote: > A (non-streaming) XSLT processor creates an in-memory representation of the input XML document. Right? > > Sometimes the input XML document is large and when the XSLT processor tries to create an in-memory representation of . . . Read full entry »


Is a Java program more likely to succeed in creating a

Posted 5/8/2024 11:28:18 AM

Hi Folks, A (non-streaming) XSLT processor creates an in-memory representation of the input XML document. Right? Sometimes the input XML document is large and when the XSLT processor tries to create an in-memory representation of the input XML document, an OutOfMemoryError results. Alternatively . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/4/2024 10:38:42 AM

>> Another counter argument is that although streaming might help to move the line, it hasnbt solved the problem of finite resources, it has only helped. With streaming there is in principle no limit to the size of document you can handle. There are of course likely to be practical limits, . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/4/2024 9:44:31 AM

On Sat, 4 May 2024 at 10:37, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On 03/05/2024 20:52, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx wrote: > > > > > Hm. I guess on reflection it may be such an argument, but that does . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/4/2024 9:37:39 AM

On 03/05/2024 20:52, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx wrote: > > > Hm. I guess on reflection it may be such an argument, but that doesnbt > make it a good one. At least in view of other observable limits. > > Another counter argument is that although streaming might h . . . Read full entry »


Re: Current list of XSLT training/class resources?

Posted 5/3/2024 11:52:42 PM

On Fri, 2024-05-03 at 13:45 +0000, Sewell, David R (drs2n) dsewell@xxxxxxxxxxxx wrote: > > > > Wondering if there is a more comprehensive list than this one: > B > https://blog.oxygenxml.com/xslt_training.html > B > The specific need is to solidify/expand the XSLT skills o . . . Read full entry »


Re: Current list of XSLT training/class resources?

Posted 5/3/2024 7:15:03 PM

Thanks, Dimitre, I was planning to recommend your coursesbI watched the XPath/XSLT 3 ones myself to get up to speed on the new features, David S. From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Reply-To: "xsl-list@xxxxxxxxxxxxxxxxxxx . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 6:52:12 PM

Hi, Hm. I guess on reflection it may be such an argument, but that doesn't make it a good one. At least in view of other observable limits. Another counter argument is that although streaming might help to move the line, it hasn't solved the problem of finite resources, it has only helped. So a . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 3:57:10 PM

On Fri, May 3, 2024 at 1:31b/AM Michael Kay michaelkay90@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On 3 May 2024, at 00:25, Dimitre Novatchev dnovatchev@xxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > If I were related t . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 3:46:37 PM

>Is this an argument that streaming should be in the core spec? It depends what you are trying to achieve. There are too many good XSLT processors that have fallen by the wayside because their implementors weren't able to fund further development. You're not going to improve that situation by m . . . Read full entry »


Re: Current list of XSLT training/class resources?

Posted 5/3/2024 3:41:16 PM

On Fri, May 3, 2024 at 6:44b/AM Sewell, David R (drs2n) dsewell@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Wondering if there is a more comprehensive list than this one: > > > > https://blog.oxygenxml.com/xslt_training.html > > > > The specific . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 3:40:36 PM

On 03/05/2024 17:36, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx wrote: > > Mike and XSL-List, > > Is this an argument that streaming should be in the core spec? > Isn't it part of the official XSLT 3 specification? I am sure it is, even if SaxonEE is the only implementation (after . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 3:36:33 PM

Mike and XSL-List, Is this an argument that streaming should be in the core spec? Since this limit will always be there, even if it moves? (And in view of observations on how the real world is not always as accommodating as we might like.) Agree also with Dmitry and Liam. Know your tools. Even i . . . Read full entry »


Current list of XSLT training/class resources?

Posted 5/3/2024 1:44:26 PM

Wondering if there is a more comprehensive list than this one: https://blog.oxygenxml.com/xslt_training.html The specific need is to solidify/expand the XSLT skills of someone who has taken over my responsibilities in that domain. They have intermediate skills in XSLT 2, so the ideal would be any . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 8:39:40 AM

> Of course, BaseX might fall over onto its back and wiggle its legs in > the air at a 5GByte XML document, ibm not sure. Ibve had more than 5G > in one BaseX database i think, but not all in one file, it was the > collected works of Dorothy Parker > For those interested, our docu . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 8:31:08 AM

> On 3 May 2024, at 00:25, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > If I were related to any activity that collects and structures such large quantities of data, I would envisage splitting and keeping this data into smaller, man . . . Read full entry »


Re: [Summary] An efficient XSLT program that searches

Posted 5/3/2024 8:31:00 AM

> As a matter of interest, what was the execution time? 1 minute and 12 seconds. . . . Read full entry »


Re: [Summary] An efficient XSLT program that searches

Posted 5/3/2024 8:14:52 AM

> I ran it and it worked beautifully! > As a matter of interest, what was the execution time? Michael Kay Saxonica . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 8:13:14 AM

> On 2 May 2024, at 23:50, Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I do not know any answer to the question, and without the data (and perhaps some further information about your system, like default heap space) I cannot reproduce th . . . Read full entry »


Re: [Summary] An efficient XSLT program that searches

Posted 5/3/2024 7:54:30 AM

On 03/05/2024 09:48, Roger L Costello costello@xxxxxxxxx wrote: > > I decided to go the XSLT streaming route. Below is my summary of how to do it. > > > > So I went with XSLT streaming. Here's how to do it. > > The SAXON documentation [1] says this: "Using the xsl:sourc . . . Read full entry »


[Summary] An efficient XSLT program that searches a la

Posted 5/3/2024 7:48:36 AM

Hi Folks, Thank you for your excellent responses! I decided to go the XSLT streaming route. Below is my summary of how to do it. First, the problem statement: I have an XSLT program that locates all leaf elements which have the string value 'DNKK'. My program outputs the element and the name of . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/3/2024 1:05:31 AM

On Thu, 2024-05-02 at 13:08 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > The input XML document is large, nearly 5GB. Youbve probably considered this, but if you query the document more than once, it may be worth putting it into e.g. BaseX, and using XQuery instead of XSLT. The adv . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/2/2024 11:25:06 PM

While Martin, Michael Kay and other people provided valuable advice towards streaming, it is probably a good moment to raise the question why, and should such a huge document be created and probably continuously augmented with new, additional data. It has been proven in practice that horizontal sc . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/2/2024 10:49:52 PM

I do not know any answer to the question, and without the data (and perhaps some further information about your system, like default heap space) I cannot reproduce the problem. But my first instinct, for no intelligent reason whatsoever, is to use template application for flow of control: <xs . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/2/2024 2:27:25 PM

> On 2 May 2024, at 14:08, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Folks, > > I have an XSLT program that locates all leaf elements which have the string value 'DNKK'. My program outputs the element and the name of its parent: . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/2/2024 1:38:57 PM

On 02/05/2024 15:35, Martin Honnen martin.honnen@xxxxxx wrote: Saxon EE is the only XSLT 3 processor implementing streaming so there you could try <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" B version="3.0" B xmlns:xs="http://www.w3.org/2001/XMLSch . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/2/2024 1:35:22 PM

On 02/05/2024 15:08, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I have an XSLT program that locates all leaf elements which have the string value 'DNKK'. My program outputs the element and the name of its parent: <xsl:template match="/"> <results> . . . Read full entry »


Re: An efficient XSLT program that searches a large XM

Posted 5/2/2024 1:11:00 PM

On 02/05/2024 15:08, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I have an XSLT program that locates all leaf elements which have the string value 'DNKK'. My program outputs the element and the name of its parent: <xsl:template match="/"> <results> . . . Read full entry »


An efficient XSLT program that searches a large XML d

Posted 5/2/2024 1:07:39 PM

Hi Folks, I have an XSLT program that locates all leaf elements which have the string value 'DNKK'. My program outputs the element and the name of its parent: <xsl:template match="/"> <results> <xsl:for-each select="//*[not(*)][. eq 'DNKK']&qu . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 6:46:39 PM

Thanks, Martin, for this important detail... > On 1 May 2024, at 20:41, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Yes, the step > > / (Customer_or_Area_Code, Cycle_Date, Sequence_Number) > > and the step > > / (Cy . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 6:41:27 PM

On 01/05/2024 20:36, Leo Studer leo.studer@xxxxxxxxxxx wrote: > Then I am curious >> >> my suggestion with >> >> <xsl:sequence select="$record ! (Customer_or_Area_Code, Cycle_Date, >> Sequence_Number) ! f:convert(.)b/> >> >> will produce the . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 6:36:30 PM

For a little issue like this, the <xsl:sequence> approach is perfect. There are more complex scenarios that your example alludes to, and in those cases, I pass the parameter to a template mode, where it can then be the context in different template matches. That approach gives me a lot of . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 6:35:50 PM

Then I am curious > my suggestion with > > <xsl:sequence select="$record ! (Customer_or_Area_Code, Cycle_Date, Sequence_Number) ! f:convert(.)b/> > > will produce the same result (order) while any use of / will sort the elements in document order. do the following express . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 6:26:42 PM

On 01/05/2024 20:22, Leo Studer leo.studer@xxxxxxxxxxx wrote: > Martin, > >> On 1 May 2024, at 14:09, Martin Honnen martin.honnen@xxxxxx >> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: >> >> >> On 01/05/2024 13:28, Roger L Costello costello@xxxxxxxxx wr . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 6:22:15 PM

Martin, > On 1 May 2024, at 14:09, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > On 01/05/2024 13:28, Roger L Costello costello@xxxxxxxxx <mailto:costello@xxxxxxxxx> wrote: >> Hi Folks, >> >> I have a functi . . . Read full entry »


XSL-List Guidelines

Posted 5/1/2024 2:46:01 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 set an element as the context without using

Posted 5/1/2024 12:09:26 PM

On 01/05/2024 13:28, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > I have a function that I pass "record" to: > > <xsl:function name="f:procedureLeg" as="element()+"> > <xsl:param name="record" as="element . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 12:07:12 PM

On Wed, May 01, 2024 at 11:49:59AM -0000, Pieter Masereeuw pieter@xxxxxxxxxxxx scripsit: [snip] > Currently, I use to add a comment to my <xsl:for-each> that explains that it > will iterate only once. If I understand the language design intent correctly, part of the point is that " . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 11:49:52 AM

Exactly for this reason, I once suggested to add <xsl:with> (or maybe: <xsl:with-context>) to the language. It would be like <xsl:for-each>, but has the benefit that there could be a check if the select-expression really matches only one item, not more. There can be discussion . . . Read full entry »


Re: How to set an element as the context without using

Posted 5/1/2024 11:31:37 AM

<xsl:sequence select="$record/(f:convert(Customer_or_Area_Code),f:convert(Cycle_Date),f:convert(Sequence_Number))"/> David On Wed, 1 May 2024 at 12:28, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > I have a . . . Read full entry »


How to set an element as the context without using a

Posted 5/1/2024 11:28:27 AM

Hi Folks, I have a function that I pass "record" to: <xsl:function name="f:procedureLeg" as="element()+"> <xsl:param name="record" as="element()"/> ... </xsl:function> "record" is an element that contain . . . Read full entry »


Re: List Item Content

Posted 4/24/2024 4:43:17 AM

Hi Marin, ----------------------------- What are the rules, to move all elements p class="ListParagraph" to the end of the container div element? --------------------------------- Rules: Yes. Footnote <sup>2</sup> content along with <p list> to end of </div> mo . . . Read full entry »


Re: List Item Content

Posted 4/23/2024 1:46:03 PM

I do not think this is what you really want, because I cannot pretend to actually understand what you are trying to do. While there are probably better ways to do this, the following does take the posted input and generate the desired output. Maybe you can tweak it into what you really need. <? . . . Read full entry »


Re: List Item Content

Posted 4/23/2024 9:36:27 AM

On 23/04/2024 10:27, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote: Hi, I am getting stuck where the list item comes in any footnote label. FindB the below XML and desired Output. XML <div id="1"> <p class="BodyText">Afresh is<sup>1</sup> of the would . . . Read full entry »


List Item Content

Posted 4/23/2024 8:27:22 AM

Hi, I am getting stuck where the list item comes in any footnote label. Find the below XML and desired Output. XML <div id="1"> <p class="BodyText">Afresh is<sup>1</sup> of the would be<sup>2</sup>.</p> <p class="ListParagraph . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/22/2024 9:01:31 PM

On 22/04/2024 22:51, Mark Giffin m1879@xxxxxxxxxxxxx wrote: > Oops! Thanks for the correction. Any idea if Oxygen is using Xerces? These days with Java in one way (embedded version of Xerces in the JRE/JDK) or another (a custom Xerces installation) I assume they do. But ask their support about . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/22/2024 8:51:23 PM

Oops! Thanks for the correction. Any idea if Oxygen is using Xerces? Mark -----Original Message----- From: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Apr 21, 2024 3:07 AM To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Re: Ignoring a DTD with document() Am 21.04.2024 um 04:06 schrieb . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/21/2024 10:07:27 AM

Am 21.04.2024 um 04:06 schrieb Mark Giffin m1879@xxxxxxxxxxxxx: Thanks Michael, I'm using Saxon-PE 10.6 from inside Oxygen v24.1. I don't know what XML parser is used in this setup, I assume Xalan. Xalan is an XSLT 1 processor, not an XML parser. Xerces is an XML parser. . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/21/2024 5:52:09 AM

Hi Mark, DTDs are special, compared to other schema languages, in that they allow entity declarations that need to be resolved during parsing. Saxon's -dtd option only controls whether the document be validated against the DTD *after* it has been successfully parsed. If the document does not use . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/21/2024 2:06:35 AM

Thanks Michael, I'm using Saxon-PE 10.6 from inside Oxygen v24.1. I don't know what XML parser is used in this setup, I assume Xalan. This is the error I get: I/O error reported by XML parser processing file:/C:/Users/mark/Desktop/company/ExportPub/myfile.xml: D:\DocTypes\dita-oasis\1.2\techni . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/20/2024 12:40:44 PM

The answer is, it depends entirely on the XSLT processor you are using. Most XSLT processors are likely to give you access to some kind of resolver mechanism that enables you to control the options used for XML parsing; and at that point it depends on the XML parser you are using. Michael Kay Saxo . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/19/2024 11:07:19 PM

On 19/04/2024 21:46, Mark Giffin m1879@xxxxxxxxxxxxx wrote: I'm using XSLT 2.0, trying to open an XML file with document(), the XML file references a DTD that is not available, and document() fails. How can I get document() to ignore the DTD? My immediate reaction is just to edit the document and r . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/19/2024 9:08:10 PM

Do you have control over the document to be read in? If so you might want to issue $ xmllint --dropdtd /path/to/desired.xml > /path/to/desired_without_DOCTYPE.xmlb before you run the XSLT2 pgm. (Yes, I realize this does not actually answer the original question, but some folks may find it a use . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/19/2024 8:55:20 PM

I don't think you can ignore the dtd purely from xslt. If your xslt system gives you control over the xml parser you may be able to configure that or supply a catalogue that specifies a different location for a (possibly empty) dtd that is available. Failing that you could read the file with unpar . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/19/2024 8:54:37 PM

On 19/04/2024 22:45, Mark Giffin m1879@xxxxxxxxxxxxx wrote: I'm using XSLT 2.0, trying to open an XML file with document(), the XML file references a DTD that is not available, and document() fails. How can I get document() to ignore the DTD? How are you using XSLT 2? From Java? There is a parser . . . Read full entry »


Ignoring a DTD with document()

Posted 4/19/2024 8:45:42 PM

I'm using XSLT 2.0, trying to open an XML file with document(), the XML file references a DTD that is not available, and document() fails. How can I get document() to ignore the DTD? Thanks, Mark . . . Read full entry »


Re: Checking if a file exists

Posted 4/19/2024 12:36:03 AM

On Thu, 2024-04-18 at 22:59 +0000, dvint dvint@xxxxxxxxx wrote: > I'm trying to stop the result-document() from writing to the file > more than once. Itbs an error to try, even if the file hasn't yet been written. One way round this might be to use fn:transform(0 to do your transformation . . . Read full entry »


Re: Checking if a file exists

Posted 4/19/2024 12:06:04 AM

Your main problem here is that you are thinking about things very procedurally: you are thinking about creating files and checking for the existence of files in terms of a world that is changing as your code executes, while XSLT is designed to create the illusion of a stateless world that doesn't c . . . Read full entry »


Re: Checking if a file exists

Posted 4/18/2024 11:40:49 PM

On Thu, 18 Apr 2024 at 23:58, dvint dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I'm trying to stop the result-document() from writing to the file more > than once. I had moved from the file:exist() because I need to use the > saxon-pe to use it, but oxygen an . . . Read full entry »


Re: Checking if a file exists

Posted 4/18/2024 10:58:14 PM

I'm trying to stop the result-document() from writing to the file more than once. I had moved from the file:exist() because I need to use the saxon-pe to use it, but oxygen ant transformation only allows the use of the HE edition.So am I right in thinking there may be ae sequencing/file writing iss . . . Read full entry »


Re: Checking if a file exists

Posted 4/18/2024 10:38:54 PM

On Thu, 2024-04-18 at 22:28 +0000, dvint@xxxxxxxxx wrote: > I need to take a list of XML files and rename them based upon values > provided by the writer. I know that my list has duplicate name tokens > for different files in the list. I do get duplicate names when > generated. > > . . . Read full entry »



PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

Learn Stylus Studio in 6 Minutes

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

Why Pay More for XML Tools?

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

 
Free Stylus Studio XML Training: