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: Subtle (or not?) Map Processing Bug in XQuery

Posted 1/7/2022 7:28:06 PM

I'm glad we dragged the thread (sort of) on topic! On Fri, Jan 7, 2022 at 1:23 PM Eliot Kimber ekimber@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Good point about asbIbm OCD about it in XSLT but havenbt gotten there in > my XQuery yet. > -- ...Wendell Pie . . . Read full entry »


Re: Subtle (or not?) Map Processing Bug in XQuery

Posted 1/7/2022 6:22:42 PM

Good point about asbIbm OCD about it in XSLT but havenbt gotten there in my XQuery yet. But Ibm not sure how it would have caught the error in this case as in the bug case Ibm still providing maps to map:merge(), just the wrong ones. Cheers, E. -- Eliot Kimber http://contrext.com . . . Read full entry »


Re: Subtle (or not?) Map Processing Bug in XQuery

Posted 1/7/2022 6:11:18 PM

> In my XQuery script Ibm building a map from all the image files in a directory tree (using BaseXbs file extensions): > > let $files := file:list($rootDir, true(), b*.pngb) > let $imageMap := map:merge( > for $file in $files > map:entry(local:getFilename($file), map{bpathb . . . Read full entry »


Book XQuery for Humanists

Posted 1/7/2022 6:09:35 PM

At Jean-Paul Rehrbs recommendation I just bought XQuery for Humanists by Clifford Anderson and Joe Wicentowski. Looking it over it looks like a great resourcebI look forward to taking the time to read through it. I really like the tone and the presentation of XML and XPath fundamentals. Ibve rec . . . Read full entry »


Re: Subtle (or not?) Map Processing Bug in XQuery

Posted 1/7/2022 5:45:43 PM

Christian and Jean-Paul, I hadnbt thought about map:for-each() (not sure I even realized it was an option). Ibll have to think about that more. Map:for-each() B feels very familiar to my JavaScript brain (which it pains me to admit I even have but there it is). Ibll check out Joebs . . . Read full entry »


Re: Subtle (or not?) Map Processing Bug in XQuery

Posted 1/7/2022 5:21:35 PM

Hi Eliot, > Ibm also wondering if therebs any general source of XQuery coding patterns for working with maps in non-trivial ways? I havenbt run across one but I havenbt looked too hard yet. You could use map:remove, either with map:keysb& let $orphanMap := map:remove($imageMap, map: . . . Read full entry »


Re: Subtle (or not?) Map Processing Bug in XQuery

Posted 1/7/2022 5:13:03 PM

I would look at map:for-each() <https://docs.basex.org/wiki/Map_Module#map:for-each> for this. You may want to consider an output to an array if you've got multiples of the same key. I would suggest chapter 7 of the new book by Joe Wicentowski *XQuery for Humanists* which covers maps and arr . . . Read full entry »


Subtle (or not?) Map Processing Bug in XQuery

Posted 1/7/2022 4:18:57 PM

Ibm starting to use XQuery again after being away from it for a few years and also trying to re-learn how to operate on maps efficiently as my current XQuery use is largely data analysis and reporting over large bodies of DITA content, so therebs lots of reference management and resolution to be . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/5/2022 7:31:50 PM

Hi Makita-san, You are right, in most cases the DITA-OT is good about suppressing leading/trailing spaces! We use Oxygenbs PDF Chemistry for publishing, and I noticed the following: * In TOC, trailing whitespace pushed the dot leader (dotted line) rightward. * In figure titles, leading . . . Read full entry »


Re: Sorting XML data by <entry ID="">

Posted 1/5/2022 1:32:47 PM

Hey Chuck, Assuming it was the default scenario in oXygen (or whichever one it was) open it up and inspect it - you can probably see (under the third tab) where an *.html file prefix is defined. This default scenario for XML IIRC picks up an xml-stylesheet PI from the document and executes it - t . . . Read full entry »


Re: Sorting XML data by <entry ID="">

Posted 1/5/2022 11:52:13 AM

Hi Charles! Graydon is probably correct, it is most likely oXygen 24 that is changing the name on you. Are you using a Transformation Scenario? If so, try editing the Transformation Scenario in question, and choosing the "Output" tab (the R-most of the 3 tabs). There you can control wher . . . Read full entry »


Re: Sorting XML data by <entry ID="">

Posted 1/5/2022 8:07:21 AM

Graydon wrote: The result document file name is not specified by the XSLT, so it's presumably being controlled by whatever you're using to run the stylesheet. OK, I see that if I run XSLTproc from the Linux command line I can control the file extension of the output files. Thanks for the tip! C . . . Read full entry »


Re: Sorting XML data by <entry ID="">

Posted 1/5/2022 7:07:21 AM

Graydon wrote: The below XSLT seems to work, but despite the xsl:output method="xml" declaration, the files come out as .html (even though the contents are fine). I should have said, the files areB output with an HTML extension, even though the XML structure remains intact. How are you r . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/5/2022 6:25:14 AM

Hi Chris, > I want to remove leading/trailing whitespace from certain DITA block elements. For example, I want to turn this: I have been working with DITA and found that there is *no needs* to remove leading/trailing spaces when we publish it to PDF or HTML. However one output format do ne . . . Read full entry »


Re: Sorting XML data by <entry ID="">

Posted 1/5/2022 5:09:14 AM

On Wed, Jan 05, 2022 at 04:51:43AM -0000, Charles Muller acmuller@xxxxxxxxxxxxxxx scripsit: > > The below XSLT seems to work, but despite the xsl:output > > method="xml" declaration, the files come out as .html (even though > > the contents are fine). > > I should . . . Read full entry »


Re: Sorting XML data by <entry ID="">

Posted 1/5/2022 4:51:37 AM

The below XSLT seems to work, but despite the xsl:output method="xml" declaration, the files come out as .html (even though the contents are fine). I should have said, the files areB output with an HTML extension, even though the XML structure remains intact. Regards, Chuck What am . . . Read full entry »


Sorting XML data by <entry ID="">

Posted 1/5/2022 4:31:41 AM

My dictionary data has the below basic format (simplified here): <entry ID="c8fc4"> <pron> <sense> <refs> </entry> <entry ID="c8f00"> <pron> <sense> <refs> </entry> <entry ID="c8f25"> < . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/4/2022 10:39:25 PM

Very reassuring -- I hope you're having a great 2022 so far Eliot! Cheers, Wendell On Tue, Jan 4, 2022 at 3:53 PM Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Note that this function: > > > > <xsl:function name="mine:is . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/4/2022 8:52:36 PM

Note that this function: <xsl:function name="mine:is-trim-element" as="xs:boolean"> <xsl:param name="elt" as="node()"/> <xsl:value-of select="exists($elt[self::desc or self::dt or self::endnote or self::entry or self::example-titl . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/4/2022 8:50:01 PM

Hi Chris, Consider something like this: <xsl:function name="mine:is-trim-element" as="xs:boolean"> <xsl:param name="elt" as="node()"/> <xsl:apply-templates mode="mine:is-trim" select="$elt"/> </xsl:function> . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/4/2022 8:36:52 PM

Hi Dimitre, That is good advice about functions b I will keep it in mind! Hi everyone, So I ran into a limitation of using document node-set variables in template match expressions: <!-- put document nodes in $trim-elements --> <xsl:variable name="trim-elements" select= . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/3/2022 2:42:30 AM

On Sun, Jan 2, 2022 at 5:58 PM Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Dimitre, > > Just some feedback from a novice... For me, this would be difficult to > remember to determine if a node is in a sequenc . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/3/2022 1:58:13 AM

Hi Dimitre, Just some feedback from a novice... For me, this would be difficult to remember to determine if a node is in a sequence: exists(index-of($seq, $n, id-equal#2)) A one-word operator for this would be easier for me to remember: $n in $seq $n is $seq Hi everyone (again), I was abl . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/2/2022 11:12:09 PM

On Sun, Jan 2, 2022 at 2:42 PM Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Thanks Michael, Martin! This list is great. > > > > Given the many articles on the various ways of comparing identicality in > XSL . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/2/2022 10:42:01 PM

Thanks Michael, Martin! This list is great. Given the many articles on the various ways of comparing identicality in XSLT 2+, I was surprised not to find the answer to this one. * Chris . . . Read full entry »


XSL-List Guidelines

Posted 1/1/2022 6:09:54 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: Using node-set variables in predicates (another no

Posted 1/1/2022 10:03:52 AM

Use (. intersect X). It may not be intuitive, but it does exactly what you want, and it becomes intuitive once you've done it a few times. Michael Kay Saxonica > On 1 Jan 2022, at 06:00, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> . . . Read full entry »


Re: Using node-set variables in predicates (another no

Posted 1/1/2022 9:20:13 AM

Am 01.01.2022 um 07:00 schrieb Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx: > > Hi everyone, and happy new year's! > > Let's say I have a variable that contains a set of nodes: > > <xsl:variable name="nodes" select="//(foo|bar|baz)"/> > . . . Read full entry »


Aw:  Using node-set variables in predicates (another n

Posted 1/1/2022 8:38:37 AM

I think you have the right expression but you could also use [some $node in $nodes satisfies . is $node] as the predicate. -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 01.01.22, 07:00 schrieb "Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx&qu . . . Read full entry »


Using node-set variables in predicates (another node

Posted 1/1/2022 6:00:22 AM

Hi everyone, and happy new year's! Let's say I have a variable that contains a set of nodes: <xsl:variable name="nodes" select="//(foo|bar|baz)"/> In XPath 3.0, I can apply a template directly to this node-set variable (very cool!): <xsl:template match="$nodes& . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/30/2021 5:44:15 PM

> - If order of the sequence must be maintained, consider fold-left() or fold-right() I suppose > - but test it! I would definitely prefer the index-of() - based solution: for being: - shortest - with least moving parts and surface - shown in actual performance measurements to be no . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/30/2021 2:46:06 PM

Hmm.... Takeaways for me seem to be: - For the operation in question, prefer "$nodes/." or perhaps "$nodes/self::node()" or $nodes/self::* as appropriate, plus a comment - If order of the sequence must be maintained, consider fold-left() or fold-right() I suppose - but test . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 11:24:39 PM

> No, it doesn't seem to be fixed, Mike's implementation seems to try be > smarter than the spec allows and his own coding assumes :) Seems BaseX rules! And glad to be a contributor to the eventual future improvement of Saxon :) Cheers, Dimitre On Wed, Dec 29, 2021 at 12:17 PM Martin Honn . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 8:17:09 PM

On 29.12.2021 20:59, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: B B document (fragments?) are involved. Yes, bugs happen... Just trying to evaluate Dr. Kay's fold-left solution with Saxon (EE9.1.7 via Oxygen) I am getting a result of 20 nodes but the correct must be just 3 nodes. BaseX correc . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 8:01:31 PM

On Wed, Dec 29, 2021 at 11:47 AM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Probably it works well enough in practice; if it was part of a library > i was distributing, at the very least i'd want to document that the > order is not g . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 7:58:58 PM

On Wed, Dec 29, 2021 at 11:10 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > As I said, eXist-db is struggling > with generate-id based approaches, at least if nodes from different > document (fragments?) are involved. Yes, bugs happen . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 7:47:44 PM

On Wed, 2021-12-29 at 19:06 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > On Wed, Dec 29, 2021 at 10:27 AM Martin Honnen martin.honnen@xxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I am happy to state that the provided solution produces the correct > . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 7:45:45 PM

On Wed, 2021-12-29 at 18:34 +0000, Michael Kay mike@xxxxxxxxxxxx wrote: > > As Dimitre says, ($n except $a) where $n is a singleton isn't > immediately intuitive - but intuition takes practice! I'd be tempted to write, function($found-so-far, $new) { ( $found-so-far, if . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 7:10:47 PM

On 29.12.2021 20:06, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: On Wed, Dec 29, 2021 at 10:27 AM Martin Honnen martin.honnen@xxxxxx <mailto:martin.honnen@xxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: >B I don't . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 7:06:02 PM

On Wed, Dec 29, 2021 at 10:27 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I don't have to know one, I just pointed out that the spec doesn't > guarantee the order. Thus I don't see why, given the spec, one should > expect any implem . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 6:33:29 PM

> So given this expression: > > fold-left($nodes, (), function($a, $n) { $a, $n except $a }) > > I understand this to be iterating over $nodes from left to right, applying the function function($a, $n) to each node, where $a is the next node and $n is the accumulated value (being the . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 6:31:25 PM

On 29.12.2021 19:27, Martin Honnen martin.honnen@xxxxxx wrote: It seems, on the other hand, eXide of eXist-db in the online version doesn't even grok some of the generate-id based attempts: let $nodes := (1 to 10) ! parse-xml-fragment('<node>' || . || '</node>')/node(), B B B $nodes . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 6:27:11 PM

On 29.12.2021 17:36, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: On Wed, Dec 29, 2021 at 12:21 AM Martin Honnen martin.honnen@xxxxxx <mailto:martin.honnen@xxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>> wrote: Am 29.12.202 . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 5:57:28 PM

Dimitre, ThanksI see now that I had the parameters reversedI didnt read the spec carefully enough and assumed that the order of the parameters to fold-left matched the order of the parameters to the function. Cheers, E. _____________________________________________ Eliot Kimber Sr Staff Co . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 4:58:51 PM

On Wed, Dec 29, 2021 at 2:37 AM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Here is an improved (and shorter) version of the fold-left() solution: > > fold-left($nodes, (), function($a, $n) { $a, $n except $a }) > Let's compare the two: $nod . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 4:50:57 PM

On Wed, Dec 29, 2021 at 7:25 AM Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > So given this expression: > > fold-left($nodes, (), function($a, $n) { $a, $n except $a }) > > I understand this to be iterating over $nodes from le . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 4:36:13 PM

On Wed, Dec 29, 2021 at 12:21 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Am 29.12.2021 um 00:32 schrieb Dimitre Novatchev dnovatchev@xxxxxxxxx: > > > > > > Hit Send too early: > > Do notice: this seems the only so . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 3:25:17 PM

Wowthis generated much more discussion than I anticipated. For my requirements of the moment the order of the result node set is unimportant, so $nodes intersect () seems like the least surprising solution (and I suspect I might have arrived at it if Id spent a bit more time thinking about the . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 10:37:09 AM

Here is an improved (and shorter) version of the fold-left() solution: fold-left($nodes, (), function($a, $n) { $a, $n except $a }) Michael Kay Saxonica > On 28 Dec 2021, at 23:47, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > For a solution th . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 8:21:44 AM

Am 29.12.2021 um 00:32 schrieb Dimitre Novatchev dnovatchev@xxxxxxxxx: > > > On Tue, Dec 28, 2021 at 3:29 PM Dimitre Novatchev > <dnovatchev@xxxxxxxxx> wrote: > > A pure XPath solution: > > let $ids := distinct-values($nodes ! generate-id(.)) > B B retu . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 12:46:22 AM

As for performance, I compared the execution times of the two solutions (the index-of vs fold-left / intersect / if-then-else). The Xml document was : "<t><a/><b/><c/></t>". The $nodes sequence contained 45 nodes: $nodes := ($xml/*/a, $xml/*/c, $xml/*/b . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 12:23:42 AM

On Tue, Dec 28, 2021 at 4:10 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > On 28 Dec 2021, at 23:54, Dimitre Novatchev dnovatchev@xxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > > > $ . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/29/2021 12:10:30 AM

> On 28 Dec 2021, at 23:54, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > $nodes[index-of($nodes ! generate-id(.), generate-id(.))[1]] > > This seems a candidate for "the shortest solution" and it shouldn't be inef . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 11:55:24 PM

Actually, O(n*m) where n is the number of input nodes and m the number of output (distinct) nodes. So it's likely to be perfectly viable for large n, but not for large m. Michael Kay Saxonica > On 28 Dec 2021, at 23:47, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx& . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 11:54:41 PM

On Tue, Dec 28, 2021 at 3:47 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > For a solution that delivers distinct nodes in order of first appearance, my preference would be > > nodes => fold-left((), function($all, $this) {if ($all intersect $ . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 11:47:23 PM

For a solution that delivers distinct nodes in order of first appearance, my preference would be $nodes => fold-left((), function($all, $this) {if ($all intersect $this) then $all else ($all, $this)}) It's likely to be O(n^2) in most implementations, whereas Martin Honnen's solution is probabl . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 11:36:19 PM

To see that the original sequence order is preserved in the result, here is a complete example: let $xml := parse-xml("<t><a/><b/><c/></t>"), $nodes := ($xml/*/a, $xml/*/c, $xml/*/b, $xml/*/a, $xml/*/b ), $ids := distinct-values($nodes ! generate-id( . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 11:32:05 PM

On Tue, Dec 28, 2021 at 3:29 PM Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote: > A pure XPath solution: > > let $ids := distinct-values($nodes ! generate-id(.)) > return $ids ! (function($id) {$nodes[generate-id(.) eq $id][1]})(.) > > Happy New Year to all ! > Hit . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 11:30:06 PM

A pure XPath solution: let $ids := distinct-values($nodes ! generate-id(.)) return $ids ! (function($id) {$nodes[generate-id(.) eq $id][1]})(.) Happy New Year to all ! On Tue, Dec 28, 2021 at 2:39 PM Wendell Piez wapiez@xxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 10:39:22 PM

Eliot and XSL-List, Along similar lines to $nodes | (), consider $nodes except () $nodes intersect $nodes I'm finding it difficult to argue what's most intuitive but I kind of like 'intersect'. Can't vouch for performance though. :-) Best wishes for 2022 -- Wendell On Tue, Dec 28, 2021 at 4 . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 9:56:08 PM

You might consider $nodes | () a bit more intuitive. Michael Kay Saxonica > On 28 Dec 2021, at 19:23, Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hmph. > > That is certainly much more efficient p but is not necessarily ob . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 9:56:02 PM

On 28.12.2021 20:28, Priscilla Walmsley pwalmsley@xxxxxxxxxxx wrote: $nodes/. would re-order them in document order if that matters. As the question says XQuery/XPath 3.1, if the order in the original sequence / node list matters, generate-id made it from XSLT into newer versions of XPath and XQue . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 7:38:57 PM

On 28.12.2021 20:28, Priscilla Walmsley pwalmsley@xxxxxxxxxxx wrote: $nodes/. would re-order them in document order if that matters. That is true but the original code did ($resultList | $node) so it will do the sorting in document order as well. . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 7:28:29 PM

Hi, $nodes/. would re-order them in document order if that matters. FunctX also has a distinct-nodes function but I doubt that it would be considered obvious, and I also doubt that it would be as efficient as what you came up with: http://www.xqueryfunctions.com/xq/functx_distinct-nodes.html Ho . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 7:23:13 PM

Hmph. That is certainly much more efficient p but is not necessarily obvious (at least not to me). Thanks! E. _____________________________________________ Eliot Kimber Sr Staff Content Engineer O: 512 554 9368 M: 512 554 9368 servicenow.com<https://www.servicenow.com> LinkedIn<https . . . Read full entry »


Re: XQuery/XPath 3.1: Node List to Node Set ("distinct

Posted 12/28/2021 7:15:40 PM

On 28.12.2021 20:10, Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx wrote: I couldnbt find an answer in my google and markmail searching so I thought Ibd ask here: Given an arbitrary list of nodes that may contain duplicates, what is the most efficient way to reduce the node list to a set? The solution . . . Read full entry »


XQuery/XPath 3.1: Node List to Node Set ("distinct no

Posted 12/28/2021 7:09:50 PM

I couldnt find an answer in my google and markmail searching so I thought Id ask here: Given an arbitrary list of nodes that may contain duplicates, what is the most efficient way to reduce the node list to a set? The solution I came up with is a recursive function: (: Get the unique nodes fro . . . Read full entry »


Re: Aw: PDF output - file can't be opened

Posted 12/23/2021 6:23:15 PM

Cool!! I have got Oxygen, so will give that a try. It is kind of fun to go through the raw XSL-FO, I didnbt know what it looked like. Michele From: Wendell Piez wapiez@xxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, December 23, 2021 1:10 PM To: xsl-list@xxxxxxx . . . Read full entry »


Re: Aw: PDF output - file can't be opened

Posted 12/23/2021 6:10:08 PM

Michele, In case you are an oXygen XML user, FOP comes bundled and is available from the middle tab of an XSLT Transformation Scenario - it is run as a post-process, consuming the XML produced by the transformation (using the XSL-FO vocabulary to which Martin refers). If you have no oXygen, FOP i . . . Read full entry »


Re: Aw:  PDF output - file can't be opened

Posted 12/23/2021 4:32:24 PM

Hi Martin b Ah. So if I understand correctly, therebs an additional transformation needed: xml ==> xsl-fo ==> PDF. I shall go and investigate this Apache FOP! Thanks -- Michele From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, De . . . Read full entry »


Aw:  PDF output - file can't be opened

Posted 12/23/2021 4:26:51 PM

XSLT produces XSL-FO , not PDF. To convert XSL-FO to PDF , use Apache FOP. -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 23.12.21, 17:19 schrieb "Michele R Combs mrrothen@xxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: Hi b A colleague . . . Read full entry »


PDF output - file can't be opened

Posted 12/23/2021 4:19:23 PM

Hi - A colleague sent me a style sheet they use to convert XML to PDF. I'm using saxon and running it using a command line in a batch file, with the command as follows: java.exe -cp saxon9he.jar net.sf.saxon.Transform -t -s:"../other_peoples/bertha/VdM_EAD export.xml" -xsl:"../oth . . . Read full entry »


[ANN] XSLT 3 training - January 2022 - for XSLT 1 and

Posted 12/20/2021 11:30:58 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 went on XSLT 1 Upgrade, or who use XSLT 2. I'm planning that part one would be on a Thursday. Part two would be Tuesday, Wedne . . . Read full entry »


Re: Select with multiple conditions?

Posted 12/8/2021 5:15:16 PM

Ha! Yes, that would be great XD From: Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, December 8, 2021 11:58 AM To: xsl-list <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Re: Select with multiple conditions? Michele, You are not alone.. . . . Read full entry »


Re: Select with multiple conditions?

Posted 12/8/2021 5:14:46 PM

Thanks so much, everyone, for your explanations. This is all very helpful! Michele From: Wendell Piez wapiez@xxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, December 8, 2021 11:25 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Select with multiple condition . . . Read full entry »


Re: Select with multiple conditions?

Posted 12/8/2021 4:58:05 PM

Michele, You are not alone... Sometimes (very rarely) I try to use a single | for the concatenation operator :) And sometimes even mistake ! for | Probably we need an "XPath font" ? Thanks, Dimitre On Wed, Dec 8, 2021 at 6:53 AM Michele R Combs mrrothen@xxxxxxx < xsl-list-service@ . . . Read full entry »


Re: Select with multiple conditions?

Posted 12/8/2021 4:24:57 PM

Hi again, Another footnote is that even in XSLT 1.0 if we can contrive to bind the values 'collection', 'recordgrp', 'series' and 'subseries' to XML somewhere (for example loading them from an example document) we can then say for-each select="*[@level=$levels]" where $levels is the set . . . Read full entry »


Re: Select with multiple conditions?

Posted 12/8/2021 4:19:07 PM

Ouch the send button hit itself sorry! 2nd expression rewritten: <xsl:for-each select="child::*[@level = 'series' or @level = 'subseries']"> but we need XPath 2.0 to say <xsl:for-each select="child::*[@level = ('series', 'subseries')]"> Cheers, Wendell On Wed, . . . Read full entry »


Re: Select with multiple conditions?

Posted 12/8/2021 4:17:06 PM

Michele, As Eliot notes, the pipe operator in XPath is shorthand for "union", not "or", although there are places (such as a match pattern) when a union ("give me As and Bs") can look and work like an "or" ("give me things that are A or B"). So . . . Read full entry »


Re: Select with multiple conditions?

Posted 12/8/2021 3:28:46 PM

You seem to be under the misapprehension that "|" is a boolean `or` operator. That's not the case: it forms the union of two node-sets. Node-sets are often used in a context where they are implicitly converted to booleans (empty node-set => false, non-empty => true), and in this si . . . Read full entry »


Re: Select with multiple conditions?

Posted 12/8/2021 3:21:36 PM

Your 2nd and third constructions are not correct, in that they are not going to do what you intend. The second option uses | (set union) where you mean OR (logical OR), so you are effectively creating a sequence of Booleans (although I think that isnt really a thing in XPath 1, but Id have to . . . Read full entry »


Select with multiple conditions?

Posted 12/8/2021 2:53:28 PM

All three of these constructions appear to be valid (this is xsl 1.0, sorry for being antiquated!). Will there be differences in the output? If not, is one option "better" than the others, and if so why? I'm guessing that there are no differences in output, and that option 3 is better . . . Read full entry »


Re: Combining entity references into a single document

Posted 12/3/2021 11:51:46 PM

Thank you to all that replied. FrameMaker uses Saxon EE and an identity transform successfully combined the files. . . . Read full entry »


Re: Combining entity references into a single document

Posted 12/3/2021 7:28:21 PM

On Fri, 2021-12-03 at 17:26 +0000, rick@xxxxxxxxxxxxxx wrote: > . Is > there an XSLT 3 mechanism for combining everything into a single XML > document? Any pointers would be appreciated. xmllint --loaddtd yourmainfile.xml > output.xml There are options to retain entities (--noents) an . . . Read full entry »


Re: Combining entity references into a single document

Posted 12/3/2021 6:07:06 PM

On 03/12/2021 17:25, rick@xxxxxxxxxxxxxx wrote:> I have an XML document generated from an Adobe FrameMaker book. It > creates multiple XML files and refers to them with entities in the > main XML file. Is there an XSLT 3 mechanism for combining everything > into a single XML document? A . . . Read full entry »


Re: Combining entity references into a single document

Posted 12/3/2021 5:37:06 PM

Thank you Michael. I will give it a try in my environment. From: Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, December 3, 2021 12:35 PM To: xsl-list <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Re: Combining entity references into a single do . . . Read full entry »


Re: Combining entity references into a single document

Posted 12/3/2021 5:34:55 PM

Assembling this is the job of the XML parser, not the XSLT processor. A simple <xsl:copy-of select="/`"/>, or the query ".", should do the job. It won't work, of course, if the parser doesn't support DTDs -- for example that's true for all parsers we know of on Node.js. I . . . Read full entry »


Combining entity references into a single document

Posted 12/3/2021 5:25:23 PM

Hi All, I have an XML document generated from an Adobe FrameMaker book. It creates multiple XML files and refers to them with entities in the main XML file. Is there an XSLT 3 mechanism for combining everything into a single XML document? Any pointers would be appreciated. <?xml version= . . . Read full entry »


XSL-List Guidelines

Posted 12/1/2021 3:57:08 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 »


XSL-List Guidelines

Posted 11/1/2021 3:38:16 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: test for ancestral attribute returning variant re

Posted 10/27/2021 3:16:24 AM

I've just read the list guidelines and seen that attachments are a no no, so here it is with the test case available at a url: https://www.dropbox.com/s/c46ut9dngyudet7/versiontest.zip?dl=0 cheers T From: Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxx . . . Read full entry »


Re: Extract String between chars

Posted 10/26/2021 9:59:58 PM

Thank you very much, David. On Tue, 26 Oct 2021 at 13:18, David Carlisle d.p.carlisle@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > This is the same as the case you asked the other day. > > Given input > > <x>Order1#11.11.11.111;Order2#22.22.22.22;Order . . . Read full entry »


Re: Extract String between chars

Posted 10/26/2021 5:18:29 PM

This is the same as the case you asked the other day. Given input <x>Order1#11.11.11.111;Order2#22.22.22.22;Order3#333.3433.3333;</x> and stylseheet <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:param name=" . . . Read full entry »


Extract String between chars

Posted 10/26/2021 4:59:13 PM

Team, I need a template for which, when I pass order number as parameter, I should get the corresponding IPs. I need this in *XSLT 1.0* =============== Eg Input String : Order1#11.11.11.111;Order2#22.22.22.22;Order3#333.3433.3333; Param : Order2 Output: 22.22.22.22 Basically it should extract t . . . Read full entry »


Re: test for ancestral attribute returning variant re

Posted 10/25/2021 5:25:10 PM

Attached is a small(ish) test case. Run test_version.xsl with control.xml as input and control.txt as output. Repeat with fail.xml and fail.txt. Both XML documents contain the same note (it's a cnote element) whose paragraph children specify the same version as the parent note. The rel . . . Read full entry »


Re: test for ancestral attribute returning variant re

Posted 10/24/2021 7:36:29 PM

> You're going to ask for a small failing test case; unfortunately there isn't one :-( Just send the smallest one you can construct. Even if it appears complex, debugging something you can actually run is vastly easier than debugging something you can't. And remember: if you can't find the bug . . . Read full entry »


Re: test for ancestral attribute returning variant re

Posted 10/24/2021 7:02:58 PM

Haven't gone deep into this (and after a single reading I am not sure I understand what is the alleged problem at all), but at a glance it seems quite possible that the use of the "!=" operator may be the culprit of some unexpected behavior. My advice is to always use the not() function . . . Read full entry »


Re: test for ancestral attribute returning variant re

Posted 10/24/2021 6:02:23 PM

On Sun, Oct 24, 2021 at 05:42:38PM -0000, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx scripsit: [why is this test of version attributes afflicting me?] I am not going to claim I fully understand the logic you've presented, but I think you've got three cases: 1. the context item doesn't have an @ver . . . Read full entry »


test for ancestral attribute returning variant results

Posted 10/24/2021 5:42:30 PM

Hi (What follows is XSL 2.0 and the processor I am using is Saxon, I have tried with Saxon versions 8.7.3, 9.9 and 10.0 and all exhibit the same behaviour.) I am at a complete loss to explain why this is happening. My XML documents conform to a schema which allows many elements to have . . . Read full entry »


Re: Configuration file for Saxon

Posted 10/23/2021 10:10:33 AM

On https://help.adobe.com/en_US/framemaker/using/using-framemaker/user-guide/frm_structauth_sa-xsl-transformation.html there is a FrameMaker config file entry: SAXON=fminit\XSLT\XSLTProcessors\saxon\SaxonEE9-8-0-7J\saxon9ee.jar, net.sf.saxon.TransformerFactoryImpl, Default Maybe you can specif . . . Read full entry »


Re: Configuration file for Saxon

Posted 10/22/2021 4:43:04 PM

On Fri, 2021-10-22 at 13:49 +0000, rick@xxxxxxxxxxxxxx wrote: > to set expandAttributeDefaults="false" for all of my transforms in > FrameMaker. Since I am not specifying calls to Saxon directly, I > don't have > the ability to specify a configuration file. Could you write XS . . . Read full entry »


Re: Configuration file for Saxon

Posted 10/22/2021 3:04:59 PM

Thank you for the reply Michael. I was hoping for something where: bIf a config file is in a particular location, Saxon will read it automatically.b I will check with the Adobe engineers and see how they call Saxon and see if I have any other options. Thanks again! From: Michael Kay mike@xxxxx . . . Read full entry »


Re: Configuration file for Saxon

Posted 10/22/2021 2:10:55 PM

If the Framemaker application encapsulates Saxon so thoroughly that you don't have any access to any Saxon APIs, then that's a bit of a challenge. I can think of a possible hack looking at the Saxon 10 code, but no guarantee it will work with any other version: new Configuration() calls Configura . . . Read full entry »


Configuration file for Saxon

Posted 10/22/2021 1:48:26 PM

I am using Saxon EE through another application (Adobe FrameMaker). I want to set expandAttributeDefaults="false" for all of my transforms in FrameMaker. Since I am not specifying calls to Saxon directly, I don't have the ability to specify a configuration file. Is there a way to have a c . . . Read full entry »


[ANN] Oxygen XML Editor version 24.0 has been released

Posted 10/19/2021 9:04:13 AM

Hi everyone, We are excited to announce that Oxygen XML Developer/Editor version 24 is now available! Listing below some new features which may be useful for the XSL community: Component Updates ================================== * Updated the 10.x version of the Saxon transformer add-on to sup . . . Read full entry »


Re: replace a string that is in between two specific

Posted 10/18/2021 11:13:22 AM

Thank you very much for your reply, David. As you guessed, input string can have any number of ; and # => any number of ; and # and you want to delete any text between adjacent # and ; (as the title of the thread implies To further clarify: aaa#bbbb;ccc#dd; 1. ';' marks the end of each set : . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/15/2021 8:08:35 AM

On 14/10/2021 14:45, Roger L Costello costello@xxxxxxxxx wrote: ... I ran the XSLT program on the XML document. No error was generated. My colleague argues that such behavior is bad language design: ... Do you agree with my colleague's assessment? Is this behavior in XPath an indication of bad lan . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/14/2021 9:54:51 PM

Thanks, I already have FOP in my pipeline, hence the xsl question. I am using DITA as the source, so structure is good, just need to find the right elements for the instructor content. I think there might be a plug-in out there for LaTeX, but I've never used that approach.B Sent from my Verizon, Sa . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/14/2021 8:55:19 PM

On 14/10/2021 14:19, dvint dvint@xxxxxxxxx wrote: > Yes instead of xslt I meant xsl-fo. I'm going to be using DITA XML and > need to produce a pdf. The elephant in the room is of course LaTeX, which can easily handle the formatting you describe. Outputting LaTeX source from XSLT is straight . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 7:48:51 PM

Yes, that's why the question doesn't make sense 'in general'... but if there's some context by which this hypothetical colleague wants a warning any time select generates a null sequence, 'doing it twice' is feasible with a straightforward preprocessor. I've mainly used this method for debugging, . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 4:55:15 PM

That only tells you this particular instance doesn't include that element or content. It doesn't tell you if the path might actually exist in some other contextSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "BR Chrisman brchrisman@xxxxxxxxx" <xs . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 4:48:17 PM

It's not very difficult to apply a transform to the stylesheet grabbing the @select from value-of or apply-templates or what not into new xsl:if test="count(@select) = 0"... xsl:message ... if warnings is what your colleague wants. - Brian . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 4:39:29 PM

I wanted to put a plug in for the schema-aware usage. When I was working with a team converting one complex vocabulary to another complex vocabulary, the error reporting from the schema-aware processing was incredibly helpful. Obviously, this only works for cases where those vocabularies exist, b . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 4:37:22 PM

> > Even adding req() as a synonym for one-or-more() might be enough to encourage people to write req(Document)/req(foo) in order to get better diagnostics. > > Why not just: > > req(Document/foo) > The finer-grained form would enable more precise diagnostics. And they . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 4:22:09 PM

> Even adding req() as a synonym for one-or-more() might be enough to encourage people to write req(Document)/req(foo) in order to get better diagnostics. Why not just: req(Document/foo) Thanks, Dimitre On Thu, Oct 14, 2021 at 8:17 AM Michael Kay mike@xxxxxxxxxxxx < xsl-list-servi . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 3:47:24 PM

Dear XSL-List, XSLT already supports type declarations (in non-schema-aware processing) in certain contexts (such as variables, parameters, function results) with the @as attribute. Is it possible (that is, potentially useful) to extend the use of @as to other contexts? Possible advantages (over n . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 3:25:57 PM

On Thu, Oct 14, 2021 at 03:17:08PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > I've sometimes wondered whether a "soft" checker (lint-like) that warns you of potentially void paths (by reference to a schema and/or instance document) might not be a valuable tool. Any kind of XSLT . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 3:17:02 PM

Having said all this, of course you (and your friend) are perfectly correct: the fact that "void paths" are not statically detected is a major cause of debugging headaches, and a solution to the problem that prevents those headaches would be highly desirable. I've sometimes wondered whet . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 3:05:49 PM

This was the thinking that led to the design of the "static typing" feature in XQuery 1.0, which has been a notable failure. Even it its diluted form as implemented in schema-aware XPath/XQuery without static typing (where Saxon will potentially give you a warning here) it has not been a . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 2:33:04 PM

Graydon, this is good. Yes, fair enough. In Schematron's favor, it is not so hard to deploy it over collections (using those 'other pieces'), and when combined with XSLT 3 it's pretty darned powerful. I'm not opposed to many ways to do it, of course! Cheers, Wendell On Thu, Oct 14, 2021 at 10:2 . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 2:28:01 PM

On Thu, Oct 14, 2021 at 02:19:47PM -0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx scripsit: > Is this solution too demanding? (Not just defensive XSLT with extra tests in > your XPath but an entire Schematron?) I always wonder, when we get to that > point. What problem are we actually trying t . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 2:23:02 PM

For generic xml without a dtd or schema, there is no wrong XPath as who is to say that element might exist somewhere or sometime. It would be nice if there was a way to validate an XPath against a given did or schema to indicate a path would never exist.Sent from my Verizon, Samsung Galaxy smartpho . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 2:19:41 PM

Hi again Roger, Also, to be less flippant - it is due to complexities like these that we do not use these technologies in isolation, but embedded in other processes and technologies that help to sort out the actual issues. For example, in this case perhaps your schema does not require your 'foo', . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 1:59:18 PM

In addition to that, I think Saxon EE with schema-aware XSLT 2/3 and xs:import-schema would warn you about the use of a path like "Document/foo" if there is no match in the schema for a possible element. I don't think it is an obligation of a schema-aware XSLT processor but I think it is . . . Read full entry »


Re: My XPath mistakenly referenced an element that do

Posted 10/14/2021 1:54:48 PM

Roger, I think your colleague is right, but not very right. You forget that a missing 'foo' may be an error in one document and a feature in another document in the very same system. Indeed it is part of the semantics that constitute the reason why we save documents, that we do not always have co . . . Read full entry »


My XPath mistakenly referenced an element that doesn't

Posted 10/14/2021 1:45:32 PM

Hi Folks, Here is my (very simple) XML document: <Document>Hello, world</Document> My XSLT program contains a xsl:value-of with a simple XPath expression: <xsl:template match="/"> <xsl:value-of select="Document/foo eq 'abc'"/> </xsl:templat . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/14/2021 1:19:36 PM

Yes instead of xslt I meant xsl-fo. I'm going to be using DITA XML and need to produce a pdf. It has been a long time since I've done a full up xsl-fo implementation and couldn't remember if this could be done. Ultimately the un-expressed part of the question was if the spec as well as the for engi . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/14/2021 12:45:06 PM

How about going to simple, XSLT friendly (x)html pages, with tables and divs, and then print the html pages to pdf ? Le jeu. 14 oct. 2021 C 07:48, Wendell Piez wapiez@xxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> a C)crit : > Hi, > > There is also a complication. Cont . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/14/2021 12:44:14 PM

How about going to simple, XSLT friendly (x)html pages, with tables and divs, and then print the html pages to pdf ? Le jeu. 14 oct. 2021 C 07:48, Wendell Piez wapiez@xxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> a C)crit : > Hi, > > There is also a complication. Cont . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/14/2021 11:48:31 AM

Hi, There is also a complication. Contributors to this list have offered pointers to solutions using XSLT and XSL-FO, but they have not stressed addressed the "no cost" context: - There is only one widely available *free* FO engine (or cake baking machine), namely Apache FOP. - For thos . . . Read full entry »


Re: replace a string that is in between two specific

Posted 10/14/2021 10:24:57 AM

Michael , To answer your previous question, I can add another ";" at the end like the below: *From: * q1#11.11.11.111;q2#22.22.22.22; *To:* q1;q2 2. Is it possible to write *another function* that gives me *From: * q1#11.11.11.111;q2#22.22.22.22; *To:* 11.11.11.111;22.22.22.22; . . . Read full entry »


Re: replace a string that is in between two specific

Posted 10/14/2021 10:24:30 AM

On Thu, 14 Oct 2021 at 11:05, Prady Prady prady.chin@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Thank you for the response, Michael! > > But Oracle BPEL 2.0 does not support XSLT 3.0. It only supports XSLT 1.0 It would help if you clarified your question as y . . . Read full entry »


Re: replace a string that is in between two specific

Posted 10/14/2021 10:05:42 AM

Thank you for the response, Michael! But Oracle BPEL 2.0 does not support XSLT 3.0. It only supports XSLT 1.0 Any help using XSLT 1.0 is greatly appreciated On Wed, 13 Oct 2021 at 13:43, Michael MC<ller-Hillebrand mmh@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/14/2021 7:52:57 AM

> Subject: Side notes layout in xslt? > > > Before I start this I'm looking for confirmation this is possible in xslt. > You're misunderstanding the role of XSLT here. XSLT transforms your XML to some other format, such as HTML, XSL-FO, CSS, etc. You could even use it to transform . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/13/2021 10:56:36 PM

See http://www.renderx.com/usecasestest.html bCreating marginalia using side floatsb From: dvint dvint@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, October 13, 2021 8:55 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Cc: dvint@xxxxxxxxx Subject: Side notes layout in xslt . . . Read full entry »


Re: replace a string that is in between two specific

Posted 10/13/2021 5:42:18 PM

Hi Prady, Assuming you meant "string split by ;" I came up with this template doing the work: <xsl:template match="Ip"> <xsl:variable name="entries" select="tokenize(text(), '\s*;\s*')" as="xs:string*"/> <xsl:element name= . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/13/2021 4:15:00 PM

XSL-FO is the solution for managing print outputs. The vanilla Apache XSL-FO processor can do the transformation, built into Oxygen or available in eXist-db, Base-X, etc. https://xmlgraphics.apache.org/fop/fo.html Or use Antenna House or Render X XEP extended XSL-FO solutions. JPR On Wed, Oct 1 . . . Read full entry »


Re: Side notes layout in xslt?

Posted 10/13/2021 4:13:00 PM

On 13/10/2021 16:55, dvint dvint@xxxxxxxxx wrote: Before I start this I'm looking for confirmation this is possible in xslt. I'll assume that you mean XSL-FO... I have a request to produce an instructors version of a training guide as well as student version. Both will have a wide gutter on the le . . . Read full entry »


Re: replace a string that is in between two specific

Posted 10/13/2021 3:58:39 PM

Am 13.10.2021 um 17:31 schrieb Prady Prady prady.chin@xxxxxxxxx: > Team, > > > Can somebody help me to replace string that is in between*# and ;* > with blank. I need to include this is oracle bpel which only supports > xslt 1.0 > > From: > <IpsCollection xmlns="h . . . Read full entry »


Side notes layout in xslt?

Posted 10/13/2021 3:54:42 PM

Before I start this I'm looking for confirmation this is possible in xslt.I have a request to produce an instructors version of a training guide as well as student version. Both will have a wide gutter on the left side when produced.B The instructor guide will have instructor notes in this area. I . . . Read full entry »


replace a string that is in between two specific chars

Posted 10/13/2021 3:31:37 PM

Team, Can somebody help me to replace string that is in between* # and ;* with blank. I need to include this is oracle bpel which only supports xslt 1.0 From: <IpsCollection xmlns="http://xmlns.oracle.com/aa"> <Ips> * <Ip>q1#11.11.11.111;q2#22.22.22.22</Ip>* &l . . . Read full entry »


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 »



PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

Learn XQuery in 10 Minutes!

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

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