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!


XSLT 4: normalize-mixed()

Posted 5/25/2020 3:51:33 AM

So fairly often I get to try to do things to documentation XML documents; lots of mixed content, and for various reasons someone wants the content regularized. The pretty-print indentation should all be stripped out and eventually added back in via some consistent means. (Or the pretty-print inde . . . Read full entry »


[ANN] Invitation: Balisage: The Markup Conference DRES

Posted 5/24/2020 9:27:40 PM

Balisage 2020 will be unlike any previous Balisage conference: ALL VIRTUAL. This means new procedures and infrastructure, and a lot of things we need to learn. To help make Balisage 2020 run as smoothly as possible, we're holding a Dress Rehearsal in June. You are invited! The Dress Rehearsal wil . . . Read full entry »


Re: Intersection of two sets based on a subset of fiel

Posted 5/23/2020 11:09:30 AM

On Sat, 23 May 2020 at 05:24, Mukul Gandhi gandhi.mukul@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Thu, May 21, 2020 at 7:53 PM David Carlisle d.p.carlisle@xxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >> if $set1 is a your sequenc . . . Read full entry »


Re: Intersection of two sets based on a subset of fiel

Posted 5/23/2020 4:24:18 AM

On Thu, May 21, 2020 at 7:53 PM David Carlisle d.p.carlisle@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > if $set1 is a your sequence of books and $set2 is your sequence of Music > then you seem to want > > $set1[concat(Author,'#',Country)=$m/concat(Author,'#',Cou . . . Read full entry »


Re: The philosophical implications of an XSLT processo

Posted 5/22/2020 3:57:09 PM

On 22/05/2020 16:26, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: Actually, it is the latest developments in XPath 3 (maps) that made it possible to produce an XSLT processor written in XSLT, which is claimed to have a practically feasible performance. I agree - maps make it feasable - you can d . . . Read full entry »


Re: The philosophical implications of an XSLT processo

Posted 5/22/2020 3:42:04 PM

Dimitre wrote: > So, here is a true challenge, XPath in XPath, then XSLT in XPath Wow! Mind-blowing stuff Dimitre! /Roger From: Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, May 22, 2020 11:26 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sub . . . Read full entry »


Re: The philosophical implications of an XSLT processo

Posted 5/22/2020 3:25:52 PM

> It was believed that XML languages such as XSLT were not sufficient in speed and/or language facilities ... While having an XSLT processor written completely in XSLT is a great achievement and a stepping stone in our progress, we need to be careful when saying that XSLT is an "XML langu . . . Read full entry »


Re: The philosophical implications of an XSLT processo

Posted 5/22/2020 10:54:01 AM

On 21/05/2020 17:19, Roger L Costello costello@xxxxxxxxx wrote: Michael Kay reports that, within a few weeks, Saxonica will be releasing an XSLT processor implemented in XSLT. That will be a key event. Back in the day, someone wrote an XSLT 1.0 processor in XSLT 1.0. It was because they could, n . . . Read full entry »


Re: The philosophical implications of an XSLT processo

Posted 5/22/2020 9:46:21 AM

On Thu, May 21, 2020 at 10:29 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Actually, I have done an XSD validator in XSLT - I got it to a fairly > advanced stage but never released it. It's described here: > > https://www.saxonica.com/pape . . . Read full entry »


Re: The philosophical implications of an XSLT processo

Posted 5/21/2020 4:59:50 PM

Actually, I have done an XSD validator in XSLT - I got it to a fairly advanced stage but never released it. It's described here: https://www.saxonica.com/papers/markupuk-2018mhk.pdf XSLT 3.0 gives us most of the data structures needed for this kind of application, but it still has one significan . . . Read full entry »


The philosophical implications of an XSLT processor i

Posted 5/21/2020 4:18:50 PM

Hi Folks, Michael Kay reports that, within a few weeks, Saxonica will be releasing an XSLT processor implemented in XSLT. That will be a key event. Here is one philosophical implication of that event. Philosophical Implication #1 Up to this period in time, it has been believed that "syste . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/21/2020 3:11:58 PM

On Thu, May 21, 2020 at 05:58:14AM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > This reminds me that I've been trying to find a good syntax for doing > > <xsl:for-each-member-in-array select="[(1 to 3), (5 to 9), (10 to 20)]"> > <x>{count(current-member())} . . . Read full entry »


Re: Intersection of two sets based on a subset of fiel

Posted 5/21/2020 2:45:39 PM

In the language of relational algebra, it's a join, not an intersection. In XSLT, joins are best performed using the key() function. In XSLT 2.0 (or is it 3.0?) you can define a composite key with multiple fields. Michael Kay Saxonica > On 21 May 2020, at 15:17, Roger L Costello costello@xxxx . . . Read full entry »


Re: Intersection of two sets based on a subset of fiel

Posted 5/21/2020 2:23:50 PM

if $set1 is a your sequence of books and $set2 is your sequence of Music then you seem to want $set1[concat(Author,'#',Country)=$m/concat(Author,'#',Country) ] assuming # doesn't appear in Author or Country names. David On Thu, 21 May 2020 at 15:16, Roger L Costello costello@xxxxxxxxx < xsl . . . Read full entry »


Intersection of two sets based on a subset of fields?

Posted 5/21/2020 2:16:45 PM

Hi Folks, I have a set of Book instances. I call this Set #1. Here are two instances: <Book> <Title>ABC</Title> <Author>John Doe</Author> <Country>USA</Country> <Binding>hardcover</Binding> </Book> <Book> <T . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/21/2020 5:58:09 AM

>> <xsl:for-each-group select="some-node" group-by="true()"> >> .... inside I have current-group() ... >> </xsl:for-each-group> >> >> -- which has sometimes made me wonder if group-by="true()" might be a >> default on f . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/21/2020 4:17:40 AM

On Tue, May 19, 2020 at 06:10:56PM -0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx scripsit: > Does anyone else find themselves doing > > <xsl:for-each-group select="some-node" group-by="true()"> > .... inside I have current-group() ... > </xsl:for-each-gr . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/21/2020 4:11:37 AM

On Tue, May 19, 2020 at 05:55:25PM -0000, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx scripsit: > But read my previous messages in this thread. Instead of xsl:with I propose > to use a @context-item attribute (an @xsl:context-item attribute on non-xsl > elements). If you really need t . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/21/2020 3:13:38 AM

Please also consider following. Let there be following XSLT pseudocode, and explanation after that, <xsl:template match="X"> <xsl:for-each select="Y"> <!-- something here --> </xsl:for-each> </xsl:template> The current node X, is t . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/20/2020 7:32:40 AM

Thanks everyone for your comments. It is great to be part of a community like this. You made me think better, and that's why I'd like share some other thoughts on this subject. It seems that XSLT has enough power to facilitate anything that you want to do in processing XML (and other stuff). Al . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/20/2020 4:06:30 AM

On Tue, May 19, 2020 at 2:23 PM Pieter Masereeuw pieter@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I would be very happy if I could make my intentions clearer by using a > real XSLT construct in this situation, such as *<xsl:with select="...">.* &g . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 9:09:02 PM

Hi Gerrit, Thanks for your response, the <xsl:sequence> afterthought you brougtht up is finally dawning upon me. I did initially read through the thread, and I also think it is better to use existing vocabulary and to fill the gaps in the paradigm, rather than to cook up new verbs. It's j . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 6:12:52 PM

I finished reading through the xslt4 doc. Great stuff, and I do the for-each-context-switch as well. I had some preprocessors converting a <gen:context select=""> (gen prefix pointing to a different ns) to that context-setting-only xsl:for-each as well (with xsl prefix pointing to . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 6:10:50 PM

Hi, Does anyone else find themselves doing <xsl:for-each-group select="some-node" group-by="true()"> .... inside I have current-group() ... </xsl:for-each-group> -- which has sometimes made me wonder if group-by="true()" might be a default on for-each . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 5:55:19 PM

Of course such an xsl:with instruction won't be penalized by HOAXCoQS [1], unlike xsl:for-each, which reeks of XSLT 1 habits most of the time. xsl:with won't get brownie points though; I'd consider it "neutral". But read my previous messages in this thread. Instead of xsl:with I propos . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 5:14:40 PM

I think <xsl:with select="..."> is an elegant rewrite of for-each. It does make me wonder whether it would earn brownie points or penalties in Gerrit's highly opiniated book. On 19/05/2020 18:52, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: On Tue, 2020-05-19 at 08:54 +0000, Piet . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 4:51:50 PM

On Tue, 2020-05-19 at 08:54 +0000, Pieter Masereeuw pieter@xxxxxxxxxxxx > Because such a for-each does not repeat, I always add a comment like > <!-- Merely sets the context, does not repeat -->. I tend to comment these too, although not with the repeat part - be careful, too, as in E . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 2:59:30 PM

On 19.05.2020 16:29, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: Sometimes the xsl:for-each instruction will comprise many result tree elements or XSLT instructions. Then there is no single element to stick the @context-item attribute onto. Of course there is: xsl:sequence/@context-it . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 2:29:10 PM

Maybe we don't need a new instruction for switching context. We could re-use the @context-item attribute that already is allowed on xsl:evaluate. If used on a non-xsl element, the attribute will become @xsl:context-item. A contrived example follows. Consider this variable: <xsl:variable na . . . Read full entry »


Re: XSLT 4: xsl:template/@select

Posted 5/19/2020 12:37:08 PM

Ah, OK, thanks for setting me straight. I was just about to change some templates to try this. On Tue, May 19, 2020 at 10:26 AM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I hadn't realized that it was possible to include template parameters as . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 11:59:56 AM

On Tue, May 19, 2020 at 08:53:54AM -0000, Pieter Masereeuw pieter@xxxxxxxxxxxx scripsit: > I would be very happy if I could make my intentions clearer by using a real > XSLT construct in this situation, such as *<xsl:with select="...">*. The > semantics could also help as a . . . Read full entry »


Re: XSLT 4: couldn't xsl:mode have copy-namespaces de

Posted 5/19/2020 11:53:54 AM

On Tue, May 19, 2020 at 07:49:38AM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: [snip] > Sometimes I would want to declare > > <xsl:mode on-no-match="shallow-copy" copy-namespaces="no"/> > > Is that feasible? I would certainly use it if it was. . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 10:01:19 AM

On 19/05/2020 09:54, Pieter Masereeuw pieter@xxxxxxxxxxxx wrote: Just something that I've always wanted to bring up, but always hesitated to do because I don't know if it's really worthwhile: I often find myself using xsl:for-each for no other purpose than merely setting the context, e.g., in or . . . Read full entry »


Re: XSLT 4 xsl:with

Posted 5/19/2020 8:58:19 AM

Yes. Little things like this can make a big difference. We've tried to eliminate cases (e.g. xsl:number, xsl:copy) that force you to set the context item, so the need for this is perhaps less than it was, but I can still see it being handy. Michael Kay Saxonica > On 19 May 2020, at 09:54, Piet . . . Read full entry »


XSLT 4 xsl:with

Posted 5/19/2020 8:53:48 AM

Just something that I've always wanted to bring up, but always hesitated to do because I don't know if it's really worthwhile: I often find myself using xsl:for-each for no other purpose than merely setting the context, e.g., in order to call a named template or to simplify a set of XPath expre . . . Read full entry »


Re: XSLT 4: xsl:template/@select

Posted 5/19/2020 8:26:03 AM

> I hadn't realized that it was possible to include template parameters as part of the template match rule. It isn't! It's a feature that I would sometimes like to have, and that other people also seem in favour of. But at the moment, local parameters are not in scope for the match pattern. Mi . . . Read full entry »


Re: XSLT 4: couldn't xsl:mode have copy-namespaces de

Posted 5/19/2020 8:24:56 AM

Sounds a reasonable idea. inherit-namespaces=no could also be handy, especially as inheriting of namespaces can cause a heavy cost (though adding features that improve performance isn't a big win; most people won't use them). Michael Kay Saxonica > On 19 May 2020, at 08:49, Martin Honnen marti . . . Read full entry »


Re: XSLT 4: xsl:template/@select

Posted 5/19/2020 7:57:52 AM

I hadn't realized that it was possible to include template parameters as part of the template match rule. That would definitely simplify some things that I was doing recently where I was matching more general cases and then, upon checking against the template parameter, I would call "xsl:next- . . . Read full entry »


XSLT 4: couldn't xsl:mode have copy-namespaces declar

Posted 5/19/2020 7:49:32 AM

XSLT 3 has a declarative way with xsl:mode and on-no-match being one of deep-copy, shallow-copy, deep-skip, shallow-skip, text-only-copy. With XSLT 2 and 3 xsl:copy and xsl:copy-of also have some improvement to XSLT 1 by allowing the use of the copy-namespaces attribute with "no". Sometim . . . Read full entry »


Re: XSLT 4: xsl:template/@select

Posted 5/19/2020 1:21:23 AM

ohhh xsl:mode enclosing templates.. I use that a lot in generated stylesheets... it just makes so much sense.... looking forward to that! On Mon, May 18, 2020 at 11:52 AM Graydon graydon@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On Mon, May 18, 2020 at 05:04:12PM - . . . Read full entry »


Re: XSLT compiler written in XSLT?

Posted 5/18/2020 8:06:28 PM

Finished, yes, but released no. Hopefully it will be out within a few weeks. Actually the XSLT processing is done in XSLT, and the XPath processing in Javascript. We know that parsing XPath using XSLT is possible, but we decided not to do it that way this time around. The most challenging part is . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 7:19:18 PM

> But i'm leaning towards keeping the > existing 1.0/2.0 FAQ unchanged (except e.g. if there are broken links > etc) and starting a new one that incorporates XSLT 3 and current work > and implementations. The new one, as per Dmitre and Wendell, could use > parts of the old one, given . . . Read full entry »


XSLT compiler written in XSLT?

Posted 5/18/2020 7:04:34 PM

Hi Folks, I noticed in the 2019 XML Prague proceedings an article on implementing an XSLT compiler in XSLT. How's that going? Is it finished? Is it released? /Roger . . . Read full entry »


Re: XSLT 4: xsl:template/@select

Posted 5/18/2020 6:52:17 PM

On Mon, May 18, 2020 at 05:04:12PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > I didn't want to create messy scoping rules for variables, e.g. > > <xsl:template match="type(xs:integer)" mode="increment" select=".+1"/> > > is fine, but > . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 6:40:40 PM

On Mon, May 18, 2020 at 05:08:28PM -0000, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx scripsit: > I'll wait a few more days to give others a chance to comment > (especially Dave himself!). But i'm leaning towards keeping the > existing 1.0/2.0 FAQ unchanged (except e.g. if there are broken links . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 5:44:20 PM

Keep the two separate. Document that some may still find the Dave one very useful. --Deb > On May 18, 2020, at 1:08 PM, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On Mon, 2020-05-18 at 16:01 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 5:08:20 PM

On Mon, 2020-05-18 at 16:01 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: > Hi, > > I concur entirely with Dimitre on this. Thank you both, that's very helpful. > I think we need both the old > FAQ, and a new FAQ covering the best current practice in XSLT 2020+, > includin . . . Read full entry »


Re: XSLT 4: xsl:template/@select

Posted 5/18/2020 5:04:06 PM

I didn't want to create messy scoping rules for variables, e.g. <xsl:template match="type(xs:integer)" mode="increment" select=".+1"/> is fine, but <xsl:template match="type(xs:integer)" mode="increment" select=".+$delta"> . . . Read full entry »


XSLT 4: xsl:template/@select

Posted 5/18/2020 4:52:25 PM

https://archive.xmlprague.cz/2020/files/xmlprague-2020-proceedings.pdf#page=121 says in 5.1: > A template rule with a select attribute must not contain any xsl:param > or xsl:context-item declarations. I can easily imagine wanting xsl:param, particularly a tunnel parameter. For example, if . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 4:00:38 PM

Hi, I concur entirely with Dimitre on this. I think we need both the old FAQ, and a new FAQ covering the best current practice in XSLT 2020+, including XSLT 3.0 solutions. The old FAQ includes many solutions that you should not want or need today -- unless you are in a corner. As Dimitre says, fo . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 3:28:23 PM

> I finally sat down for an hour or two and got the files Dave had sent > me to build. I still need to do some editing (e.g. make sure there's no > references left to it being on Dave's Web site) and then will put it up > on gitlab so people can raise issues and/or send merge requests o . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 11:25:10 AM

On 18/05/2020 01:58, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: [...] The current version is at https://www.delightfulcomputing.com/xslfaq/xsl/ I have updated the XML FAQ to reflect this at http://xml.silmaril.ie/style.html#XSL with a caveat that the address may change again. Many thanks to Da . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 6:34:56 AM

https://www.xmlprague.cz/day2-2020/#xslt4 https://www.youtube.com/watch?v=J-2Rd0-fM6A&t=2s Christophe Le 18/05/2020 C 07:15, Mukul Gandhi gandhi.mukul@xxxxxxxxx a C)critB : > On Mon, May 18, 2020 at 6:28 AM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx > <mailto:liam@xxxxxxxxxxxxxxxx> . . . Read full entry »


Re: return of the XSL FAQ

Posted 5/18/2020 5:15:01 AM

On Mon, May 18, 2020 at 6:28 AM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > The current version is at > https://www.delightfulcomputing.com/xslfaq/xsl/ Thank you for the link. The original XSL FAQ (of which above link is the copy) fr . . . Read full entry »


return of the XSL FAQ

Posted 5/18/2020 12:58:08 AM

I finally sat down for an hour or two and got the files Dave had sent me to build. I still need to do some editing (e.g. make sure there's no references left to it being on Dave's Web site) and then will put it up on gitlab so people can raise issues and/or send merge requests or pull requests, or . . . Read full entry »


Re: Anyone have XSLT that generates XML showing a Wind

Posted 5/13/2020 7:55:44 PM

Hi Roger, There are too-many characters that are allowed in a directory-name that will break the syntax for an XML element name: seems like any character except: (0 to 31)!codepoints-to-string(.), \, / , ?,:, *, ", <, >, | So you can have commas, whitespace (consecutive spaces), %, . . . Read full entry »


Re: Re: Anyone have XSLT that generates XML showing a

Posted 5/13/2020 5:53:47 PM

On Wed, 2020-05-13 at 15:38 +0000, Costello, Roger L. costello@xxxxxxxxx wrote: > Thank you John, Michael, Steven, and Dave. > > I decided to go the route that John suggested, and use the EXPath > File module. John was right, it was fairly easy to implement the > desired functionali . . . Read full entry »


Re: Anyone have XSLT that generates XML showing a Wind

Posted 5/13/2020 5:08:24 PM

That would be an easy transformation of the output from xml-dir-listing, which I use in a number of projects: https://code.google.com/archive/p/xml-dir-listing/ I hope this helps. . . . . . Ken At 2020-05-13 12:53 +0000, Costello, Roger L. costello@xxxxxxxxx wrote: Hi Folks, Do you have XSLT . . . Read full entry »


Re: Re: Anyone have XSLT that generates XML showing a

Posted 5/13/2020 4:23:54 PM

Am 13.05.2020 um 17:37 schrieb Costello, Roger L. costello@xxxxxxxxx: I decided to go the route that John suggested, and use the EXPath File module. John was right, it was fairly easy to implement the desired functionality using the EXPath File module. Below is what I created. It seems to work fin . . . Read full entry »


Re: Anyone have XSLT that generates XML showing a Wind

Posted 5/13/2020 3:37:28 PM

Thank you John, Michael, Steven, and Dave. I decided to go the route that John suggested, and use the EXPath File module. John was right, it was fairly easy to implement the desired functionality using the EXPath File module. Below is what I created. It seems to work fine. If you see any potential . . . Read full entry »


Re: exercise in complex grouping

Posted 5/13/2020 3:32:00 PM

Hey Syd, With apologies for lateness: maybe this is now "moot" in the American sense. But an idea. I would try this by writing a function: it could return a Boolean value, true() or false() depending on whether a node should be judged to be "sticky". f:sticky(.), in other word . . . Read full entry »


Re: Anyone have XSLT that generates XML showing a Wind

Posted 5/13/2020 2:08:18 PM

FAQ, section 4 1. Accessing a directory full of xml files. Francis Norton This is a pure DOS / XML / XSLT way of creating an XML file containing directory listing. It's based on my earlier solution which didn't tolerate embedded spaces in filenames. Warning. If a file name contains the ampersan . . . Read full entry »


Re: Anyone have XSLT that generates XML showing a Wind

Posted 5/13/2020 1:59:35 PM

Hans-JC<rgen Rennau did some work in this area: https://www.parsqube.de/en/publications/foxpath-for-selecting-files-and-folde rs/ Michael Kay Saxonica > On 13 May 2020, at 13:56, Costello, Roger L. costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Oops! Co . . . Read full entry »


Re: Anyone have XSLT that generates XML showing a Wind

Posted 5/13/2020 1:57:30 PM

Note that the btreeb command ( on Linux, or I have it installed on Mac via home-brew ) Has an option to output in XML format ( 'tree -X '). Not quite the exact format you want, but simpler to transform the format from this command than to walk the filesystem in XSLT. <?xml version="1.0 . . . Read full entry »


Re: Anyone have XSLT that generates XML showing a Wind

Posted 5/13/2020 12:59:10 PM

On 13/05/2020 13:52, Costello, Roger L. costello@xxxxxxxxx wrote: Do you have XSLT code that does this: Given a root folder, show all the subfolders and files within it, repeat for each subfolder. Example, for this folder structure: root persons local JohnDoe.xml . . . Read full entry »


Re: Anyone have XSLT that generates XML showing a Wind

Posted 5/13/2020 12:56:26 PM

Oops! Correction: For this folder structure: root persons local JohnDoe.xml MarySmith.xml remote BillAnderson.xml the XSLT code outputs this XML: <root> <persons> <local> JoeDoe.xml . . . Read full entry »


Anyone have XSLT that generates XML showing a Windows

Posted 5/13/2020 12:52:26 PM

Hi Folks, Do you have XSLT code that does this: Given a root folder, show all the subfolders and files within it, repeat for each subfolder. Example, for this folder structure: root persons local JohnDoe.xml MarySmith.xml remote BillAnderso . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/13/2020 8:48:31 AM

The cost of creating a thread (and handling its completion) here is far greater than the cost of the computation you are doing inside the thread (a single multiplication) so this result is no surprise. Multithreading only pays off when the amount of work done in each thread is quite substantial (wh . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/13/2020 3:27:45 AM

I played a little bit using *saxon:threads*: https://www.saxonica.com/html/documentation/extensions/attributes/threads.htm l , with the hope that this could lead to faster execution. The results are below, and they can be useful as a reference. With a source XML document of 1M elements, each of whi . . . Read full entry »


Re: exercise in complex grouping

Posted 5/12/2020 3:47:22 PM

To: Geert Bormans and David Carlisle From: Syd Re: complex grouping suggestions Gentlemen -- Thank you so much! As you might guess, it will take me awhile to work through your suggestions, tweak to match the actual data, and test. But I'm on it, and very appreciative. . . . Read full entry »


[ANN] Balisage Peer-reviewed Program Announced: late-

Posted 5/12/2020 3:27:51 PM

BALISAGE 2020 PROGRAM The peer-reviewed portion of the Balisage 2020 program has been set: https://www.balisage.net/2020/Program.html The Balisage 2020 program includes papers that discuss: XSLT regular expressions for Unicode, making high-quality Microsoft Word from XML, the expressive powers o . . . Read full entry »


Re: exercise in complex grouping

Posted 5/12/2020 12:08:04 PM

Syd, Single step appeared to be less complex then I assumed I worked out the pseudocode I suggested before (can do better on the inner works, but at least you get the idea) <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1 . . . Read full entry »


Re: exercise in complex grouping

Posted 5/12/2020 10:53:34 AM

I have assumed there are no complicated overlapping cases here but this works for the one case I tried which includes A before B and B before A <x> blah blah blah <d><e>blah</e> blah <B target="#A1">blort</B> <f>monkey</f> shines . . . Read full entry »


Re: exercise in complex grouping

Posted 5/12/2020 10:40:08 AM

Hi Syd, This might not be appealing if you are looking for beautiful code... I would make a two-pass 1st pass: group-starting-with B and make the C group when you find the matching A in the same group (could do that with a group-ending-with matching A on the current() group) 2nd pass: group-ending . . . Read full entry »


Re: exercise in complex grouping

Posted 5/12/2020 9:45:25 AM

Am 12.05.2020 um 11:34 schrieb Syd Bauman s.bauman@xxxxxxxxxxxxxxxx: I have a moderately sizable TEI file (~31,000 text nodes with ~100,400 "words" or ~688,000 characters; ~20,000 elements, ~15,000 attributes). Somewhere in all that mess there are a few pairs of elements for which I need . . . Read full entry »


exercise in complex grouping

Posted 5/12/2020 9:33:42 AM

I have a moderately sizable TEI file (~31,000 text nodes with ~100,400 "words" or ~688,000 characters; ~20,000 elements, ~15,000 attributes). Somewhere in all that mess there are a few pairs of elements for which I need some special processing. Say each pair is an <A> and a <B&g . . . Read full entry »


Re: Nested for-each-group and current-group()

Posted 5/11/2020 8:51:52 PM

Rick, Think on second group you want B <xsl:for-each-group select="current-group()/*"> Try this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSc . . . Read full entry »


Re: Nested for-each-group and current-group()

Posted 5/11/2020 4:36:00 PM

On Mon, 2020-05-11 at 15:47 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: > Hi, > > Alternatively, if you wish to continue using xsl:apply-templates > idiomatically and capture all nodes in traversal without the ungainly > "current-group()/node()", you could write > . . . Read full entry »


Re: Nested for-each-group and current-group()

Posted 5/11/2020 4:15:40 PM

On 11.05.2020 17:47, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: Hi, Alternatively, if you wish to continue using xsl:apply-templates idiomatically and capture all nodes in traversal without the ungainly "current-group()/node()", you could write <xsl:for-each select="current-group . . . Read full entry »


Re: Nested for-each-group and current-group()

Posted 5/11/2020 4:12:10 PM

If the tool gives you downvotes for using xsl:for-each, just switch to xsl:iterate instead. It won't improve your code, but it will earn you brownie points. These tools are designed to create perverse incentives, aren't they?? Michael Kay Saxonica > On 11 May 2020, at 16:47, Wendell Piez wapie . . . Read full entry »


Re: Nested for-each-group and current-group()

Posted 5/11/2020 3:46:57 PM

Hi, Alternatively, if you wish to continue using xsl:apply-templates idiomatically and capture all nodes in traversal without the ungainly "current-group()/node()", you could write <xsl:for-each select="current-group()"> <xsl:apply-templates/> </xsl:for-each&g . . . Read full entry »


Re: Nested for-each-group and current-group()

Posted 5/11/2020 3:43:23 PM

Hi Martin, That was the issue. Thank you very much. I had to modify things to get the list nesting correct as well. Here is the finished template: <xsl:template match="/root"> <root> <xsl:for-each-group select="*" group-adjacent="if(self . . . Read full entry »


Re: Nested for-each-group and current-group()

Posted 5/11/2020 2:44:17 PM

Am 11.05.2020 um 16:34 schrieb Rick Quatro rick@xxxxxxxxxxxxxx: I am using nested xsl:for-each-group constructs but I don't get the inner <ul> elements. I think I am incorrect in my use of current-grouping-key() or current-group() on the inner group. Thanks in advance. I think you need to pr . . . Read full entry »


Nested for-each-group and current-group()

Posted 5/11/2020 2:33:48 PM

Hi All, I have this as my input XML: <?xml version="1.0" encoding="UTF-8"?> <root> <topic> <para>topic 1</para> <subtopic> <para>subtopic 1a</para> </subtopic> &l . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/10/2020 6:53:34 PM

For reference on fast sequential algorithms for computing the dot product, see this: https://lemire.me/blog/2018/07/05/how-quickly-can-you-compute-the-dot-product-between-two-large-vectors/ On Sat, May 9, 2020 at 10:52 AM Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote: > Hi Roger, > . . . Read full entry »


Re: Joining list fragments

Posted 5/9/2020 7:07:15 PM

Folks, That piece of code by Gerrit is beautiful: https://github.com/gimsieke/join-list-fragments My personal original strategy was to pick the beginning of a broken list and then walk the following-sibling axis to collect all "joinable" list fragments. As Gerrit mentioned early on > . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/9/2020 5:52:59 PM

Hi Roger, > I need a super-efficient way to compute the sum of A[i] * B[i] for i=1 to n. In case you have n cores / processors, and the compiler knows to optimize functions like map(), zipWith() (for-each-pair() in XPath 3.0), then all processors can each do a corresponding multiplication in . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/9/2020 5:40:08 PM

On Sat, 2020-05-09 at 12:00 +0000, Costello, Roger L. costello@xxxxxxxxx wrote: > Hi Folks, > > I need a super-efficient way to compute the sum of A[i] * B[i] for > i=1 to n. The most efficient way to do something in computing is often to avoid doing it. So if it's a performance bottl . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/9/2020 4:45:26 PM

Thank you Michael, Michael, and Martin. I measured the performance of this: sum(for $i in 1 to count($A/col) return number($A/col[$i]) * number($B/col[$i])) and this: sum(for $i in 1 to count($A) return number($A [$i]) * number($B [$i])) in the latter, $A and $B holds the sequence of values in . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/9/2020 1:55:28 PM

I doubt you'll find much improvement on this. You could cut out the call on number() and rely on implicit conversion, but I doubt it makes any difference. You could factor out the expressions ($A/col) and ($B/col) into variables declared outside the loop, which might make a difference: finding th . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/9/2020 1:41:36 PM

On Sat, 2020-05-09 at 11:59 +0000, Costello, Roger L. costello@xxxxxxxxx wrote: > ... > I want to compute: > > (0.9 * 0.2) + (0.3 * 0.8) > > Here's one way to do it: > > sum(for $i in 1 to count($A/col) return number($A/col[$i]) * > number($B/col[$i])) > > I su . . . Read full entry »


Re: A super-efficient way to compute the sum of A[i] *

Posted 5/9/2020 12:18:48 PM

Am 09.05.2020 um 13:59 schrieb Costello, Roger L. costello@xxxxxxxxx: Hi Folks, I need a super-efficient way to compute the sum of A[i] * B[i] for i=1 to n. For example, suppose A is this: <row> <col>0.9</col> <col>0.3</col> </row> and B is this: < . . . Read full entry »


A super-efficient way to compute the sum of A[i] * B[i

Posted 5/9/2020 11:59:16 AM

Hi Folks, I need a super-efficient way to compute the sum of A[i] * B[i] for i=1 to n. For example, suppose A is this: <row> <col>0.9</col> <col>0.3</col> </row> and B is this: <row> <col>0.2</col> <col>0.8</col> . . . Read full entry »


Re: [ANN] Balisage 2020 Goes Virtual!

Posted 5/7/2020 10:45:46 PM

You are a total sweet heart, whose paper I am lookin forward to. Official confirmation will come RSN (we've been busy!) --dal > On May 7, 2020, at 6:40 PM, Peter Flynn peter@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On 07/05/2020 21:13, Tommie Usdin btusdin@x . . . Read full entry »


Re: [ANN] Balisage 2020 Goes Virtual!

Posted 5/7/2020 10:40:12 PM

On 07/05/2020 21:13, Tommie Usdin btusdin@xxxxxxxxxxxxxxxx wrote: VIRTUAL - Balisage will be an all virtual conference this year, no in-hotel meeting, just faces and presentations on screens. (Online platform to be named later.) I have updated the XML FAQ to reflect this. Peter . . . Read full entry »


[ANN] Balisage 2020 Goes Virtual!

Posted 5/7/2020 8:12:53 PM

VIRTUAL - Balisage will be an all virtual conference this year, no in-hotel meeting, just faces and presentations on screens. (Online platform to be named later.) FORMAT and SCHEDULE - We have an all new format and daily schedule this year because we will be attending from all over the planet: - . . . Read full entry »


Re: Line break algorithm

Posted 5/7/2020 6:02:26 AM

On Thu, 2020-05-07 at 00:30 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > Thank you Dr. Kay, having this set of rules is really useful. > > What about adding this to the relevant documentation, and, --> Dave > Pawson > <--, to the XSLT FAQ? the XSLT FAQ got a breath . . . Read full entry »


Re: Line break algorithm

Posted 5/7/2020 12:29:55 AM

Thank you Dr. Kay, having this set of rules is really useful. What about adding this to the relevant documentation, and, --> Dave Pawson <--, to the XSLT FAQ? > Firstly, it's true that the spec says nothing about how functions are implemented. This is a tricky area and we hit it a lot wi . . . Read full entry »


Re: Line break algorithm

Posted 5/6/2020 9:37:00 PM

> Saxon does this for templates, but I believe, not for all types of functions. In the past I raised this problem and Dr. Michael Kay said that at the time the XSLT WG didn't mandate recognizing and optimizing tail-recursion, because they didn't have a definition for "tail-recursion". . . . Read full entry »


Re: Line break algorithm

Posted 5/6/2020 7:14:27 PM

> I think Saxon for instance tries to optimize tail calls of > xsl:call-template so depending on how you write your recursive templates > you might not run into the problem of a stack overflow. Saxon does this for templates, but I believe, not for all types of functions. In the past I rai . . . Read full entry »


Re: Line break algorithm

Posted 5/6/2020 6:28:30 PM

On 06.05.2020 19:43, Terry Badger terry_badger@xxxxxxxxx wrote: Sort of forget every call creates a stack. Will look at xsl:interate but now thinking if must use V2 how I might solve the problem. I think Saxon for instance tries to optimize tail calls of xsl:call-template so depending on how you . . . Read full entry »


Re: Line break algorithm

Posted 5/6/2020 5:43:01 PM

Jirka, Thank you. Sort of forget every call creates a stack. Will look at xsl:interate but now thinking if must use V2 how I might solve the problem. Terry On Tuesday, May 5, 2020, 10:46:37 AM EDT, Jirka Kosek jirka@xxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: -----BEG . . . Read full entry »


Re: Joining list fragments

Posted 5/6/2020 6:25:49 AM

Ok, it turned out that some recursion is necessary. Michael (MC<ller-Hillebrand) sent me an updated test file and the expected results. As one can expect, the problem is even more complex than Michael's initial sample input suggests, due to the merging on multiple levels that is required. B . . . Read full entry »


Re: Line break algorithm

Posted 5/5/2020 2:46:02 PM

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 3.5.2020 21:31, Terry Badger terry_badger@xxxxxxxxx wrote: > So I am old fashion with V2 but recursion works for me: Please note that on larger strings recursion based solution can easily cause stack overflow. So if something can be written usin . . . Read full entry »


Re: Line break algorithm

Posted 5/4/2020 2:06:52 PM

For a more complete i18n-aware solution I integrated ICU4J's word and line break features into Saxon extensions in my DITA Community i18n project: https://github.com/dita-community/org.dita-community.i18n While this is set up to integrate with the DITA Open Toolkit, the Saxon extensions are gener . . . Read full entry »


Re: What is the default global context item?

Posted 5/4/2020 10:22:41 AM

It depends on the processor's API. For Saxon, we effectively have two kinds of API: legacy APIs where the "initial match selection" and "global context item" are the same thing, and 3.0-specific APIs where they are set independently. You need to read the specs for the particula . . . Read full entry »


What is the default global context item?

Posted 5/4/2020 9:53:47 AM

Hi all (and maybe especially <mailto:mike@xxxxxxxxxxxx> @Michael Kay) In implementing XSLT 3 conversions for XProc 3.0 pipelines we ran into this issue: What is the global context item for an XSLT 3.0 stylesheet when none is set explicitly? Ibve tried to find it in the XSLT 3 spec . . . Read full entry »


Re: Find the next item in a sequence

Posted 5/4/2020 12:12:26 AM

On Sun, 2020-05-03 at 20:00 +0000, David Carlisle d.p.carlisle@xxxxxxxxx wrote: > > position()+1 directly. Why can't I use position()+1 directly? > > [...] with a numeric value is short for [position()=...] so [ > position()+1] is short for [position()=position()+1] which is not an . . . Read full entry »


Re: Find the next item in a sequence

Posted 5/3/2020 7:59:29 PM

> position()+1 directly. Why can't I use position()+1 directly? [...] with a numeric value is short for [position()=...] so [ position()+1] is short for [position()=position()+1] which is not an error but is always false. David . . . Read full entry »


Re: Line break algorithm

Posted 5/3/2020 7:31:03 PM

Rick, So I am old fashion with V2 but recursion works for me: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" B B B version="3.0"> B B B <!-- badger 2020-05- . . . Read full entry »


Re: Find the next item in a sequence

Posted 5/3/2020 7:19:03 PM

Because the focus inside a predicate is different from the focus outside. Michael Kay Saxonicia > On 3 May 2020, at 19:12, Rick Quatro rick@xxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Why can't I use position()+1 directly? . . . Read full entry »


Re: Find the next item in a sequence

Posted 5/3/2020 6:11:59 PM

Yes, that did work. One curiosity: I have to set a variable for the next index ($next-index) instead of using position()+1 directly. Why can't I use position()+1 directly? Thank you very much. ... <xsl:variable name="next-index" select="position()+1"/> . . . Read full entry »


Re: Find the next item in a sequence

Posted 5/3/2020 5:14:41 PM

Yes, you would need to define a variable containing all the tokens (same as you would in xsl:for-each). Alternatively you could "look-behind" by setting an extra parameter $previous as you move through the list. Michael Kay Saxonica > On 3 May 2020, at 16:51, Rick Quatro rick@xxxxxx . . . Read full entry »


Find the next item in a sequence

Posted 5/3/2020 3:51:18 PM

Hi All, This is related to my previous question about a line-break algorithm. In my tokenized list, I want to "look-ahead" to the next member of the list. I tried .[position()+1] but this doesn't work. Do I need to set the tokenize($input) to a variable first? Thank you. Rick . . . Read full entry »


Re: Line break algorithm

Posted 5/3/2020 3:23:55 PM

Thank you Michael. This is my first use of xsl:iterate and very useful in understanding how it works. Here is my finished test stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x . . . Read full entry »


Re: Joining list fragments

Posted 5/3/2020 1:44:28 PM

There were two redundancies; I put a modified version into this Gist: https://gist.github.com/gimsieke/56311eee455bf43b2f685e9cfa699c37 On 03.05.2020 15:28, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: Ok, itbs a triply-nested grouping now (starting-with/adjacent/starting-with): <x . . . Read full entry »


Re: Joining list fragments

Posted 5/3/2020 1:28:12 PM

Ok, itbs a triply-nested grouping now (starting-with/adjacent/starting-with): <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:my="http://localhost/" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-p . . . Read full entry »


Re: Line break algorithm

Posted 5/3/2020 1:04:05 PM

Hi Rick, I pulled this function using regular expressions (assuming there are no inline elements present) from some past project (no XSLT 3, sorry): <!-- try to break a string at the latest space character before the defined width returns a sequence of strings --> <xsl:func . . . Read full entry »


Re: Joining list fragments (was: Handling position in

Posted 5/3/2020 10:07:16 AM

> On 3 May 2020, at 09:54, gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > This looks like a nested group-starting-with / group-adjacent to me at first glance. My reaction too. Of course the various options on xsl:for-each-group are "stereotypes&qu . . . Read full entry »


Re: Line break algorithm

Posted 5/3/2020 9:26:44 AM

If (like me) you find xsl:iterate easier to get right than recursive functions, then you could do something like <xsl:iterate select="tokenize($input)"> <xsl:param name="line-length" select="0"/> <xsl:choose> <xsl:when test="$line-le . . . Read full entry »


Re: Joining list fragments (was: Handling position in

Posted 5/3/2020 8:54:17 AM

This looks like a nested group-starting-with / group-adjacent to me at first glance. Sent from MailDroid -----Original Message----- From: "Michael MC<ller-Hillebrand mmh@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sent: Sun, 03 May . . . Read full entry »


Re: Joining list fragments (was: Handling position in

Posted 5/3/2020 8:33:14 AM

Am 02.05.2020 um 13:43 schrieb Michael Kay: > > You're talking about a solution, but I don't think you've told us what the problem is. What are you trying to achieve? Fair enough, sometimes one is so deep wrapping onebs thoughts around a detail problem, that the broader picture gets lost. . . . Read full entry »


Re: Line break algorithm

Posted 5/3/2020 1:05:24 AM

You could have a look at this -- just add the break at the end of each generated line: https://github.com/dnovatchev/FXSL-XSLT2/blob/master/f/strSplit-to-Lines.xsl This solution was posted in the xsl-list in 2002: https://www.oxygenxml.com/archives/xsl-list/200202/msg01247.html Cheers, Dimitr . . . Read full entry »


Line break algorithm

Posted 5/3/2020 12:45:12 AM

Hi All, I have lines in my input that I want to add <break> elements to in my output. For example, this might be the input: <xsl:param name="line" select="'Takeoff from Unlisted and Alternate Airports'"/> and I want to replace a space with a <break> . . . Read full entry »


Re: Is this the best way to compute a sigmoid function

Posted 5/2/2020 9:41:58 PM

TouchC)... being an engineer, I never benefitted from his lectures > > So the reason we calculate to 15 digits is not that we need 15 digits in the final answer, but rather because the errors accumulate, so if we want 5 digits in the final answer, we may need 15 digits in the intermediate st . . . Read full entry »


Re: Is this the best way to compute a sigmoid functio

Posted 5/2/2020 9:33:58 PM

It's a long time (almost 50 years!) since I studied numerical methods as an undergraduate, and while David Wheeler could be an incredibly boring lecturer, I do recall him demonstrating how repetitive numerical calculations could lose precision at an alarming rate. So the reason we calculate to 15 d . . . Read full entry »


Re: Is this the best way to compute a sigmoid functi

Posted 5/2/2020 8:53:11 PM

o;?Apart from determining the value of G or the fine constant, or a few other esoteric determination of funadamental constants, what practical issues require more than 7-8 significant figures of precision? Yes, some interplanetary differentials might at times. (Our moon recedes from us as fast as . . . Read full entry »


Re: Is this the best way to compute a sigmoid function

Posted 5/2/2020 7:27:01 PM

Hi Roger, In XPath 3 one can use the standard exp() function, see: https://www.w3.org/TR/xpath-functions-30/#func-math-exp As for the accuracy, here is what I get using the "Sigmoid calculator ( https://keisan.casio.com/exec/system/15157249643325): 0.6456563062257954529091 With FXSL out of . . . Read full entry »


Re: Is this the best way to compute a sigmoid function

Posted 5/2/2020 6:09:19 PM

> On 2 May 2020, at 18:55, Costello, Roger L. costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > I want to compute the result of evaluating this sigmoid function: > > 1 > ---------------- > (1 + e**-x) > > That is, compute 1 divided by . . . Read full entry »


Re: Is this the best way to compute a sigmoid function

Posted 5/2/2020 6:00:52 PM

On 02.05.2020 19:55, Costello, Roger L. costello@xxxxxxxxx wrote: Hi Folks, I have a variable $x that has a value such as 0.6 I want to compute the result of evaluating this sigmoid function: 1 ---------------- (1 + e**-x) That is, compute 1 divided by (1 + e raised to the -x power) Does y . . . Read full entry »


Is this the best way to compute a sigmoid function?

Posted 5/2/2020 5:55:28 PM

Hi Folks, I have a variable $x that has a value such as 0.6 I want to compute the result of evaluating this sigmoid function: 1 ---------------- (1 + e**-x) That is, compute 1 divided by (1 + e raised to the -x power) I am using the exp template in Dimitre's FXSL library. [Dimitre, incre . . . Read full entry »


Re: Handling position in non-atomic sequences

Posted 5/2/2020 11:43:34 AM

> On 2 May 2020, at 11:52, Michael MC<ller-Hillebrand mmh@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi folks, > > if a sequence stored in a variable consists of elements, we can not use the nice function index-of(). You can, but it might not do what you . . . Read full entry »


Re: Handling position in non-atomic sequences

Posted 5/2/2020 11:31:14 AM

You can keep the variable as a sequence of elements and declare a function like this: <xsl:function name="my:index-of" as="xs:integer*"> <xsl:param name="seq" as="node()*"/> <xsl:param name="nodes-in-question" as="nod . . . Read full entry »


Re: Handling position in non-atomic sequences

Posted 5/2/2020 10:57:33 AM

Am 02.05.2020 um 12:52 schrieb Michael MC<ller-Hillebrand mmh@xxxxxxxxx: Hi folks, if a sequence stored in a variable consists of elements, we can not use the nice function index-of(). Also, if the variable is typed as="element()*" I cannot use the axes preceding-sibling or following- . . . Read full entry »


Handling position in non-atomic sequences

Posted 5/2/2020 10:52:17 AM

Hi folks, if a sequence stored in a variable consists of elements, we can not use the nice function index-of(). Also, if the variable is typed as="element()*" I cannot use the axes preceding-sibling or following-sibling. I can solve that by not typing the variable or use as="docum . . . Read full entry »


XSL-List Guidelines

Posted 5/1/2020 2:25:02 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: import, include, and packages?

Posted 4/23/2020 5:03:52 PM

Thank you, Michael! On Thu, Apr 23, 2020 at 1:00 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > 1. I think the advantage of using <xsl:package> over <xsl:import> and > <xsl:include> for my case (importing a single function [ . . . Read full entry »


Re: import, include, and packages?

Posted 4/23/2020 5:00:28 PM

> 1. I think the advantage of using <xsl:package> over <xsl:import> and <xsl:include> for my case (importing a single function [but see below about arity]], from a package that does not import anything itself) is that I can expose only the function that I want to expose, and no . . . Read full entry »


import, include, and packages?

Posted 4/23/2020 3:36:56 PM

Dear XSL-list, I find myself writing my first importable XSLT function since the advent of XSLT 3.0, and I would be grateful if someone could advise me about best practicebor, at least, about pitfalls of which I should be aware. In the past I have used <xsl:include> and <xsl:import> . . . Read full entry »


Declarative Amsterdam Announcement

Posted 4/21/2020 7:44:08 AM

On 8 and 9 October 2020, The second Declarative Amsterdam conference will take place at CWI (Science Park, Amsterdam). The conference focuses on the technologies and methods used for declarative programming and declarative data. Declarative programming is a style of programming that expresses t . . . Read full entry »


[OT] New Slack workspace for XML discussions

Posted 4/16/2020 3:58:58 PM

Hopefully the moderators won't mind me posting this? I think it has value for readers of this list... Just a quick heads up in-case anyone is interested, there is now a new vendor neutral Slack Workspace for discussing all things XML related - https://www.xml.com/news/2020-04-slack-workspace-for-t . . . Read full entry »


[ANN] Balisage Call for Late-breaking News

Posted 4/15/2020 5:03:42 PM

Call for Late-breaking News: Balisage 2020 Paper proposals for Balisage 2020 are being peer reviewed now. The preliminary program will be announced in mid-May. That preliminary program will include a few spaces for late-breaking news. If you want to speak at Balisage 2020 and have not sent in a . . . Read full entry »


Re: [ANN] First Pre-Release of VSCode Extension for XS

Posted 4/10/2020 5:22:45 PM

Well done, and a nice present for us all just now! --Debbie > On Apr 10, 2020, at 7:58 AM, Philip Fearon pgfearo@xxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Dear list, > > We're pleased to announce the first pre-release of XPath-Embedded, an > exten . . . Read full entry »


[ANN] First Pre-Release of VSCode Extension for XSLT

Posted 4/10/2020 11:58:07 AM

Dear list, We're pleased to announce the first pre-release of XPath-Embedded, an extension for the VSCode. The initial focus is on providing XSLT language features for this popular code editor. XPath-Embedded is an open-source project managed by DeltaXML. Here are the base features for this early . . . Read full entry »


Re: What does //distinct-values(...) mean?

Posted 4/9/2020 10:15:27 AM

On Thu, Apr 9, 2020 at 1:49 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: Sorry, but that's wrong. The semantics are crystal-clear, just as the > semantics of //name() are crystal clear. The expression might be useless, > and its effect might be non . . . Read full entry »


Re: What does //distinct-values(...) mean?

Posted 4/9/2020 8:19:06 AM

> The above XPath productions clearly shows that, the following XPath expression > //distinct-values(..) > > is allowed by the XPath language. Yes, that's undisputed, just as (say) //name() is allowed and returns a sequence containing the names of all nodes. > > The signature of . . . Read full entry »


Re: What does //distinct-values(...) mean?

Posted 4/9/2020 4:54:38 AM

On Wed, Apr 8, 2020 at 6:42 PM Costello, Roger L. costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I thought that // operates on nodes. The distinct-values function doesn't > return nodes, does it? I thought it returns a sequence of strings. If so, > then how . . . Read full entry »


Re: What does //distinct-values(...) mean?

Posted 4/8/2020 1:25:27 PM

With XPath 2 and later, any path expression selecting nodes can have a last step applying a function returning non-node values so like you can use e.g. B //date/xs:dateTime(.) calling `xs:dateTime` for each `date` element selected earlier you can use B //distinct-values(...) to apply the d . . . Read full entry »


Re: What does //distinct-values(...) mean?

Posted 4/8/2020 1:21:51 PM

Martin didn't say that it operated on a sequence of strings. He explained that the "//" operator expands to address a bunch of nodes, and then the distinct-values() function is evaluated from each of those nodes. XPath is evaluated from left to right and the "//" is evaluate . . . Read full entry »


Re: What does //distinct-values(...) mean?

Posted 4/8/2020 1:20:26 PM

One more reason to avoid the // abbreviation completely! Of course, when designing XPath 1.0 they wouldn't have an idea what was about to come in the next versions :) Cheers, Dimitre On Wed, Apr 8, 2020 at 5:25 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx&g . . . Read full entry »


Re: What does //distinct-values(...) mean?

Posted 4/8/2020 1:12:38 PM

Hi Martin, But, but, but, ... I thought that // operates on nodes. The distinct-values function doesn't return nodes, does it? I thought it returns a sequence of strings. If so, then how can // operate on a sequence of strings? /Roger -----Original Message----- From: Martin Honnen martin.honnen . . . Read full entry »


Re: What does //distinct-values(...) mean?

Posted 4/8/2020 12:25:27 PM

Am 08.04.2020 um 14:19 schrieb Costello, Roger L. costello@xxxxxxxxx: Hi Folks, I executed this XPath query in Oxygen: //distinct-values(//Row[matches(Advertiser, 'TS3', 'i')]/Subscribers) The two slashes at the beginning were an accident. At the bottom of the screen Oxygen shows the matches. Al . . . Read full entry »


What does //distinct-values(...) mean?

Posted 4/8/2020 12:18:50 PM

Hi Folks, I executed this XPath query in Oxygen: //distinct-values(//Row[matches(Advertiser, 'TS3', 'i')]/Subscribers) The two slashes at the beginning were an accident. At the bottom of the screen Oxygen shows the matches. All of a sudden it showed 111,000 matches, then a moment later 438,000 m . . . Read full entry »


Re: How to read an XML file that is in a subfolder or

Posted 4/7/2020 3:26:05 PM

On Tue, 7 Apr, 2020, 8:29 PM Wendell Piez wapiez@xxxxxxxxxxxxxxx, < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > In Saxon, also, when consuming a path to a directory, the collection() > function accepts a 'recurse' option, which could be used to return > such a file. > > . . . Read full entry »


Re: How to read an XML file that is in a subfolder or

Posted 4/7/2020 2:59:16 PM

Roger, In Saxon, also, when consuming a path to a directory, the collection() function accepts a 'recurse' option, which could be used to return such a file. collection('file:///path/to/files?recurse=yes;select=filelist.xml') Of course you might get more than one filelist.xml this way. Cheers, . . . Read full entry »


Re: How to read an XML file that is in a subfolder or

Posted 4/7/2020 1:14:02 PM

Assuming your processor can map a file system directory to a collection, you can use the fn:uri-collection() function to get all the URIs of files in the collection and then search them to find the one you are looking for. An alternative would be to use the functions in the EXPath file module, whi . . . Read full entry »


Re: How to read an XML file that is in a subfolder or

Posted 4/7/2020 1:11:54 PM

On 07/04/2020 14:06, Costello, Roger L. costello@xxxxxxxxx wrote: Hi Folks, My XSLT program has a variable $filename which contains the name of an XML file. The XML file is in a folder named "files" or one of its subfolders or one of its sub-subfolders or one of its sub-sub-subfolders or . . . Read full entry »


How to read an XML file that is in a subfolder or sub

Posted 4/7/2020 1:05:47 PM

Hi Folks, My XSLT program has a variable $filename which contains the name of an XML file. The XML file is in a folder named "files" or one of its subfolders or one of its sub-subfolders or one of its sub-sub-subfolders or ... In other words, it's somewhere in the tree of folders rooted . . . Read full entry »


Re: tokenize a string with escaped spaces

Posted 4/4/2020 8:24:02 AM

Double-quotes in an XML attribute value should be written as `&quot;`. Also remember that this is an attribute value template, so curly braces need special treatment. I often write such things as <xsl:variable name="regex">\S*('[^']*')?("[^"]*")?</xsl:variabl . . . Read full entry »


Re: tokenize a string with escaped spaces

Posted 4/4/2020 2:58:05 AM

I found that this works for my purposes: <xsl:analyze-string select="$outputclass" regex="\S+'[^']*'"> <xsl:matching-substring> <xsl:message><xsl:value-of select="."/></xsl:message> </xsl:matching-substring> </ . . . Read full entry »


Re: tokenize a string with escaped spaces

Posted 4/4/2020 1:17:10 AM

Thanks Michael. The double quotes " in the regex give errors in this context: <xsl:analyze-string select="$attr" regex="\S*('[^']*')?("[^"]*")?"> Should those be single quotes instead? Or should I put the regex in a variable? On 4/3/2020 4:38 PM, M . . . Read full entry »


Re: tokenize a string with escaped spaces

Posted 4/3/2020 11:38:31 PM

Try using xsl:analyze-string with a regex of \S*('[^']*')?("[^"]*")? I've had to guess at your specification from your single example, but you should be able to adapt it if the spec is different. You could also extend the regex to pick up the keyword (before '=') and value (after . . . Read full entry »


tokenize a string with escaped spaces

Posted 4/3/2020 11:17:23 PM

I am tokenizing an XML attribute that has info I need in it. Example: myattr="ng-model=mymodel ng-show-mymodel=='Radio button 1'" So I want to tokenize into these two values: ng-model=mymodel ng-show='Radio button 1' Using white space like tokenize($attr, '\s') gives me this, not what . . . Read full entry »


Pluralsight Free-April -- all courses free this month

Posted 4/2/2020 5:29:31 PM

Pluralsight announced Free April -- yes a whole free month for individuals: http:// <https://t.co/Dz9YQtIE9L?amp=1> https://www.pluralsight.com/offer/2020/free-april-month This isn't unrelated topic, as it could seem, due to the presence of a number of XML / XSLT / XPath courses (this list . . . Read full entry »


[ANN] Reminder - Balisage Papers Due April 6

Posted 4/2/2020 1:38:22 PM

GEOGRAPHY IS NOT A BARRIER TO PARTICIPATION IN BALISAGE 2020! Paper submission are due 6 April 2020 (with short extensions available on request). More info: About Balisage: https://www.balisage.net/index.html <https://www.balisage.net/index.html> Call for Participation: https://www.balisag . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 4/2/2020 1:05:15 PM

Hey Mukul: Expressing "Two hours and a half" is not so hard: xs:dayTimeDuration('PT1H') * 2.5 returns (as a duration) PT2H30M Makes sense to me. Cheers, Wendell On Thu, Apr 2, 2020 at 8:06 AM Mukul Gandhi gandhi.mukul@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 4/2/2020 12:06:07 PM

On Thu, Apr 2, 2020 at 3:32 PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Do you consider 2.5 an unsigned integer? It is not. > The following, results in an error, <xsl:variable name="dt1" select="xs:dayTimeDuration('PT5H' . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 4/2/2020 10:02:36 AM

Am 02.04.2020 um 11:35 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx: On Thu, Apr 2, 2020 at 12:46 PM Michael Kay mike@xxxxxxxxxxxx <mailto:mike@xxxxxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: Surely the error messa . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 4/2/2020 9:34:55 AM

On Thu, Apr 2, 2020 at 12:46 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Surely the error message is pretty clear? > > See https://www.w3.org/TR/xmlschema-2/#duration > > B'3.2.6.1 The values of the Year, Month, Day, Hour and Minu . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 4/2/2020 7:16:48 AM

> Error at char 28 in expression in xsl:value-of/@select on line 10 column 69 of trf1.xsl: > FORG0001 Invalid duration value 'PT2.5H' (H is out of sequence) > In template rule with match="/" on line 8 of trf1.xsl > Invalid duration value 'PT2.5H' (H is out of sequence) &g . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 4/2/2020 5:03:48 AM

Hi Martin, On Tue, Mar 31, 2020 at 1:34 PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: In general, if you want the difference in seconds, I would suggest to use div xs:dayTimeDuration('PT1S') for minutes div xs:dayTimeDuration('PT1M') or for ho . . . Read full entry »


XSL-List Guidelines

Posted 4/1/2020 3:06: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: Parsing XPath in XSLT?

Posted 4/1/2020 1:22:46 PM

Dear Gerrit, Thanks indeed for the thorough analysis. I had gotten so far as to detect the XPath 1.0 EBNF wasn't complete, but no further. You have shown me the way. And what a beautiful PR! Best regards -- Wendell OT - hey can I mention how inspiring the current work is with XProc 3.0! Very m . . . Read full entry »


Re: Parsing XPath in XSLT?

Posted 3/31/2020 11:45:19 PM

Hi Wendell, After comparing your XPath 1 EBNF with the XQuery 1.0 EBNF, I thought that there must be some incantation in the latter that makes REx understand patterns such as [^"]*. I analyzed the strange error message about EquivalenceLookAhead that came with 'Literal'. It dawned on me t . . . Read full entry »


Re: Parsing XPath in XSLT?

Posted 3/31/2020 7:36:18 PM

Dear XSL-List, Last week readers helped me with this interesting question of parsing a formal language (specifically XPath) in XSLT. A couple of you (John L, Christophe) pointed me to Gunther Rademacher's awesome work on the REx parser generator. This is good stuff and I was indeed able to get XP . . . Read full entry »


Re: Why? A function that computes atomic values should

Posted 3/31/2020 2:02:42 PM

When you write <xsl:function name="f:test" as="xs:boolean"> <xsl:value-of select="2 + 2 = 4"/> </xsl:function> the expression in the select attribute returns the boolean value true. The xsl:value-of instruction first converts this to the string &q . . . Read full entry »


Re: Why? A function that computes atomic values should

Posted 3/31/2020 1:57:23 PM

On Tue, Mar 31, 2020 at 01:40:19PM -0000, Costello, Roger L. costello@xxxxxxxxx scripsit: > Hi Folks, > > I have a function that returns a xs:boolean. I used xs:value-of to return the value. Saxon 9.9.1.5 gives this warning message: > > A function that computes atomic values > . . . Read full entry »


Re: Why? A function that computes atomic values should

Posted 3/31/2020 1:56:44 PM

Am 31.03.2020 um 15:40 schrieb Costello, Roger L. costello@xxxxxxxxx: I have a function that returns a xs:boolean. I used xs:value-of to return the value. Saxon 9.9.1.5 gives this warning message: A function that computes atomic values should use xsl:sequence rather than xsl:value-of Why? Why . . . Read full entry »


Why? A function that computes atomic values should use

Posted 3/31/2020 1:40:13 PM

Hi Folks, I have a function that returns a xs:boolean. I used xs:value-of to return the value. Saxon 9.9.1.5 gives this warning message: A function that computes atomic values should use xsl:sequence rather than xsl:value-of Why? Why should a function use xsl:sequence? I don't recall ever s . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/31/2020 8:04:15 AM

Am 31.03.2020 um 07:01 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx: On Mon, Mar 30, 2020 at 5:31 PM Michael Kay mike@xxxxxxxxxxxx <mailto:mike@xxxxxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: I now have following XSLT . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/31/2020 5:01:28 AM

On Mon, Mar 30, 2020 at 5:31 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: I now have following XSLT stylesheet with me, <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.o . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/30/2020 4:55:32 PM

I posted that at the beginning of the thread within minutes of Martin's response: https://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/202003 /msg00084.html At 2020-03-30 13:21 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: So you really missed this simple solution:B <htt . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/30/2020 4:37:57 PM

Martynas, just wanted to point out - that Saxon documentation link you gave is for the standard http://www.w3.org/2005/xpath-functions/math namespace function math:sqrt() Where as you were after the EXSLT http://exslt.org/math namespace function, found at: http://www.saxonica.com/html/document . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/30/2020 1:20:12 PM

So you really missed this simple solution: https://stackoverflow.com/a/3468123/36305 ( current-dateTime() - xs:dateTime('1970-01-01T00:00:00') ) div xs:dayTimeDuration('PT1S') On Mon, Mar 30, 2020 at 4:51 AM Mukul Gandhi gandhi.mukul@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/30/2020 12:01:24 PM

> The following finally works for me, > > > <xsl:function name="fn0:minsFromdiffDTduration" as="xs:decimal"> > <xsl:param name="diffDTduration" as="xs:dayTimeDuration"/> > > <xsl:variable name="yrsDur . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/30/2020 11:57:13 AM

Am 30.03.2020 um 13:51 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx: On Mon, Mar 30, 2020 at 12:23 PM Martin Honnen martin.honnen@xxxxxx <mailto:martin.honnen@xxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: Am 30.03.2020 . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/30/2020 11:50:56 AM

On Mon, Mar 30, 2020 at 12:23 PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Am 30.03.2020 um 08:49 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx: > > Here you have used the wrong prefix "xs" again, instead you want > < . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/30/2020 6:56:17 AM

In addition, you might need to cast $totalSecs to a string if the function is supposed to return a string. But you will notice it anyway once you fixed xs:sequence. On 30.03.2020 08:53, Martin Honnen martin.honnen@xxxxxx wrote: B B B B B <xs:sequence select="$totalSecs"/> Here . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/30/2020 6:53:21 AM

Am 30.03.2020 um 08:49 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx: Hi Mike, B B Thanks for the pointer. xs:value-of was one of the erroneous instructions I was mentioning within my stylesheet, instead of xsl:value-of. I've now corrected that, and below is my XSLT stylesheet as of now, <xsl:s . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/30/2020 6:49:13 AM

Hi Mike, Thanks for the pointer. xs:value-of was one of the erroneous instructions I was mentioning within my stylesheet, instead of xsl:value-of. I've now corrected that, and below is my XSLT stylesheet as of now, <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/29/2020 9:35:00 AM

Thank you for the suggestions. The stylesheets are currently 2.0 because they are also reused on the client-side with Saxon-CE. Which means standard math: functions and random-number-generator() are not available. I will definitely want to upgrade them to 3.0, but waiting for Saxon-JS 2.0 to do th . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/29/2020 9:09:54 AM

d that namespace in the first place. > > I think the standardized random-number-generator > https://www.saxonica.com/html/documentation/functions/fn/random-number-genera tor.html > is now also supported in Saxon 10 HE. Yes. It's not quite as convenient as math:random() because it's des . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/29/2020 9:05:06 AM

Am 29.03.2020 um 10:57 schrieb Martynas JuseviD ius martynas@xxxxxxxxxxxxx: Thanks Martin. It makes more sense to use the standard functions of course. But I'm still missing EXSLT's math:abs() and math:random(). I guess that's why I used that namespace in the first place. And "abs" is al . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/29/2020 9:01:26 AM

Am 29.03.2020 um 10:57 schrieb Martynas JuseviD ius martynas@xxxxxxxxxxxxx: Thanks Martin. It makes more sense to use the standard functions of course. But I'm still missing EXSLT's math:abs() and math:random(). I guess that's why I used that namespace in the first place. I think the standardized . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/29/2020 8:56:54 AM

Thanks Martin. It makes more sense to use the standard functions of course. But I'm still missing EXSLT's math:abs() and math:random(). I guess that's why I used that namespace in the first place. On Sun, Mar 29, 2020 at 10:37 AM Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxx . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/29/2020 8:37:08 AM

Am 29.03.2020 um 10:32 schrieb Martynas JuseviD ius martynas@xxxxxxxxxxxxx: I'm mostly interested in math functions: https://www.saxonica.com/html/documentation/functions/math/ For example, the documentation for math:sqrt() says "Available in XPath 3.0, XSLT 3.0, XQuery 3.0, and later versions . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/29/2020 8:32:21 AM

I'm mostly interested in math functions: https://www.saxonica.com/html/documentation/functions/math/ For example, the documentation for math:sqrt() says "Available in XPath 3.0, XSLT 3.0, XQuery 3.0, and later versions. From Saxon 9.6, available in all editions." However, after switchin . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/29/2020 7:59:26 AM

> That's interesting to know. > > Is this also the reason EXSLT functions are not available anymore? > The general policy is: core conformance to standards in Saxon-HE, optional features and extensibility features in Saxon-PE, performance optimizations and advanced features (streaming, . . . Read full entry »


Re: [ANN] Saxon 10.0 (today's other news..)

Posted 3/28/2020 11:10:17 PM

That's interesting to know. Is this also the reason EXSLT functions are not available anymore? On Mon, Mar 16, 2020 at 10:46 PM Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > One question: does Saxon-HE not support extension functions, or has & . . . Read full entry »


Re: difference between an integer and current-dateTime

Posted 3/28/2020 12:02:12 PM

It should be xsl:value-of, not xs:value-of. As written, xs:value-of is a literal result element, which finds its way into the result tree, but is then discarded on serialization because that's what the text output method does with element nodes. Michael Kay Saxonica (Had me puzzled for a while.. . . . Read full entry »



PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

What's New for X14?

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

Ask Someone You Know

Does your company use Stylus Studio? Do your competitors? Engineers from over 100,000 leading companies use Stylus Studio, and now you can ask someone from your own organization about their experiences using Stylus Studio.

 
Free Stylus Studio XML Training:
W3C Member