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!


Declarative Amsterdam

Posted 10/4/2021 10:52:51 AM

The Program for Declarative Amsterdam 2021 (http://declarative.amsterdam/program) has been announced, featuring tutorials and presentations on topics such as Saxon-JS, ixml, XProc, DITA, declarative databases, and the social issues of declarative processes, featuring names such as Betsy Haibel, Deb . . . Read full entry »


XSL-List Guidelines

Posted 10/1/2021 1:48:21 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: All combinations from a sequence

Posted 9/30/2021 8:19:27 PM

I think the recursive version is easier to read than using idiv and math:pow something like <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="data:,my&qu . . . Read full entry »


Re: All combinations from a sequence

Posted 9/30/2021 7:29:56 PM

Thanks a lot, Michael Kay, just what I needed! After a bit of thinking and just for handling a sequence of strings I came up with this: <xsl:function name="my:powerset" as="xs:string*"> <xsl:param name="seq" as="xs:string+"/> <xsl:v . . . Read full entry »


Re: All combinations from a sequence

Posted 9/30/2021 2:37:27 PM

There's a nice algorithm here https://www.geeksforgeeks.org/power-set/ which abstracts to for $i in 1 to math:pow(2, count($input)) return combination($i) where combination($i) includes or excludes each $input[$N] depending on whether bit $N is set in $i, which you can determine using bin:shift . . . Read full entry »


All combinations from a sequence

Posted 9/30/2021 2:20:04 PM

Good afternoon, I have a sequence of items and I need all combinations (not permutations) in all possible lengths. I saw what I want described as "powerset" in the Python docs: powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3) In XPath notation and based on strings: . . . Read full entry »


Re: Saxon processor for XSLT 3.0

Posted 9/23/2021 11:27:21 AM

Hi Vishnu, Also, since your variable $version is given as a number, it is not likely to be written as "3.0".... make it a string or even use system-property('version') ... Good luck, Wendell On Thu, Sep 23, 2021 at 1:34 AM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx < xsl-list-service@xxx . . . Read full entry »


Re: Saxon processor for XSLT 3.0

Posted 9/23/2021 5:34:02 AM

