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: xsl:accumulator and temporary trees

Posted 2/13/2020 7:36:52 AM

Thanks Martin. Just few things to refactor, then. See you, Christophe Le 12/02/2020 C 15:08, Martin Honnen martin.honnen@xxxxxx a C)critB : Am 12.02.2020 um 15:01 schrieb Christophe Marchand cmarchand@xxxxxxxxxx: Hello, I use an accumulator to calculate height of block elements in a page. My ac . . . Read full entry »


Re: Fwd: xsl:for-each in Corresp Tag

Posted 2/13/2020 7:30:14 AM

Am 13.02.2020 um 08:22 schrieb Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx: Yes Wendell,B I have tried <xsl: Apply-templates/>. But double comma appearing after </institution>. How can I handle if 3 type of variations coming in XML file. It would help if you show us input, current outpu . . . Read full entry »


Fwd: xsl:for-each in Corresp Tag

Posted 2/13/2020 7:22:22 AM

Yes Wendell, I have tried <xsl: Apply-templates/>. But double comma appearing after </institution>. How can I handle if 3 type of variations coming in XML file. Thank Byomokesh ---------- Forwarded message --------- From: Byomokesh Sahoo <sahoo.byomokesh@xxxxxxxxx> Date: Wed, . . . Read full entry »


Re: xsl:for-each in Corresp Tag

Posted 2/13/2020 1:15:03 AM

Hi, I looked at the example and I wonder if much of it, if not everything, could not be accomplished with good old-fashioned template matching, no use of for-each whatsoever. Byomokesh have you tried <xsl:apply-templates/> and if not, why not? It will probably do most if not everything you . . . Read full entry »


[ANN] XML in Publishing Accessible Documents - Call fo

Posted 2/12/2020 8:16:55 PM

CALL FOR PARTICIPATION Symposium on The Role of XML in Publishing Accessible Documents Most scientific, medical, legal, academic, engineering, and technical literature is published and/or archived using XML as an intermediary format. In a workflow where publishers create print, PDF, HTML, eBook, b . . . Read full entry »


Re: xsl:for-each in Corresp Tag

Posted 2/12/2020 5:44:40 PM

On 12.02.2020 18:06, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote: I am facing difficulty to get required output in different structureB of <corres>. Find the below three types of tagging structure. Not getting exact output if apply <xsl:for-each> on below three type of scenario. D . . . Read full entry »


Re: xsl:for-each in Corresp Tag

Posted 2/12/2020 5:33:00 PM

Can't the XML / XSLT be properly indented? Absolutely unreadable! On Wed, Feb 12, 2020 at 9:05 AM Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi, > > I am facing difficulty to get required output in different structure of > &l . . . Read full entry »


Re: xsl:for-each in Corresp Tag

Posted 2/12/2020 5:15:42 PM

On 12.02.2020 18:06, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote: XML <corresp><label>Correspondence to</label> Anne Marie Darling, <institution content-type="department">Department of Epidemiology</institution>, <institution>Boston University< . . . Read full entry »


xsl:for-each in Corresp Tag

Posted 2/12/2020 5:05:51 PM

Hi, I am facing difficulty to get required output in different structure of <corres>. Find the below three types of tagging structure. Not getting exact output if apply <xsl:for-each> on below three type of scenario. XML <corresp><label>Correspondence to</label> An . . . Read full entry »


Re: xsl:accumulator and temporary trees

Posted 2/12/2020 2:08:17 PM

Am 12.02.2020 um 15:01 schrieb Christophe Marchand cmarchand@xxxxxxxxxx: Hello, I use an accumulator to calculate height of block elements in a page. My accumulator is defined like this : B <xsl:accumulator name="height.counter" as="xs:double" initial-value="0.0" . . . Read full entry »


xsl:accumulator and temporary trees

Posted 2/12/2020 2:01:20 PM

Hello, I use an accumulator to calculate height of block elements in a page. My accumulator is defined like this : B <xsl:accumulator name="height.counter" as="xs:double" initial-value="0.0"> B B B <xsl:accumulator-rule match="page" select=&quo . . . Read full entry »


Pluralsight Free Weekend: Friday 2/7 - Sunday 2/9

Posted 2/8/2020 12:48:24 AM

Pluralsight announced this Free Weekend: https://www.pluralsight.com/offer/2020/february-free-weekend?amp=1 This isn't unrelated topic, as it could seem, due to the presence of a number of XML / XSLT / XPath courses (this list is not complete): XML tools by Example <https://www.pluralsight.co . . . Read full entry »


Re: Finding Only Initial Following Siblings That Meet

Posted 2/6/2020 12:09:06 AM

