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

The XSL-LIST Blog

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


Re: can I *undefine* an attribute via xsl:attribute?

Posted 8/3/2020 1:53:09 PM

Chris, Maybe what you had mixed up is the difference between creating an attribute and adding an attribute to the result tree. Once you've added an attribute to the result tree, you can't remove it, or it wouldn't be the result tree. You can certainly add an attribute to a temporary tree, then co . . . Read full entry »


Re: Performance results of an XML-based neural network

Posted 8/2/2020 7:26:35 AM

I'm hoping to find time to investigate this (though it's not top of my priority list: next week I've got a lot of croquet planned...). I've opened a tracker at https://saxonica.plan.io/issues/4663 and if you're interested in the investigation or its conclusions, please follow it there. There's a . . . Read full entry »


Re: The time to execute a function is 625 times greate

Posted 8/1/2020 9:03:52 PM

Roger, since everyone is speculating about the causes, if you can package up the test cases you are measuring so I can run them, then I'll take a look and see if I can come up with an explanation. My own guess is that it's likely to be something none of have thought of (based on my experience that . . . Read full entry »


Re: The time to execute a function is 625 times greate

Posted 8/1/2020 8:51:34 PM

On Sat, 2020-08-01 at 19:04 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > I am having great difficulty determining why my XSLT neural network > program runs so slow. I am currently focusing on the f:train > function. The Saxon profile tool reports the gross total . . . Read full entry »


Re: The time to execute a function is 625 times greate

Posted 8/1/2020 7:57:38 PM

On Sat, Aug 01, 2020 at 07:03:35PM -0000, Roger L Costello costello@xxxxxxxxx scripsit: > To see how much time each statement in f:train takes, Michael > M|ller-Hillebrand suggested that I put each statement into its own > function. Great idea! I did so. I ran the Saxon profile tool on the . . . Read full entry »


Re: The time to execute a function is 625 times greate

Posted 8/1/2020 7:12:36 PM

With performance the devil is always in the detail. Without knowing the detail, we can't help you find the explanation. It's not intrinsically surprising that two different ways of writing the same code should exhibit very different performance. If I were analyzing this myself, my next step would . . . Read full entry »


The time to execute a function is 625 times greater th

Posted 8/1/2020 7:03:29 PM

Hi Folks, I am having great difficulty determining why my XSLT neural network program runs so slow. I am currently focusing on the f:train function. The Saxon profile tool reports the gross total time for one call to the f:train function is 5,460.326 ms. To see how much time each statement in f:t . . . Read full entry »


Re: Thoughts about the "Asynchronous XSLT"

Posted 8/1/2020 5:41:17 PM

> Thanks for the suggestion, I will certainly look into this. Thank you Dr. Kay. For anyone interested to learn about Reactive Extensions, here are a few resources: RxJS in Action, https://www.manning.com/books/rxjs-in-action - *.NET Reactive Extensions Fundamentals 1.0*, Pluralsight co . . . Read full entry »


Re: can I *undefine* an attribute via xsl:attribute?

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

The essence of the XSLT model is that there is no bdeleteb operation, merely a bdecline to copyb so you have to copy attributes except the one you wish to remove/undefine/delete. John Lumley john@xxxxxxxxxxxxxx > On 1 Aug 2020, at 16:47, G. Ken Holman g.ken.holman@xxxxxxxxx <xsl-list-se . . . Read full entry »


XSL-List Guidelines

Posted 8/1/2020 4:05:51 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: can I *undefine* an attribute via xsl:attribute?

Posted 8/1/2020 3:47:33 PM

One cannot "undefine" an added attribute, but when I know I might have to do so, I put the attributes in a temporary home and then work from there. I hope this helps. . . . . . Ken ~/t $ cat j.xsl <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xml . . . Read full entry »


can I *undefine* an attribute via xsl:attribute?

Posted 8/1/2020 3:03:14 PM

Hi all, I would like to call a template that creates various attributes, then conditionally *undefine* certain attributes, using some **MAGIC** below: <xsl:template name="create-my-attributes> <xsl:call-template name="create-their-attributes"/> <xsl:attribute nam . . . Read full entry »


Re: [Slightly Off Topic] mail server

Posted 8/1/2020 10:56:46 AM

[new thread] On 01/08/2020 07:54, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote:> The background for the change in policy is here: > https://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/201404/msg00131.html I remember reading it and being baffled that it was a . . . Read full entry »


Re: Thoughts about the "Asynchronous XSLT"

Posted 8/1/2020 7:43:53 AM

Thanks for the suggestion, I will certainly look into this. My instinct to use promises was because we're primarily interested in retrieving external resources, which is inevitably done by calling out to Javascript APIs, and most of those APIs these days manage the asynchrony using JavaScript pro . . . Read full entry »


Re: [Slightly Off Topic] mail server [was: Re: Source

Posted 8/1/2020 6:53:40 AM

The background for the change in policy is here: https://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/201404/msg00131.html I don't know how other lists manage to continue distributing posts by original sender address while simultaneously preserving the messages from falling pr . . . Read full entry »


Thoughts about the "Asynchronous XSLT"

Posted 8/1/2020 3:08:43 AM

First of all, congratulations to the Balisage organizers for organizing this conference even in the current situation. I read Dr. Kay's paper "Asynchronous XSLT" from the proceedings of Balisage-2020: https://www.balisage.net/Proceedings/vol25/html/Kay01/BalisageVol25-Kay01.html While . . . Read full entry »


Re: [Slightly Off Topic] mail server [was: Re: Source

Posted 8/1/2020 12:27:35 AM

This kind of thing: From: Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> has always baffled me. I'm sure there were valid reasons for wanting to do this. The fact that no other list does it continues to puzzle me, but as my MUA elides it correctl . . . Read full entry »


Re: [Slightly Off Topic] mail server [was: Re: Source

Posted 7/31/2020 9:53:36 PM

Yes, it's all about what happens when people start spoofing. Then: watch out. -- Gerrit -----Original Message----- From: Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, July 31, 2020 9:25 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject . . . Read full entry »


Re: [Slightly Off Topic] mail server [was: Re: Source

Posted 7/31/2020 1:24:35 PM

I remember when Mulberry needed to take the difficult decision to change the sender of each and every message to <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> (albeit prefixed with the sender's name and actual email address). The best solution for your and John's email clients would be if the . . . Read full entry »


[Slightly Off Topic] mail server [was: Re: Source code

Posted 7/31/2020 1:16:21 PM

Hi Wendell, Don't worry, I get all my messages from Abel (as Gerrit pointed out) I experience similar issues as John does, I need to see my iPad or phone to know the sender of a message I guess Gerrit is not too far of suggesting that the first ever message I received from this address could have . . . Read full entry »


Re: Source code formatting

Posted 7/31/2020 1:09:01 PM

Same problem here, George. Your message was ostensibly sent from the ominous "Wendell Piez"! On 31.07.2020 15:02, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx wrote: John and XSL-List, I don't know whether to be charmed or horrified. So who else gets all their XSL-List messages fr . . . Read full entry »


Re: Source code formatting

Posted 7/31/2020 1:02:41 PM

John and XSL-List, I don't know whether to be charmed or horrified. So who else gets all their XSL-List messages from me? (You don't have to answer if you really don't think it's on topic.) Regards, Wendell -----Original Message----- From: John Lumley john@xxxxxxxxxxxx <xsl-list-service@xxxx . . . Read full entry »


Re: Balisage Bard: On performance, persistence, and p

Posted 7/31/2020 1:01:20 PM

> On 31 Jul 2020, at 13:23, Michele R Combs mrrothen@xxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > What a delight!! It's positively Seussian :) May I share to another list? > Sure, share it anywhere. I don't intend to earn a living by writing poetry... Michael . . . Read full entry »


Re: Balisage Bard: On performance, persistence, and p

Posted 7/31/2020 12:23:15 PM

What a delight!! It's positively Seussian :) May I share to another list? Michele > > On 31 Jul 2020, at 4:24 am, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > For those who weren't there, and those who were and can bear hearing it again, . . . Read full entry »


Re: Thank You, Michael Kay!

Posted 7/31/2020 11:24:05 AM

I just wish all conferences were recorded and made open access even after some years of embargo. There's just so much knowledge in some people's minds. Em qui, 30 de jul de 2020 21:20, Debbie Lapeyre dalapeyre@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> escreveu: > Balisa . . . Read full entry »


Thank You, Michael Kay!

Posted 7/31/2020 12:20:11 AM

Balisage cannot formally post Bard poems, but the author is free to spread it far and wide. And you did, and it is beautiful. A wonderful story! Thank you so very much! --Debbie ================================================================ Deborah A Lapeyre mailto:dalapeyre@xxx . . . Read full entry »


Re: Balisage Bard: On performance, persistence, and p

Posted 7/31/2020 12:02:37 AM

parent pointers: rather have them and not need them, than need them and not have them... but either way, the optimizer better know my 'haves' from my 'needs' :) On Thu, Jul 30, 2020 at 4:38 PM Damian Morris damian@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > This is . . . Read full entry »


Re: Balisage Bard: On performance, persistence, and p

Posted 7/30/2020 11:38:54 PM

This is fabulous, Michael :) On 31 Jul 2020, at 4:24 am, Michael Kay mike@xxxxxxxxxxxx<mailto:mike@xxxxxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list-service@xxxxxxxxxxxx rytech.com>> wrote: For those who weren't there, and those who were and can bear heari . . . Read full entry »


Balisage Bard: On performance, persistence, and pointe

Posted 7/30/2020 6:24:30 PM

For those who weren't there, and those who were and can bear hearing it again, here's my contribution to the famous Balisage Bard session. It's an abridged version of my XML Prague 2018 paper, and describes work done during the development of the XSLT compiler now released as part of Saxon-JS 2. . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 12:58:18 PM

On Thu, Jul 30, 2020 at 5:23 PM Willem Van Lishout willemvanlishout@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Attribute-value normalization seems to replace the CR with a space, so I > think that is expected behavior. > You're right. The following XSD document, . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 11:53:19 AM

Attribute-value normalization seems to replace the CR with a space, so I think that is expected behavior. Willem Van Lishout willemvanlishout@xxxxxxxxx On Thu, Jul 30, 2020 at 1:44 PM Mukul Gandhi gandhi.mukul@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Thu, Jul 3 . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 11:43:46 AM

On Thu, Jul 30, 2020 at 4:00 PM Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I'd really appreciate if xerces had an option to deactivate attribute > normalization that can be set by a Saxon configuration option or a > command li . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 10:38:46 AM

On Thu, 30 Jul 2020 at 11:30, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I'd really appreciate if xerces had an option to deactivate attribute > normalization that can be set by a Saxon configuration option or a > command . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 10:30:34 AM

I'd really appreciate if xerces had an option to deactivate attribute normalization that can be set by a Saxon configuration option or a command line switch. I don't know how responsive/welcoming the Apache XML maintainers are if someone of us submitted a patch, in particular if it's a patch th . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 10:23:57 AM

It seems it has a different meaning from what I thought. It actually means changing a program's behavior at runtime. What I meant was simply commenting out the relevant code rather than coming up with a nicer solution... The more you know. Willem On Jul 30, 2020, 12:12, at 12:12, "Michael . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 10:11:53 AM

It's a new one on me too, but it's in the dictionary: https://www.yourdictionary.com/monkey-patch Not sure what the difference is from a regular patch. Michael Kay Saxonica > On 30 Jul 2020, at 10:51, Michele R Combs mrrothen@xxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 9:50:56 AM

"monkey patch" ? Michele Sent from Nine<http://www.9folders.com/> ________________________________ From: "Willem Van Lishout willemvanlishout@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, July 30, 2020 4:07 AM To: xsl-list@xxxxxxxxxxxxxxxxxxx . . . Read full entry »


Re: Source code formatting

Posted 7/30/2020 8:06:44 AM

Thanks everyone. What I did is monkey patch Xerces to skip the normalization for attributes. I still end up with &#10; instead of actual carriage returns, but it seems I can fix that in XSLT by using a character map. In my research I found out that the .NET XmlTextReader class allows disabling . . . Read full entry »


Re: Source code formatting

Posted 7/29/2020 11:19:52 AM

Agreed, the attribute normalization spec is an absolute pain, and being able to switch it off would have many benefits and no adverse consequences I can foresee. Michael Kay Saxonica > On 29 Jul 2020, at 09:27, Pieter Lamers pieter.lamers@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxx . . . Read full entry »


Re: Source code formatting

Posted 7/29/2020 8:27:11 AM

I have the same problem when storing XSLT documents in eXist-db. Attribute normalization also kills whitespace there because the spec says whitespace should be ignored in attribute values (and eXist-db normalizes against the spec). Isn't it about time to change the spec in this respect? Pieter . . . Read full entry »


Re: Source code formatting

Posted 7/29/2020 5:44:07 AM

I have exactly the same problem with xsl-list read on my iPad... all the messages now appear from Wendell Piez, so unless there is identification of originator in the message body, I have no firm idea of who is the sender.... Unless, as in this case, I compose a reply. Ok on Thunderbird on my Wind . . . Read full entry »


Re: Source code formatting

Posted 7/28/2020 11:22:28 PM

> The problem is that, due to attribute value normalization, carriage returns are removed from attribute nodes during XML parsing. > When using long XPath expressions (and this has become very common in XSLT 3, especially with higher order functions), > which are split in multiple lines, t . . . Read full entry »


Re: Source code formatting

Posted 7/28/2020 10:02:02 PM

Interesting, Geert, how your email client apparently regenerated the header of the original message instead of just quoting it literally. Your email client seems to hold a database of senders by email address. When regenerating the headers, it won't use the real name under which the message was . . . Read full entry »


Re: Source code formatting

Posted 7/28/2020 9:44:06 PM

Hi Willem, Not sure if this would work with the particular VCS you are using, but have you considered not to use a formatter when adding the XSLT to the VCS, but tune the actual dif (ignoring whitespace in attributes as an example) Delta XML have done some work in that area for GIT I believe, m . . . Read full entry »


Re: Source code formatting

Posted 7/28/2020 9:37:34 PM

I recently thought about this when I wondered how we can preserve whitespace in attributes when migrating XProc 1.0 documents (that often include inline XSLT with multi-line attributes, in addition to their own multiline attributes) to XProc 3.0. At first I thought that the easiest solution wou . . . Read full entry »


Source code formatting

Posted 7/28/2020 9:17:49 PM

Hi list, Like many of you, I assume, I use a version control system when working on XSLT projects. I'm working together with multiple people, and we run the code through an XML formatter before checking it in to avoid formatting differences showing up in the diffs. The problem is that, due to att . . . Read full entry »


Re: Order of accumulator rules

Posted 7/27/2020 6:50:18 PM

Thanks! Best, -- David On Mon, 27 Jul 2020 20:00:35 +0200, Michael Kay mike@xxxxxxxxxxxx wrote: > > [1 <text/plain; us-ascii (quoted-printable)>] > [2 <text/html; us-ascii (quoted-printable)>] > Bug logged: > > https://saxonica.plan.io/issues/4657 > > Mic . . . Read full entry »


Re: Order of accumulator rules

Posted 7/27/2020 6:00:15 PM

Bug logged: https://saxonica.plan.io/issues/4657 Michael Kay Saxonica > On 27 Jul 2020, at 18:11, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Added as test case accumulator-081 to XSLT3 test suite. > > Michael Kay > Saxonica > > . . . Read full entry »


Re: Order of accumulator rules

Posted 7/27/2020 5:11:36 PM

Added as test case accumulator-081 to XSLT3 test suite. Michael Kay Saxonica > On 27 Jul 2020, at 17:33, David Maus lists@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hello everone, > > I started to play with XSLT 3 accumulators and am not sure I > under . . . Read full entry »


Order of accumulator rules

Posted 7/27/2020 4:33:01 PM

Hello everone, I started to play with XSLT 3 accumulators and am not sure I understand the specifications correctly with regards to the order of accumulator rules. Take the following example: <xsl:transform version="3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema . . . Read full entry »


Re: case conversion with replace() (i.e., with a regul

Posted 7/27/2020 1:19:51 PM

Thank you, Martin and Michael, for your replies! It is good to learn that what I originally had in mind is not possible, but that there are the other options you point out. Best regards, Wolfhart On 27.07.20 06:13, Michael Kay mike@xxxxxxxxxxxx wrote: > Saxon has introduced the extension fun . . . Read full entry »


Re: Tool that measures the performance of an XSLT prog

Posted 7/27/2020 10:24:35 AM

On Mon, Jul 27, 2020 at 3:48 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > No, current-dateTime() is explicitly defined to give constant results > throughout an evaluation. That's because there isn't any defined order of > execution, so " . . . Read full entry »


Re: Tool that measures the performance of an XSLT prog

Posted 7/27/2020 10:18:32 AM

> I guess, saving value of current-dateTime() at two different places within an XSLT stylesheet, and computing the difference later might give us the time spent by the enclosed XSLT instructions. > For your use case, I think to do this, extracting the component expressions into their own vari . . . Read full entry »


Re: Tool that measures the performance of an XSLT prog

Posted 7/27/2020 10:15:42 AM

Hi Roger, On Mon, Jul 27, 2020 at 1:06 AM Dr. Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > Here is a statement in my XSLT program: > > <xsl:variable name="who-list" select="random:sequence($hiddennodes . . . Read full entry »


Re: case conversion with replace() (i.e., with a regul

Posted 7/27/2020 10:13:13 AM

Saxon has introduced the extension function replace-with() which allows replace-with($in, '^.', function($x){upper-case($x)}) Michael Kay Saxonica > On 26 Jul 2020, at 22:34, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Dea . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/26/2020 11:49:23 PM

Why not just use apply-templates with dedicated templates with type selectors (match), possibly using a mode? Use a for-each, if you need, to set variables, call a named dispatch template, tunneling the parameter(s) to it and the dispatch template simply does an apply-templates without the need to . . . Read full entry »


Re: Tool that measures the performance of an XSLT prog

Posted 7/26/2020 9:57:35 PM

Roger, Have you tried to put every expression in a separate function, to be able to use Saxon's -TP option? Of course, this changes the processing, as Michael Kay mentioned and might not give you the answers you want to have. - Michael MH > Am 26.07.2020 um 21:36 schrieb Dr. Roger L Costello . . . Read full entry »


Re: case conversion with replace() (i.e., with a regul

Posted 7/26/2020 9:54:23 PM

On 26.07.2020 23:34, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: I need to convert the first character of a string from lower-case to upper-case. I know that I can do so with the following code: concat(upper-case(substring(.,1,1)),substring(.,2)) I was wondering whether it can also be . . . Read full entry »


case conversion with replace() (i.e., with a regular

Posted 7/26/2020 9:33:48 PM

Dear list, I need to convert the first character of a string from lower-case to upper-case. I know that I can do so with the following code: concat(upper-case(substring(.,1,1)),substring(.,2)) I was wondering whether it can also be done with the replace() function, i.e., with a regular express . . . Read full entry »


Re: Tool that measures the performance of an XSLT prog

Posted 7/26/2020 9:30:04 PM

On Sun, 2020-07-26 at 21:00 +0000, Dr. Roger L Costello costello@xxxxxxxxx wrote: > Thanks Michael. If there is no way to get the performance of the > basic pieces of an XSLT program, then how does one determine what is > causing an XSLT program to run slow? For example, I have a function . . . Read full entry »


Re: Tool that measures the performance of an XSLT prog

Posted 7/26/2020 8:59:51 PM

Thanks Michael. If there is no way to get the performance of the basic pieces of an XSLT program, then how does one determine what is causing an XSLT program to run slow? For example, I have a function f that calls functions A, B, and C. The SAXON profile tool says that the total execution time for . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/26/2020 8:57:25 PM

Dear David, It's difficult to propose a solution without seeing the current code, but I suggest that if you can't avoid moving the nested for-eaches into the type-specific templates (that are invoked by next-match), you can encapsulate these for-eaches in a named template that you call from eac . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/26/2020 8:30:53 PM

Dear xsl-list, I am grateful to all of those who responded to my inquiry, below. Packaging the variables inside a map, as several readers suggested, so that I have to pass only one thing when I hand off responsibility from the general template (does the common stuff for all items) to the type-spe . . . Read full entry »


Re: Tool that measures the performance of an XSLT prog

Posted 7/26/2020 8:18:36 PM

Short answer: no. Even instrumenting the Java code internally is virtually impossible: the more you try to probe timings at fine granularity, the more you distort things like hot-spot optimization and CPU caching that have a profound effect on performance. Heisenberg comes to mind... Remember als . . . Read full entry »


Tool that measures the performance of an XSLT program

Posted 7/26/2020 7:36:08 PM

Hi Folks, Here is a statement in my XSLT program: <xsl:variable name="who-list" select="random:sequence($hiddennodes * $outputnodes, 0.0, math:pow($hiddennodes, -0.5))" as="xs:double*" /> I would like to know the time required to execute each of these portions . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 6:42:48 PM

On Fri, 2020-07-24 at 16:48 +0000, Eliot Kimber ekimber@xxxxxxxxxxxx wrote: > > If my memory is correct, we (the XML Working Group) wanted to use PIs > for namespace declarations Yes, i remember there was such a proposal. > The design decision was overridden by Tim Berners-Lee and we . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 4:53:17 PM

Liam says: A schema will do it in some cases - and i've met XML systems that require it to be possible to dereference a namespace name as a URL and to retrieve an XML Schema document representtion (XSD) from it for this purpose, but nothing in XML, Namespaces, XSD requires or eve . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 4:48:02 PM

Norm said: Itbs a shame that XML was forced to adopt a weird, pseudo-attribute based namespaces design that introduces all sorts of scoping complexity. It was done, as I recall, because the folks doing RDF/XML had already made some really weird decisions about the semantics of RDF . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 4:30:19 PM

On Fri, 2020-07-24 at 15:17 +0000, BR Chrisman brchrisman@xxxxxxxxx wrote: > Could xpath-default-namespace be an xpath-namespace-search-path? A > list of namespaces which would resolve in order? If I had a 'foo' > that was in ns1, ns2 and ns3, I mainly want to be able to tell the > pro . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 3:33:11 PM

> Global declarations at the top of the file would have addressed the overwhelming majority of cases. Perhaps it is still not too-late to have a new version of XML/XMLNamespaces that introduces this? Compatibility can be fully achieved by sensible defaults. On Fri, Jul 24, 2020 at 3:30 AM Nor . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 3:16:50 PM

Could xpath-default-namespace be an xpath-namespace-search-path? A list of namespaces which would resolve in order? If I had a 'foo' that was in ns1, ns2 and ns3, I mainly want to be able to tell the processor the order of precedence in those namespaces. I suppose with schemas, conflicts in multi . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 2:10:22 PM

I will observe that the DITA standard does not (and cannot really) use namespaces except for inclusion of foreign vocabularies, where namespaces are required. The DITA standard does use a namespace for itself in one very important way: it defines a mandatory attribute that is in a DITA-defined name . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 12:56:21 PM

On Fri, Jul 24, 2020 at 4:04 PM Pieter Masereeuw pieter@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > My experience is that namespaces are useful but far too often used without > a real need. > About overuse of XML namespaces, I think people who know XML namespace . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 12:31:30 PM

I think the core of the problem is that in languages like Java, "String" is clearly just an abbreviation for "java.lang.String", and anywhere you don't want to use the abbreviation, you can write "java.lang.String" intead, and it's clear to everyone what's going on. Th . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 10:34:41 AM

My experience is that namespaces are useful but far too often used without a real need. Some people seem to like complexity. I don't. Unless you want to live by a prefix only, you only need namespaces when you mix several XML languages, such as in the case of XSLT and XSL-FO (where you can mix . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 10:30:15 AM

With a little trepidation, Ibm going to wade into this threadb& The first observation Ibll make is that there are other languages that allow local names to be in a default namespace. They donbt call them namespaces and they donbt work *exactly* the same way, but you donbt have to fully qu . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 10:06:46 AM

On Fri, Jul 24, 2020 at 8:18 AM Debbie Lapeyre dalapeyre@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Namespaces are a real problem. > I personally, find XML namespaces functionality useful. At the moment, the online downside I see for XML namespaces is, that . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 7:43:05 AM

Ha! :) I will say that XPath not having support for default namespaces was, perhaps, with the benefit of hindsight and in retrospect, without casting aspersions and with all the best will in the world, looking backwards for just a moment, as an aside and just to shoot the breeze for a minute, a mi . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 6:54:16 AM

Sadly, I can't find my first comment on the draft namespaces spec, which was to the effect of "this is horrible, but it hardly matters, because it's so horrible that no-one will use it". I was right on the first point, and very badly wrong on the second. Michael Kay Saxonica > On 24 . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 6:32:24 AM

+1 for my first question to support requests being to check the usage of namespaces, as this is where 80%+ of my users' problems are. +1 for the 3-minute fix being the most common outcome, too! I do think that namespaces are where XML derives an enormous amount of its power from, though, and would . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 5:49:54 AM

On Fri, 2020-07-24 at 03:40 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > One can find questions and answers like this from so many people ... Overall the "wilful violation of the XPath spec" done by Web browsers, so that unprefixed names would match local names associated wi . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 5:47:07 AM

> When you try to explain this to beginners. they > do not believe you. 'But who would do that?' they cry. It is about names. A name has two parts, a first name (the local name) and the family name (the namespace)... > If I had a nickle for every time I as a consultant have > been cal . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 5:42:10 AM

> On 24 Jul 2020, at 00:17, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Failing to appreciate the implications of a namespace declaratoin in the source document is probably the most common source of XSLT questions on StackOverflow - if you searc . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 3:39:24 AM

One can find questions and answers like this from so many people ... https://stackoverflow.com/questions/5239685/xml-namespace-breaking-my-xpath/5 241062#5241062 On Thu, Jul 23, 2020 at 7:48 PM Debbie Lapeyre dalapeyre@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/24/2020 2:48:22 AM

When you try to explain this to beginners. they do not believe you. 'But who would do that?' they cry. If I had a nickle for every time I as a consultant have been called to solve a horrible mess, checked the namespaces, fixed them, went home in 3 minutes ... And many of you on this list have done . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/23/2020 10:17:22 PM

Failing to appreciate the implications of a namespace declaratoin in the source document is probably the most common source of XSLT questions on StackOverflow - if you search there for "XSLT default namespace" you will find at least 600 questions from people who have fallen into this trap . . . Read full entry »


Re: Re: xmlns in the root element prevents transformat

Posted 7/23/2020 9:05:17 PM

On 23.07.2020 23:01, Martin Honnen martin.honnen@xxxxxx wrote: On 23.07.2020 22:55, Manuel Souto Pico terminolator@xxxxxxxxx wrote: I think I can answer myself. The stylesheet needs to have the version hardcoded in the root element, at least from what I can tell, like xpath-default-namespace=" . . . Read full entry »


Re: Re: xmlns in the root element prevents transformat

Posted 7/23/2020 9:00:57 PM

On 23.07.2020 22:55, Manuel Souto Pico terminolator@xxxxxxxxx wrote: I think I can answer myself. The stylesheet needs to have the version hardcoded in the root element, at least from what I can tell, like xpath-default-namespace="urn:oasis:names:tc:xliff:document:1.2", and it must be th . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/23/2020 8:55:25 PM

I think I can answer myself. The stylesheet needs to have the version hardcoded in the root element, at least from what I can tell, like xpath-default-namespace="urn:oasis:names:tc:xliff:document:1.2", and it must be the same version as the input XML files. Cheers, Manuel Manuel Souto . . . Read full entry »


Re: xmlns in the root element prevents transformation

Posted 7/23/2020 7:34:21 PM

If you add an attribute xpath-default-namespace="urn:oasis:names:tc:xliff:document:1.2" to xsl:stylesheet, the templates will match. Currently they only match if the source elements are in no namespace. But xmlns="urn:oasis:names:tc:xliff:document:1.2" puts them in a namespa . . . Read full entry »


xmlns in the root element prevents transformation

Posted 7/23/2020 7:12:30 PM

Dear all, This transformation gives me an empty output file: https://xsltfiddle.liberty-development.net/gVhEaiQ However, if I remove the xmlns="urn:oasis:names:tc:xliff:document:1.2 bit from the XLIFF root node, then it works. Could somebody help me understand why that happens? Thanks in a . . . Read full entry »


Re: Performance results of an XML-based neural network

Posted 7/22/2020 4:19:37 PM

> There are lots of matrix operations involved in running a neural network -- lots of matrix addition, transpose, dot product, etc., operations. The operations update the <Matrix> elements in <neuralNetwork>. > > I used the SAXON profile tool to see the performance of my implem . . . Read full entry »


Re: Performance results of an XML-based neural network

Posted 7/22/2020 12:29:30 PM

Hello Martin, > Does the profile not reveal where the > map based solution spends most of > the time? Yes, is says that all the time is spent in the train function and virtually zero time in the matrix operations. Which is strange since the train function primarily just calls the matrix . . . Read full entry »


Re: Performance results of an XML-based neural network

Posted 7/22/2020 12:17:19 PM

On 22.07.2020 13:25, Dr. Roger L Costello costello@xxxxxxxxx wrote: Surprisingly, however, the overall time to train the XML-based neural network was faster than the time to train the map-based neural network: neural-network:train XML-based: average time (net/ms) = 1711.572 total time (net/ms) = 1 . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/22/2020 11:58:29 AM

Hi David, I'm curious to know what approach you finally chose. ("Enquiring minds want to know.") thanks and best regards -alan On Mon, Jul 20, 2020 at 11:00 PM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Mon, 2020-07-20 at 1 . . . Read full entry »


Performance results of an XML-based neural network ver

Posted 7/22/2020 11:24:41 AM

Hi Folks, I implemented a neural network. My first implementation was XML-based. Running the neural network revolves around processing this XML document: <?xml version="1.0" encoding="UTF-8"?> <neuralNetwork> <!-- Set number of nodes in each input, hidden, o . . . Read full entry »


Re: [saxon] Use of QName forcing declaration "Unused"

Posted 7/22/2020 6:27:15 AM

Well, passing lexical QNames across interfaces is definitely a bad idea unless you can be sure that both sides of the interface know the namespace context (that is, the set of prefix-URI bindings). Without a namespace context, a lexical QName is meaningless. Michael Kay Saxonica > On 22 Jul 20 . . . Read full entry »


Re: [saxon] Use of QName forcing declaration "Unused"

Posted 7/21/2020 11:48:50 PM

If the QNames are names of elements in the source document, then you shouldn't be calling name() to get the lexical QName, and then calling xs:QName to turn it back into an xs:QName value, because that loses information (specifically, the namespace bindings that were in scope in the source document . . . Read full entry »


Re: [saxon] Use of QName forcing declaration "Unused"

Posted 7/21/2020 2:10:17 PM

Ihe Onwuka <ihe.onwuka@xxxxxxxxx> writes: > However if I remove any one of the namespaces I get this error. > > Error at char 79 in expression in xsl:sequence/@select on line 14 column > 118 of ***.xsl: > FONS0004 Namespace prefix {jx} has not been declared > at function . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/20/2020 9:00:27 PM

On Mon, 2020-07-20 at 18:24 +0000, David Birnbaum djbpitt@xxxxxxxxx wrote: > Dear Syd (cc xsl-list), > > Thanks for the quick response. As you note, the actual main template > does a > lot of things that are common to all types before it gets to the > <xsl:choose>, and if I . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/20/2020 8:40:28 PM

David, Andre and List, +1 I was going to mention visitors (actually I just did in another context) aka dispatch templates. Plus, tunnel parameters. It should not be necessary to do any choosing explicitly. An implicit selection will also be easier to maintain. What he said -- thanks! Wendell On . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/20/2020 8:39:25 PM

Hey David, I entirely agree with the "how do I make this readable and palatable and easy to break up and maintain" approach and I think that it's a worthy cause to uphold. I'm thinking that this is essentially an established context of "variables" and also perhaps the current . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/20/2020 8:36:22 PM

Hi, Although there may be no standard way to represent (or pass) a function in XML/XSLT "straight up", it is certainly possible to capture the operations of appropriately defined functions in markup languages and embed libraries implementing such operations in stylesheets. Indeed, even . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/20/2020 8:18:37 PM

Dear Andre (cc xsl-list), Thank you for the quick response. This is appealing because it reduces the repetition of <xsl:param> inside the secondary templates, since I would pass just one item, instead of five separate variables. Best, David On Mon, Jul 20, 2020 at 4:00 PM Andre Cusson akh . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/20/2020 8:00:53 PM

Hi, Why not put the variables in a structure (ex. markup, map, array), the apply-templates with type selector and pass the parameter structure, possibly through a tunnel param with an additional dispatch template? Regards, ac Le lun. 20 juil. 2020 C 14:23, David Birnbaum djbpitt@xxxxxxxxx < . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/20/2020 6:23:42 PM

Dear Syd (cc xsl-list), Thanks for the quick response. As you note, the actual main template does a lot of things that are common to all types before it gets to the <xsl:choose>, and if I write completely separate templates for each of the types, I would need to repeat that shared code verba . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/20/2020 5:35:07 PM

Hi David, Why is it necessary at all to use <xsl:choose> ? On Mon, Jul 20, 2020 at 10:03 AM David Birnbaum djbpitt@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Dear XSL-list, > > I write here for advice about Best Practice. The question is at the end; > b . . . Read full entry »


Re: Legibility, repetition, nesting

Posted 7/20/2020 5:32:00 PM

Hi David! I dont feel qualified to pontificate on best practice, but happy to suggest pros and cons of alternatives. But first, lets make sure I have this rightthe current basic structure is roughly as follows: <xsl:template match="item"> <xsl:variable name="pre-c . . . Read full entry »


Legibility, repetition, nesting

Posted 7/20/2020 5:03:55 PM

Dear XSL-list, I write here for advice about Best Practice. The question is at the end; because I am constitutionally unable to be concise, the long narrative before it is context. I'm developing an XSLT stylesheet that processes 134 different types of items (same generic identifier, distinguishe . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/20/2020 4:06:41 PM

On Mon, 2020-07-20 at 09:02 +0000, Michael Kay mike@xxxxxxxxxxxx wrote: > it's still restricted. I was astonished to discover this in XQuery when i joined that WG in 2001, and have often wondered about implementing something that behaved differently, coverting to a string only as needed. But . . . Read full entry »


[ANN] Balisage: The Markup Conference - next week - p

Posted 7/20/2020 3:02:20 PM

Balisage: The Markup Conference starts in one week! (27 - 31July 2020) Look at the program: https://www.balisage.net/2020/Program.html Register: https://www.balisage.net/registration.html Get prepared: https://www.balisage.net/pre-conf-Tech-Checks.html (17 & 18 July) Several Balisage attend . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/20/2020 9:01:37 AM

> I think that, using a schema (for input & output documents) for an XSLT transformation, in general is very useful. The main benefit is, I think, stronger type checking of XML input/output data, which reveals many error early during an XSLT transformation cycle. Indeed. But although it giv . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/20/2020 7:14:42 AM

I think that, using a schema (for input & output documents) for an XSLT transformation, in general is very useful. The main benefit is, I think, stronger type checking of XML input/output data, which reveals many error early during an XSLT transformation cycle. On Mon, Jul 20, 2020 at 1:26 AM . . . Read full entry »


Re: How to store a sequence into an element ... andma

Posted 7/19/2020 10:43:43 PM

> Dimitre, I am trying to avoid the overhead of markup. In matrices I don't want the overhead that markup incurs. Instead, I want plain old sequences. Liam talked about this in a post last week. Great. Then just use arrays or maps. I was under the impression that you wanted to **store** perma . . . Read full entry »


Re: How to store a sequence into an element ... andma

Posted 7/19/2020 10:20:56 PM

Michael, upon further reflection I realized that what you are saying is to replace this markup: <Document> <Greeting>My List</Greeting> <List><xsl:sequence select="$list" /></List> <Ending>The End</Ending> </Do . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/19/2020 9:26:15 PM

Hello Michael, Ah, so I think what you are saying is that I could store the sequence in a map and then overwrite the sequence that is in the map. Something like this: <xsl:variable name="list" as="map(xs:string, xs:integer*)"> <xsl:map> <xsl:map-entr . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/19/2020 9:17:47 PM

Hi Roger, > Is there no other way to preserve a sequence than to resort to connecting the XSLT to an XML Schema? There are many possible ways. Here are two types of these: <list> <item>4</item> <item>1</item> <item>4</item> </list> or . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/19/2020 9:16:22 PM

On 19.07.2020 22:52, Dr. Roger L Costello costello@xxxxxxxxx wrote: Thank you Martin. Is there no other way to preserve a sequence than to resort to connecting the XSLT to an XML Schema? In my actual application I am creating many sequences. I need an efficient way of storing the sequences. For e . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/19/2020 8:57:52 PM

That's the point Liam was making last week - XML is very text-oriented. When you add a list of numbers to a document it gets serialized as a string. As Martin says, you can turn it back into a sequence of numbers by validating against a list type defined in a schema. But that's very limiting, which . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/19/2020 8:52:21 PM

Thank you Martin. Is there no other way to preserve a sequence than to resort to connecting the XSLT to an XML Schema? In my actual application I am creating many sequences. I need an efficient way of storing the sequences. For example, initially $list might be (1, 2, 3) and then processing result . . . Read full entry »


Re: How to store a sequence into an element ... and m

Posted 7/19/2020 7:56:49 PM

On 19.07.2020 21:14, Dr. Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I created a sequence (1, 2, 3) as follows: <xsl:variable name="list" select="(1, 2, 3)" as="xs:integer*" /> I checked that $list contains 3 integers: <xsl:message>count($list) . . . Read full entry »


How to store a sequence into an element ... and mainta

Posted 7/19/2020 7:13:55 PM

Hi Folks, I created a sequence (1, 2, 3) as follows: <xsl:variable name="list" select="(1, 2, 3)" as="xs:integer*" /> I checked that $list contains 3 integers: <xsl:message>count($list) = <xsl:value-of select="count($list)"/></xsl:mes . . . Read full entry »


Re: Grouping in match patterns

Posted 7/19/2020 8:54:04 AM

Am 19.07.2020 um 00:47 schrieb Martynas JuseviD ius martynas@xxxxxxxxxxxxx: Where do you find the Exselt processor? http://exselt.net returns something else. For reasons I don't know it is no longer available; it is a bit of a pity as it seemed mature enough to serve (in some areas) as one of the . . . Read full entry »


Re: Grouping in match patterns

Posted 7/18/2020 11:03:31 PM

Excuse me - I hadn't followed the conversation. Please ignore and apologies for the noise. Bridger On Sat, Jul 18, 2020, 7:01 PM Bridger Dyson-Smith bdysonsmith@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi - > http://exslt.org/ > > Should work. > > Bes . . . Read full entry »


Re: Grouping in match patterns

Posted 7/18/2020 11:01:29 PM

Hi - http://exslt.org/ Should work. Best, Bridger On Sat, Jul 18, 2020, 6:46 PM Martynas JuseviD ius martynas@xxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Where do you find the Exselt processor? http://exselt.net returns > something else. > > On Tue, Jul 1 . . . Read full entry »


Re: Grouping in match patterns

Posted 7/18/2020 10:46:41 PM

Where do you find the Exselt processor? http://exselt.net returns something else. On Tue, Jul 14, 2020 at 6:13 PM Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Am 14.07.2020 um 18:02 schrieb Martin Honnen martin.honnen@xxxxxx: > > Am 14.0 . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/16/2020 10:12:54 PM

I did have some success doing number crunching with xml in the mix... I was using an in-memory representation and tracking where all the numbers I was manipulating were to perform the actual numerical calculations in C++. When certain events occurred, xslt was invoked on the current state of the i . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/16/2020 9:27:00 PM

On Thu, 2020-07-16 at 10:28 +0000, Dr. Roger L Costello costello@xxxxxxxxx wrote: > Liam wrote this really interesting paragraph: > > > The benefit to using maps or arrays over > > elements in XSLT or XQuery is that element > > nodes are too heavyweight, and too prone > . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/16/2020 4:11:56 PM

This is a really fascinating discussion. Thank you. Michael Kay wrote this interesting sentence: > It's an argument against using XML trees for > working data structures when implementing > complex algorithms - which is why XSLT 3.0 > provides an alternative. But, but, but, ... Algo . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/16/2020 11:00:28 AM

> Liam wrote this really interesting paragraph: > >> The benefit to using maps or arrays over >> elements in XSLT or XQuery is that element >> nodes are too heavyweight, and too prone >> to turning their content back into strings. >> In XQuery in particular, cons . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/16/2020 10:27:48 AM

Liam wrote this really interesting paragraph: > The benefit to using maps or arrays over > elements in XSLT or XQuery is that element > nodes are too heavyweight, and too prone > to turning their content back into strings. > In XQuery in particular, constructors by > default do a . . . Read full entry »


Re: Grouping in match patterns

Posted 7/14/2020 11:28:58 PM

If you're interested in following progress the bug is at https://saxonica.plan.io/issues/4645 Michael Kay Saxonica > On 14 Jul 2020, at 22:07, Wendell Piez wapiez@xxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Very many thanks Michael Kay and Saxonica! > & . . . Read full entry »


Re: Grouping in match patterns

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

Very many thanks Michael Kay and Saxonica! Best regards, Wendell On Tue, Jul 14, 2020 at 4:05 PM Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I have added a test case match-0265 to the XSLT3 test suite. Saxon-JS is getting it right, Saxon-J is fai . . . Read full entry »


Re: Grouping in match patterns

Posted 7/14/2020 8:04:51 PM

I have added a test case match-0265 to the XSLT3 test suite. Saxon-JS is getting it right, Saxon-J is failing. The pattern syntax was generalized in many ways in XSLT 3.0 and this probably isn't the only gap in the implementation... Michael Kay Saxonica > On 14 Jul 2020, at 20:26, Wendell Pie . . . Read full entry »


Re: Grouping in match patterns

Posted 7/14/2020 7:26:17 PM

Hi again, I am most grateful to the attention given to this so far. :-) What Liam saw is what I saw - according to the EBNF it appears to me it should be okay. FWIW, match="(b |c) / d" does seem to work at any rate in some versions of Saxon. Also, the error I see in (some version of) o . . . Read full entry »


Re: Grouping in match patterns

Posted 7/14/2020 5:40:09 PM

On Tue, 2020-07-14 at 15:34 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: > XSL-List friends, > > Is there anything special I should know about a match pattern such as > "a / (b|c)" -- which gives me an error (in oXygen and running Saxon)? > > <xsl:template matc . . . Read full entry »


Re: Grouping in match patterns

Posted 7/14/2020 4:41:26 PM

Am 14.07.2020 um 18:34 schrieb Norman Tovey-Walsh ndw@xxxxxxxxxx: It seems the spec indeed allows this. Furthermore, Saxon-JS 2 doesn't complain: Saxon 10.1 does: Yes, Wendell kind of already said that Saxon gives an error. The closest test in the test suite I could dig up is https://github.com/w3 . . . Read full entry »


Re: Grouping in match patterns

Posted 7/14/2020 4:34:37 PM

> It seems the spec indeed allows this. > Furthermore, Saxon-JS 2 doesn't complain: Saxon 10.1 does: Error at xsl:template on line 14 column 35 of out.xsl: XTSE0340 Cannot convert the expression {homCheck(child::element(Q{}a)/(child::element(Q{}b) | child::element(Q{}c)))} to a pattern . . . Read full entry »


Re: Grouping in match patterns

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

Am 14.07.2020 um 18:02 schrieb Martin Honnen martin.honnen@xxxxxx: Am 14.07.2020 um 17:33 schrieb Wendell Piez wapiez@xxxxxxxxxxxxxxx: XSL-List friends, Is there anything special I should know about a match pattern such as "a / (b|c)" -- which gives me an error (in oXygen and running . . . Read full entry »


Re: Grouping in match patterns

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

Am 14.07.2020 um 17:33 schrieb Wendell Piez wapiez@xxxxxxxxxxxxxxx: XSL-List friends, Is there anything special I should know about a match pattern such as "a / (b|c)" -- which gives me an error (in oXygen and running Saxon)? <xsl:template match="a / (b | c)"/> Wouldn't . . . Read full entry »


Grouping in match patterns

Posted 7/14/2020 3:33:02 PM

XSL-List friends, Is there anything special I should know about a match pattern such as "a / (b|c)" -- which gives me an error (in oXygen and running Saxon)? <xsl:template match="a / (b | c)"/> Wouldn't it be permitted by the grammar given at https://www.w3.org/TR/xslt- . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/13/2020 10:23:02 PM

Thanks, Liam. This is very helpful. I had used schema-aware processing, *@as*, and *@type* attributes when I tried the *<cell row="x" col="y">* approach in the hope of avoiding unwanted type instability. But even when that works, I hadn't thought about the overhead of the . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/13/2020 9:58:15 PM

On Mon, 2020-07-13 at 17:26 +0000, David Birnbaum djbpitt@xxxxxxxxx wrote: > Dear XSL-list, > > Roger's question invites a tangential one (for which reason I have > changed > the subject line): How might we usefully think about representing > matrices > in an XML environment? . . . Read full entry »


Re: Form feed character (&#xc;) in decoded xs:base64B

Posted 7/13/2020 7:16:50 PM

On 13.07.2020 20:55, Martynas JuseviD ius martynas@xxxxxxxxxxxxx wrote: Ah, sorry :) I get it now. After I make the change: <?xml version="1.1" encoding="UTF-8"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" . . . Read full entry »


Re: Form feed character (&#xc;) in decoded xs:base64B

Posted 7/13/2020 6:54:56 PM

Ah, sorry :) I get it now. After I make the change: <?xml version="1.1" encoding="UTF-8"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#& . . . Read full entry »


Re: Form feed character (&#xc;) in decoded xs:base64B

Posted 7/13/2020 6:44:38 PM

I was suggesting that you prepend <?xml version="1.1"?> to your stylesheet document, hoping that you are then able to apply translate(., '&#xc;', '') to the decoded string. On 13.07.2020 20:26, Martynas JuseviD ius martynas@xxxxxxxxxxxxx wrote: With xsl:output version="1 . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/13/2020 6:35:13 PM

Dear XSL-list, Thank you, BR Chrisman, for the quick response and for the pointer to this spec. It is of type #1 of the three types that I mentioned, that is, row-major. It does offer a way for me to standardize the generic identifiers should I adopt approach #1. Sincerely, David On Mon, Jul 13 . . . Read full entry »


Re: Form feed character (&#xc;) in decoded xs:base64B

Posted 7/13/2020 6:26:33 PM

With xsl:output version="1.1", the form feed is not a problem - Saxon writes the decoded xs:base64Binary string without any replacements. However I'm getting weird parsing errors downstream in my RDF toolkit (which works fine with XML 1.0). I'll try to see what the problem is. On Mon, J . . . Read full entry »


Re: Modeling matrices in an XML environment

Posted 7/13/2020 6:25:44 PM

Would the Content MathML spec help here? On Mon, Jul 13, 2020 at 10:25 AM David Birnbaum djbpitt@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Dear XSL-list, > > Roger's question invites a tangential one (for which reason I have changed the subject line): How mig . . . Read full entry »


Re: Form feed character (&#xc;) in decoded xs:base64B

Posted 7/13/2020 6:14:17 PM

You could use bin:to-octets, then look for and remove any octets representing invalid characters... Not easy. The theory is that (if XML 1.1 isn't enabled) then the xs:string data type doesn't allow a FF character, therefore any operation that tries to generate one must fail. Michael Kay Saxonica . . . Read full entry »


Re: Form feed character (&#xc;) in decoded xs:base64B

Posted 7/13/2020 6:00:00 PM

What happens if you use version="1.1" in the XML declaration (of the stylesheet)? On 13.07.2020 19:54, Martynas JuseviD ius martynas@xxxxxxxxxxxxx wrote: Hi, I'm transforming large JSON files with some email data using XSLT 3.0. They contain xs:base64Binary literals which I'm decoding . . . Read full entry »


Form feed character (&#xc;) in decoded xs:base64Binary

Posted 7/13/2020 5:54:05 PM

Hi, I'm transforming large JSON files with some email data using XSLT 3.0. They contain xs:base64Binary literals which I'm decoding using bin:decode-string() and want to include the decoded values in the output XML. The problem is that some of the decoded string values have illegal XML 1.0 charac . . . Read full entry »


Modeling matrices in an XML environment

Posted 7/13/2020 5:25:43 PM

Dear XSL-list, Roger's question invites a tangential one (for which reason I have changed the subject line): How might we usefully think about representing matrices in an XML environment? This question is tangential because Roger's original question assumed his hierarchical representation (*/matr . . . Read full entry »


Re: JSON to XML using XSLT 3.0 representation

Posted 7/13/2020 3:26:37 PM

Hi, sure enough I hit one of the 0.1% cases in the conversion :) Namely the form feed char being present in the JSON which produced form feed in the XML output which is not well-formed XML 1.0. I've released JSON2XML version 1.0.5 which attempts to address this issue by doing the default replacem . . . Read full entry »


Re: How to improve the performance of my matrix additi

Posted 7/13/2020 9:19:11 AM

Am 12.07.2020 um 23:53 schrieb Martin Honnen martin.honnen@xxxxxx: On 12.07.2020 22:47, Dr. Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, My application uses lots of matrix operations. I used the SAXON Tool Profile (-TP) option to generate a web page that shows the performance of each of my . . . Read full entry »


Re: How to improve the performance of my matrix additi

Posted 7/12/2020 9:53:24 PM

On 12.07.2020 22:47, Dr. Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, My application uses lots of matrix operations. I used the SAXON Tool Profile (-TP) option to generate a web page that shows the performance of each of my matrix operations. I found that my matrix addition function is tak . . . Read full entry »


Re: How to improve the performance of my matrix addit

Posted 7/12/2020 9:47:42 PM

Fantastic! That made a huge difference: Average time (gross/ms): . . . Read full entry »


Re: How to improve the performance of my matrix additi

Posted 7/12/2020 9:19:13 PM

On 12.07.2020 22:47, Dr. Roger L Costello costello@xxxxxxxxx wrote: My application uses lots of matrix operations. I used the SAXON Tool Profile (-TP) option to generate a web page that shows the performance of each of my matrix operations. I found that my matrix addition function is taking an app . . . Read full entry »


How to improve the performance of my matrix addition

Posted 7/12/2020 8:47:13 PM

Hi Folks, My application uses lots of matrix operations. I used the SAXON Tool Profile (-TP) option to generate a web page that shows the performance of each of my matrix operations. I found that my matrix addition function is taking an appallingly large amount of time. Below is my matrix addition . . . Read full entry »


Re: Seeking XSLT code that provides a "Go to definiti

Posted 7/11/2020 5:43:06 PM

> Ibm not sure thatbs possible in the general case. I forget the exact > terminology that the spec uses, but the schema components available at > runtime may be the result of the union of several different schema > files. (I havenbt looked to see if the Saxon schema component model & . . . Read full entry »


Re: Seeking XSLT code that provides a "Go to definiti

Posted 7/11/2020 8:51:25 AM

Dr. Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > I want to do something like this: > > <xsl:template match="/"> > <Results> > <xsl:for-each select="//*"> > <element> . . . Read full entry »


Re: Seeking XSLT code that provides a "Go to definiti

Posted 7/11/2020 6:52:59 AM

Hi Roger, On Sat, Jul 11, 2020 at 3:09 AM Dr. Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I want to do something like this: > > <xsl:template match="/"> > <Results> > <xsl:for-each select="/ . . . Read full entry »


Re: Seeking XSLT code that provides a "Go to definiti

Posted 7/10/2020 9:39:33 PM

> Do you mean, Roger, that youbd like to > generate HTML with links in the > output or do you mean something else? I want to do something like this: <xsl:template match="/"> <Results> <xsl:for-each select="//*"> <element&g . . . Read full entry »


Re: Seeking XSLT code that provides a "Go to definitio

Posted 7/10/2020 8:57:36 PM

Bridger Dyson-Smith bdysonsmith@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > Perhaps Norm Walsh's XSLT Explorer[1] would be helpful? I got the impression that Roger was looking for a tool that would connect elements in his source document back to their schema definitions. . . . Read full entry »


Re: Seeking XSLT code that provides a "Go to definitio

Posted 7/10/2020 8:13:55 PM

Hi Roger - Perhaps Norm Walsh's XSLT Explorer[1] would be helpful? Best, Bridger [1] https://so.nwalsh.com/2020/06/02-xsltexplorer On Fri, Jul 10, 2020 at 2:45 PM Dr. Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > One of the . . . Read full entry »


Seeking XSLT code that provides a "Go to definition"

Posted 7/10/2020 6:45:01 PM

Hi Folks, One of the really nice features of Oxygen is that one can right-mouse click on an element and select "Go to definition" and then Oxygen displays the XML Schema element declaration in the XML Schema file. Kudos to the Oxygen folks! I want that capability in my XSLT program. Tha . . . Read full entry »


Re: XSLT3 generic grouping functions

Posted 7/9/2020 2:02:21 PM

Thanks for the comments, I'm glad it doesn't look like a silly pattern :) Yes, this common module really looks like a package, especially this XSL is not usable as is, it has to be imported. But in the context of my company, our architecture is based on xsl:import/include using uri "dependenc . . . Read full entry »


Re: XSLT3 generic grouping functions

Posted 7/9/2020 11:30:34 AM

Am 09.07.2020 um 13:21 schrieb Matthieu RICAUD-DUSSARGET m.ricaud-dussarget@xxxxxxxxxxxxxxxxxx: In the other xsl I pointed https://github.com/ELSGestion/els-sie-xsl-lib/blob/master/src/main/xsl/nest-t itles.xsl I use a kind on binterfaceb pattern : This common xsl module defines function which . . . Read full entry »


Re: XSLT3 generic grouping functions

Posted 7/9/2020 11:21:11 AM

In the other xsl I pointed https://github.com/ELSGestion/els-sie-xsl-lib/blob/master/src/main/xsl/nest-t itles.xsl I use a kind on binterfaceb pattern : This common xsl module defines function which returns a fatal error saying bplease override me to define your caseb <xsl:function name=&qu . . . Read full entry »


Re: XSLT3 generic grouping functions

Posted 7/9/2020 11:19:24 AM

Hi Michael, Thanks for this explanation, really interesting to me. I actually never had the occasion to use fn:fold-left/right functions. Probably because Ibm sticked with XSLT 2 and discover XSLT 3 features step by step. Ibll definitely have a look to this lower level primitive, Ibll need to c . . . Read full entry »


Re: XSLT3 generic grouping functions

Posted 7/9/2020 10:23:08 AM

Hi Martin, Thanks you for theses feedbacks. You are right, the function could be more generic with any sequence of nodes as param. I'm use to always perform adjacent grouping within a XML document tree in a specific context, in document order. But it's true there might be other usecases. I set a . . . Read full entry »


Re: XSLT3 generic grouping functions

Posted 7/8/2020 10:20:52 AM

It might be useful to think of xsl:for-each-group as providing a solution for "stereotype" grouping use cases that are commonly encountered, but looking to other functional primitives for solutions to the more general problem: for example you can use fn:fold-left to build up the set of gr . . . Read full entry »


Re: XSLT3 generic grouping functions

Posted 7/8/2020 9:36:07 AM

Am 08.07.2020 um 11:24 schrieb Matthieu RICAUD-DUSSARGET m.ricaud-dussarget@xxxxxxxxxxxxxxxxxx: Hi all, While teaching XSLT, someone ask if it was possible to have a kind of generic function to group XML elements. I first answer the only way to do it was to use (eventually nested) <xsl:for-each . . . Read full entry »


XSLT3 generic grouping functions

Posted 7/8/2020 9:24:13 AM

Hi all, While teaching XSLT, someone ask if it was possible to have a kind of generic function to group XML elements. I first answer the only way to do it was to use (eventually nested) <xsl:for-each-group> instruction with specific conditions according to the data. Later, as I was discoveri . . . Read full entry »


Re: An observation on the performance of fn:transform

Posted 7/3/2020 10:00:53 PM

Drink another coffe, maybe with some Welsh alcohol added in... Stay safe and be happy, Christophe PS: we are on friday evening, I've test some welsh and non-welsh alcohols... Le 03/07/2020 C 12:53, Norman Tovey-Walsh ndw@xxxxxxxxxx a C)critB : Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@x . . . Read full entry »


Re: An observation on the performance of fn:transform

Posted 7/3/2020 10:52:59 AM

Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > A workaround would be to add another layer to the stylesheet, > debug.xsl / non-debug.xsl that sets the static parameter (by > overriding it with a variable) and then you could cache both versions. If . . . Read full entry »


Re: An observation on the performance of fn:transform

Posted 7/3/2020 10:12:38 AM

A workaround would be to add another layer to the stylesheet, debug.xsl / non-debug.xsl that sets the static parameter (by overriding it with a variable) and then you could cache both versions. Michael Kay Saxonica > On 3. Jul 2020, at 11:01, Norman Tovey-Walsh ndw@xxxxxxxxxx <xsl-list-serv . . . Read full entry »


Re: An observation on the performance of fn:transform

Posted 7/3/2020 10:01:28 AM

Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > We currently honour cache="yes" in all cases provided that no static > parameters are supplied. If there are static parameters, we don't > attempt to check that they are consistent with previo . . . Read full entry »


Re: An observation on the performance of fn:transform

Posted 7/3/2020 9:20:49 AM

Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > There is an option > 'cache' : true() > on the option map you pass to `fn:transform` which serves as a hint to > the XSLT processor to cache the stylesheet, perhaps setting that > explicitl . . . Read full entry »


Re: An observation on the performance of fn:transform

Posted 7/3/2020 9:19:01 AM

> Perhaps a argument for something akin to fn:compile-transform($options as map(*)) as function($options), which does the compilation once and returns an exectuable function. Before XSLT3 and xsl:evaluate, Saxon had (and still has) something similar for XPath: saxon:expression() and saxon:evalua . . . Read full entry »


Re: An observation on the performance of fn:transform

Posted 7/3/2020 8:53:59 AM

On 03/07/2020 09:44, Norman Tovey-Walsh ndw@xxxxxxxxxx wrote: Hello world, This isnbt a complaint, or explicitly a request for advice (though Ibm always happy for helpful suggestions), just an observation. The workflow for processing DocBook documents is roughly this pipeline: 1. Fixup the logic . . . Read full entry »


Re: An observation on the performance of fn:transform

Posted 7/3/2020 8:52:35 AM

Am 03.07.2020 um 10:45 schrieb Norman Tovey-Walsh ndw@xxxxxxxxxx: Hello world, This isnbt a complaint, or explicitly a request for advice (though Ibm always happy for helpful suggestions), just an observation. The workflow for processing DocBook documents is roughly this pipeline: 1. Fixup the l . . . Read full entry »


An observation on the performance of fn:transform

Posted 7/3/2020 8:44:49 AM

Hello world, This isnbt a complaint, or explicitly a request for advice (though Ibm always happy for helpful suggestions), just an observation. The workflow for processing DocBook documents is roughly this pipeline: 1. Fixup the logical structure of the document (expand entities and replace . . . Read full entry »


Re: Highlight.js available as a XPath extension functi

Posted 7/3/2020 7:20:32 AM

Christophe Marchand cmarchand@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > which is not yet open-sourced - I wanted to use exactly the same > highlighter... Yes. I faced exactly the same problem. I had been using PrismJS for syntax highlighting in the browser, but I n . . . Read full entry »


Re: Highlight.js available as a XPath extension functi

Posted 7/3/2020 7:01:20 AM

I didn't know Pygments, it seems great. At Oxiane, we've developed a slide editor that entirely runs in a browser, without any servide-side component. That's great to use, both for writing or for presenting. But, for our classes, we need a PDF version of slides, and we wanted a text-oriented PD . . . Read full entry »


Re: Highlight.js available as a XPath extension functi

Posted 7/3/2020 6:10:00 AM

Christophe Marchand cmarchand@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > Highlight JS is a well known javascript library that is able to > highlight source code in a HTML page. Very nice, Christophe. I just recently finished coding up an extension function to call t . . . Read full entry »


Re: Highlight.js available as a XPath extension functi

Posted 7/3/2020 5:59:56 AM

Until Java8, JDK had a JS evaluator embeded. Since Java9, it's an optional module - just like JaxB, and you can choose between various implementations. I use GraalJS[1] for this. In extension function, GraalJS is started only once, and reused at each call, but it's still quite heavy... Christo . . . Read full entry »


Re: Highlight.js available as a XPath extension functi

Posted 7/2/2020 10:41:36 PM

On 02.07.2020 23:21, Christophe Marchand cmarchand@xxxxxxxxxx wrote: Highlight JS is a well known javascript library that is able to highlight source code in a HTML page. If you need to generate a static HTML that contains highlighted source code, and if you use Saxon 10 and Java 11 at least, you n . . . Read full entry »


Highlight.js available as a XPath extension function

Posted 7/2/2020 9:21:30 PM

Highlight JS is a well known javascript library that is able to highlight source code in a HTML page. If you need to generate a static HTML that contains highlighted source code, and if you use Saxon 10 and Java 11 at least, you now have a XPath extension function that do this. It embeds highli . . . Read full entry »


[ANN] Balisage: The Markup Conference starts 27 July

Posted 7/1/2020 9:39:11 PM

BALISAGE 2020 WHAT - Balisage is an annual conference devoted to the theory and practice of descriptive markup and related technologies for structuring and managing information. WHERE - Balisage 2020 will be a totally virtual event; attend from anyplace with connectivity WHEN - 27 through 31 Jul . . . Read full entry »


[ANN] Balisage: The Markup Conference starts 27 July

Posted 7/1/2020 9:15:47 PM

BALISAGE 2020 - 27 - 31 July 2020 Balisage is an annual conference devoted to the theory and practice of descriptive markup and related technologies for structuring and managing information. Balisage 2020 will be a 5-day virtual event, including papers that discuss: XSLT regular expressions for U . . . Read full entry »


XSL-List Guidelines

Posted 7/1/2020 3:10:14 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: getting "Cannot create an attribute node (...) who

Posted 7/1/2020 12:53:56 AM

Hi Norman and Graydon, This was indeed the issue. I added as="attribute()" to the function parameter and variable inside the function, and it works perfectly! Many thanks, - Chris -----Original Message----- From: Norman Tovey-Walsh ndw@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxx . . . Read full entry »


Re: getting "Cannot create an attribute node (...) who

Posted 6/30/2020 4:19:11 PM

> <!-- make a copy of the attributes (a proxy for processing) and return them --> > <xsl:function name="mine:recopy"> Try <xsl:function name="mine:recopy" as="attribute()*"> I think whatbs happening is that, because your function does . . . Read full entry »


Re: getting "Cannot create an attribute node (...) who

Posted 6/30/2020 4:17:15 PM

On Tue, Jun 30, 2020 at 04:10:23PM -0000, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx scripsit: > Hello! Language is XSLT 2.0, processor is Saxon-PE 9.9.1.7 in Oxygen XML Editor v22.1. > > I'm trying to pass attribute nodes from an element template to a function, make a m . . . Read full entry »


Re: getting "Cannot create an attribute node (...) who

Posted 6/30/2020 4:16:58 PM

Am 30.06.2020 um 18:10 schrieb Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx: <xsl:variable name="new_atts"> <xsl:sequence select="$orig_atts"/> </xsl:variable> This doesn't copy the attribute nodes, it creates a . . . Read full entry »


getting "Cannot create an attribute node (...) whose

Posted 6/30/2020 4:10:15 PM

Hello! Language is XSLT 2.0, processor is Saxon-PE 9.9.1.7 in Oxygen XML Editor v22.1. I'm trying to pass attribute nodes from an element template to a function, make a modified copy of the attributes inside the function, then return them for inclusion in the element. But when I attempt this, I ge . . . Read full entry »


Re: Any difference between 1 div $x and math:pow($x, -

Posted 6/27/2020 2:09:11 PM

Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > Hi Folks, > > My XSLT program computes this expression many times for different values of $x: > > 1 div (1 + math:exp(-$x)) > > Here is an equivalent expression: > > math:pow(1 + . . . Read full entry »


Re: Any difference between 1 div $x and math:pow($x, -

Posted 6/27/2020 1:02:07 PM

they are certainly different <xsl:sequence select="1.0 div 0.0"/> is FOAR0001: Decimal divide by zero at template m on line 8 of r4.xsl: <xsl:sequence select="math:pow(0.0,-1)"/> is INF David On Sat, 27 Jun 2020 at 13:23, Roger L Costello costello@xxxxxx . . . Read full entry »


Any difference between 1 div $x and math:pow($x, -1)?

Posted 6/27/2020 12:23:00 PM

Hi Folks, My XSLT program computes this expression many times for different values of $x: 1 div (1 + math:exp(-$x)) Here is an equivalent expression: math:pow(1 + math:exp(-$x), -1) Which expression is better? By "better" I mean any one of these: - produces more accurate results - i . . . 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!

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