On Thu, 2021-09-23 at 05:12 +0000, VISHNU SINGH svishnu.singh4@xxxxxxxxx wrote: > Hi, > > "this is test xslt version {$version}" > > It is not evaluating the variable 'version'. Add expand-text="yes" to your xsl:stylesheet element (or to the xsl:message elemen . . . Read full entry »


Saxon processor for XSLT 3.0

Posted 9/23/2021 5:11:34 AM

Hi, I want to use the Saxon processor for XSLT 3.0. For this I have downloaded the *SaxonHE10-6J *package. I am simply trying to print a message using below xslt 3.0 <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Tr . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/22/2021 7:54:17 PM

And dont forget xsl:iterate as an alternative to recursive functions or templates (if you can use XSLT 3). Cheers, Eliot _____________________________________________ Eliot Kimber Sr Staff Content Engineer O: 512 554 9368 M: 512 554 9368 servicenow.com<https://www.servicenow.com> LinkedIn& . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/22/2021 6:33:26 PM

Hi again, What Graydon says is totally true, but the counter is also true, that it can be amazing what grouping *can* be made to do and problems it can solve that you didn't think were grouping problems but actually are. This actually includes overlap problems, as Gerrit (just to name one) has al . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/22/2021 6:28:43 PM

On Wed, Sep 22, 2021 at 05:46:12PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > > Especially if you find Wendell's observation above covers your use > > cases, it won't apply this time, but in general, I find that if I'm > > struggling with xsl:for-each-group, I should -- and . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/22/2021 5:46:05 PM

> Especially if you find Wendell's observation above covers your use > cases, it won't apply this time, but in general, I find that if I'm > struggling with xsl:for-each-group, I should -- and sometimes I even do! > -- remember that xsl:for-each-group is not fully general. There comes a . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/22/2021 5:16:37 PM

On Wed, Sep 22, 2021 at 05:06:34PM -0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx scripsit: > Another optimization to consider is to group using > group-adjacent="@class='analyze_visual'" returning a Boolean grouping key, > and groups that are nicely split. > > Then part/@num . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/22/2021 5:06:26 PM

Hi, Another optimization to consider is to group using group-adjacent="@class='analyze_visual'" returning a Boolean grouping key, and groups that are nicely split. Then part/@num should collapse into '{position()}' and things get simpler. Also gracefully handles the case of multiple spl . . . Read full entry »


Re: Namespaces in output

Posted 9/22/2021 2:46:41 PM

> On 22 Sep 2021, at 15:37, Terry Ofner tdofner@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Michael, > > Thank you for the clarity. > > So, a modified identity template like the one below will take care of any elements not addressed in my stylesheet. Is . . . Read full entry »


Re: Namespaces in output

Posted 9/22/2021 2:37:41 PM

Michael, Thank you for the clarity. So, a modified identity template like the one below will take care of any elements not addressed in my stylesheet. Is there any danger in this approach? <xsl:template match="*"> <xsl:element name="{name()}" namespace=" . . . Read full entry »


Re: Namespaces in output

Posted 9/22/2021 1:53:22 PM

If an element in the result tree is in the XHTML namespace, that's because you put it there, and the way to get rid of the namespace declaration is to STOP putting it there. The way you put it there depends on how you created the element. The three ways of creating an element are essentially (a) . . . Read full entry »


Re: Namespaces in output

Posted 9/22/2021 1:53:12 PM

Terry, What happens if you remove the default namespace declaration xmlns=" http://www.w3.org/1999/xhtml" from the top level? Your XSLT stylesheet is an XML document, so this is binding all unprefixed names in the XSLT (such as 'div') to the XHTML namespace. Remove the declaration and . . . Read full entry »


Re: Namespaces in output

Posted 9/22/2021 1:51:36 PM

You need to omit xmlns="http://www.w3.org/1999/xhtml" in your stylesheet. In addition, if you use an identity template, modify it like this: <xsl:template match="*"> <xsl:element name="{local-name()}"> <xsl:apply-templates select="@*, node() . . . Read full entry »


Namespaces in output

Posted 9/22/2021 1:43:36 PM

I am processing html exported from InDesign documents. As such, Every html document comes with the standard doctype and namespace declarations: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> In the past, I have skirted the namespace tangle by manually removing t . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/22/2021 2:19:21 AM

Just replace the variable definition with this: <xsl:variable name="part3ID"> <xsl:sequence select= "string( (current-group()[self::div[@class='analyze_visual']], preceding-sibling::div[@class='analyze_visual' . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/21/2021 10:37:35 PM

On Tue, 2021-09-21 at 18:59 +0000, Terry Ofner tdofner@xxxxxxxxx wrote: > Liam, > > I tried as="xs:stringb and the attribute shortcut you indicated, but > got the same empty result. > As noted in my response to my own query, I changed the for-each- > group() to group-start . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/21/2021 7:27:21 PM

Geert, Yep. That solves the problem. Thanks. Should have seen that before. Terry > On Sep 21, 2021, at 3:21 PM, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I think you need to give the variable a value outside the for-each-group > . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/21/2021 7:20:45 PM

I think you need to give the variable a value outside the for-each-group @ nextExposID is not available in all groups <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:math="http://www.w3.org/2005/xpa . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/21/2021 6:58:47 PM

Liam, I tried as="xs:stringb and the attribute shortcut you indicated, but got the same empty result. As noted in my response to my own query, I changed the for-each-group() to group-starting-with, which put parts 2 and 3 in the same xsl:when part of the xsl:choose, allowing me to access the . . . Read full entry »


Re: Value of variable not appearing in the <xsl:other

Posted 9/21/2021 6:46:25 PM

On Tue, 2021-09-21 at 17:12 +0000, Terry Ofner tdofner@xxxxxxxxx wrote: > > B B B B B B B <xsl:variable name="part3ID"> > B B B B B B B B B B B <xsl:value-of select="current- > group()[self::div[@class='analyze_visual']]/@nextExposID"></xsl:value- & . . . Read full entry »


Value of variable not appearing in the <xsl:otherwise>

Posted 9/21/2021 5:11:05 PM

I have this xml input: <div id="584175"> <p>1.2 Modes</p> <p>Some content</p> <div class="analyze_visual" lookup="2.1.2.2" av_itemIDnum="584177" nextExposID="584176"> <p>Analyzing the Vi . . . Read full entry »


[ANN] XSLT 3 training - September - for XSLT 1 and 2

Posted 9/13/2021 9:20:43 PM

The borders open and close, so i'm only offering this as an online/remote course, with a live instructor. (1) XSLT 1 Upgrade, for XSLT 1 users; (2) XSLT 3, for people who use XSLT 2 or who did (1). The XSLT 1 Upgrade session is just one afternoon - i'm aiming for one to two hours, but with open d . . . Read full entry »


Re: shuffling words in text content

Posted 9/7/2021 9:31:30 PM

Hi everyone, I replaced the reordering variable definition with the following: <!-- perturb the word order --> <xsl:variable name="shuffled-words" as="xs:string*"> <xsl:sequence select="random-number-generator()?permute($words)"/> . . . Read full entry »


Re: shuffling words in text content

Posted 9/7/2021 7:42:20 PM

On 07.09.2021 21:31, Michael Kay mike@xxxxxxxxxxxx wrote: What's wrong with tokenize(.) => random-number-generator()?permute() => string-join(" ") Both Saxon Java and Saxon-JS want tokenize(.) => (random-number-generator()?permute)() => string-join(' ') to not complain. At . . . Read full entry »


Re: shuffling words in text content

Posted 9/7/2021 7:39:31 PM

Or here's a tested version: random-number-generator()?permute(tokenize('The cat sat on the mat')) => string-join(' ') outputs mat The on the sat cat Michael Kay Saxonica > On 7 Sep 2021, at 20:31, Michael Kay <mike@xxxxxxxxxxxx> wrote: > > What's wrong with > > tokenize . . . Read full entry »


XSL-List Guidelines

Posted 9/1/2021 2:40:13 PM

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


Re: What is the relationship between transforming, ma

Posted 9/1/2021 7:52:07 AM

Yes, in XPath the "!" operator corresponds to the flatMap operation of other functional programming languages, not to the map operation, and you are quite right to point out that I failed to make this distinction. A filter operation can be expressed in terms of flatMap, but not in terms o . . . Read full entry »


Re: What is the relationship between transforming, ma

Posted 8/31/2021 10:13:34 PM

*mapping*: the process of iterating through a list of items and transforming each item in turn into a (potentially different) item. Technically, the iteration and the map are different things, but almost all map operations are usually done upon a sequence of some sort. *filtering:* A filter is a ma . . . Read full entry »


Re: What is the relationship between transforming, ma

Posted 8/31/2021 6:56:24 PM

This punter's US$.02: Transformation: the generic term for the overall process. Mapping: the creation of output that corresponds directly to some input on a fine-grained level. Filtering: choosing what information to map (or not). Enriching: adding additional information to that output that doe . . . Read full entry »


Re: In XSLT context, base-uri() and document-uri() ret

Posted 8/18/2021 3:52:33 PM

We've had to make changes to document-uri() because we were setting it in cases where we couldn't guarantee that two different documents never have the same document-uri(), which is an implicit requirement of the spec. For example copy-of should retain the base URI but drop the document URI. I'm n . . . Read full entry »


Re: [XSL-FO] right alignment after leader dots (multip

Posted 8/18/2021 11:06:57 AM

On 17/08/2021 16:36, Tony Graham tgraham@xxxxxxxxxxxxx wrote: ... The initial value of leader-length.minimum is 0pt.B You did not override that, so AH Formatter was allowed to use a 0pt leader (which possibly happened because the other leader wants to be 100%).B If you add 'leader-length.minimum= . . . Read full entry »


Re: [XSL-FO] right alignment after leader dots (multip

Posted 8/17/2021 3:28:53 PM

Hi Tony, Thanks for looking into this I have attached a full working example The first leader and the space before the number, I added because without them FOP pushes the dot leader to the next line, giving me a full line of dots About your second cell suggestion... I have a variant that does ex . . . Read full entry »


[ANN] Balisage: The Markup Conference in 2 days!

Posted 7/29/2021 6:33:52 PM

Balisage: The Markup Conference 2021 Balisage: where serious markup practitioners and theoreticians meet every summer. Once again, all virtual. Attend from your comfortable chair. pre-conference events Saturday and Sunday, 31 July and 1 August conference 2 - 6 August Overview:https://www.balisa . . . Read full entry »


Can fold-left process the attributes nodes of a stream

Posted 7/27/2021 2:02:21 PM

I am struggling to find a compact way to use XSLT 3 streaming and an accumulator to sum up the attribute values of certain elements,e.g. xsl:accumulator name="attribute-sums" as="map(xs:QName, xs:decimal)" initial-value="map{}" streamable="yes" to accumulate . . . Read full entry »


[ANN] XML XSLT XForms CSS SGML SVG XQuery and more at

Posted 7/20/2021 1:46:50 PM

Balisage: The Markup Conference Overview: https://www.balisage.net/ <https://www.balisage.net/> Program: https://www.balisage.net/2021/Program.html <https://www.balisage.net/2021/Program.html> Registration: https://www.balisage.net/registration.html <https://www.balisage.net/registr . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/16/2021 12:50:35 AM

You could also express or transform the expression into Content MathML and use a processor for that? https://www.w3.org/TR/MathML3/chapter4.html On Thu, Jul 15, 2021 at 8:43 AM Dimitre Novatchev dnovatchev@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > You can short-c . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/15/2021 3:43:21 PM

> You can short-circuit the process by generating the lexical analyser and syntax analyser directly from a BNF specification > using a parser generator; a popular choice in this community is Rex from Gunther Rademacher > (though this does an excellent job, it suffers from (a) not being pub . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/15/2021 3:28:39 PM

> I have XML documents like this: > > <Convert-to-Celsius> > <equation>(Fahrenheit - 32) * (5/9)</equation> > <variable> > <name>Fahrenheit</name> > <value>32</value> > </variable> > </Convert . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/15/2021 3:10:08 PM

> Have you done this kind of dynamic equation solving using XSLT? If so, how did you do it? What is described is not "equation solving", it is just evaluation of a function for a certain value of a variable. Solving an equation requires to have an equation in the first place. That is . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/15/2021 7:11:17 AM

On Wed, 2021-07-14 at 18:49 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > I have XML documents like this: > > <Convert-to-Celsius> > B B B <equation>(Fahrenheit - 32) * (5/9)</equation> > B B B <variable> > B B B B B B B <n . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/15/2021 6:04:49 AM

On Thu, Jul 15, 2021 at 12:18 AM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I have XML documents like this: > > <Convert-to-Celsius> > <equation>(Fahrenheit - 32) * (5/9)</equation> > <variable> > . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/15/2021 5:14:30 AM

Hi Roger Le 14/07/2021 C 20:48, Roger L Costello costello@xxxxxxxxx a C)critB : Have you done this kind of dynamic equation solving using XSLT? If so, how did you do it? Computer Algebra System like maxima (https://maxima.sourceforge.io/) have powerful representation of symbolic equations allowi . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/14/2021 8:04:07 PM

Hi Roger, > The document contains an equation which might contain variables. If it does contain variables, then I need to fetch their values and replace the variables in the equation with their values and then compute the value of the equation. > > Have you done this kind of dynamic equ . . . Read full entry »


Re: How to dynamically evaluate an equation in the inp

Posted 7/14/2021 6:57:37 PM

On 14.07.2021 20:48, Roger L Costello costello@xxxxxxxxx wrote: <Convert-to-Celsius> <equation>(Fahrenheit - 32) * (5/9)</equation> <variable> <name>Fahrenheit</name> <value>32</value> </variable> </Convert-to . . . Read full entry »


How to dynamically evaluate an equation in the input X

Posted 7/14/2021 6:48:18 PM

Hi Folks, I have XML documents like this: <Convert-to-Celsius> <equation>(Fahrenheit - 32) * (5/9)</equation> <variable> <name>Fahrenheit</name> <value>32</value> </variable> </Convert-to-Celsius> The documen . . . Read full entry »


Re: Got an XSLT function that does value intersection

Posted 7/12/2021 6:40:22 AM

On Sun, Jul 11, 2021 at 10:47 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: Yes, but doing N-squared deep-equal comparisons doesn't scale very well. > I thought that, the problem was not a grouping problem. And I wanted to present an algorithm, that c . . . Read full entry »


Re: Got an XSLT function that does value intersection

Posted 7/11/2021 5:17:33 PM

> The following XSLT stylesheet, also seems to work, Yes, but doing N-squared deep-equal comparisons doesn't scale very well. Michael Kay Saxonica > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform <http://www.w3.org/1999/XSL/Transform>" > . . . Read full entry »


Re: Got an XSLT function that does value intersection

Posted 7/11/2021 4:28:51 AM

On Thu, Jul 8, 2021 at 6:50 PM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I have an XML document that consists of <row> elements: > > <Document> > <row> > <x>1</x> > <y>2< . . . Read full entry »


XQuery alternative ⁓ map | XSLT 2.0 || 3.0

Posted 7/10/2021 1:17:19 PM

B B B B Stage four execution: let $m := c:mM($c) let $h := c:style($t, $c) => c:hM() return let $b := <b> B B B <m>{ $m - $h }</m> B B B <h>{ $h - $m }</h> B B B <e> B B B B B B B { B B B B B B B B let $e := <e>{ $m + $h }</e> B B B B B B B . . . Read full entry »


Re: Do you use Knuth's algorithms book to solve XML p

Posted 7/9/2021 4:15:44 PM

> For example, recently I wrote an XSLT program to output information about each element (name, type, minOccurs, maxOccurs, facets) in all the files of an XML Schema. My program had to take into consideration complexTypes with complexContent, complexTypes with simpleContent, complexTypes with se . . . Read full entry »


Re: Do you use Knuth's algorithms book to solve XML p

Posted 7/9/2021 4:05:19 PM

Roger, You can't do engineering without mathematics (in some form) -- but that doesn't mean they are the same thing. Cheers, Wendell On Fri, Jul 9, 2021 at 3:09 PM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > As you know, D . . . Read full entry »


Re: Do you use Knuth's algorithms book to solve XML p

Posted 7/9/2021 3:14:57 PM

It took me a long time to wrap my head around programming in XSL. In my opinion, it was very similar to programming in oldB school lisp. I have used Knutebs book for solving problems. I think what you end up having to do is understand his algorithm and then it HasB to be recast in your language of . . . Read full entry »


Do you use Knuth's algorithms book to solve XML proce

Posted 7/9/2021 3:08:53 PM

Hi Folks, As you know, Donald Knuth has written a bunch of books that describe algorithms for solving just about every conceivable problem. I've always dreamed of, one day, getting a problem to solve, looking up the appropriate algorithm in one of Knuth's books, and then expressing the algorithm . . . Read full entry »


Re: Got an XSLT function that does value intersection

Posted 7/9/2021 1:57:12 PM

> On 9 Jul 2021, at 14:03, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Michael Kay wrote: > >> In this situation, you can use grouping: >> >> <xsl:for-each-group select="row" group-by="x, y" comp . . . Read full entry »


Here’s how to eliminate duplicate elements using XSLT

Posted 7/9/2021 1:56:31 PM

Hi Folks, [This is a summary of yesterday's discussion, for the archives.] I have an XML document that consists of <row> elements: <Document> <row> <x>1</x> <y>2</y> </row> <row> <x>3</x> . . . Read full entry »


Re: Got an XSLT function that does value intersection

Posted 7/9/2021 1:02:57 PM

Michael Kay wrote: > In this situation, you can use grouping: > > <xsl:for-each-group select="row" group-by="x, y" composite="yes"> > <xsl:sequence select="current-group()[1]"/> > </xsl:for-each> That is a beautiful solu . . . Read full entry »


Re: Got an XSLT function that does value intersection

Posted 7/8/2021 1:31:30 PM

In this situation, you can use grouping: <xsl:for-each-group select="row" group-by="x, y" composite="yes"> <xsl:sequence select="current-group()[1]"/> </xsl:for-each> If your comparison operation is more complex (e.g., deep-equal()) then . . . Read full entry »


Re: Got an XSLT function that does value intersection

Posted 7/8/2021 1:30:13 PM

Am 08.07.2021 um 15:19 schrieb Roger L Costello costello@xxxxxxxxx: Hi Folks, I have an XML document that consists of <row> elements: <Document> <row> <x>1</x> <y>2</y> </row> <row> <x>3</x> . . . Read full entry »


Got an XSLT function that does value intersection (not

Posted 7/8/2021 1:19:41 PM

Hi Folks, I have an XML document that consists of <row> elements: <Document> <row> <x>1</x> <y>2</y> </row> <row> <x>3</x> <y>4</y> </row> <row> < . . . Read full entry »


Reminder: Declarative Amsterdam 2021, Call for Presen

Posted 7/8/2021 1:01:13 PM

On 4 and 5 November 2021, the third 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 (https://en.wikipedia.org/wiki/Declarati . . . Read full entry »


[ANN] Balisage Dress Rehearsals (Saturday 31 July & S

Posted 7/7/2021 9:09:16 PM

Considering "Balisage: The Markup Conference?" Unsure about the conference portal? Wish for just a bit more Markup talk? Balisage Dress Rehearsals are open to all Balisage attendees! Balisage 2021 Dress Rehearsals Balisage will use the Whova Conference Portal, which is unfamiliar to so . . . Read full entry »


XSL-List Guidelines

Posted 7/1/2021 3:38:30 PM

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


Re: Re: fn:contains in sequence – P2 | XSLT 2.0

Posted 6/24/2021 5:10:34 PM

Superb is as Superb does !!! On Thursday, June 24, 2021, 12:31:21 p.m. EDT, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: I think you want to put your variable's selection directly as the second argument expression in the contains call or rather jus . . . Read full entry »


Re: Re: fn:contains in sequence – P2 | XSLT 2.0

Posted 6/24/2021 4:31:20 PM

Am 24.06.2021 um 18:20 schrieb Fiona Chen anonymousjuly1@xxxxxxxx: > Hi, Martin: > B B B I understand what the error means. > > B B B B If I run that module in Oxygen, I get: > > <?xml version="1.0" encoding="UTF-8"?> > <SVM xmlns="schema://fc . . . Read full entry »


Re: fn:contains in sequence – P2 | XSLT 2.0

Posted 6/24/2021 4:19:47 PM

Hi, Martin:B B B B B B B I understand what the error means. B B B B If I run that module in Oxygen, I get: <?xml version="1.0"encoding="UTF-8"?> <SVM xmlns="schema://fc.fasset/svm"><!-- June 23rd, 202122:18:41 --> B B <Negative><!--Negati . . . Read full entry »


Re: fn:contains in sequence – P2 | XSLT 2.0

Posted 6/24/2021 3:53:23 PM

Am 24.06.2021 um 16:47 schrieb Fiona Chen anonymousjuly1@xxxxxxxx: > B B B B However, I am not able to transform the report in XSLT 2.0 > equivalent without MarkLogic cts. > > <xsl:template match="SVM"> > <xsl:variable name="classVal" select="class[/ . . . Read full entry »


fn:contains in sequence – P2 | XSLT 2.0

Posted 6/24/2021 2:47:35 PM

B B B B However, I am not able to transform thereport in XSLT 2.0 equivalent without MarkLogic cts. B B B B <xsl:templatematch="SVM"> B B B B B B B <xsl:variable name="classVal"select="class[xs:decimal(@val) gt 0.00]"/> B B B B B B B <xsl:elem . . . Read full entry »


fn:contains in sequence – P1 | XSLT 2.0

Posted 6/24/2021 2:36:14 PM

I am developing a classification application. As the result of theStage one module, the trained classifier will classify the documents as below: <SVM xmlns="schema://fc.fasset/svm"> B B B <classification> B B B B B B B <serial>1</serial> B B B B B B B <docI . . . Read full entry »


Re: Is XPath and/or XSLT designed such that I should

Posted 6/23/2021 8:13:09 AM

> I don't think that, using an "if" (xsl:if / xsl:choose in XSLT, "if" in XPath) control flow mechanism in the code (and equally well in XSLT) is always a bad idea. It's an integral programming tool to solve problems. To have code look nicer, may be we can encapsulate the &qu . . . Read full entry »


Re: Is XPath and/or XSLT designed such that I should

Posted 6/23/2021 4:27:33 AM

On Tue, 2021-06-22 at 19:51 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > > > Example: finding all (X)Html elements that have class $myClass: > > B B B B B //*[contains(concat(' ', @class, ' '), concat(' ', $myClass, ' > ')] > Expressions like this, which work in . . . Read full entry »


Re: Is XPath and/or XSLT designed such that I should

Posted 6/23/2021 3:49:29 AM

On Tue, Jun 22, 2021 at 10:34 PM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > <xsl:if test="empty(Cell[2]/Data)"> do something </xsl:if> > > Bad, bad, bad. > > > Question #1: is XPath and/or XSLT designed s . . . Read full entry »


Re: Is XPath and/or XSLT designed such that I should

Posted 6/22/2021 7:50:09 PM

> Question #1: is XPath and/or XSLT designed such that I should never have to write special case code? > > Question #2: If I find myself writing special case code, should I stop and say, "How can I modify this XPath and/or XSLT so that I do not have to write special case code? Remind . . . Read full entry »


Re: Is XPath and/or XSLT designed such that I should

Posted 6/22/2021 6:36:05 PM

If I understand what you mean by bspecial case codeb I think you really mean bhandling edge cases in a one-off or clunky kind of wayb. With XSLT, if you take the general approach of doing as much as possible with templates then handling special cases is usually a matter of having templates t . . . Read full entry »


Is XPath and/or XSLT designed such that I should never

Posted 6/22/2021 5:03:43 PM

Hi Folks, I think special case code is evil. To explain what I mean by "special case code" let's take its opposite: code selects what is desired under any condition. So, by "special case code" I mean extra code that is written for dealing with special conditions. Last week I . . . Read full entry »


Re: An XPath expression that avoids writing special ca

Posted 6/22/2021 1:59:07 PM

Hey again, Better: <xsl:sequence select="$document/Row[Cell[1]/Data = $element][not(Cell[2]/Data != $parent)]" /> Cheers, Wendell On Tue, Jun 22, 2021 at 9:42 AM Wendell Piez <wapiez@xxxxxxxxxxxxxxx> wrote: > Roger, > > Okay, so the requirement is that if Data[2] . . . Read full entry »


Re: An XPath expression that avoids writing special ca

Posted 6/22/2021 1:42:55 PM

Roger, Okay, so the requirement is that if Data[2] is present, it must correspond with the second argument. It may not be the same (if it is not there at all) but it must not be different. <xsl:function name="f:getRow"> <xsl:param name="element"/> <xsl:p . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 7:18:17 PM

On Sun, Jun 20, 2021 at 04:42:39PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > I have occasionally wondered whether the ban on using tunnel parameters inside a function is perhaps rather paternalistic. In many ways, accessing tunnel parameters is "less evil" than accessing global . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 5:48:28 PM

> On 20 Jun 2021, at 18:35, Jeremy Cronk jcronk@xxxxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Forgive my ignorance on this, but why is there a global context item in the first place? Ibve never seen it do anything but cause trouble, but on the other hand, . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 5:35:40 PM

Forgive my ignorance on this, but why is there a global context item in the first place? Ive never seen it do anything but cause trouble, but on the other hand, Ive never seen it actually being used except by global variables. Jeremy From: Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xx . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 5:12:58 PM

>> I have occasionally wondered whether the ban on using tunnel >> parameters inside a function is perhaps rather paternalistic. > > I think so - you can presumably have a template wrapper whose only > purpose is to return a tunel parameter, and call it from within the > f . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 5:05:35 PM

On Sun, 2021-06-20 at 16:43 +0000, Michael Kay mike@xxxxxxxxxxxx wrote: > > > > A non-streamable function fn:input-document() might be a win! > > > > Liam > > > > It would have the same effect: code using this function could not be > easily converted to be . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 4:42:33 PM

> A non-streamable function fn:input-document() might be a win! > > Liam > It would have the same effect: code using this function could not be easily converted to be part of a stylesheet that processes a collection of documents. I have occasionally wondered whether the ban on using t . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 4:12:25 PM

On Sun, 2021-06-20 at 08:01 +0000, Michael Kay mike@xxxxxxxxxxxx wrote: > > > > But i agree there are cases where it makes sense.B B Sometimes i > > write, > > B <xsl:variable name="input" select="/" /> > > for example, > > Yep, we a . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 2:55:54 PM

I think the use case here is not really a support for global variables but for appropriately-managed global configuration. I think thatbs a special case separate from a more general (ill-advised) use of global variables. That suggests that Mike Kaybs assertion that a global variable is just an . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 8:01:01 AM

> But i agree there are cases where it makes sense. Sometimes i write, > <xsl:variable name="input" select="/" /> > for example, Yep, we all do that, and it's very handy, but it also has a devastating impact: it severely restricts your abiliity to reuse your c . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 7:52:17 AM

But a lot of that stuff is assuming procedural languages, where global variables are mutable. An immutable global variable is essentially equivalent to a zero-arity function. With XSLT, the only real difference between a global variable and a zero-arity function is that a global variable has access . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 3:25:07 AM

On Sun, 2021-06-20 at 00:35 +0000, Graydon graydon@xxxxxxxxx wrote: > > I think this is one of those places where the imperative best > practise > and the declarative best practise aren't perfectly congruent. For sure things are changed, but recall that global variables in XSLT can b . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 12:35:06 AM

On Sun, Jun 20, 2021 at 12:11:50AM -0000, Christophe Marchand cmarchand@xxxxxxxxxx scripsit: > All the responses given by Eliot and Liam respect Clean Code[1] best > practises. Many principles must be respected if you expect your code may > evolve : I think this is one of those places whe . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/20/2021 12:11:42 AM

All the responses given by Eliot and Liam respect Clean Code[1] best practises. Many principles must be respected if you expect your code may evolve : * DRY : Don't Repeat Yourself ; sometime in opposition with Single Responsability principle * YAGNI : You Ain't Gonna Need It * SOLID, . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/19/2021 1:49:58 PM

I like the binding via the *for $book in books/book* expression .. it makes the entire mapping block more readable. Thanks again, very helpful. -alan On Sat, Jun 19, 2021 at 12:47 PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Am 19.06 . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/19/2021 10:47:31 AM

Am 19.06.2021 um 12:37 schrieb Martin Honnen martin.honnen@xxxxxx: > > Or you would need to use a for expression to bind a "book" e.g. > > > B B map { > B B B 'books' : array { > B B B B for $book in books/book return map:merge(( > B B B B B map:entry . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/19/2021 10:37:05 AM

Am 19.06.2021 um 12:30 schrieb Alan Painter alan.painter@xxxxxxxxx: > *map:entry('out-of-print', true())[current()/@out-of-print eq 'true']* *I think you would need to write e.g.* *B if (@out-of-print eq 'true') then map:entry('out-of-print', true()) else ()* * * Or you would need to use a . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/19/2021 10:30:15 AM

That looks very good. I'm able to get your recommendation to work: <books> <book> <title>The C Programming Language</title> <author>Brian Kernighan</author> <author>Dennis Ritchie</author> </book> <book out-of-print=" . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/19/2021 9:43:08 AM

David, My general principle in writing a function has been to avoid any global parameters/variables to begin with. When it needs one or two more options, I supply ++-arity variants. But at some point, one might face the problem of function constants that must be either set in stone, or bound t . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/19/2021 9:25:39 AM

Am 19.06.2021 um 10:54 schrieb Alan Painter alan.painter@xxxxxxxxx: But I'm wondering what the equivalent would be for conditional map entries. Supposing that there is an additional optional attribute on the 'book' element of the original xml, 'out-of-print="true"'. Furthermore, let's say . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/19/2021 8:54:04 AM

Martin, I'm liking your xpath example more and more, especially for people who like in-line parsing (for instance, folks who prefer XQuery over XPath). But I'm wondering what the equivalent would be for conditional map entries. Supposing that there is an additional optional attribute on the 'bo . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/19/2021 1:26:20 AM

> Is there agreement about Best Practice with respect to using stylesheet (global) variables inside user-defined functions? Not if one wants to have reusable functions -- many of them, in useful libraries that you can use again and again and that you can share with everyone. Best of all, defi . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/18/2021 9:46:29 PM

Unfortunately this is a significant gap in XSLT 3.0 functionality. The explanation for the gap is that the WG was reluctant to make XSLT 3.0 dependent on XPath 3.1 as distinct from XPath 3.0, and arrays only came with 3.1. There are workarounds, of course, but they aren't particularly nice. Mich . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/18/2021 9:42:57 PM

First, I'd suggest that it's bad practice to have global variables whose value depends on the global context item. If you have such variables, it makes it much harder to reuse the code, e.g. as part of a pipeline. (If you want, you can use the xsl:global-context-item declaration to enforce this.) . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/18/2021 7:07:35 PM

I agree that this case is so simple that you don't need to use xsl:apply-templates at all and can either in-line all of the xpath expressions or can convert the templates to functions. I do like breaking things up into templates so was hoping that I was just missing something and that there was a . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/18/2021 6:54:34 PM

On Fri, 2021-06-18 at 18:41 +0000, Alan Painter alan.painter@xxxxxxxxx wrote: > > > Is there a more elegant way of doing this? I don't think so; you could construct maps with integer keys and then convert them, but i don't think that's remotely elegant. -- Liam Quin,B https://www.deli . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/18/2021 6:50:03 PM

On 18.06.2021 20:45, Martin Honnen martin.honnen@xxxxxx wrote: Of course for the limited sample you could be tempted to inline anything as an XPath 3.1 expression. Like this: <xsl:template match="/"> <xsl:sequence select="map { 'books' : array { . . . Read full entry »


Re: constructing arrays in XSLT with templates

Posted 6/18/2021 6:44:46 PM

On 18.06.2021 20:40, Alan Painter alan.painter@xxxxxxxxx wrote: Hi fellow XSLT enthusiasts, I've been constructingB json in XSLT using xsl:map and xsl:map-entry and the resulting code looks really nice.B But I'm a bit stuck with arrays and was hoping for some enlightenment. Within the template f . . . Read full entry »


constructing arrays in XSLT with templates

Posted 6/18/2021 6:40:09 PM

Hi fellow XSLT enthusiasts, I've been constructing json in XSLT using xsl:map and xsl:map-entry and the resulting code looks really nice. But I'm a bit stuck with arrays and was hoping for some enlightenment. Taking as input example: <books> <book> <title>The C Programmi . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/18/2021 6:21:29 PM

If I was given a style sheet with a function that used a global variable I would immediately rewrite the function to take that variable as a parameter. Cheers, E. -- Eliot Kimber http://contrext.com From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xx . . . Read full entry »


Re: user-defined XSLT functions and stylesheet variabl

Posted 6/18/2021 5:56:15 PM

On Fri, 2021-06-18 at 17:42 +0000, David Birnbaum djbpitt@xxxxxxxxx wrote: > Dear XSLT-list, > > Is there agreement about Best Practice with respect to using > stylesheet > (global) variables inside user-defined functions? Tommie once gave a talk about best practice considered hamr . . . Read full entry »


user-defined XSLT functions and stylesheet variables?

Posted 6/18/2021 5:41:31 PM

Dear XSLT-list, Is there agreement about Best Practice with respect to using stylesheet (global) variables inside user-defined functions? If I want to be able to reuse my function in different contexts, passing in everything the function needs as an explicit parameter ensures that it won't have e . . . Read full entry »


Re: An XPath expression that avoids writing special c

Posted 6/18/2021 4:23:43 PM

Wendell wrote: > In the first case, the step 'string(Data)', in the absence of a Data node, > will return '', since string(()) (a string value of nothing) is an empty string, > i.e. a sequence of one member, (''). > In the second case, the failure of the path to reach any node at Data . . . Read full entry »


Re: An XPath expression that avoids writing special c

Posted 6/18/2021 4:02:12 PM

Roger, You ask > Question: Below are two XPath expressions. The first is the one that Mukul recommended and it returns the desired row. The second is the one that I created and it fails. The only difference between the two XPath expressions is string(Data) versus Data. Why does the former work . . . Read full entry »


Re: An XPath expression that avoids writing special c

Posted 6/18/2021 1:31:15 PM

Hi Mukul, I tried your suggestion. For this XML document: <Document> <Row> <Cell> <Data>aviation</Data> </Cell> <Cell/> </Row> </Document> I evaluated the following XPath expression in Oxygen XML: . . . Read full entry »


Re: An XPath expression that avoids writing special c

Posted 6/18/2021 1:12:35 PM

Am 18.06.2021 um 14:35 schrieb Roger L Costello costello@xxxxxxxxx: I tried your suggestion. For this XML document: <Document> <Row> <Cell> <Data>aviation</Data> </Cell> <Cell/> </Row> < . . . Read full entry »


Re: An XPath expression that avoids writing special ca

Posted 6/18/2021 12:57:39 PM

Hi Wendell, My XML document may have an element named navaid with a parent element named airport and it may have an element named navaid with a parent element named enrouteAirway, like this: <Document> B B ... B B <Row> B B B B <Cell> B B B B B B <Data>navaid . . . Read full entry »


Re: An XPath expression that avoids writing special ca

Posted 6/18/2021 12:44:58 PM

Roger, I am fairly puzzled, not by the problem as posed, but whether it is really the problem. Surely, if you had <xsl:function name="f:getRow"> <xsl:param name="element"/> <xsl:sequence select="$document/Row[Cell[1]/Data eq $element]" /> & . . . Read full entry »


Re: An XPath expression that avoids writing special c

Posted 6/18/2021 12:35:35 PM

Hi Martin, I tried your suggestion. For this XML document: <Document> <Row> <Cell> <Data>aviation</Data> </Cell> <Cell/> </Row> </Document> I used Oxygen XML to evaluate this XPath expression on the . . . Read full entry »


Re: An XPath expression that avoids writing special ca

Posted 6/18/2021 7:27:52 AM

On Thu, Jun 17, 2021 at 7:36 PM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > My XML document contains a bunch of <Row> elements, like so: > > <Document> > ... > <Row> > <Cell> > . . . Read full entry »


Re: An XPath expression that avoids writing special ca

Posted 6/18/2021 5:33:53 AM

Hi Martin, I really like your solution. Short, elegant, and to the point. The empty element is part of every set. Changing a single character. A piece of beauty & smarts. Thank you. Cheers, ac Le jeu. 17 juin 2021 C 10:16, Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxx . . . Read full entry »


Re: An XPath expression that avoids writing special ca

Posted 6/17/2021 2:16:14 PM

This is a case for pipelines. First run a transformation that turns your document into something that better represents thet semantics, like <airports> <airport>LHR</airport> <airport>LAX</airport> </airports> and then do your actual query against this docu . . . Read full entry »


Re: An XPath expression that avoids writing special ca

Posted 6/17/2021 2:15:22 PM

Am 17.06.2021 um 16:06 schrieb Roger L Costello costello@xxxxxxxxx: <xsl:sequence select="$document/Row[Cell[1]/Data eq $element][Cell[2]/Data eq $parent]" /> I think using = helps: <xsl:sequence select="$document/Row[Cell[1]/Data eq $element][Cell[2]/Data = $parent]" . . . Read full entry »


An XPath expression that avoids writing special case

Posted 6/17/2021 2:06:03 PM

Hi Folks, My XML document contains a bunch of <Row> elements, like so: <Document> ... <Row> <Cell> <Data>airport</Data> </Cell> <Cell> <Data>airports</Data> </Cell> . . . Read full entry »


[ANN] Balisage Program Adds Late-breaking News

Posted 6/16/2021 3:04:37 PM

The Balisage 2021 program has grown! Late-breaking News Pre-conference Sessions Sponsor Presentations See details at: https://www.balisage.net/2021/Program.html <https://www.balisage.net/2021/Program.html> Register at: https://www.balisage.net/registration.html <https://www.balisage.net/re . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/15/2021 9:27:28 PM

Thanks Mukul! I will give that a try. Best, Charles From: Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, June 15, 2021 12:33 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: We need to kick someone out of the group *** External email: us . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/15/2021 4:32:32 AM

On Fri, Jun 11, 2021 at 5:56 PM Charles O'Connor coconnor@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Using XSLT 2.0, I have the input XML: > > <contrib-group> > <contrib><name>Bob</name><xref rid="aff1"/>& . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/11/2021 9:04:04 PM

Thanks Wendell! I'll give that a try, and I'll be brewing a triple-decoction mash pilsner this winter when I can fill my lagering cave (OK, it's a bulkhead) with snow. Best, Charles From: Wendell Piez wapiez@xxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, June 11, 2 . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/11/2021 6:06:10 PM

Hey Charles, If the data is as I guessed, instead of grouping you could use keys to assemble the data into the structure you want. Inside the contrib-group in the result, pull the wanted affiliations into the contrib-group using an appropriate key to grab and copy them. And when they are matched . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/11/2021 1:37:20 PM

Oh, I missed that. Apologies and thanks! -----Original Message----- From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, June 11, 2021 9:35 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: We need to kick someone out of the group *** External . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/11/2021 1:34:29 PM

Am 11.06.2021 um 15:32 schrieb Charles O'Connor coconnor@xxxxxxxxxxxx: Alas, I cannot use Martinbs solution, as I am limited to XSLT 2.0. The only XSLT 3 in there was the use of the XPath 3 tail function use but the answer also stated that tail(current-group()) is subsequence(current-group(), 2 . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/11/2021 1:31:43 PM

Alas, I cannot use Martinbs solution, as I am limited to XSLT 2.0. Wendell, Sorry. When I simplified the input for the question, I forgot the "aff" in the @id <aff>. It should indeed match the @rid in the <xref>. I will have to bone up on keys. As for beer, clean beers like . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/11/2021 12:42:12 PM

Charles, Your stated input has: <contrib-group> <contrib><name>Bob</name><xref rid="aff1"/></contrib> <contrib><name>Judy</name><xref rid="aff2"/></contrib> </contrib-group> <aff . . . Read full entry »


Re: We need to kick someone out of the group

Posted 6/11/2021 12:35:03 PM

Am 11.06.2021 um 14:26 schrieb Charles O'Connor coconnor@xxxxxxxxxxxx: Hi all, Sometimes I am baffled about how to approach something. Sometimes I'm baffled by why something doesn't work. Using XSLT 2.0, I have the input XML: <contrib-group> <contrib><name>Bob</ . . . Read full entry »


We need to kick someone out of the group

Posted 6/11/2021 12:26:26 PM

Hi all, Sometimes I am baffled about how to approach something. Sometimes I'm baffled by why something doesn't work. Using XSLT 2.0, I have the input XML: <contrib-group> <contrib><name>Bob</name><xref rid="aff1"/></contrib> <c . . . Read full entry »


Re: Removing unwanted space

Posted 6/7/2021 2:19:08 PM

That's interesting. I'll give it a try. Thanks Joel! >Hi Charles, >As I understand it, you want to normalize space, but exercise the option to specify if the initial or terminal space should be replaced by a single space or removed >altogether. Here's how I'd handle it: [Snip] >Good . . . Read full entry »


Re: Conditional sort instruction as parameter within

Posted 6/7/2021 2:09:29 AM

Splendid !!B B Thanks for entertaining the question!B This is my first time using XSLT to perform sort. I incapacitated the ML sort operator and plugin the XSLT sort. A trifle unsteady in the IDEA - "Expected type 'xs:string', got 'xs:decimal' ?B But the sort rendering bears well in the UI . . . Read full entry »


Re: Conditional sort instruction as parameter within

Posted 6/6/2021 10:44:10 PM

Hi, Michael: B B B I included the Input XML in the question already. The <search:response> itself is XML as the Stage One search result: <?xml version="1.0" encoding="UTF-8"?> <search:response xmlns:search="http://marklogic.com/appservices/search"> . . . Read full entry »


Re: Conditional sort instruction as parameter within

Posted 6/6/2021 10:40:48 PM

The desired result is simple as:B <Incarnation> B B <Trade> B B B B B <Justification> B B B B B B B B <path>fn:doc('/b.xml')//*:putCurrencyAmount/*:currency</path> B B B B B B B B <highlight>USD</highlight> B B B B B B B B <path>fn:doc('/b.xml . . . Read full entry »


Re: Conditional sort instruction as parameter within

Posted 6/6/2021 9:39:41 PM

Fiona, I'm afraid you really aren't making yourself very clear. It would be much easier if you showed us a source document and a desired result document. You've shown us code like > <xsl:for-each select="highlight"> > > <xsl:sort select="if (normaliz . . . Read full entry »


Re: Conditional sort instruction as parameter within

Posted 6/6/2021 8:59:57 PM

The logic is to sort on the <search:highlight>:B <search:highlight> contains both string( /*:putCurrencyAmount/*:currency) and decimal (/*:putCurrencyAmount/*:amount) value in the same parent element (search:result/search:snippet).B "sortAmount" is supposed to sortB /*:am . . . Read full entry »


Re: Conditional sort instruction as parameter within

Posted 6/6/2021 8:23:54 PM

On Sun, 2021-06-06 at 19:33 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > On 06.06.2021 19:34, Fiona Chen anonymousjuly1@xxxxxxxxx wrote: > > > > B B B B <xsl:param name="sortAmount"> > > B B B B B B B B <xsl:for-each select="highlight"> . . . Read full entry »


Re: Conditional sort instruction as parameter within

Posted 6/6/2021 7:32:11 PM

On 06.06.2021 19:34, Fiona Chen anonymousjuly1@xxxxxxxx wrote: Question One: The conditional sort is based on the search:highlight, if it is decimal, sort the putAmount and then incarnate the document. Notice: The "Rationale" is that currency and amount must be paired. In each search:snip . . . Read full entry »


Re: Conditional sort instruction as parameter within

Posted 6/6/2021 6:29:09 PM

On 06.06.2021 19:34, Fiona Chen anonymousjuly1@xxxxxxxx wrote: Question One: The conditional sort is based on the search:highlight, if it is decimal, sort the putAmount and then incarnate the document. Notice: The "Rationale" is that currency and amount must be paired. In each search:sni . . . Read full entry »


Conditional sort instruction as parameter within group

Posted 6/6/2021 5:33:53 PM

I can sort on putAmount by exploiting the data engine through API. But I can't seem to achieve the same sort effect in pure XSLT. Below is my XSLT module extract as part of the Stage Two implementation: B B B <xsl:template match="result"> B B B B B B B <xsl:variable name=" . . . Read full entry »


Conditional sort instruction as parameter within group

Posted 6/6/2021 5:32:42 PM

I am developing a search and transform engine. Stage one ( XQuery ): It returns the search response snippet based on the point-in-time criteria from the UI: <search:response xmlns:search="http://marklogic.com/appservices/search"> B B B <search:result index="1" uri=&qu . . . Read full entry »


Re: Removing unwanted space

Posted 6/5/2021 10:02:57 PM

On 04/06/2021 19:54, Charles O'Connor coconnor@xxxxxxxxxxxx wrote: > On 04/06/2021 18:58, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: >> If you use DTD parsing, you can declare specific elements as being >> element-only (by giving a list of all permitted element children >> . . . Read full entry »


Re: Removing unwanted space

Posted 6/5/2021 5:54:11 AM

Hi Charles, As I understand it, you want to normalize space, but exercise the option to specify if the initial or terminal space should be replaced by a single space or removed altogether. Here's how I'd handle it: <xsl:template match="text()" priority="-1" mode="nor . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 10:49:51 PM

On 04/06/2021 23:45, Charles O'Connor coconnor@xxxxxxxxxxxx wrote: > Ask an ye shall receive. Here's an example from a table (words have been changed to protect the innocent), though I think Peter's template would work fine here. However, there are gene names and yeast mating types that use mark . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 10:46:53 PM

On 04/06/2021 23:05, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: [...] > > Watch out for input like > > <p>The boy<em> splshed </em>through the puddles!</p> > and, > <p>It was very un<i>convent</i><b>ion</b>al to have to fa . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 10:44:54 PM

Ask an ye shall receive. Here's an example from a table (words have been changed to protect the innocent), though I think Peter's template would work fine here. However, there are gene names and yeast mating types that use markup on just parts of terms, and I'm not sure how it would work on them: . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 10:05:06 PM

On Fri, 2021-06-04 at 21:42 +0000, Peter Flynn peter@xxxxxxxxxxx wrote: > [...] > Pass all text nodes in mixed content through a template which will > strip > space from the start (if it's the first text node in an element) or > the > end (if it's the last text node in an elemen . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 9:41:12 PM

On 04/06/2021 00:54, Charles O'Connor coconnor@xxxxxxxxxxxx wrote: > OK, I've tried this a bunch of ways and failed (using XSLT 2.0). > > The XML I'm working with has a bunch of unwanted whitespace in all sorts of places, but looking just at paragraphs, it can have > > <p> &g . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 7:18:21 PM

On Fri, 2021-06-04 at 19:08 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: > Hi, > > Alas, schema awareness is actually not a help for this particular > case or > any case where the errant whitespace turns up in places where > whitespace is > supposed to be significant (and . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 7:07:42 PM

Hi, Alas, schema awareness is actually not a help for this particular case or any case where the errant whitespace turns up in places where whitespace is supposed to be significant (and frequently is). I suppose something like schema-awareness, or actual schema awareness (XSD awareness), might be . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 6:53:41 PM

>If you use DTD parsing, you can declare specific elements as being element-only (by giving a list of all permitted element children without #PCDATA), and then >whitespace in such a context may be dropped by the parser or application (e.g. Saxon) automatically. Alas, we are limited to non- . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 5:58:21 PM

On Fri, 2021-06-04 at 12:41 +0000, Charles O'Connor coconnor@xxxxxxxxxxxx wrote: > In tables I fear that some line > breaks will be junk and others used to get rendering they want, which > will be near impossible to tease out. If you use DTD parsing, you can declare specific elements . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 1:07:19 PM

Don't forget https://www.w3.org/TR/xslt-30/#element-strip-space Useful with selected elements. HTH On Fri, 4 Jun 2021 at 13:40, Charles O'Connor coconnor@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Thanks Wendell, Joel, and Graydon! I will use your suggestions an . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 12:40:09 PM

Thanks Wendell, Joel, and Graydon! I will use your suggestions and see what I get and whether I can apply the lessons to other places I need to get rid of white space. I am at least a little gratified that this is not an easy problem causing the bumps on my forehead. Joel, to answer your question . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 11:36:25 AM

Hey Charles, A couple of techniques I use in this situation: text()[. is ancestor::p/descendant::text()[1]] - matches the first text node in a p, no matter how deep. text()[. is ancestor::p/descendant::text()[last()]] - same for the end text()[not(matches(.,'\S')] - text that has no non-whitesp . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 8:49:27 AM

Hi Charles, This question seems to need more specificity. People can reasonably disagree on details, especially if a space appears to be an object of markup, or there are expectations further downstream about space explicitly tagged/formatted. For example, in the following variation... <p&g . . . Read full entry »


Re: Removing unwanted space

Posted 6/4/2021 12:36:35 AM

On Thu, Jun 03, 2021 at 11:54:25PM -0000, Charles O'Connor coconnor@xxxxxxxxxxxx scripsit: > OK, I've tried this a bunch of ways and failed (using XSLT 2.0). > > The XML I'm working with has a bunch of unwanted whitespace in all > sorts of places, but looking just at paragraphs, it can . . . Read full entry »


Removing unwanted space

Posted 6/3/2021 11:54:18 PM

OK, I've tried this a bunch of ways and failed (using XSLT 2.0). The XML I'm working with has a bunch of unwanted whitespace in all sorts of places, but looking just at paragraphs, it can have <p> The rain in <bold>Spain</bold> <italic>is</italic> wet. </p> O . . . Read full entry »


XSL-List Guidelines

Posted 6/1/2021 2:29:31 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: White papers etc on xsl:iterate

Posted 5/27/2021 10:46:28 PM

On Thu, 2021-05-27 at 21:39 +0000, rick@xxxxxxxxxxxxxx wrote: > . Does anyone know of any white papers, > conference presentations, etc. on <xsl:iterate>? It's included in the XSLT 3 course i run :) (i've expamded coverage somewhat, too) and there are examples om the spec. Liam -- L . . . Read full entry »


Aw:  White papers etc on xsl:iterate

Posted 5/27/2021 9:58:45 PM

https://www.balisage.net/Proceedings/vol25/html/Walsh 01/BalisageVol25-Walsh01.html#xsliterate -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 27.05.21, 23:38 schrieb "rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: Hi all, I . . . Read full entry »


Re: White papers etc on xsl:iterate

Posted 5/27/2021 9:42:05 PM

I'm currently not aware of any, but https://xsl.markmail.org/search/?q=iterate should unearth some examples. On 27.05.2021 23:38, rick@xxxxxxxxxxxxxx wrote: Hi all, I finally used <xsl:iterate> on a job and it was pretty useful passing parameters for each iteration. Does anyone know of an . . . Read full entry »


White papers etc on xsl:iterate

Posted 5/27/2021 9:38:08 PM

Hi all, I finally used <xsl:iterate> on a job and it was pretty useful passing parameters for each iteration. Does anyone know of any white papers, conference presentations, etc. on <xsl:iterate>? I looked at the spec and the Saxon docs, but I was hoping to find more details and exa . . . Read full entry »


[ANN] Balisage Late-breaking News proposals due 4 June

Posted 5/27/2021 7:05:30 PM

The peer-reviewed part of the Balisage 2021 program has been scheduled (https://www.balisage.net/2021/Program.html). As usual, some speaking slots were set aside for late-breaking news, updates, and fast-breaking stories. Proposals for late-breaking presentations at Balisage are due June 4th. Deta . . . Read full entry »


Re: Transform selected attribute to element when eleme

Posted 5/22/2021 9:28:02 PM

p b$o8 Excellent Collaboration!!!B On Saturday, May 22, 2021, 12:03:32 p.m. MST, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: On 22.05.2021 20:51, Sam Spade anonymousjuly1@xxxxxxxx wrote: > As you can see,B the unwanted attribute . . . Read full entry »


Re: Transform selected attribute to element when eleme

Posted 5/22/2021 7:03:31 PM

On 22.05.2021 20:51, Sam Spade anonymousjuly1@xxxxxxxx wrote: As you can see,B the unwanted attribute *currencyScheme* still persists. Is there a way to remove the attribute which is not in the $keepAttr list? Perhaps in this case it is better to filter when applying templates: <xsl:stylesheet . . . Read full entry »


Re: Transform selected attribute to element when eleme

Posted 5/22/2021 6:51:01 PM

Thanks!B I tried a similar approach before. Input: <requestConfirmation xmlns="http://example/confirmation"> B B B <trade> B B B B B B B <cal> B B B B B B B B B B B <c>PRECEDING</c> B B B B B B B B B B B <bcs id="businessCenters"> B B B . . . Read full entry »


Re: How to fuzz the last four digits of a lat/long?

Posted 5/22/2021 1:26:40 PM

> But, but, but, .... > > I really want to do the transformation in one step. Why? There are clearly two separate operations here - rounding the value and then formatting it. I would do round($x, 2) => format-number("000.000000") Michael Kay Saxonica > Is there a way t . . . Read full entry »


How to fuzz the last four digits of a lat/long?

Posted 5/22/2021 1:09:38 PM

Hi Folks, I want to transform this location data: <location> <altitude>30000</altitude> <latitude>42.364978</latitude> <longitude>-71.022362</longitude> </location> to this: <location> <altitude>30000</altitude> . . . Read full entry »


Re: Transform selected attribute to element when eleme

Posted 5/22/2021 8:12:38 AM

Am 22.05.2021 um 02:02 schrieb Sam Spade anonymousjuly1@xxxxxxxx: > > 2.As I point out in the post, > > https://stackoverflow.com/questions/67575484/what-attribute-node-cannot-follo w-non-attribute-node-in-element-content-tells > <https://stackoverflow.com/questions/67575484/what- . . . Read full entry »


Re: Transform selected attribute to element when eleme

Posted 5/22/2021 12:01:47 AM

2.B B B B As I point out in the post, B https://stackoverflow.com/questions/67575484/what-attribute-node-cannot-follo w-non-attribute-node-in-element-content-tells B it is not only very difficult to search value if anelement (<currency>) contains both element (<id>) and text valu . . . Read full entry »


Re: Transform selected attribute to element when eleme

Posted 5/22/2021 12:01:07 AM

Hi, Martin: B B B B B B B B B B B The purposesof flattening the XML are: 1.B B B B After the $keepAttr is flattened to element (therewill not be any attribute ), I can further transform the flattened XML to JSON.That is the purpose of this post: https://stackoverflow.com/questions/67145900/xque . . . Read full entry »


Re: Transform selected attribute to element when eleme

Posted 5/21/2021 5:35:52 PM

On 21.05.2021 16:30, Sam Spade anonymousjuly1@xxxxxxxx wrote: |The transformation logic: ||| | 1) transform namespace 2) transform root element 3) transform the selected attribute(s) to element (the attribute name is parameterised not hard-coded) 4) the transformed element shouldn't contain both o . . . Read full entry »


Transform selected attribute to element when element

Posted 5/21/2021 2:30:07 PM

Input: B <requestConfirmation xmlns="http://example/confirmation"> <trade> <cal> <c>PRECEDING</c> <bcs id="businessCenters"> <bc>USNY</bc> <bc>GBLO</bc> . . . Read full entry »


Re: preceding-sibling in a group

Posted 5/21/2021 7:45:59 AM

Martin's suggestions would both work. Another idea would be <xsl:variable name="first-note" select="current-group/PART_DES[matches(.,'NOTE')][1] > > <xsl:for-each select="current-group()"> > <xsl:choose> > < . . . Read full entry »


Re: preceding-sibling in a group

Posted 5/20/2021 8:49:41 PM

On 20.05.2021 22:36, Martin Honnen martin.honnen@xxxxxx wrote: The idea is that when I see a NOTE string, I want that entry and all following within the same group to be <note> elements. So I am look for preceding-sibling or self that contains NOTE but restricted to the same group. I am u . . . Read full entry »


Re: preceding-sibling in a group

Posted 5/20/2021 8:35:52 PM

On 20.05.2021 22:20, rick@xxxxxxxxxxxxxx wrote: The idea is that when I see a NOTE string, I want that entry and all following within the same group to be <note> elements. So I am look for preceding-sibling or self that contains NOTE but restricted to the same group. I am using XSLT 3. Th . . . Read full entry »


Re: preceding-sibling in a group

Posted 5/20/2021 8:20:03 PM

Here is my sample input: <?xml version="1.0" encoding="UTF-8"?> <dataroot> <DH675AU> <FIG_NO>99999</FIG_NO> <PART_DES>DIPSTICK</PART_DES> </DH675AU> <DH675AU> <FIG_NO>99999 . . . Read full entry »


Re: preceding-sibling in a group

Posted 5/19/2021 5:22:47 PM

It would be good to see the problem in context, but if you want to select elements that are both (a) members of the current group, and (b) preceding siblings of the current element, then you could use (preceding-sibling::* intersect current-group()). I suspect though that there is a better solutio . . . Read full entry »


Re: preceding-sibling in a group

Posted 5/19/2021 4:55:45 PM

On 19.05.2021 18:45, rick@xxxxxxxxxxxxxx wrote: If I am processing elements in the current-group (), is the preceding-sibling axis restricted to the current group? I want to test the value on a preceding-sibling element, but want to restrict it to the group I am processing. Any pointers would be a . . . Read full entry »


preceding-sibling in a group

Posted 5/19/2021 4:45:28 PM

Hi, If I am processing elements in the current-group (), is the preceding-sibling axis restricted to the current group? I want to test the value on a preceding-sibling element, but want to restrict it to the group I am processing. Any pointers would be appreciated. I am using XSLT 3. Thank you . . . Read full entry »


[ANN] Call for Late-breaking News -- Balisage: The Mar

Posted 5/18/2021 3:26:23 PM

It is not too late for you to speak at Balisage! The peer-reviewed part of the Balisage 2021 program has been scheduled (https://www.balisage.net/2021/Program.html). The Markup world moves quickly, so every year some speaking slots are set aside for late-breaking news, updates, and fast-breaking s . . . Read full entry »


[ANN] Markup UK conference approaching (May 21 - 22)

Posted 5/16/2021 10:58:32 AM

Markup UK conference is now less than a week away. (May 21 - 22) Starting Friday, there will be two days of exciting presentations on various topics including XSLT and Schematron. There will also be an extensive XForms tutorial, spanning both Friday and Saturday mornings. The full schedule ca . . . Read full entry »


Declarative Amsterdam 2021, Call for Presentations

Posted 5/15/2021 8:38:40 AM

On 4 and 5 November 2021, the third 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 (https://en.wikipedia.org/wiki/Declarati . . . Read full entry »


Re: passing a function as a parameter to transform()

Posted 5/14/2021 1:51:30 PM

On Fri, May 14, 2021 at 01:35:38PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > Clearly the "called" stylesheet isn't picking up the supplied value for the parameter. I can't see why, but I would look carefully at the rather weird namespace that it's using. Martin correctly identi . . . Read full entry »


Re:  Re:  Re: passing a function as a parameter to tr

Posted 5/14/2021 1:48:20 PM

On Fri, May 14, 2021 at 01:30:39PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: > The parameter passing needs to use the URI of the namespace and not the namespace prefix. (Argh.) That works! Thank you! Apologies for the cabbage-nature. For anyone who might be curious, the working . . . Read full entry »


Re: passing a function as a parameter to transform()

Posted 5/14/2021 1:35:33 PM

I can't see what's wrong at this stage, but that's probably because I'm not sure exactly what your code looks like after a series of changes. Clearly the "called" stylesheet isn't picking up the supplied value for the parameter. I can't see why, but I would look carefully at the rather w . . . Read full entry »


Aw: Re:  Re: passing a function as a parameter to tra

Posted 5/14/2021 1:30:34 PM

The parameter passing needs to use the URI of the namespace xmlns:local="data:,dpc" e.g.QName('data:,dpc','functionname&# 39;) -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 14.05.21, 15:06 schrieb "Graydon graydon@xxxxxxxxx" <xsl-list- . . . Read full entry »


Re: passing a function as a parameter to transform()

Posted 5/14/2021 1:28:35 PM

On Fri, May 14, 2021 at 01:05:31PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > You're calling <xsl:sequence select="local:tiny('away')" />, but there is no function named local:tiny in scope. What there is is a variable (parameter) named local:tiny, whose value is a function . . . Read full entry »


Re:  Re: passing a function as a parameter to transfo

Posted 5/14/2021 1:06:43 PM

On Fri, May 14, 2021 at 12:39:53PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: > Use $local:function Progress! If I invoke the passed-as-a-parameter function as <xsl:sequence select="$local:tiny('away')" /> in the stylesheet called by transform(), it changes the error . . . Read full entry »


Re: passing a function as a parameter to transform()

Posted 5/14/2021 1:05:25 PM

You're calling <xsl:sequence select="local:tiny('away')" />, but there is no function named local:tiny in scope. What there is is a variable (parameter) named local:tiny, whose value is a function. So you need a dynamic call on the function held in the variable, not a static call on . . . Read full entry »


Aw: Re: passing a function as a parameter to transfor

Posted 5/14/2021 12:39:47 PM

Use $local:function -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 14.05.21, 14:15 schrieb "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: On Thu, May 13, 2021 at 09:20:49PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit . . . Read full entry »


Re:  Re: passing a function as a parameter to transfo

Posted 5/14/2021 12:31:17 PM

On Fri, May 14, 2021 at 12:20:04PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: > Perhaps try visibility=&quot;public&quot; on the function declaration If I try <xsl:function name="local:tiny" as="text()" visibility="public"> <xsl:param . . . 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