On 06.02.2020 00:42, Eliot Kimber ekimber@xxxxxxxxxxxx wrote: In my case, I must start with the first instance of the matching phrase anywhere in the source document (I'm pulling stuff that could be anywhere to a specific location) and then only want to consider things that immediately follow that . . . Read full entry »


Re: Finding Only Initial Following Siblings That Meet

Posted 2/5/2020 11:43:00 PM

I like the use of xsl:iterate here--it seems to be a clean match for the behavior. Cheers, E. -- Eliot Kimber http://contrext.com o;?On 2/5/20, 5:14 PM, "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: I think the ability to select items fro . . . Read full entry »


Re: Finding Only Initial Following Siblings That Meet

Posted 2/5/2020 11:42:07 PM

In my case, I must start with the first instance of the matching phrase anywhere in the source document (I'm pulling stuff that could be anywhere to a specific location) and then only want to consider things that immediately follow that specific <ph> element. So unless I'm missing a subtlety . . . Read full entry »


Re: Finding Only Initial Following Siblings That Meet

Posted 2/5/2020 11:16:01 PM

On 06.02.2020 00:07, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: But as I wanted to say above, in terms of idiomatic XSLT 2+ purity, I'd always prefer a solution that doesn't look along the preceding/following axes, even when it is done just once for selecting the for-each-group popu . . . Read full entry »


Re: Finding Only Initial Following Siblings That Meet

Posted 2/5/2020 11:14:51 PM

I think the ability to select items from a sequence until some condition is true is something that's always been far too difficult. In my paper for XML Prague next week I propose: fn:items-before( ($this,$this/following-sibling::node()), function($n){$n/@outputclass != $this/@outputclass}) a . . . Read full entry »


Re: Finding Only Initial Following Siblings That Meet

Posted 2/5/2020 11:07:21 PM

Grouping should liberate you from looking ahead or behind. So instead of matching the first <ph outputclass="x">, you'd match <p> (or more generally '*[ph[@outputclass]]') and do the group-adjacent grouping for the child nodes, like this: <xsl:stylesheet xmlns:xsl=" . . . Read full entry »


Finding Only Initial Following Siblings That Meet Some

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

In my XML I can have adjacent elements that should be processed as a unit, where the adjacent elements all have the same value for a given attribute. Other elements with the same attribute could be following siblings but separated by other elements or text nodes, i.e.: <p>Text <ph outputc . . . Read full entry »


Re: Tree Comparing Algorithm

Posted 2/4/2020 10:49:21 AM

Am 04.02.2020 um 01:49 schrieb Michael Kay mike@xxxxxxxxxxxx: I haven't studied it in close detail, but I strongly suspect that the initial processing of the input files is streamed, but at some stage in the processing pipeline everything ends up in memory. Martin's solution uses arrays, and array . . . Read full entry »


Re: Tree Comparing Algorithm

Posted 2/4/2020 9:03:24 AM

> Even if the probability of two objects to have the same hash code is low, we should take this into account -- for example, we may choose to calculate a pair of hash codes for each object, using two independent hashing algorithms. > This reminds me of an incident during my time with ICL whe . . . Read full entry »


Re: Tree Comparing Algorithm

Posted 2/4/2020 3:44:00 AM

> If the hash of a folder from both the trees are same, the entire tree under the folder that matches the hash is ignored Just a minor note that has nothing to do with XSLT: It is not sufficient that two objects have the same hash code for them to be considered "equal". When the has . . . Read full entry »


Re: Tree Comparing Algorithm

Posted 2/4/2020 12:49:31 AM

I haven't studied it in close detail, but I strongly suspect that the initial processing of the input files is streamed, but at some stage in the processing pipeline everything ends up in memory. Martin's solution uses arrays, and array processing in Saxon is generally not pipelined in the way tha . . . Read full entry »


Re: Tree Comparing Algorithm

Posted 2/3/2020 8:38:52 PM

On 03.02.2020 21:10, Vasu Chakkera vasucv@xxxxxxxxx wrote: Thanks both. Martin's solution sort of worked, but it only gave me 21 children, but I had around 21000 nodes in the xml. I am not sure to what depth the comparisonB is happening. It was solely an attempt to try to find some way to recursive . . . Read full entry »


Re: Tree Comparing Algorithm

Posted 2/3/2020 8:10:04 PM

Thanks both. Martin's solution sort of worked, but it only gave me 21 children, but I had around 21000 nodes in the xml. I am not sure to what depth the comparison is happening. Vasu On Mon, 3 Feb 2020 at 12:16, Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: . . . Read full entry »


Re: Tree Comparing Algorithm

Posted 2/3/2020 5:15:40 PM

The only facility in the XSLT 3.0 to allow streaming of two input files "in parallel" is xsl:merge, and as Martin points out, that's rather specialised and not really suited to your requirements. In Saxon, streaming is in most cases done in push mode (where the parser owns the control lo . . . Read full entry »


Re: xsl:mode and priorities question

Posted 2/3/2020 5:06:04 PM

I think the answer is that despite there being two xsl:mode declarations, there is only one mode, and the properties/attributes of that mode (such as on-no-match) are determined by the highest-precedence definition. In this case the two definitions of the mode are identical so there is no ambiguity . . . Read full entry »


Re: Tree Comparing Algorithm

Posted 2/3/2020 2:57:43 PM

Am 03.02.2020 um 14:47 schrieb Vasu Chakkera vasucv@xxxxxxxxx: > Hi All, > I am planning to write a XML Tree comparing XSLT using streaming. > The XML Trees look something like this > > <root path="" mhash =" "> > > <folder path ="" mhash . . . Read full entry »


xsl:mode and priorities question

Posted 2/3/2020 2:52:14 PM

Hello, XSL 3.0, imports and modes. main.xsl declares a mode, and imports imported.xsl, that declares the same mode and defines a template in that mode : main.xsl: <xsl:mode name="foo" on-no-match="shallow-copy"/> <xsl:import href="imported.xsl"/> import . . . Read full entry »


Tree Comparing Algorithm

Posted 2/3/2020 1:46:44 PM

Hi All, I am planning to write a XML Tree comparing XSLT using streaming. The XML Trees look something like this <root path="" mhash =" "> <folder path ="" mhash =""> <folder path ="" mhash =""> <leaf . . . Read full entry »


XSL-List Guidelines

Posted 2/1/2020 1:10: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: page range in Reference

Posted 1/26/2020 6:10:33 PM

On 26.01.2020 17:52, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote: Below is my inputB and required output xml. Need to all dot, columns(:) in outside elements will be same to go output xml. I am strugglingB how to manage page range tag ( <fpage>752</fpage>&#x2013;<lpage>8 . . . Read full entry »


page range in Reference

Posted 1/26/2020 4:52:00 PM

Hi, Below is my input and required output xml. Need to all dot, columns(:) in outside elements will be same to go output xml. I am struggling how to manage page range tag ( <fpage>752</fpage>&#x2013;<lpage>8</lpage>) in output reference. <mixed-citation><pers . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/24/2020 2:54:41 PM

Hi Christophe, I think that, there have been lots of discussion on Xerces-J lists about this issue (I think, you were also part of those discussions). If I may, I'd like to say few points about this issue here as well. Firstly, I believe that Xerces team recognizes the need of having Xerces-J . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/24/2020 10:12:58 AM

We've had the same issue with Saxon on Maven. For years we resisted putting Saxon on Maven, on the grounds that Maven allowed people to download the JAR files without the accompanying legal notices, which is contrary to the license conditions imposed by third parties. But other people started putti . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/24/2020 9:51:25 AM

Mukul, if Xerces team were responsible to publish to maven central, all these problems would disappear. And, even if Adam and exist-db team are very kind and publish xerces under their groupId, we - end users - have no guarantee that artifacts published by others are the same that are published . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/24/2020 1:46:03 AM

Hi Adam, On Thu, Jan 23, 2020 at 8:13 PM Adam Retter adam.retter@xxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Sorry about that. Unfortunately I cannot update artifacts on Maven > Central, releases there are considered immutable. > It seems that, the only way . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 5:44:15 PM

I did not consider accumulators, although it makes sense that an iterator approach would work since that naturally provides for updating a variable. Interestingly, I went over my failing code and simply added explicit types to all the parameters and variables (it reflected the best of XSLT 1 pract . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 5:42:32 PM

Dear Martin and Michael, Thank you both for the quick responses! Best, David On Thu, Jan 23, 2020 at 12:38 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > In Saxon there's the vendor extension <xsl:function > saxon:memo-function="yes&quo . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 5:38:40 PM

In Saxon there's the vendor extension <xsl:function saxon:memo-function="yes"/> which has been available for some years; in XSLT 3.0 it's standardised as <xsl:function cache="yes"/> Michael Kay Saxonica > On 23 Jan 2020, at 17:31, David Birnbaum djbpitt@xxxxxxxx . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 5:37:04 PM

On 23.01.2020 18:31, David Birnbaum djbpitt@xxxxxxxxx wrote: Is there information anywhere about how to construct a memo function? I see that support for it it is built into Saxon PE and EE, but does anyone know of an example or descriptionB of how to construct a memo function in HE, or a differen . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 5:31:05 PM

Dear XSL-list, Is there information anywhere about how to construct a memo function? I see that support for it it is built into Saxon PE and EE, but does anyone know of an example or description of how to construct a memo function in HE, or a different XSLT engine that does already incorporate hoo . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 5:10:39 PM

Eliot, I canbt answer with specifics as Ibm far from my codebase and will be for a couple of weeks, but I did some investigation on checking CALS row/column span interferences with XSLT3 a couple of years ago. One promising technique IIRC was to use one or more array-valued accumulators to track . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 4:15:39 PM

One technique I have found useful in converting algorithms designed for procedural programming languages is to use memo functions. For example, if you need to assign (row, column, height, depth) properties to every cell in a table, you don't necessarily need to construct a data structure holding t . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 3:59:42 PM

Andrew's code will almost certainly allow me to solve my immediate problem. I would still be interested in an XSLT 3 solution that uses arrays or maps, but I might be able to work it out myself, although I know that I don't fully grok the best/most compact way to do things, for example, taking adv . . . Read full entry »


Re: Help With Homework: HTML Tables to CALS

Posted 1/23/2020 3:37:18 PM

Am 23.01.2020 um 16:30 schrieb Eliot Kimber ekimber@xxxxxxxxxxxx: I have XSLT 1-style code that converts HTML tables to CALS tables. I discovered that this code fails for certain patterns of HTML tables in that it miscalculates column spans in the face of row spans earlier in the table. It doesn't . . . Read full entry »


Help With Homework: HTML Tables to CALS

Posted 1/23/2020 3:29:56 PM

I have XSLT 1-style code that converts HTML tables to CALS tables. I discovered that this code fails for certain patterns of HTML tables in that it miscalculates column spans in the face of row spans earlier in the table. It doesn't fail for all tables, just specific ones (which is why we didn't no . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/23/2020 2:43:26 PM

Hi Murkul, Sorry about that. Unfortunately I cannot update artifacts on Maven Central, releases there are considered immutable. On Thu, 23 Jan 2020 at 15:19, Mukul Gandhi gandhi.mukul@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Adam, > > On Tue, Jan 21, 202 . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/23/2020 2:19:35 PM

Hi Adam, On Tue, Jan 21, 2020 at 8:40 PM Adam Retter adam.retter@xxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > For anyone who uses Maven or Ivy, we have published Xerces 2.12.1 > artifacts (including XML Schema 1.1 support) to Maven Central - > > https://sea . . . Read full entry »


[ANN] Balisage 2020 - Call for Participation

Posted 1/22/2020 8:56:03 PM

================================================= Call for Participation "Balisage: The Markup Conference 2020b Balisage: where serious markup practitioners and theoreticians meet every summer. Critical Dates - 02 April 2020 b Full paper submissions due - 27 July 2020 b PRE-CONFERENCE . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 6:55:07 PM

On Tue, 2020-01-21 at 17:25 +0000, Michael Kay mike@xxxxxxxxxxxx wrote: > Indeed this suggests a generalization using higher-order functions: It seems likely that if we did deep-equals() today it would have an optional 3d parameter that would be a comparison function. Or, a map with node type = . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 5:24:53 PM

Indeed this suggests a generalization using higher-order functions: <xsl:function name="has-duplicates" as="xs:boolean"> <xsl:param name="nodes" as="node()*"/> <xsl:param name="hashCode" as="function(node()) as xs:anyAtomicT . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 5:23:49 PM

Liam: Yes. It is the definition of "the same" that is at the heart of this problem (as of so many). Cheers, Wendell -----Original Message----- From: Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, January 21, 2020 11:42 AM To: xsl-lis . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 5:21:53 PM

Wolfhart, Indeed, my solution ignores that distinction, and it is a feature. The signature logic neatly encapsulates how one wishes normalization to occur over the names (or other features contributing to 'identity'), or not, as the case may be. p Cheers, Wendell -----Original Message-- . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 4:41:37 PM

On Tue, 2020-01-21 at 15:42 +0000, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx wrote: > Hi, > > Another solution not yet suggested in this thread is to avoid deep- > equal() and rely on a signature function. Yes. I admit i tend to avoid deep-equal for this sort of thing because of its . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 4:39:27 PM

On 21.01.2020 17:34, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: Thank you for your solution. I have a question about it, which has to do with the fact that, in my case, the <author>/<director> elements also may have a <middle> child element, which I did not mention i . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 4:34:09 PM

Hi Wendell, Thank you for your solution. I have a question about it, which has to do with the fact that, in my case, the <author>/<director> elements also may have a <middle> child element, which I did not mention in my original post. Now, if I understand correctly, your solut . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 3:41:56 PM

Hi, Another solution not yet suggested in this thread is to avoid deep-equal() and rely on a signature function. So for example, <xsl:function name="f:signature" as="xs:string"> <xsl:param name="who" as="node()"/> <xsl:value-of select=&q . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/21/2020 3:10:11 PM

For anyone who uses Maven or Ivy, we have published Xerces 2.12.1 artifacts (including XML Schema 1.1 support) to Maven Central - https://search.maven.org/artifact/org.exist-db.thirdparty.xerces/xercesImpl/2 .12.1/jar On Mon, 13 Jan 2020 at 13:52, Mukul Gandhi gandhi.mukul@xxxxxxxxx <xsl-list-s . . . Read full entry »


Re: compare two node sets

Posted 1/21/2020 1:21:43 PM

On Mon, Jan 20, 2020 at 2:19 AM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > The simplest (XPath 2.0) solution that comes to mind is > > count(//director) eq count(//author) and > every $d in //director satisfies > some $a in //author sa . . . Read full entry »


Re: compare two node sets

Posted 1/20/2020 12:20:39 AM

On Sun, 2020-01-19 at 22:51 +0000, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: > > It is, although it will match the case your initial message said > shouldn't match, Never mind, i was being slow, sorry m > -- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Docum . . . Read full entry »


Re: compare two node sets

Posted 1/19/2020 10:50:49 PM

On Sun, 2020-01-19 at 21:22 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > Thank you, David, Michael, and Liam for the prompt replies! > Michael's > solution seems to be the simplest to implement. It is, although it will match the case your initial message said should . . . Read full entry »


Re: compare two node sets

Posted 1/19/2020 9:37:09 PM

On Sun, Jan 19, 2020 at 09:26:54PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: > On 19.01.2020 22:21, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx > wrote: [snip] > > XPST0003: Unexpected token "every" at start of expression > > I think you need to put the . . . Read full entry »


Re: compare two node sets

Posted 1/19/2020 9:36:12 PM

I think you need to put the `every` expression into parenthesis, and in the context of a `film` element it suffices to use child selection, so to simplify: count(director) eq count(author) and (every $d in director satisfies some $a in author satisfies deep-equal($d/*, $a/*)) Yes, like that it work . . . Read full entry »


Re: compare two node sets

Posted 1/19/2020 9:26:50 PM

On 19.01.2020 22:21, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: Thank you, David, Michael, and Liam for the prompt replies! Michael's solution seems to be the simplest to implement. I use Saxon 9 HE, so XPath 2.0 should be okay. And, indeed, quadratic performance should not be an issu . . . Read full entry »


Re: compare two node sets

Posted 1/19/2020 9:21:17 PM

Thank you, David, Michael, and Liam for the prompt replies! Michael's solution seems to be the simplest to implement. I use Saxon 9 HE, so XPath 2.0 should be okay. And, indeed, quadratic performance should not be an issue. However, Saxon throws the following error: XPST0003: Unexpected token & . . . Read full entry »


Re: compare two node sets

Posted 1/19/2020 8:55:21 PM

On Sun, 2020-01-19 at 20:37 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > Hello, > > I have an XSL/XPath problem to which I cannot find the solution. I > have > an xml file with data about films, in the following form > (simplified): > > [..] > . B . . . Read full entry »


Re: compare two node sets

Posted 1/19/2020 8:49:24 PM

Well, first of all we need to know which XSLT version we're talking about. It's certainly going to be difficult in XSLT 1.0. It also depends on the performance requirement. The simplest solutions may well have quadratic performance, but since the number of directors and authors of a film is likely . . . Read full entry »


Re: compare two node sets

Posted 1/19/2020 8:40:20 PM

Dear Wolfhart, You may find http://www.xqueryfunctions.com/xq/functx_sequence-deep-equal.html useful. Best, David On Sun, Jan 19, 2020 at 3:36 PM Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hello, > > I have an XSL/XPath p . . . Read full entry »


compare two node sets

Posted 1/19/2020 8:36:34 PM

Hello, I have an XSL/XPath problem to which I cannot find the solution. I have an xml file with data about films, in the following form (simplified): B B <film> B B B B B <title>The big Lebowski</title> B B B B B <director> B B B B B B B B <first>Joel</first& . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/14/2020 2:49:24 PM

On Tue, Jan 14, 2020 at 3:23 AM Jirka Kosek jirka@xxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Any estimate when > > https://issues.apache.org/jira/browse/XERCESJ-1102 > > will be fixed? It's only 14 years old and there is a patch available > so I'm curious . . . Read full entry »


Re: Can an XSLT 3.0 stylesheet access the complete se

Posted 1/14/2020 10:24:45 AM

On 14.01.2020 10:25, Martin Honnen martin.honnen@xxxxxx wrote: Am 13.01.2020 um 13:27 schrieb Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx: b& As you observed, with XProc 3.0, when using p:xslt in XSLT-3.0 mode, a transformation that is invoked without an initial template is supposed to pr . . . Read full entry »


Re: Can an XSLT 3.0 stylesheet access the complete se

Posted 1/14/2020 9:25:26 AM

Am 13.01.2020 um 13:27 schrieb Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx: On 12.01.2020 22:21, Martin Honnen martin.honnen@xxxxxx wrote: On 12.01.2020 20:44, Michael Kay mike@xxxxxxxxxxxx wrote: You can only process the items individually; which I'm afraid makes the feature rather useless. . . . Read full entry »


Re: [ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/13/2020 9:53:51 PM

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 13.1.2020 13:52, Mukul Gandhi gandhi.mukul@xxxxxxxxx wrote: > The Apache Xerces XML project team is pleased to announce that > version 2.12.1 of Apache Xerces-J is now available. Hi, that's great. Any estimate when https://issues.apache.org . . . Read full entry »


[ANN]: Apache Xerces-J 2.12.1 now available

Posted 1/13/2020 12:52:43 PM

Hi all, The Apache Xerces XML project team is pleased to announce that version 2.12.1 of Apache Xerces-J is now available. Xerces-J 2.12.1 can be downloaded at: http://xerces.apache.org/mirrors.cgi. This release is a bug fix release. It fixes few bugs which were present in Xerces-J 2.12.0 and . . . Read full entry »


Re: Can an XSLT 3.0 stylesheet access the complete se

Posted 1/13/2020 12:26:53 PM

On 12.01.2020 22:21, Martin Honnen martin.honnen@xxxxxx wrote: On 12.01.2020 20:44, Michael Kay mike@xxxxxxxxxxxx wrote: You can only process the items individually; which I'm afraid makes the feature rather useless. The XProc 3 guys seem to want to use it: https://spec.xproc.org/master/head/steps/ . . . Read full entry »


Re: Can an XSLT 3.0 stylesheet access the complete se

Posted 1/12/2020 9:21:30 PM

On 12.01.2020 20:44, Michael Kay mike@xxxxxxxxxxxx wrote: You can only process the items individually; which I'm afraid makes the feature rather useless. The XProc 3 guys seem to want to use it: https://spec.xproc.org/master/head/steps/#c.xslt.10 says: "If no value is supplied for template-nam . . . Read full entry »


Re: Can an XSLT 3.0 stylesheet access the complete se

Posted 1/12/2020 7:43:52 PM

You can only process the items individually; which I'm afraid makes the feature rather useless. Perhaps an initial-match-selection() function might rescue it; but as Dimitre says, it's just as easy to set a global parameter. Michael Kay Saxonica > On 12 Jan 2020, at 18:15, Dimitre Novatchev d . . . Read full entry »


Re: Can an XSLT 3.0 stylesheet access the complete se

Posted 1/12/2020 6:15:31 PM

On Sun, Jan 12, 2020 at 3:32 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > In https://www.w3.org/TR/xslt-30/#dt-initial-match-selection, the XSLT 3 > spec outlines: > > A stylesheet may be evaluated by supplying a value to be proc . . . Read full entry »


Can an XSLT 3.0 stylesheet access the complete sequenc

Posted 1/12/2020 11:32:21 AM

In https://www.w3.org/TR/xslt-30/#dt-initial-match-selection, the XSLT 3 spec outlines: A stylesheet may be evaluated by supplying a value to be processed, together with aninitial mode <https://www.w3.org/TR/xslt-30/#dt-initial-mode>. The value (which can be any sequence of i . . . Read full entry »


Re: Is it possible to set the mode dynamically?

Posted 1/10/2020 7:41:11 AM

On Wed, 2020-01-08 at 20:45 +0000, Ruski Blogg profrustyleafiii@xxxxxxxxxxx wrote: > Many thanks for all the advice. Was not aware of how powerful higher > order functions were in XSLT 3.0 - may have to delve deeper. Higher order functions are both really useful and not as hard as they migh . . . Read full entry »


Re: FWK005 error

Posted 1/9/2020 8:31:59 PM

Hi Martin Thanks for the quick reply. Interestingly, I tried an earlier version of FrameMaker that uses saxonhe9-3-0-5j\saxon9he.jar and I don't get those errors. I will see if I can install a later version of the JRE. Thanks again. Rick . . . Read full entry »


Re: FWK005 error

Posted 1/9/2020 8:22:39 PM

On 09.01.2020 21:12, Rick Quatro rick@xxxxxxxxxxxxxx wrote: I am not sure if this appropriate to post here, but I have a transform that I am using in Oxygen with Saxon. I am trying to do the same transform in Adobe FrameMaker, which is using Saxon. Here is the information from FrameMaker's ini fil . . . Read full entry »


FWK005 error

Posted 1/9/2020 8:12:37 PM

Hi All, I am not sure if this appropriate to post here, but I have a transform that I am using in Oxygen with Saxon. I am trying to do the same transform in Adobe FrameMaker, which is using Saxon. Here is the information from FrameMaker's ini file: SaxonEE9-8-0-7J\saxon9ee.jar, net.sf.saxon . . . Read full entry »


Re: Is it possible to set the mode dynamically?

Posted 1/8/2020 8:44:42 PM

Many thanks for all the advice. Was not aware of how powerful higher order functions were in XSLT 3.0 - may have to delve deeper. Sent via iPigeon... > On 7 Jan 2020, at 14:57, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > o;? &g . . . Read full entry »


Re: [ann] Upcoming XSLT 3 courses: Prague.cz; Bethesda

Posted 1/8/2020 6:14:13 PM

On Wed, 2020-01-08 at 07:07 +0000, Erik Siegel erik@xxxxxxxxxxx wrote: > Hi Liam, > > I suppose the XSLT 3 course in Prague is around XML Prague? Any > details on the dates yet (before/after)? I'm currently thinking the monday-Wednesday before the conference. Do you have a preference . . . Read full entry »


[ANN] Schematron Class -- LAST CALL

Posted 1/8/2020 5:06:50 PM

Mulberry Technologies announces the LAST CALL for Mulberry's hands-on face-to-face Schematron class Are you one of those people who learns best when you can engage with the instructor? Do you learn better when you can get immediate answers to your questions? D . . . Read full entry »


Re: [ann] Upcoming XSLT 3 courses: Prague.cz; Bethesda

Posted 1/8/2020 7:06:36 AM

Hi Liam, I suppose the XSLT 3 course in Prague is around XML Prague? Any details on the dates yet (before/after)? Erik -----Original Message----- From: Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, 8 January 2020 01:27 To: xsl-list@xxxxxxx . . . Read full entry »


[ann] Upcoming XSLT 3 courses: Prague.cz; Bethesda MD

Posted 1/8/2020 12:26:53 AM

Find out how XSLT 3 will save you time, reduce defects, enable new projects. XSLT 3 for XSLT People (3 days) Europe: Prague, Feb 2020 North America: Bethesda/Rockville MD, April If you're using XSLT, you need to know about XSLT 3. Find out why on this course. Learn the major new features . . . Read full entry »


Re: Is it possible to set the mode dynamically?

Posted 1/7/2020 1:57:22 PM

Hi, Steering clear of higher-order functions and indeed of the question as posted, one can work around the requirement by doing something entirely different. For example, one could pass that file name in as a tunnel parameter and then reference it in templates lower down, without having to switch . . . Read full entry »


Re: Is it possible to set the mode dynamically?

Posted 1/7/2020 11:20:40 AM

Another way would be to associate a function with each mode: <xsl:function name="f:apply-pivot-table"> <xsl:param name="select"/> <xsl:apply-templates select="$select" mode="pivot-table"/> </xsl:function> <xsl:function name=&q . . . Read full entry »


Re: Is it possible to set the mode dynamically?

Posted 1/7/2020 11:01:18 AM

Am 07.01.2020 um 11:51 schrieb rus tle profrustyleafiii@xxxxxxxxxxx: > Is it possible to set the mode dynamically? > > The use case: > > 1. Setting a variable to a file name > > <xsl:variablename="PayloadName"select="/POM/Netflix/@payload"/> > > . . . Read full entry »


Is it possible to set the mode dynamically?

Posted 1/7/2020 10:51:00 AM

Is it possible to set the mode dynamically? The use case: 1. Setting a variable to a file name <xsl:variable name="PayloadName" select="/POM/Netflix/@payload" /> 2. Using that variable to load the file dynamically into another variable <xsl:variable name="payl . . . Read full entry »


Re: Merkle Tree Algorithm and SHA-256

Posted 1/6/2020 10:37:00 AM

Looking at the code of a Javascript implementation of SHA-256, the algorithm doesn't look difficult to implement in XPath/XSLT with a little help from the EXPath/binary module to do the bit-twiddling. But if you're doing it in Saxon, calling out to the Java implementation that comes with the JDK lo . . . Read full entry »


Re: Merkle Tree Algorithm and SHA-256

Posted 1/6/2020 2:04:05 AM

On Sun, 2020-01-05 at 23:30 +0000, Vasu Chakkera vasucv@xxxxxxxxx wrote: > I am using xslt3.0 and I cant find the exslt hash function in > http://exslt.org/exsl/index.html > Any pointers where someone would have implemented this would help. I'm not aware of anyone who has implemented this . . . Read full entry »


Re: Merkle Tree Algorithm and SHA-256

Posted 1/5/2020 11:29:51 PM

I am using xslt3.0 and I cant find the exslt hash function in http://exslt.org/exsl/index.html Any pointers where someone would have implemented this would help. Vasu On Sun, 5 Jan 2020 at 15:55, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On . . . Read full entry »


Re: Merkle Tree Algorithm and SHA-256

Posted 1/5/2020 11:21:55 PM

Maybe this - http://expath.org/spec/crypto/editor On Sun, 5 Jan 2020, 18:43 Vasu Chakkera vasucv@xxxxxxxxx, < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hello All, > Wish you all a very happy new year.. > I am having to do a Merkle Tree algorithm for doing the checksum of fi . . . Read full entry »


Re: Merkle Tree Algorithm and SHA-256

Posted 1/5/2020 8:55:09 PM

On Sun, 2020-01-05 at 18:44 +0000, Vasu Chakkera vasucv@xxxxxxxxx wrote: > My XSLT script in general is ready except for the hash part, and I am > not sure if there is a way to execute SHA-256 on the files using > XSLT. In XSLT 3 with the exslt extensions it should be fairly easy. In XSL . . . Read full entry »


Merkle Tree Algorithm and SHA-256

Posted 1/5/2020 6:43:52 PM

Hello All, Wish you all a very happy new year.. I am having to do a Merkle Tree algorithm for doing the checksum of files when moving files from to AWS from the local network ( on-prem) . I have a number of solutions for this. Using Java, Node JS etc. While I was implementing this, I couldn't stop . . . Read full entry »


Re: [saxon] Questions about the `saxon:threads` extens

Posted 1/3/2020 12:02:38 AM

> A saxon:unordered attribute on the xsl:for-each itself would be much more robust. Yes! This would be a **Great** feature. Thanks, Dimitre On Thu, Jan 2, 2020 at 3:22 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On 2 Jan 2020, at 2 . . . Read full entry »


Re: [saxon] Questions about the `saxon:threads` extens

Posted 1/2/2020 11:22:22 PM

> On 2 Jan 2020, at 22:28, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > (1) fn:unordered doesn't relate very well to xsl:for-each because functions can't be applied directly to instructions; it would make more sense, > > > . . . Read full entry »


Re: Re: [saxon] Questions about the `saxon:threads` e

Posted 1/2/2020 10:28:01 PM

> (1) fn:unordered doesn't relate very well to xsl:for-each because functions can't be applied directly to instructions; it would make more sense, > > I think, to add a saxon:unordered attribute to xsl:for-each. I don't think it's a particularly easy change to make, given the existing cod . . . Read full entry »


XSL-List Guidelines

Posted 1/1/2020 5:01:45 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: [saxon] Questions about the `saxon:threads` e

Posted 12/29/2019 2:17:08 AM

> Sadly, I suspect you could count the number of users who would take advantage of such options on the fingers of one hand. > However, Saxon's power-users are an important part of the community and we do value them. An american film -name became a proverb: "If you build it they will com . . . Read full entry »


Re: [saxon] Questions about the `saxon:threads` extens

Posted 12/28/2019 8:58:24 PM

Is it too much to ask (for the benefit of the whole XSLT developers' community and current + future Saxon users) for implementing the desired behaviour in a future release of Saxon? :) 1. Honour fn:unordered() -- this will make it possible to do WaitAny(). The current behavior is equivalent to W . . . Read full entry »


Re: Re: [saxon] Questions about the `saxon:threads` e

Posted 12/28/2019 5:15:40 AM

Thank you, Dr. Kay, Is it too much to ask (for the benefit of the whole XSLT developers' community and current + future Saxon users) for implementing the desired behaviour in a future release of Saxon? :) 1. Honour fn:unordered() -- this will make it possible to do WaitAny(). The current behavi . . . Read full entry »


Re: [saxon] Questions about the `saxon:threads` extens

Posted 12/28/2019 1:20:39 AM

Quite a difficult question to answer accurately because I haven't looked at the code for a while and the logic isn't all in one place; it also depends on understanding the behaviour of the underlying Java services that we rely on, notably the ExecutorService. Q1. Firstly, calling fn:error() is exa . . . Read full entry »


Questions about the `saxon:threads` extension attribut

Posted 12/27/2019 5:18:31 AM

The questions below are essentially for Dr. Kay, though anyone interested and able to shed light on these is welcome. I need this information, because it seems not to be available in the Saxon documentation. *General setup*: We have multi-threaded processing specified by saxon:threads=b2b . . . Read full entry »


Re: Group handling of multiple IDREFS

Posted 12/20/2019 1:30:18 AM

On 19/12/2019 23:51, Michael Kay mike@xxxxxxxxxxxx wrote: If this was schema-aware, then atomizing the @to attribute would return a list of atomic values, so it would all just work... As it is, can't you simply do group-by="tokenize(@to)"? Or have I missed something? No, you're right. . . . Read full entry »


Re: Group handling of multiple IDREFS

Posted 12/19/2019 11:50:51 PM

If this was schema-aware, then atomizing the @to attribute would return a list of atomic values, so it would all just work... As it is, can't you simply do group-by="tokenize(@to)"? Or have I missed something? Note that when the group-by expression selects multiple values, the element w . . . Read full entry »


Group handling of multiple IDREFS

Posted 12/19/2019 11:42:27 PM

I have a custom document type which makes heavy use of an IDREFS attribute on an element type for cross-referencing. In the containing section, I need to iterate across the first occurrences of the values in document order. This is easy with an IDREF attribute, eg <xsl:for-each-group select= . . . Read full entry »


Re: Suggestions for filtering algorithm

Posted 12/18/2019 4:32:55 PM

Thank you Martin. That is excellent. I have never used the "satisfies" expression, but I can see that this is a perfect application for it. Thanks again! From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, December 18, 2019 11:12 . . . Read full entry »


Re: Suggestions for filtering algorithm

Posted 12/18/2019 4:11:23 PM

Am 18.12.2019 um 04:08 schrieb Rick Quatro rick@xxxxxxxxxxxxxx: > > Hi All, > > I have an XML file with parts similar to this: > > <?xml version="1.0" encoding="UTF-8"?> > > <parts> > > <part no="123456" desc="HOSE . . . Read full entry »


Re: Suggestions for filtering algorithm

Posted 12/18/2019 3:29:50 PM

Here is my attempt at filtering by getting a regular expression pattern to apply against my input. Here is the filter document: <?xml version="1.0" encoding="UTF-8"?> <filter> <exclude>HOSE ASSEMBLY</exclude> <exclude>HOSE ASSY</ex . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/18/2019 3:13:34 AM

Thanks to everyone who responded to this. I have a few things to look into now :-) cheers T From: Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Sunday, 15 December 2019 22:03 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Running the same t . . . Read full entry »


Suggestions for filtering algorithm

Posted 12/18/2019 3:08:06 AM

Hi All, I have an XML file with parts similar to this: <?xml version="1.0" encoding="UTF-8"?> <parts> <part no="123456" desc="HOSE KIT"/> <part no="234567" desc="HOSE FITTINGS"/> <part no= . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/16/2019 2:43:52 PM

The way I do this is with Ant indeed: Ant does a single XSLT compilation, then applies it to all input files where the output file is older than the input file or doesn't exist (which may provide another optimisation). I use a build.xml like this to run `ant transform-files`. <project> & . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/16/2019 10:43:09 AM

You may have a look at gaulois-pipe, which is design to cache XSL compile results, to run multi-files transformation in parallel, and other simple things made to go fast. https://github.com/cmarchand/gaulois-pipe/wiki We use it a lot, as it allows, through a pipeline definition file, to run va . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/16/2019 12:20:15 AM

> Does Saxon implement the semantics of > "cache" : true() > > as per the Spec? > If cache:true() is set then Saxon's implementation of fn:transform() will cache and reuse a compiled stylesheet provided that it does not use static parameters. The spec of course does not . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 11:00:42 PM

Thank you, Dr. Kay, > Indeed, I overlooked the possibility of having the controlling loop written in XSLT 3.0 and executing the per-transformation code using fn:transform(), > which gets over the problems of changing existing XSLT code if it relies on global variables. Does Saxon implement . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 10:50:07 PM

Indeed, I overlooked the possibility of having the controlling loop written in XSLT 3.0 and executing the per-transformation code using fn:transform(), which gets over the problems of changing existing XSLT code if it relies on global variables. Michael Kay Saxonica > On 15 Dec 2019, at 22:35, . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 10:35:21 PM

> Note that there's a double overhead here: firstly you're bringing up a new Java VM for each transformation, > and secondly you're recompiling the stylesheet for each transformation. Isn't the meaning of the * "cache" : true()* key-value pair in the $*options *argument of `fn: . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 10:12:20 PM

Note that there's a double overhead here: firstly you're bringing up a new Java VM for each transformation, and secondly you're recompiling the stylesheet for each transformation. You can avoid the Java loading overhead by using ant or XProc, but I'm not sure either of them will avoid the overhead . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 7:31:12 PM

On Sun, 2019-12-15 at 09:03 +0000, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx wrote: > > cd documents > > for d in `cat dlist`; do as others have said, use collection, or unparsed-text-lines() to read dlist; > > cd $d > > for f in `cat flist`; do > > java . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 7:07:28 PM

Looking at my answer, I think that it would be useful to have another overload of the standard `collection()` function, but this time, due to reasons we all know, this would be a Saxon extension function: saxon:collection($arg as xs:string?, $processWith as function(*), $multiThread as xs:boolean . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 5:49:37 PM

I would definitely use the `collection()` function, then would try to process the documents in parallel using the `saxon:threads` extension attributes with a value dependent on the number of cores on the machine. https://www.saxonica.com/html/documentation/extensions/attributes/threads.html Tryi . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 5:37:11 PM

On Sun, Dec 15, 2019 at 09:03:01AM -0000, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx scripsit: > Our processor of choice is Saxon (currently we are using 8.7.3) so I can Why are you using something that old? (It's not quite like saying "we use K&R C!" but it's heading there.) [sn . . . Read full entry »


Re: command line invocation issue

Posted 12/15/2019 10:25:21 AM

Hi Pieter, You are absolutely right. The script.sh add been created under windows. Copying the invocation script to a new file fixed the issues ... Thank you. Regards, ac Le dim. 15 dC)c. 2019 C 05:11, Pieter Masereeuw pieter@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> a C)cri . . . Read full entry »


Re: command line invocation issue

Posted 12/15/2019 10:11:06 AM

Hi Andre, Maybe you are using Windows line ending characters? On Debian-/Ubuntu-/Mint-like systems, you can use fromdos myscript.sh If you need to install fromdos, use: sudo apt-get install tofrodos But some sophisticated text editors may also give you the option to use ascii character 10 (LF . . . Read full entry »


Re: command line invocation issue

Posted 12/15/2019 10:00:21 AM

Hi Martin, Good question, but yes, net.galasoft.dnaos.saxon.Transform invokes/subclasses net.sf.saxon.Transform. It has been working fine for years with no changes, except the OS. Now, yes, in theory it could still require adaptation, but as noted to Dave a moment ago, The transform now works if t . . . Read full entry »


Re: command line invocation issue

Posted 12/15/2019 9:48:00 AM

Hi Dave, You are right, the line is a little long. I just copied it from the script file. Breaking the line up into multiple lines in the script file by ending each one with \ (with nothing after it) does not work as Bash seems to just see separate commands that it does know about ... Yet, intera . . . Read full entry »


Re: Running the same transformation on many input file

Posted 12/15/2019 9:35:29 AM

Am 15.12.2019 um 10:03 schrieb Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx: > > An application I am working on contains a large number of source > documents which are all run through the same series of > transformations. While initially the build process didn't take long > the cost of . . . Read full entry »


Re: command line invocation issue

Posted 12/15/2019 9:25:49 AM

Am 15.12.2019 um 09:22 schrieb Andre Cusson akhu01@xxxxxxxxx: Hi, We are turning to this list because the solution to this is probably very simple, but we seem to require an experienced developer eye to see it. We have had an xslt2/Saxon application runningB fine for some years, under Windows, but . . . Read full entry »


Running the same transformation on many input files,

Posted 12/15/2019 9:02:56 AM

Hi An application I am working on contains a large number of source documents which are all run through the same series of transformations. While initially the build process didn't take long the cost of repeatedly initialising the XSL processor soon adds up, so I am looking at ways to streamlin . . . Read full entry »


Re: command line invocation issue

Posted 12/15/2019 8:38:00 AM

Quick guess, you have a newline in your script? Try using bash continuation lines to make it more readable? HTH On Sun, 15 Dec 2019 at 08:21, Andre Cusson akhu01@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi, > > We are turning to this list because the soluti . . . Read full entry »


command line invocation issue

Posted 12/15/2019 8:21:45 AM

Hi, We are turning to this list because the solution to this is probably very simple, but we seem to require an experienced developer eye to see it. We have had an xslt2/Saxon application running fine for some years, under Windows, but now we need to upgrade it to xslt3, with Saxon still, but und . . . Read full entry »


Re: XSLT code for XML to JSON conversion?

Posted 12/13/2019 10:50:40 PM

Many thanks to all for some excellent input on this topic. We will explore 1. Some of the converters. 2. Sending XML to the client, and letting Javascript do the conversion to the DOM BTW, the XML we are using is the ISO-19115-2 (19139) schema: https://www.iso.org/obp/ui/ https://data.noaa.gov/r . . . Read full entry »


Re: XSLT code for XML to JSON conversion?

Posted 12/13/2019 3:28:06 PM

Hi, I think itbs fair to say there will be no absolutely generic XML<->JSON alignment tool or even approach. This is because there is no such thing as bgenericb XML or JSON, there is only the actual XML and actual JSON you actually have or need. As Mike says, the stuff you get from the ch . . . Read full entry »


Re: XSLT code for XML to JSON conversion?

Posted 12/13/2019 10:26:57 AM

However, the xml-to-json function on XSLT 3.0 doesn't convert arbitrary XML to JSON; it requires you first to do a transformation to the XML structure that reflects the JSON you want to produce. Generally, off-the-shelf tools that convert arbitrary XML to JSON tend to produce JSON that's not very . . . Read full entry »


Re: XSLT code for XML to JSON conversion?

Posted 12/13/2019 10:11:44 AM

Hi, Saxon on the Java Platform would work fine on the command-line, but as Liam said you have the Java runtime startup. Alternatively Saxon/C could equally fit your requirements. It is cross compiled to native library, which can be run on the command-line using C/C++. Saxon/C also comes with Pyth . . . Read full entry »


Re: XSLT code for XML to JSON conversion?

Posted 12/12/2019 10:37:30 PM

There are also non XSLT converters that use SAX: read XML and serialize out as JSON. There are several node-js packages. Python xmljson. https://pypi.org/project/xmljson/ <https://pypi.org/project/xmljson/> supports several different JSON encoding conventions. And Ibm sure many others. ( I . . . Read full entry »


Re: XSLT code for XML to JSON conversion?

Posted 12/12/2019 10:08:34 PM

On Thu, 2019-12-12 at 21:32 +0000, Richard Fozzard richard.fozzard@xxxxxxxx wrote: > Hi Folks, > > We're looking to do conversion of relatively complex XML (i.e. > namespaces, attributes, repeating elements, xlinks) into JSON from > the > Unix command line to build a web page. . . . Read full entry »


XSLT code for XML to JSON conversion?

Posted 12/12/2019 9:31:53 PM

Hi Folks, We're looking to do conversion of relatively complex XML (i.e. namespaces, attributes, repeating elements, xlinks) into JSON from the Unix command line to build a web page. We'veB used the XML to JSON feature in the Oxygen Developer tool, and it works well, but that's a GUI, not a c . . . Read full entry »


Re: Suggestion for handling an endless loop

Posted 12/11/2019 12:06:23 AM

Sorry to be so late in responding to this. No, I was not using Oxygen, I was running the DITA OT from the command line only. So the XSLT processor used would be the one that comes with DITA OT version 3.3.2 (Saxon-HE-9.8.0-14.jar). But the DITA OT is basically an Ant application, and it calls t . . . Read full entry »


Re: What are the possible vendor-options to pass to f

Posted 12/10/2019 2:34:12 AM

On Mon, 2019-12-09 at 19:35 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > This is a question to Dr. Kay and the Saxon team. > > I am running a transformation that calls the standard XPath 3.0 > fn:transform() and this exhibits different behavior in Oxygen > Debugger and in . . . Read full entry »


Re: What are the possible vendor-options to pass to f

Posted 12/9/2019 8:55:26 PM

I wonder if settings in Oxygen debugger Configure Parameters overrides the parameters you pass to Fn:transform() or not ? b Steve M. > On Dec 9, 2019, at 2:34 PM, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > This is a question to Dr . . . Read full entry »


What are the possible vendor-options to pass to fn:tr

Posted 12/9/2019 7:34:29 PM

This is a question to Dr. Kay and the Saxon team. I am running a transformation that calls the standard XPath 3.0 fn:transform() and this exhibits different behavior in Oxygen Debugger and in the Editor (in non-debugger run). The question is: 1. What must we specify in the map of parameters that . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/8/2019 12:48:26 AM

> Also, why use the verbose <xsl:map-entry> as compared to the XPath way > of writing a map-literal? I know that this can be useful in > dynamically creating a map when the number of key-value pairs is > determined at runtime -- but this still isn't the case in this > question. . . . Read full entry »


Re: Aw: URI collection select?

Posted 12/7/2019 11:23:04 PM

Since uri-collection() is new to XPath 3.1 and the collection URI query parameters that OP is using look like Saxonbs, OP is probably using a recent version of Saxon. In recent versions of Saxon, a collection URI query parameter named 'match' is supported, see http://www.saxonica.com/document . . . Read full entry »


Aw: URI collection select?

Posted 12/7/2019 11:00:01 PM

Is that for Saxon 9? -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 07.12.19, 23:51 schrieb "dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: I once upon a time found a documentation with examples on various way to build collections . . . Read full entry »


URI collection select?

Posted 12/7/2019 10:51:28 PM

I once upon a time found a documentation with examples on various way to build collections and for the life of me I cannot find it again. I have a situation where I have files with a .dita and .xml file extensions. I thought there was a way to do this in one select statement but all the ways I can . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/7/2019 5:04:14 PM

Thank you, Dr. Kay, > > This can be simplified to: > > <xsl:variable name="vFuns" as="map(xs:string, function(*))" > select="map { > 'move' : f:move#0, > 'stop' : f:stop#0 > } > " > /> > Yes, I know the f:fun#Ar . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/7/2019 8:59:19 AM

This can be simplified to: > <xsl:variable name="vFuns" as="map(xs:string, function(*))" > select="map { > 'move' : f:move#0, > 'stop' : f:stop#0 > } > " > /> You can also use XSLT syntax: <xsl:map> <xsl:map-ent . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/7/2019 1:44:55 AM

I also like this XSLT/XPath 3 way: <xsl:stylesheet version="3.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:f="my:f"> <xsl:param name="pFunName" select="'move'" as=&quo . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/6/2019 11:50:45 PM

Well, you can turn the function name into a function object using fn:function-lookup(), and then invoke it using dynamic function invocation, but one wonders why you are using function names as distinct from function objects in the first place. Where do these strings like "move" come from . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/6/2019 8:13:15 PM

On Fri, 2019-12-06 at 17:21 +0000, Costello, Roger L. costello@xxxxxxxxx wrote: > . For example, if $function-to-invoke > holds the string "move" then I want my XSLT program to invoke the > function with that name, i.e., invoke f:move(...). let $f := function-lookup(QName($fn, . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/6/2019 7:46:15 PM

Sure, but this will have to be <xsl:template match="@val[. >= 0]">{ . || ': positive'}</xsl:template> or the slightly more explicit <xsl:template match="@val[. >= 0]">{ string(.) || ': positive'}</xsl:template> since by matching the attribute, w . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/6/2019 7:35:56 PM

On 06.12.2019 18:21, Costello, Roger L. costello@xxxxxxxxx wrote: I have an XSLT variable, $function-to-invoke, that holds the name of an XSLT function to be invoked. For example, if $function-to-invoke holds the string "move" then I want my XSLT program to invoke the function with that . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/6/2019 6:25:36 PM

Whiltespace is definitely a concern. I especially dislike things like: <xsl:value-of>, <xsl:value-of> (would be even worse if that was just xsl:template instead of xsl:value-of). It's easy for fiddly bits to be misread or lost in code cleanup or whatever. So I tend to prefer either x . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/6/2019 5:32:01 PM

And in XSLT ver < 3 Use the same technique that is in the heart of FXSL -- Have different templates that match unique nodes and that call a corresponding function. Cheers, Dimitre On Fri, Dec 6, 2019 at 9:29 AM Dimitre Novatchev dnovatchev@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxx . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/6/2019 5:30:09 PM

Roger, Wouldn't this would be another occasion for the technique of using an element as a proxy for your function, as in Dimitre's FXSL? In other words, if your variable held an element <roger:function-to-invoke/>, you could apply templates to it to dispatch to your function, passing its ar . . . Read full entry »


Re: How to call an XSLT function whose name isn't know

Posted 12/6/2019 5:28:59 PM

Perhaps: <xsl:evaluate ... > ? https://www.w3.org/TR/xslt-30/#dynamic-xpath Cheers, Dimitre On Fri, Dec 6, 2019 at 9:20 AM Costello, Roger L. costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > I have an XSLT variable, $function-to-invoke . . . Read full entry »


How to call an XSLT function whose name isn't known ti

Posted 12/6/2019 5:20:52 PM

Hi Folks, I have an XSLT variable, $function-to-invoke, that holds the name of an XSLT function to be invoked. For example, if $function-to-invoke holds the string "move" then I want my XSLT program to invoke the function with that name, i.e., invoke f:move(...). Is there a way for XSLT . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/6/2019 5:13:15 PM

Probably Eliot has in mind unintended whitespace in the results (heh). Whitespace. The bane of empires. (But oof. I can see I need to do a better job cleaning up after this email client.) Cheers, Wendell -----Original Message----- From: Eliot Kimber ekimber@xxxxxxxxxxxx <xsl-list-service@xxx . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/6/2019 3:53:48 PM

I don't like having literal text as direct children of <xsl:template>--too many opportunities for unintended results, so I would use xsl:text where Wendel has not: <xsl:template match="@val[. >= 0]"><xsl:text>{ . }: positive</xsl:text></xsl:template> At . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/6/2019 3:00:06 PM

Tweaked, now in 3.0 with expand-text=btrueb: <xsl:template match="@val[. >= 0]">{ . }: positive</xsl:template><mailto:%22%3e%7b%20.%20%7d:%20positive%3c/xsl:templat e%3e%0d%0d%3cxsl:template%20match=%22@val%5b0> <mailto:%22%3e%7b%20.%20%7d:%20positive%3c/xsl:te . . . Read full entry »


Re: user defined data elements in stylesheets

Posted 12/6/2019 11:20:21 AM

On Fri, Dec 6, 2019 at 4:35 PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > The usual way is > > document('') > > but it is not portable in any case, if the stylesheet was loaded from a > string for instance, that call might fa . . . Read full entry »


Re: user defined data elements in stylesheets

Posted 12/6/2019 11:11:35 AM

Hi Mukul, document('') is what you are looking for It has some issues however. It is an interesting hack in XSLT1 if you want to avoid the use of a node-set() function But I see no reason why you would not just put the data elements inside a variable (gives you some typing on top if you want) . . . Read full entry »


Re: user defined data elements in stylesheets

Posted 12/6/2019 11:05:49 AM

Am 06.12.2019 um 11:55 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx: Hi all, B B I'm trying to use 'user defined data elements' in an XSLT stylesheet. Following is my XSLT transformation example, XML input document: <?xml version="1.0" encoding="UTF-8"?> <root> B . . . Read full entry »


user defined data elements in stylesheets

Posted 12/6/2019 10:55:42 AM

Hi all, I'm trying to use 'user defined data elements' in an XSLT stylesheet. Following is my XSLT transformation example, XML input document: <?xml version="1.0" encoding="UTF-8"?> <root> <a val="-1"/> <a val="-4"/> < . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/6/2019 5:42:29 AM

Hi Eliot, On Thu, Dec 5, 2019 at 8:21 PM Eliot Kimber ekimber@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > but I would replace the choice that acts on different @val values with > templates applied to the @val attribute, i.e.: > > <xsl:template mat . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/5/2019 6:05:07 PM

It is well-known that code inside a conditional operator *increases *the cyclomatic complexity. Thus we see many sources that recommend to avoid or refactor conditional statements -- in many different languages. I believe XSLT is no exception. Just for example, here is a recommendation how to re . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/5/2019 5:39:04 PM

John's points are well taken--it certainly points up the art of XSLT implementation design. At least in the kind of stuff I do, maybe amplified by the editing tools I use (Oxygen XML), I've moved to prefer templates over inline conditionals where the logic is potentially variable or overridable or . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/5/2019 4:48:36 PM

On Wed, Dec 4, 2019 at 2:43 AM Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > ... > Secondly, I found it useful recently to split the mode for evaluating assertions into two: one mode handles the case where the test produces a normal result, the other h . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/5/2019 4:34:31 PM

On 05/12/2019 14:51, Eliot Kimber ekimber@xxxxxxxxxxxx wrote: > Not really about modes, but I would replace the choice that acts on different @val values with templates applied to the @val attribute, i.e.: > > <xsl:template match="a"> > <val>< . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/5/2019 2:50:58 PM

Not really about modes, but I would replace the choice that acts on different @val values with templates applied to the @val attribute, i.e.: <xsl:template match="a"> <val><xsl:apply-templates select="@val"/></val> </xsl:templ . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/5/2019 5:54:37 AM

Hi Mike, On Wed, Dec 4, 2019 at 4:14 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: ([mukul] I assume, you mean 'mode' here) helps to modularise the logic, and > in particular, for someone reading the code, if apply-templates uses a > specific mode . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/4/2019 7:16:57 PM

> For sure. But you can also use fn:transform() to replace modes in some > cases, and turn mode management into file management :) > > Liam Yes, this is almost exactly the same as what Elliot shared with us -- but omitting the modes could make it more unreadable. Also, fn:transform() . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/4/2019 7:00:08 PM

On Wed, 2019-12-04 at 16:59 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > Without using modes I wonder if it would be possible at all to do > this processing in a single transformation -- and even if this is > somehow (crazy) possible, the code would be a torture to read, > und . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/4/2019 6:42:17 PM

I also use modes for templates that implement functions, which I guess is really just a special case of reprocessing the same elements in a different way, now that I think about it. I also try to follow the practice of putting modes (or sets of related modes) in separate XSLT modules, in part to m . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/4/2019 4:58:07 PM

I agree with Martin. I also use modes when performing multi-pass processing -- typically the XML document that is the result of pass-N-1 and is to be processed by pass-N has different structure and meaning than any of the documents produced by previous passes , or future documents, to be produced . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/4/2019 10:43:55 AM

> That example seems to be too simple or artificial to show the value of > modes. In general I think modes have their value if you need to process > the same type of nodes twice e.g. once for generating a table of > contents and the second time for splitting into result documents. Or, i . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/4/2019 9:59:27 AM

Hi Martin, On Wed, Dec 4, 2019 at 12:21 PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > That example seems to be too simple or artificial to show the value of > modes. Ok. > In general I think modes have their value if you need to proce . . . Read full entry »


Re: best practices for using XSLT modes

Posted 12/4/2019 6:51:04 AM

Am 04.12.2019 um 07:42 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx: Hi all, B B I imagine that, using XSLT modes is useful. I've been trying different XSLT approaches for solving a class of XML transformation problems. Below is an example of what I've tried (I present an XML document, two differen . . . Read full entry »


best practices for using XSLT modes

Posted 12/4/2019 6:42:22 AM

Hi all, I imagine that, using XSLT modes is useful. I've been trying different XSLT approaches for solving a class of XML transformation problems. Below is an example of what I've tried (I present an XML document, two different XSLT stylesheets [non schema aware] to process the XML document, an . . . Read full entry »


Re: Why does this XPath expression work fine when run

Posted 12/3/2019 6:22:22 AM

Hi Roger, On Tue, Dec 3, 2019 at 12:11 AM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Secondly, the spec says that by default, assertions can't see comments and > PIs. In other words, users can add comments and PIs to the instance without > wor . . . Read full entry »


Re: current() and position()?

Posted 12/3/2019 1:19:36 AM

I think this definition of the ! operator in the XPath 3.0 specification explains exactly why the reported result of the evaluation is observed https://www.w3.org/TR/xpath-30/#id-map-operator : "3.14 Simple map operator (!) [34] SimpleMapExpr <https://www.w3.org/TR/xpath-30/#prod-xpath . . . Read full entry »


Re: current() and position()?

Posted 12/2/2019 11:56:34 PM

Dear Wendell and xsl-list, Thank you (also the others who have responded) for the clarification. You write that it "isn't about current()", but, for what it's worth, it was misunderstanding current() that led me to misunderstand position(). The spec (20.4.1) tells me that "The curr . . . Read full entry »


Re: Why does this XPath expression work fine when run

Posted 12/2/2019 6:40:58 PM

You're confusing two things here. Firstly, there's an absolute rule that an assertion can only look within the subtree of the element on which it is defined. In other words, an assertion on an element can make that element invalid, but it can't make other elements invalid (other than containing el . . . Read full entry »


Re: Why does this XPath expression work fine when run

Posted 12/2/2019 6:12:51 PM

Furthermore, if you put the assertion on a parent element, then by default the XDM instance against which the assertion is run has all comment and PI nodes stripped (on the theory that comments and PIs should not affect the validity of a document). <quote> XSD 1.1 part 1 B'3.13.4.1 clause 1. . . . Read full entry »


Re: Why does this XPath expression work fine when run

Posted 12/2/2019 6:12:32 PM

Thank you Graydon and Ken. If I understand correctly, you are saying that the XPath expression in an XSD 1.1 assert may not reference comment fields. Correct? Okay, I will switch back to XSD 1.0 and express assertions using Schematron. The XPath works fine in Schematron: <sch:rule context=&qu . . . Read full entry »


Re: Why does this XPath expression work fine when run

Posted 12/2/2019 5:50:25 PM

The data model within which an assertion is evaluated is comprised only of the element itself, not its siblings. You are looking at siblings. Per the specification: https://www.w3.org/TR/xmlschema11-1/#sec-cvc-assertion I hope this helps. . . . . . . Ken At 2019-12-02 17:27 +0000, Costello, R . . . Read full entry »


Re: Why does this XPath expression work fine when run

Posted 12/2/2019 5:47:55 PM

On Mon, Dec 02, 2019 at 05:26:37PM -0000, Costello, Roger L. costello@xxxxxxxxx scripsit: > Why does the XPath query work fine when run in Oxygen but fails when > used in an XSD 1.1 assert element? When you assert: *[local-name(.) eq 'style']/following-sibling::comment()[1]/starts-with(., ' . . . Read full entry »


Why does this XPath expression work fine when run in

Posted 12/2/2019 5:26:32 PM

Hi Folks, Below is a sample XHTML document. Immediately following the <style> element is a comment. I want to ensure that the value in the comment starts with this string: [if gte mso 9]><xml> Using Oxygen, I ran the following XPath query (the <head> element is the context . . . Read full entry »


Re: current() and position()?

Posted 12/2/2019 4:53:39 PM

Dear David and XSL-List, Mike points out this isn't about current(): it is a red herring. Nonetheless it might help to keep in mind that while position() is an XPath expression, current() is not. It is defined only by XSLT. This is because its entire purpose is to refer from inside an XPath expre . . . Read full entry »


Re: current() and position()?

Posted 12/2/2019 8:11:34 AM

Basically, if X is a sequence of N items, then X ! position() will return the integer sequence 1 to N. Which means that if X is a singleton (which current() always is) then X! position() will always be 1. This has nothing to do with the peculiarities of the current() function. Within any subexpres . . . Read full entry »


XSL-List Guidelines

Posted 12/2/2019 4:56:26 AM

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: current() and position()?

Posted 12/2/2019 4:07:49 AM

Dear Dimitre (cc xsl-list), Thank you for the quick response. I had misunderstood that, as you write: "'The context position is returned by the XPath expression position().' This has a different, narrower meaning than the definition of position() in XPath, as XPath doesn't know about any XSLT . . . Read full entry »


Re: current() and position()?

Posted 12/2/2019 3:41:08 AM

> <xsl:variable name="letters" as="xs:string+" select="'a', 'b', 'c'"/> > <xsl:for-each select="$letters"> > <xsl:message select="position(), current() ! position()"/> > </xsl:for-e . . . Read full entry »


current() and position()?

Posted 12/2/2019 1:05:11 AM

Dear xsl-list, With apologies for what I suspect is a naive question, I am confused about the context position in: <xsl:variable name="letters" as="xs:string+" select="'a', 'b', 'c'"/> <xsl:for-each select="$letters"> . . . Read full entry »



PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

What's New for X14?

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

Why Pay More for XML Tools?

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

 
Free Stylus Studio XML Training:
W3C Member