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: Ungready Flag on Regex

Posted 10/8/2020 6:45:46 PM

... and that way you don't have to pay for them! On Thu, Oct 8, 2020, 18:28 Christophe Marchand cmarchand@xxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Thanks ! Regex will always strange to me... > > XMLPrague really must be in presential mode. I have too many beer . . . Read full entry »


Re: Ungready Flag on Regex

Posted 10/8/2020 4:28:13 PM

Thanks ! Regex will always strange to me... XMLPrague really must be in presential mode. I have too many beers to drink with you ! Christophe Le 08/10/2020 C 16:54, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx a C)critB : On 08.10.2020 16:26, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: . . . Read full entry »


Re: Ungready Flag on Regex

Posted 10/8/2020 3:10:56 PM

On Thu, 2020-10-08 at 14:55 +0000, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: > > > On 08.10.2020 16:26, Liam R. E. Quin liam@xxxxxxxxxxxxxxxxx wrote: > > You want [^*]*? > > Thinking of the brilliant potential for misunderstanding that this > answer entails . . . Read full entry »


Re: Ungready Flag on Regex

Posted 10/8/2020 2:54:15 PM

On 08.10.2020 16:26, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: You want [^*]*? Thinking of the brilliant potential for misunderstanding that this answer entails. Christophe: I don't understand why you are asking me whether I want [^*]*. Jokes aside, I think you need the non-greedy question ma . . . Read full entry »


Re: Ungready Flag on Regex

Posted 10/8/2020 2:26:16 PM

On Thu, 2020-10-08 at 14:23 +0000, Christophe Marchand cmarchand@xxxxxxxxxx wrote: > > B B B <xsl:analyze-string select="$s" regex="\*\*[^*]*\*\*"> You want [^*]*? the non-greedy version of * Liam -- Liam Quin,B https://www.delightfulcomputing.com/ Available f . . . Read full entry »


Ungready Flag on Regex

Posted 10/8/2020 2:22:57 PM

Hello ! I have a regex that tries to detect bold parts in a markdown string. In markdown, bold parts are delimited with ****. For example : Not bold but **this one is blod** text. Here, *"this one is bold"* should be dispayed as bold text. For this, I use this regex : <xs . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/7/2020 7:45:42 AM

Am 07.10.2020 um 00:50 schrieb Martin Honnen martin.honnen@xxxxxx: Now I wonder whether nevertheless the sample shows that the accumulator wrongly did not fire for the parentless element. A shorter test case is <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xm . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/7/2020 6:14:07 AM

Thanks a lot, Michael, for this precision. I've just forgot it ! Best regards, Christophe Le 07/10/2020 ` 00:33, Michael Kay mike@xxxxxxxxxxxx a icrit : > It's fundamental to accumulators that the value of an accumulator at a > particular node in a document is a pure function of the preced . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 10:50:39 PM

On 07.10.2020 00:33, Michael Kay mike@xxxxxxxxxxxx wrote: Your private:block element is matched by a different "accumulator instance" from the one that matches the page element; an accumulator instance corresponds to one document, and accumulator instances for different documents don't i . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 10:33:43 PM

It's fundamental to accumulators that the value of an accumulator at a particular node in a document is a pure function of the preceding nodes in that document (or in the case of an "after" value, the descendant nodes), and nothing else (other than constant data such as global variables). . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 9:59:44 PM

On 06.10.2020 23:52, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: <xsl:sequence select="$value[1] + $height"/> No need to use [1] here: <xsl:sequence select="$value + $height"/> I made the accumulator xs:double+ temporarily because I thought you also wa . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 9:52:50 PM

A single pass will do: <xsl:accumulator name="blockHeight" as="xs:double" initial-value="0.0"> <xsl:accumulator-rule match="page"> <xsl:message>Reset block height to 3.2</xsl:message> <xsl:sequence select="3.2"/ . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 9:34:35 PM

Just another observation: If the accumulator in the main document isn't referred to, the message "Reset block height to 3.2" won't be emitted, either. Therefore I assume an accumulator will be optimized away unless used. On 06.10.2020 23:31, Christophe Marchand cmarchand@xxxxxxxxxx wr . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 9:31:41 PM

Ok, thanks a lot, Martin and Gerrit. So I must use a two pass strategy if I'm not able to directly calculate widht on content. Not a good news, but, thanks to you, I now know how to solve my problem ! Best regards, Christophe Le 06/10/2020 C 23:20, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxx . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 9:20:29 PM

The private:block elements are trees of their own and they have their own accumulator values (that are available in the template that matches private:block). But they don't add to the 'blockHeight' accumulator of the main document. On 06.10.2020 22:57, Christophe Marchand cmarchand@xxxxxxxxxx w . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 9:18:14 PM

On 06.10.2020 22:57, Christophe Marchand cmarchand@xxxxxxxxxx wrote: Hello ! I have another question with accumulators. I use accumulators to calculate block height, and then to calculate block locations (y). I have this XSL for a repro... <?xml version="1.0" encoding="UTF-8&quo . . . Read full entry »


Re: [Accumulators] Another stupid question

Posted 10/6/2020 9:16:14 PM

Please use informative subject lines on XSL-List. The list archives are very heavily used, and we believe that most users of the archives search the text and then browse the subject lines to decide what to read. Since it is likely that others will have the same question you do, it is a courtesy to . . . Read full entry »


[Accumulators] Another stupid question

Posted 10/6/2020 8:57:41 PM

Hello ! I have another question with accumulators. I use accumulators to calculate block height, and then to calculate block locations (y). I have this XSL for a repro... <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/X . . . Read full entry »


XSL-List Guidelines

Posted 10/1/2020 2:25:34 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: Word Styles (was: OTT Re: Converting XML into ODT

Posted 9/30/2020 9:49:54 PM

On 30/09/2020 17:27, Andrew Sales andrew@xxxxxxxxxxxxxxx wrote: [...] * making your Word template as visually *unlike* the document it is intended to render as (via creative use of colours and fonts) concentrates the author/editor more on its meaning. Very good advice. P . . . Read full entry »


Re: Word Styles (was: OTT Re: Converting XML into ODT

Posted 9/30/2020 4:26:43 PM

On the topic of constraining style usage within Word, I have observed that: - post hoc validation gains slightly more traction [1] (there is some XSLT in there, so still relevant to this list, I hope) - constraint of this kind tends to be favoured more in journal article workflows - . . . Read full entry »


Re: Word Styles (was: OTT Re: Converting XML into ODT

Posted 9/30/2020 3:13:20 PM

On Wed, 30 Sep 2020 at 15:32, Peter Flynn peter@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On 30/09/2020 14:41, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote:[...] > > To Word Styles, I would like to add Word Outlining to the list of > > features that are . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/30/2020 2:33:15 PM

My word2dita transformation framework (https://github.com/dita4publishers/org.dita4publishers.word2dita) is the inverse of The Wordinator--it takes DOCX XML, generates a simple intermediate format (Simple Word Processing XML) and then applies a transform using a style-to-tag mapping configuration f . . . Read full entry »


Word Styles (was: OTT Re: Converting XML into ODT doc

Posted 9/30/2020 2:32:03 PM

On 30/09/2020 14:41, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote:[...] > To Word Styles, I would like to add Word Outlining to the list of > features that are exploitable. [...] I'm surprised it's not used more, particularly by those who loved the outliners people used in the days of DOS syste . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/30/2020 1:41:17 PM

+100 Peter. Word(tm) is an amazing piece of software -- and those who know how to exploit it can do wondrous things. Note the contingency there. In this case, "those who know" must include not only individuals, but also teams and organizations. One person can know something while the tea . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/30/2020 10:20:39 AM

On 30/09/2020 10:20, Michael Kay mike@xxxxxxxxxxxx wrote: On 30/09/2020 09:57, Peter Flynn peter@xxxxxxxxxxx wrote: BUTb&all these solutions depend on the Word file using Names Styles consistently, and that's a human (editorial) requirement too. The first two editions of my book [...] totally r . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/30/2020 9:20:15 AM

> BUTb&all these solutions depend on the Word file using Names Styles consistently, and that's a human (editorial) requirement too. The first two editions of my book, produced by Wrox in Birmingham UK before the Wiley takeover, were done end-to-end in Word right through to final camera-rea . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/30/2020 8:56:43 AM

On 30/09/2020 06:00, Mukul Gandhi gandhi.mukul@xxxxxxxxx wrote: Is the following possible, as an opensource & freeware solution? First convert word file into word's standard XML serialization, and then convert that XML serialization to pdf. Yes, I think lots of people do this. The experimental . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/30/2020 4:59:54 AM

On Tue, Sep 29, 2020 at 12:43 PM Geert Bormans geert@xxxxxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > This one is not open source nor freeware, but is an amazingly good product > https://products.aspose.com/words/java > I came across above link earlier as wel . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/29/2020 7:13:02 AM

Hi Mukul, This one is not open source nor freeware, but is an amazingly good product [ https://products.aspose.com/words/java | https://products.aspose.com/words/java ] Met vriendelijke groeten, Best regards, Geert Bormans ----- Op 29 sep 2020 om 5:50 schreef Mukul Gandhi gandhi.mukul@xx . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/29/2020 6:44:11 AM

On Mon, 28 Sep 2020 at 21:53, Eliot Kimber ekimber@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > My Wordinator project (http://wordinator.org/) provides a general XML to DOCX framework that uses the Apache POI library to generate full-featured Word docs from a simpl . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/29/2020 3:50:20 AM

Sorry, if this mail may be off-topic. I'm currently, in need of an open source/freeware java API & implementation, that can convert word document to pdf from within a java program. Does anyone knows such an API? -- Regards, Mukul Gandhi . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/28/2020 9:34:16 PM

Note that the original driving use case for The Wordinator was specifically to generate DOCX files for use by people who want to use those DOCX files for further editing (in particular, DOCX versions of codified municipal code used as the input to code revision processes). But the requirement was . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/28/2020 8:53:18 PM

My Wordinator project (http://wordinator.org/) provides a general XML to DOCX framework that uses the Apache POI library to generate full-featured Word docs from a simple XML format that you can generate from whatever. I provide a basic HTML transform as a starting point. Cheers, Eliot Kimber & . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/28/2020 5:16:13 PM

On Mon, 2020-09-28 at 15:20 +0000, Manuel Souto Pico terminolator@xxxxxxxxx wrote: > Thanks, Andre. > > In the XML -> XSLT -> HTML + CSS/JS path, I was assuming it would be > possible to print directly from the browser, in which case printing > to an > offline PDF file woul . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/28/2020 3:19:06 PM

Thanks, Andre. In the XML -> XSLT -> HTML + CSS/JS path, I was assuming it would be possible to print directly from the browser, in which case printing to an offline PDF file wouldn't be necessary. If it is not possible to print directly from the browser and it's necessary to create the PDF . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/28/2020 2:39:53 PM

When you follow the XML -> XSLT -> HTML + CSS/JS path, you can still print to PDF There is potentially some manual work required, but it is a quick and easy fix if the volume is "reasonable". Other paths may be more appropriate in most cases. Le ven. 25 sept. 2020 C 07:32, Manuel . . . Read full entry »


Streaming XSLT for Vote Tabulation

Posted 9/28/2020 2:07:04 PM

Perhaps of interest to some who live in counties that have an upcoming election, Ibve been exploring the use of XSLT 3.0 Streaming for the processing of very large data sets produced by voting equipment. These data sets are commonly referred to as bCast Vote Recordsb and describe selections on b . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/25/2020 8:43:38 PM

How about https://www.openoffice.org/xml/odf2xhtml/, could that help? I used those stylesheets about 10 years ago in an ODT -> XHTML -> ePub transformation pipeline. On Fri, Sep 25, 2020 at 1:33 PM Manuel Souto Pico terminolator@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrot . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/25/2020 11:32:59 AM

Thank you so much everyone for all the suggestions. They help a lot, I have what I needed. In the end it seems my initial idea (ODT output) is not the best approach at all. Some clarification: I don't need the final document to be modified. I said ODT/OOXML because I assumed it's easier to conver . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/24/2020 3:24:33 PM

On 24/09/2020 08:57, Manuel Souto Pico terminolator@xxxxxxxxx wrote: I would need to convert XML to something that has a fixed page layout ready to print, like ODT/OOXML or PDF. Do you want other people to be able to edit the result? ODT/OOXML are designed to be editable; PDF is not. I know OOXM . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/24/2020 1:37:01 PM

On Thu, 2020-09-24 at 07:57 +0000, Manuel Souto Pico terminolator@xxxxxxxxx wrote: > Dear all, > > I would need to convert XML to something that has a fixed page layout > ready to print, like ODT/OOXML or PDF. After looking at your XML, probably CSS with something like paged.js or Viv . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/24/2020 1:20:44 PM

Hi, To add - for quick and dirty / POC, I concur ODT is probably as good a target as any and better than most, and as Willem points out, there is a single-file variant (not zipped) that makes it easier to produce. I would perhaps start by saving one of these out, and using that as a frame for a s . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/24/2020 12:02:35 PM

HTML + CSS print is usually a good-enough solution. You may have a look to https://github.com/flyingsaucerproject/flyingsaucer or to one of its fork. I actually work on a maven-plugin that transform markdown to our exercise-book odt format, with quite a good result. But it's a very specific la . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/24/2020 8:24:49 AM

>ready-made solution? Ready-made solutions usually are domain/standard specific (like TEI-XML for book editions, etc). But even those usually require certain code-level interventions to work. Your data + layout are quite simple and are a good candidate for XSL-FO <https://en.wikipedia.org/w . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/24/2020 8:12:19 AM

Open/Libre Office also has a single-file XML format that you can use for this purpose. On Thu, Sep 24, 2020 at 10:08 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Am 24.09.2020 um 09:57 schrieb Manuel Souto Pico terminolator@xxxxxxxxx: > & . . . Read full entry »


Re: Converting XML into ODT document to print as paper

Posted 9/24/2020 8:07:42 AM

Am 24.09.2020 um 09:57 schrieb Manuel Souto Pico terminolator@xxxxxxxxx: I would need to convert XML to something that has a fixed page layout ready to print, like ODT/OOXML or PDF. I know OOXML is complex, but since the final document needs to be printed and keep the same layout, probably HTML ou . . . Read full entry »


Converting XML into ODT document to print as paper

Posted 9/24/2020 7:56:57 AM

Dear all, I would need to convert XML to something that has a fixed page layout ready to print, like ODT/OOXML or PDF. I know OOXML is complex, but since the final document needs to be printed and keep the same layout, probably HTML output is not good for this (I guess!). What I need at the mome . . . Read full entry »


Re: Are xsl:accumulator-rules exclusive ?

Posted 9/21/2020 10:30:49 PM

Thanks a lot, Michael. Best regards, Christophe Le 22/09/2020 C 00:01, Michael Kay mike@xxxxxxxxxxxx a C)critB : > B'18.2.3: B If there is more than one matching rule, the last in > document order is used. If there is no matching rule, the value of the > accumulator variable does not . . . Read full entry »


Re: Are xsl:accumulator-rules exclusive ?

Posted 9/21/2020 9:55:11 PM

B'18.2.3: If there is more than one matching rule, the last in document order is used. If there is no matching rule, the value of the accumulator variable does not change. Michael Kay Saxonica > On 21 Sep 2020, at 22:52, Christophe Marchand cmarchand@xxxxxxxxxx <xsl-list-service@xxxxxxxxxx . . . Read full entry »


Are xsl:accumulator-rules exclusive ?

Posted 9/21/2020 9:52:02 PM

Hello, I didn't manage to find the response in the specs, so... Are xsl:accumulator-rule mutually exclusives, and do default priorities for template rules apply in accumulator-rule ? Is the same node able to fire many xsl:accumulator-rule in the same mode, if evaluated only once ? For example, . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 7:51:48 PM

On Mon, 2020-09-21 at 19:18 +0000, Graydon graydon@xxxxxxxxx wrote: > On Mon, Sep 21, 2020 at 07:06:21PM -0000, Dimitre Novatchev > dnovatchev@xxxxxxxxxx scripsit: > > > B filter($sequence,$function) => head() > > > > Is there any guarantee that the evaluation of fi . . . Read full entry »


Re: XSLT 2.0 courses?

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

> > filter($sequence,$function) => head() > > > > This seems nice, however it will probably filter the whole sequence and > > only then take the head() of the resulting sequence. > > > > Is there any guarantee that the evaluation of filter() will stop as soo . . . Read full entry »


Re: XSLT 2.0 courses?

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

On Mon, Sep 21, 2020 at 07:06:21PM -0000, Dimitre Novatchev dnovatchev@xxxxxxxxx scripsit: > > filter($sequence,$function) => head() > > This seems nice, however it will probably filter the whole sequence and > only then take the head() of the resulting sequence. > > Is . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 7:06:14 PM

> filter($sequence,$function) => head() This seems nice, however it will probably filter the whole sequence and only then take the head() of the resulting sequence. Is there any guarantee that the evaluation of filter() will stop as soon as an initial item is produced? Dimitre On Mon, S . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 6:29:58 PM

Dear Liam, Who says I am uncertain? I merely ask you to consider the question. Posing it should not be taken to imply that I believe either in "self-commenting code" or that I think the best measure of what makes a good path is its string length (either long or short). As for your dogma . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 6:06:18 PM

On Mon, 2020-09-21 at 13:47 +0000, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx wrote: > I suppose it depends on your background. I use other languages that > chain equal-precedence operators in this fashion. Perl's logical OR > operator comes to mind first - "$a or $b . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 5:54:24 PM

On Mon, 2020-09-21 at 15:44 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: > ... and of course this can be simplified to > > $a, $b[empty($a)], $c[empty(($a,$b))] > > can't it? Your uncertainty indicates that it isn't clear enough to be maintained easily, and i'd want to avoid . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 3:43:17 PM

... and of course this can be simplified to $a, $b[empty($a)], $c[empty(($a,$b))] can't it? Cheers again, Wendell On Mon, Sep 21, 2020 at 11:37 AM Wendell Piez wapiez@xxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > David, > > Yup, just like ($a,$b,$c)[1]. No . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 3:37:28 PM

David, Yup, just like ($a,$b,$c)[1]. Not thinking of the "return all of $a" problem. For that I might (today) write ( ($a[1] ! $a), ($b[empty($a)][1] ! $b), ($c[empty(($a,$b))][1] ! $c) ) although not before thorough testing, and since it fails the clarity test it would have to be com . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 3:24:29 PM

On Mon, Sep 21, 2020 at 10:30:56AM -0400, Graydon Saunders scripsit: > but I also feel my toes starting to extend out over an abyss. Thinking about this a little more, what I mostly want is first-available($sequence,$function) and you get back the first member of $sequence where $function is . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 2:31:11 PM

On Mon, Sep 21, 2020 at 02:08:36PM -0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx scripsit: > Aside from the name question (I'd maybe like first-available()?) the > question arises, what would be the difference between > first-defined(($a,$b,$c)) and head(($a,$b,$c)) or ($a,$b,$c) => head() . . . Read full entry »


Re: XSLT 2.0 courses?

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

semantics? car of a list vs car of an expanded list (atomised)? regards On Mon, 21 Sep 2020 at 15:08, Wendell Piez wapiez@xxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi, > > Aside from the name question (I'd maybe like first-available()?) the question ar . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 2:17:08 PM

On Mon, 21 Sep 2020 at 15:08, Wendell Piez wapiez@xxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi, > > Aside from the name question (I'd maybe like first-available()?) the > question arises, what would be the difference between > first-defined(($a,$b,$c) . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 2:08:29 PM

Hi, Aside from the name question (I'd maybe like first-available()?) the question arises, what would be the difference between first-defined(($a,$b,$c)) and head(($a,$b,$c)) or ($a,$b,$c) => head() as the case may be? Cheers, Wendell On Mon, Sep 21, 2020 at 9:41 AM Graydon graydon@xxxxxxxxx . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 1:56:31 PM

On Mon, 21 Sep 2020 at 14:47, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I suppose it depends on your background. I use other languages that chain > equal-precedence operators in this fashion. Perl's logical OR opera . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 1:47:01 PM

I suppose it depends on your background. I use other languages that chain equal-precedence operators in this fashion. Perl's logical OR operator comes to mind first - "$a or $b or $c", with short-circuiting evaluation. Python has a similar short-circuiting OR operator. Although I'm an XS . . . Read full entry »


Re: XSLT 2.0 courses?

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

On Mon, Sep 21, 2020 at 01:25:56PM -0000, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx scripsit: > Good point. Perhaps this could be handled by chaining them? > > $a otherwise $b otherwise $c otherwise $default I think "otherwise" is fine for the pair case! It' . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 1:40:29 PM

On Mon, 21 Sep 2020 at 11:53, Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Well, I thought about using EBV, so it means (if ($a) then $a else $b), > but zero is falsey, so you get surprises with, for example > > @price * (1 + (@VAT_Rate otherw . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 1:39:38 PM

Indeed, the otherwise operator as proposed has the desired effect (A otherwise B otherwise C ) === ((A otherwise B) otherwise C) === (A otherwise (B otherwise C)) Michael Kay Saxonica > On 21 Sep 2020, at 14:26, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx <xsl-list-service . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 1:25:50 PM

Good point. Perhaps this could be handled by chaining them? $a otherwise $b otherwise $c otherwise $default - Chris . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 1:20:31 PM

On Mon, Sep 21, 2020 at 12:50:32PM -0000, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx scripsit: > On 21.09.2020 13:49, Chris Papademetrious > christopher.papademetrious@xxxxxxxxxxxx wrote: > > Is "otherwise" workable? > > Some people think so: > https://www.saxo . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 12:50:27 PM

On 21.09.2020 13:49, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx wrote: Is "otherwise" workable? Some people think so: https://www.saxonica.com/papers/xmlprague-2020mhk.pdf#page=12 . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 11:49:29 AM

Is "otherwise" workable? - Chris . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 11:45:44 AM

On 21/09/2020 12:18, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: In its original sense, bzw. (beziehungsweise) means 'respectively', but yes, it has assumed the additional meaning of something like 'or', 'or else', or 'or rather'. bzw would get my vote. 'or else' is appropriate for t . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 11:30:40 AM

When you see "respectively" used as a conjunction, you know it's English written by a native speaker of German: "his respectively her", "blue respectively green". The correct translation of "X bzw Y" in such cases is probably "X/Y", or "X or, w . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 11:30:27 AM

On 21/09/2020 11:53, Michael Kay mike@xxxxxxxxxxxx wrote: Well, I thought about using EBV, so it means (if ($a) then $a else $b), but zero is falsey, so you get surprises with, for example @price * (1 + (@VAT_Rate otherwise 0.2)) which potentially gives the wrong answer if @VAT_Rate is present b . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 11:18:31 AM

In its original sense, bzw. (beziehungsweise) means 'respectively', but yes, it has assumed the additional meaning of something like 'or', 'or else', or 'or rather'. https://en.m.wiktionary.org/wiki/beziehungsweise 'or else' is appropriate for the operator, but it might be a nightmare grammar- . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 11:01:39 AM

Perhaps we should call it "bzw" - a German word that is sadly missing from English. Mike > On 21 Sep 2020, at 11:58, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Thank you, this is convincing. > > One might co . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 10:58:29 AM

Thank you, this is convincing. One might consider naming the 'otherwise' operator 'alternatively', but this is not the hill I'm going to die on. Gerrit On 21.09.2020 12:53, Michael Kay mike@xxxxxxxxxxxx wrote: Well, I thought about using EBV, so it means (if ($a) then $a else $b), but zero is . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 10:53:19 AM

Well, I thought about using EBV, so it means (if ($a) then $a else $b), but zero is falsey, so you get surprises with, for example @price * (1 + (@VAT_Rate otherwise 0.2)) which potentially gives the wrong answer if @VAT_Rate is present but zero. And it also gets complicated with atomization: if . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 10:20:47 AM

If the boolean variable $a is false() instead of an empty sequence, $a otherwise $b will return false(). This is the specified behaviour, but I find it a bit counterintuitive. I have a slight preference for the otherwise operator to return $b if $a is false(). Have you thought about defining t . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 10:06:42 AM

Dave Pawson dave.pawson@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: >> On 21 Sep 2020, at 02:34, Pieter Lamers pieter.lamers@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: [b&] >> let $a := ('one','two','three') >> let $b := ('none') . . . Read full entry »


Re: XSLT 2.0 courses?

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

> On 21 Sep 2020, at 02:34, Pieter Lamers pieter.lamers@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi, > > An avid user of ($a, $b)[1] myself, which winks at TransactSQL ISNULL($a, $b) and MySQL IFNULL($a, $b), I do have to remind myself that $a has to be . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 8:46:23 AM

I've been proposing ($a otherwise $b) to meet this requirement: it returns $a unless it's an empty sequence, in which case it returns $b. For example @price - (@discount otherwise 0) It's actually implemented in Saxon 10 if you switch syntax extensions on. Michael Kay Saxonica > On 21 Sep 20 . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 7:02:40 AM

Having been confronted with the terseness of C and Perl, I must confess that I like if ($a) then $a else $b better, even though it may look somewhat silly. Being verbose sometimes helps readers of your code more than being clever. Pieter On 9/21/20 3:34 AM, Pieter Lamers pieter.lamers@xxxxxxxx . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 6:42:56 AM

On Mon, 2020-09-21 at 01:34 +0000, Pieter Lamers pieter.lamers@xxxxxxxxxxxx wrote: > > let $a := ('one','two','three') > let $b := ('none') > > return ($a, $b)[1] will return just the first item in the sequence, > 'one', and not 'one','two','three', Right - this sort of behavi . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/21/2020 1:33:55 AM

Hi, An avid user of ($a, $b)[1] myself, which winks at TransactSQL ISNULL($a, $b) and MySQL IFNULL($a, $b), I do have to remind myself that $a has to be a single item for the /if/else /shortcut to work. So, in let $a := ('one','two','three') let $b := ('none') return ($a, $b)[1] will return j . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/19/2020 7:24:07 PM

"To owe" is certainly morally correct, although you don't owe me a beer in a legal sense (/ex contractu/). Unfortunately I won't be in Amsterdam in October, and I'm pessimistic that there will be a physical XML Prague next year. This is particularly saddening as I had plans to celebra . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/19/2020 3:46:33 PM

Thank you everyone for the recommendations! They have been most helpful. -- Graydon Saunders | graydonish@xxxxxxxxx ^fs oferiode, pisses swa mfg. -- Deor ("That passed, so may this.") . . . Read full entry »


Re: [saxon] Predicates order of evaluation

Posted 9/19/2020 7:37:17 AM

> Bad example. Here's the real thing. I found myself having to write > > [A] if (parent::*) then $fRename(name(..),..) else () > > instead of > > [B] $fRename(name(..),..) [parent::*] at a pinch I should possibly be able to write > > [C] $fRename(name(..),..) [current() . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/18/2020 11:53:47 PM

On Fri, 2020-09-18 at 19:31 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: > Hi, > > In addition to Liam's list I think there are a couple more vital > features > one needs to get a taste of in XSLT 2.0 or XSLT 3.0, if one has been > subsisting on an XSLT 1.0 diet: > > . . . Read full entry »


Re: copy-of and apply-templates equivalence

Posted 9/18/2020 8:16:13 PM

> On 18 Sep 2020, at 20:23, Graydon graydon@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On Fri, Sep 18, 2020 at 07:08:55PM -0000, rick@xxxxxxxxxxxxxx scripsit: >> Thank you. But if I have an identity transform template, then the results of >> both shoul . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/18/2020 7:44:25 PM

As a newcomer to XSLT, I wish more books (and training courses) would deemphasize XSLT 1. and focus on the efficient XSLT 2.0+ ways of doing things. Itbs easy to learn the superseded XSLT 1.0 elements when we run into them in the wild; they are fairly primitive and simple. Whatbs more difficult . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/18/2020 7:30:47 PM

Hi, In addition to Liam's list I think there are a couple more vital features one needs to get a taste of in XSLT 2.0 or XSLT 3.0, if one has been subsisting on an XSLT 1.0 diet: * <xsl:for-each-group> and its uses * temporary trees - no more extension node-set() function needed (huge!) * r . . . Read full entry »


Re: copy-of and apply-templates equivalence

Posted 9/18/2020 7:23:19 PM

On Fri, Sep 18, 2020 at 07:08:55PM -0000, rick@xxxxxxxxxxxxxx scripsit: > Thank you. But if I have an identity transform template, then the results of > both should be the same, correct? If you have no other matching templates except the identity transform, yes, you'll get the same result. . . . Read full entry »


Re: copy-of and apply-templates equivalence

Posted 9/18/2020 7:08:50 PM

Thank you. But if I have an identity transform template, then the results of both should be the same, correct? -----Original Message----- From: Graydon graydon@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, September 18, 2020 3:02 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sub . . . Read full entry »


Re: copy-of and apply-templates equivalence

Posted 9/18/2020 7:01:32 PM

On Fri, Sep 18, 2020 at 06:54:32PM -0000, rick@xxxxxxxxxxxxxx scripsit: > Providing I have an identity transform template, are these two basically > equivalent? Nope. > <xsl:copy-of select="doc($file)/*/*" /> Creates a node that's a complete -- "deep" -- copy o . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/18/2020 7:00:21 PM

I can vouch for Ken's course. It is thorough and excellent. Rick -----Original Message----- From: G. Ken Holman g.ken.holman@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, September 18, 2020 12:12 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx; xsl-list@xxxxxxxxxxxxxxxxxxxxxx Su . . . Read full entry »


copy-of and apply-templates equivalence

Posted 9/18/2020 6:54:26 PM

Hi All, Providing I have an identity transform template, are these two basically equivalent? <xsl:copy-of select="doc($file)/*/*" /> <xsl:apply-templates select="doc($file)/*/*"/> I was originally using copy-of, but now I have to do something to some . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/18/2020 5:55:08 PM

On Fri, 2020-09-18 at 15:04 +0000, Graydon graydon@xxxxxxxxx wrote: > Having seen XSLT course announcements here, I hope this is not an > inappropriate question. I think it very appropriate. > On the theory that sending someone to learn XSLT 3.0 before they've > got the XSLT 2.0 conce . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/18/2020 4:11:22 PM

Here is a coupon for 75% off of my Udemy class for XSLT/XPath 1.0 and XSLT/XPath 2.0 covering every element, every attribute, and every function: Practical Transformation Using XSLT and XPath http://www.CraneSoftwrights.com/links/ptux-coupon.htm The coupon gets refreshed at the beginning of each . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/18/2020 3:50:24 PM

Dan Sullivan already provided a link to my bXSLT 2.0 and 1.0 Foundationsb course on Pluralsight: https://www.pluralsight.com/training/Courses/TableOfContents/xslt-foundations -part1 This course was published in early 2013 and there are messages in xsl-list about this. I can see this one: https: . . . Read full entry »


Re: XSLT 2.0 courses?

Posted 9/18/2020 3:10:30 PM

https://www.pluralsight.com/courses/xslt-foundations-part1 Sent with ProtonMail Secure Email. bbbbbbb Original Message bbbbbbb On Friday, September 18, 2020 11:03 AM, Graydon graydon@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Having seen XSLT course anno . . . Read full entry »


XSLT 2.0 courses?

Posted 9/18/2020 3:03:17 PM

Having seen XSLT course announcements here, I hope this is not an inappropriate question. It turns out I have some work colleagues who need their skills expanded. On the theory that sending someone to learn XSLT 3.0 before they've got the XSLT 2.0 concepts is neither kind nor useful, are there wo . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/18/2020 11:33:39 AM

And that the expected behavior. I owe you a beer ; perhaps in Amsterdam... Christophe PS : I'm not sure "to owe" is the correct verb, but I'm sure you'll drink it ! Le 17/09/2020 C 18:22, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx a C)critB : On 17.09.2020 18:09, Martin Honne . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/17/2020 4:22:10 PM

On 17.09.2020 18:09, Martin Honnen martin.honnen@xxxxxx wrote: Why are i7 and i8 in a composite block? I understood the requirement as a line breaking algorithm: Collect as many blocks as possible whose compound width does not exceed 100. . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/17/2020 4:09:21 PM

On 17.09.2020 16:27, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: Does your code handle this input? <blocks> B <block id="i1">content</block> B <block id="i2" width="33">content</block> B <block id="i3" widt . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/17/2020 2:53:51 PM

My goal wasn't to start a competition between best XSL coders ! I do not have enough prices for awards ! But, indeed, this use case may occurs. But I've decided to let the writer correct what he has done by hand. To be honest, our editor can not generate such things... but writers may modify ge . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/17/2020 2:26:48 PM

Hi Martin, Does your code handle this input? <blocks> <block id="i1">content</block> <block id="i2" width="33">content</block> <block id="i3" width="67">content</block> <block id="i4" . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/17/2020 6:18:11 AM

Thanks a lot, Martin, Gerrit, Dimitre, Graydon ! I now need half a day to understand all your solutions, translate them to my real data structure, and choose the clearest one ! Thanks again, Christophe Le 17/09/2020 C 00:47, Graydon graydon@xxxxxxxxx a C)critB : On 16.09.2020 23:19, Christophe . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/16/2020 10:47:35 PM

> > On 16.09.2020 23:19, Christophe Marchand cmarchand@xxxxxxxxxx wrote: [group the blocks] > Here is a sample input : > > <blocks> > <block id="i1">content</block> > <block id="i2" width="33">content</block> &g . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/16/2020 10:19:30 PM

This seems shorter/simpler: <xsl:stylesheet version="2.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="n . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/16/2020 10:15:59 PM

On 17.09.2020 00:09, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: With a single for-each-group: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" B xmlns:xs="http://www.w3.org/2001/XMLSchema" B exclude-result-prefixes="xs" version=&quo . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/16/2020 10:09:06 PM

With a single for-each-group: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="3.0"> <xsl:mode default-mode="#unnamed" use- . . . Read full entry »


Re: xsl:for-each-group help needed !

Posted 9/16/2020 9:48:45 PM

On 16.09.2020 23:19, Christophe Marchand cmarchand@xxxxxxxxxx wrote: Hello all ! A slide is divided as blocks. Usually, there is one bloc per line, but sometimes, two or more blocks can be on one line, if their width sum is 100. My input has non-grouped blocks, and I want my input group blocks per . . . Read full entry »


xsl:for-each-group help needed !

Posted 9/16/2020 9:19:14 PM

Hello all ! A slide is divided as blocks. Usually, there is one bloc per line, but sometimes, two or more blocks can be on one line, if their width sum is 100. My input has non-grouped blocks, and I want my input group blocks per line. Here is a sample input : <blocks> B <block id=&q . . . Read full entry »


Declarative Amsterdam announcement

Posted 9/14/2020 11:51:31 AM

Declarative Amsterdam Declarative Amsterdam 2020 will be happening on Thursday/Friday October 8 and 9 2020. * Thursday is a tutorial day, where three hands-on tutorials will be offered. It is a bbring your own deviceb event and you may be expected to have pre-loaded some materials before at . . . Read full entry »


Re: Can code in XSLT 3 check whether it is dealing wit

Posted 9/12/2020 3:20:01 PM

Good question, and I suspect the answer is no. If you "try/catch" something that would fail on a streamed node, the chances are you'll get a static error saying the code isn't streamable. Michael Kay Saxonica > On 12 Sep 2020, at 10:01, Martin Honnen martin.honnen@xxxxxx <xsl-lis . . . Read full entry »


Can code in XSLT 3 check whether it is dealing with a

Posted 9/12/2020 9:01:13 AM

I wonder whether, in XSLT 3 with (the option of) streaming, a function or template can check/introspect if it is dealing with a streamed node or a grounded node. For instance, depending on how an XSLT stylesheet is executed the initial match selection might be streamed (e.g. StreamSource in Java/Sa . . . Read full entry »


[ANN] XSLT 3 course next week

Posted 9/8/2020 11:24:54 PM

If you contacted me to register for "XSLT Two to Three" next week, you should have received email about logistics today. If you didn't contact me yet, you still can :-) The course will run for four afternoons next week, plus either two more sessions or one full day in the following week . . . Read full entry »


Re: [saxon] Performance observation.

Posted 9/8/2020 10:19:07 AM

I'm slightly suprised by the performance effect but it depends how often the pattern is matched, and what other patterns are present in the stylesheet. Certainly putting complex logic into patterns can be risky from a performance point of view. How about using xsl:where-populated rather than xsl:t . . . Read full entry »


Re: [saxon] Pattern matching error in xsl:key

Posted 9/6/2020 10:16:44 PM

I'd like to remind everyone that this list is for questions about the Saxon product. Discussions of the W3C specifications are best taken elsewhere, for example the xsl-list at mulberrytech.com. Unfortunately, fascinating though these things are to some of us, a lengthy off-topic discussion always . . . Read full entry »


Re: [saxon] Pattern matching error in xsl:key

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

> So I have ended up doing an eq comparison and quoting the $source and $target, which is what I was trying to avoid. Why do you think any logical reasoning would result in deciding that the type of $source below must be a string? > <xsl:param name="source" select="4.0&qu . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/3/2020 6:07:10 PM

On Thu, 2020-09-03 at 15:56 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > > I haven't completely understood it but the third point sounds like > you > need fn:transform on dynamically constructed or retrieved code.B Right, i agree. Although it's a new thread, or potentially a n . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/3/2020 5:49:40 PM

On Thu, Sep 03, 2020 at 05:29:45PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > I don't think I've fully understood what you're trying to achieve but > instinctively it feels to me like the kind of problem for which the > elegant approach is to first generate an XSLT stylesheet, and th . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/3/2020 5:45:08 PM

On Thu, Sep 03, 2020 at 03:55:36PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: [snip] > I haven't completely understood it but the third point sounds like you > need fn:transform on dynamically constructed or retrieved code. I know > you ruled that out in your initial post but I am . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/3/2020 5:41:44 PM

On Thu, Sep 03, 2020 at 03:43:09PM -0000, Dimitre Novatchev dnovatchev@xxxxxxxxx scripsit: > > Is that a bit less like nonsense? > > I personally still don't understand the problem... > > A simple, complete example may be helpful. It would, but I'm trying to decide if I _ought . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/3/2020 5:29:39 PM

I don't think I've fully understood what you're trying to achieve but instinctively it feels to me like the kind of problem for which the elegant approach is to first generate an XSLT stylesheet, and then execute it. Michael Kay Saxonica > On 3 Sep 2020, at 16:55, Martin Honnen martin.honnen@x . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/3/2020 3:55:31 PM

Am 03.09.2020 um 16:24 schrieb Graydon graydon@xxxxxxxxx: On Wed, Sep 02, 2020 at 10:27:17PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: I don't understand where you use xsl:evaluate and where you bind the value to $calculated. Let me try to give less ambiguous context! I've got a few hund . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/3/2020 3:43:03 PM

> Is that a bit less like nonsense? I personally still don't understand the problem... A simple, complete example may be helpful. Dimitre On Thu, Sep 3, 2020 at 7:23 AM Graydon graydon@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Wed, Sep 02, 2020 at 10:27:17PM . . . Read full entry »


Re: For-each-group group-starting-with drops text betw

Posted 9/3/2020 3:37:47 PM

Thanks Wendell and Martin. Of course. Makes sense. /node() works perfectly in this instance. > On Sep 3, 2020, at 11:29 AM, Wendell Piez wapiez@xxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Terry, > > Don't kick yourself, but the path in your select expr . . . Read full entry »


Re: For-each-group group-starting-with drops text betw

Posted 9/3/2020 3:28:50 PM

Terry, Don't kick yourself, but the path in your select expression "div/p[@class='passage']/*" will select only elements. To select all nodes, use "div/p[@class='passage']/node()", or for just elements and text (no comments or PIs, use "div/p[@class='passage']/(* | text() . . . Read full entry »


Re: For-each-group group-starting-with drops text betw

Posted 9/3/2020 3:27:38 PM

Am 03.09.2020 um 17:20 schrieb Terry Ofner tdofner@xxxxxxxxx: I have a document with the following structure: <div> <pclass="passage"> <spanclass="itemNum">(1)</span>First <b>sentence</b> of the passage. <spanclass="itemNum">(2 . . . Read full entry »


For-each-group group-starting-with drops text between

Posted 9/3/2020 3:20:12 PM

I have a document with the following structure: <div> <p class="passage"> <span class="itemNum">(1)</span>First <b>sentence</b> of the passage. <span class="itemNum">(2)</span> Second sentence of t . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/3/2020 2:23:38 PM

On Wed, Sep 02, 2020 at 10:27:17PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: > I don't understand where you use xsl:evaluate and where you bind the > value to $calculated. Let me try to give less ambiguous context! I've got a few hundred source elements; these group into a small n . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/2/2020 10:27:11 PM

On 02.09.2020 22:08, Graydon graydon@xxxxxxxxx wrote: The prototype has a whole bunch of individual templates which are mostly the same except in match expression and in one of the values created; the XML structure is mostly identical. Many other things about the process are being driven out of a . . . Read full entry »


Re: attribute value templates in elements fetched from

Posted 9/2/2020 10:15:59 PM

On Wed, 2020-09-02 at 20:09 +0000, Graydon graydon@xxxxxxxxx wrote: > > <xsl:map-entry key="'list'"> > B B B B <style> > B B B B B B <style-name val="List" /> > B B B B B B <paragraphNumber> > B B B B B B B B B B B B <level depth=&qu . . . Read full entry »


attribute value templates in elements fetched from a m

Posted 9/2/2020 8:08:32 PM

Hello all -- The prototype has a whole bunch of individual templates which are mostly the same except in match expression and in one of the values created; the XML structure is mostly identical. Many other things about the process are being driven out of a map already, and I find myself wondering . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 4:21:28 PM

Prady, In your parameter declaration: <xsl:param name="doc2" select="document(Orders_Part2.xsl)"/> If your second document is named 'Orders_Part2.xsl', this should be document('Orders_Part2.xsl') with quote marks to represent that the argument is a string (not a path ex . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 3:57:10 PM

Am 01.09.2020 um 17:41 schrieb Prady Prady prady.chin@xxxxxxxxx: Why can't I do something like this?B But below one i*s NOT working .. * *I need to know how to select amount based on the supplied order num: * B B <xsl:value-of select="$Orders_Part2/orders*/order_num[$ordernum]*/amount . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 3:41:09 PM

Martin, Why can't I do something like this? But below one i*s NOT working .. * *I need to know how to select amount based on the supplied order num: * <xsl:value-of select="$Orders_Part2/orders*/order_num[$ordernum]* /amount"/> ==> not working ================== <xsl . . . Read full entry »


XSL-List Guidelines

Posted 9/1/2020 3:16:34 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: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 3:12:10 PM

Thank you, Martin. I will try this. On Tue, 1 Sep 2020 at 10:57, Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Am 01.09.2020 um 15:51 schrieb Prady Prady prady.chin@xxxxxxxxx: > > Is there any other simpler way.. > > What do you consid . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 3:04:30 PM

On Tue, 2020-09-01 at 14:28 +0000, Prady Prady prady.chin@xxxxxxxxx wrote: > Can we do this with call-templates? That's no such thing as call-templates. Is this a homework assignment? > > > > But I need to use only XSLT 1.0 Luckily, Martin's subsequent solution was written for yo . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 2:57:28 PM

Am 01.09.2020 um 15:51 schrieb Prady Prady prady.chin@xxxxxxxxx: Is there any other simpler way.. What do you consider simple or simpler? Using XSLT 2 or 3? Sure, go ahead <xsl:template match="order"> <xsl:copy> <xsl:apply-templates select="@* | node(), key('ord . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 2:27:13 PM

Can we do this with call-templates? On Tue, 1 Sep 2020 at 09:51, Prady Prady prady.chin@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Is there any other simpler way.. > > All I have to do is: > > Loop thru first xml: > add elements from first xml > get . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 1:51:30 PM

Is there any other simpler way.. All I have to do is: Loop thru first xml: add elements from first xml get "amount" from second xml where order number matches and create this Or Can you explain what is being done? Thank you very much for your response... On Tue, 1 Sep 2020 at 08:49 . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 1:32:04 PM

you can use, <xsl:variable name="docs" select="*for* *$f* *in* (*$first_xml*, *$second_xml*) *return* *document*(*$f*)" as="document-node()*"/> or you can create a XML pipeline using ant scripts, where you merge the two XML files then process it to create the . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 12:41:43 PM

Thank you. But I need to use only XSLT 1.0 On Tue, 1 Sep 2020 at 08:30, Elisa Beshero-Bondar ebbondar@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > For this, I use the doc() function and store the location of the second > xml in a variable. You need to define its lo . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

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

For this, I use the doc() function and store the location of the second xml in a variable. You need to define its location in relation to the XSLT file. Then just point to the variable and XPath into its nodes as you need to pull them into the transformation of the first xml. Hope this helps! Elis . . . Read full entry »


Re: Merge 2 xmls : Loop through one xml and get elemen

Posted 9/1/2020 11:17:41 AM

Am 01.09.2020 um 13:14 schrieb Prady Prady prady.chin@xxxxxxxxx: I have this requirement... ================= Merge 2 xmls : Loop through one xml and get elements from second xml I have 2 xmls(Orders_Part1.xml,Orders_Part2.xml). I have to build the 3rd xml ( Orders.xml) . Which XSLT processor or . . . Read full entry »


Merge 2 xmls : Loop through one xml and get elements f

Posted 9/1/2020 11:14:05 AM

Hello all, I have this requirement... ================= Merge 2 xmls : Loop through one xml and get elements from second xml I have 2 xmls(Orders_Part1.xml,Orders_Part2.xml). I have to build the 3rd xml ( Orders.xml) . Orders_Part1.xml: Contains order_number element and first part of order deta . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 9/1/2020 11:10:12 AM

Michael,Leo,Martin : Thank you very much for your help!! Sorry, if I missed anybody.. On Thu, 27 Aug 2020 at 04:56, Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Am 27.08.2020 um 10:44 schrieb Leo Studer leo.studer@xxxxxxxxxxx: > > Use > . . . Read full entry »


ANN: Declarative Amsterdam 2020 Program

Posted 8/31/2020 7:19:23 AM

** *Declarative Amsterdam* * Declarative Amsterdam 2020 will be happening on Thursday/Friday October 8 and 9 2020. * Thursday is a tutorial day, where three hands-on tutorials will be offered. It is a bbring your own deviceb event and you may be expected to have pre-loaded so . . . Read full entry »


Re: Limiting a row to four items

Posted 8/28/2020 9:13:27 AM

Success! (once I remembered to deal with the current-group.) Thanks. After 2 am here and I have been trying to do this for hours. Bed time! Mark On 8/28/2020 2:04 AM, Mark Wilson mark@xxxxxxxxxxxx wrote: Hi Gerrit, (responding to both emails) No, XSLTB 2. B Its just I have forgotten so much. It is . . . Read full entry »


Re: Limiting a row to four items

Posted 8/28/2020 9:04:03 AM

Hi Gerrit, (responding to both emails) No, XSLTB 2. B Its just I have forgotten so much. It is not clear to me where in the code I create the row.B I will try: For each ... B B B new row B B B B B B four plates dealt with B B B end row </xsl for each ? I have never worked with flex before, . . . Read full entry »


Re: Limiting a row to four items

Posted 8/28/2020 8:57:51 AM

On 28.08.2020 10:53, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: If you tune the .block width so that 4 of them fit into a .row, you can also set flex-wrap:wrap in .row, then you need not create div.row at all. This is rubbish. I wanted to say "then you can keep a single div.row f . . . Read full entry »


Re: Limiting a row to four items

Posted 8/28/2020 8:53:10 AM

Are you looking for an XSLT 1 solution? In XSLT 2 or 3, you can do, when in stamp context: <xsl:for-each-group select="plate" group-adjacent="(@number - 1) idiv 4">, and create a row for each group. If you tune the .block width so that 4 of them fit into a .row, you ca . . . Read full entry »


Limiting a row to four items

Posted 8/28/2020 8:44:14 AM

This is likely in the archives but I have forgotten how to use them. Among the other things I have forgotten since I turned 80 is how to a put set of elements into rows for HTML output. I want to put what four <plate> elements conjure into each row; the number of< plate> elements in eac . . . Read full entry »


Re: [saxon] How can an empty array be an instance of a

Posted 8/28/2020 8:42:56 AM

It's the old paradox of universal quantification applied to an empty set: when there are no unicorns, "every unicorn has one horn" and "every unicorn has three horns" are both true. Bertrand Russell used the example "The present King of France is bald" (https://en.wiki . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/27/2020 8:55:48 AM

Am 27.08.2020 um 10:44 schrieb Leo Studer leo.studer@xxxxxxxxxxx: Use substring(.,string-length(.)) eq b;b The eq operator doesn't exist in XPath 1.0 so you need the = operator if you intend to write code for an XSLT 1.0 processor. On 27 Aug 2020, at 10:04, Michael Kay mike@xxxxxxxxxxxx <xsl- . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/27/2020 8:44:04 AM

Use substring(.,string-length(.)) eq b;b ;-) > On 27 Aug 2020, at 10:04, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > ends-with() is an XPath 2.0 function, not available in 1.0. > > Michael Kay > Saxonica . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/27/2020 8:03:55 AM

ends-with() is an XPath 2.0 function, not available in 1.0. Michael Kay Saxonica > On 27 Aug 2020, at 06:21, Leo Studer leo.studer@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > This does it ;-) > > <xsl:stylesheet version="1.0" xmlns:xsl=" . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/27/2020 5:49:37 AM

Use this because of the ending b;b <xsl:template match="invoiceDetails"> <xsl:param name="details"> <xsl:if test="ends-with(.,';')"><xsl:value-of select="."/></xsl:if> <xsl:if test=" . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/27/2020 5:21:33 AM

This does it ;-) <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes"/> <xsl:template match="Payments"> <Payments> <xsl:apply-templates/> & . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/26/2020 5:25:13 PM

Another typo in http://www.saxonica.com/saxon-js/documentation/index.html#!development/adapta tion <xsl:template match="button" mode="ixsl:onclick" use-when="$inBrowser> Missing quote in the end On Tue, Aug 25, 2020 at 1:23 PM Martynas JuseviD ius <martynas@xxxx . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/25/2020 9:32:42 PM

And it will be cached by the browser. Browsers cache aggressively. On 25.08.2020 23:07, Willem Van Lishout willemvanlishout@xxxxxxxxx wrote: Depending on the server you use you might be able to gzip it. On Aug 25, 2020, at 22:54, "Martynas JuseviD ius martynas@xxxxxxxxxxxxx" <xsl-lis . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/25/2020 9:07:06 PM

Depending on the server you use you might be able to gzip it. On Aug 25, 2020, 22:54, at 22:54, "Martynas JuseviD ius martynas@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: >What's less great is that the resulting SEF file is 5+ MB :/ That >pretty much offse . . . Read full entry »


Re: Need help with tokenize functionality in XSLT 1.0

Posted 8/25/2020 9:00:08 PM

Thank you very much for your input. Yes. input can contain details about single order or multiple orders and it might or might not end with ";". On Tue, 25 Aug 2020 at 16:53, David Carlisle d.p.carlisle@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > You changed . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/25/2020 8:53:46 PM

What's less great is that the resulting SEF file is 5+ MB :/ That pretty much offsets the size of Saxon-CE which we now have removed in favor of Saxon-JS 2. I guess we'll need to move more processing to the browser in order to avoid page reloads... On Tue, Aug 25, 2020 at 10:48 PM Martynas JuseviD . . . Read full entry »


Re: Need help with tokenize functionality in XSLT 1.0

Posted 8/25/2020 8:53:37 PM

You changed the format. in the form you showed originally every item terminated with a ; you had two items, and two ; the form you show now has one item but no ; You could add the trailing ; by making the initial param <xsl:param name="details" select="concat(invoiceDetails,';' . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/25/2020 8:52:56 PM

*Input 1: * <Payments> <Payment> <invoiceDetails>order1#amt1;order2#amt2;</invoiceDetails> </Payment> </Payments> *Output1: Should be like the below : remove #amt1 #amt2 * * -> Only want order1;order2* <Payments> <Payment> <invoiceDetail . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/25/2020 8:48:03 PM

I think I managed to integrate the SEF generation into a Maven (web) project. I'll paste it below as it might be useful to others. What it does it basically: - executes shell commands to get a list of .xsl files (recursively) under ${xsl.root.dir} - iterates through the list and inlines DTD entitie . . . Read full entry »


Re: Need help with tokenize functionality in XSLT 1.0

Posted 8/25/2020 8:41:11 PM

This works good. Thanks for the solution. But this is not working if there is only one order eg: ===================== Input xml: <Payments> <Payment> <invoiceDetails>order1#amt1</invoiceDetails> </Payment> </Payments> I need to be able to convert this t . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/25/2020 5:27:56 PM

On Tue, 2020-08-25 at 16:29 +0000, Prady Prady prady.chin@xxxxxxxxx wrote: > Thank you.. But don't I have to loop thru? Oh - ok. Setting aside my usual rant about XSLt not having loops as such :-) in XSLT 1 i'd write a recursive template. There's no ':' in your input - if you provide a real ex . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/25/2020 4:36:55 PM

Hi, So, David's solution to the nearly-same question (of earlier this month) is also applicable here. https://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/202008 /msg00094.html A small adjustment will be necessary in one or two places. Cheers, Wendell On Tue, Aug 25, 2020 at . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/25/2020 4:28:22 PM

Thank you.. But don't I have to loop thru? Eg input : Input: <Payments> <Payment> <invoiceDetails>order1#amt1;order2#amt2;</invoiceDetails> </Payment> </Payments> Output: <Payments> <Payment> <invoiceDetails>order1;order2</invoiceD . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/25/2020 4:23:09 PM

On Tue, 2020-08-25 at 15:46 +0000, Prady Prady prady.chin@xxxxxxxxx wrote: > Team, > > I need to delete string between b:b and b;b Some implementations (including xsltproc) have a regular expression replace facility. Otherwise, you could use, concat( substring-before(., ': . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/25/2020 3:53:59 PM

Rats, realized it's in the title. Sorry for the nonsense. On Tue, Aug 25, 2020 at 5:51 PM Jean-Paul Rehr <rehrjb@xxxxxxxxx> wrote: > >I need to > > Which version of XSLT are you using? > > Best, > JPR > > On Tue, Aug 25, 2020 at 5:46 PM Prady Prady prady.chin@xxx . . . Read full entry »


Re: String manipulation in Xslt 1.0

Posted 8/25/2020 3:52:03 PM

>I need to Which version of XSLT are you using? Best, JPR On Tue, Aug 25, 2020 at 5:46 PM Prady Prady prady.chin@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Team, > > I need to delete string between b:b and b;b > > ================== > > Inp . . . Read full entry »


String manipulation in Xslt 1.0

Posted 8/25/2020 3:45:54 PM

Team, I need to delete string between b:b and b;b ================== Input: <ns0:Orders>OrderNum1:1000.20;ORderNum2:200.99;OrderNum3:300:5;OrderNum4:476: 23</ns0:Orders> Output: <ns0:Orders>OrderNum1;ORderNum2;OrderNum3;OrderNum4</ns0:Orders> ==================== . . . Read full entry »


Re: Attribute order recommendations

Posted 8/25/2020 3:13:57 PM

I must be the only one who c14n's my xslt... just kidding, I don't actually do that, but the thought made me laugh. On Tue, Aug 25, 2020 at 7:11 AM Eliot Kimber ekimber@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > For templates I like: mode, match, as (when used), . . . Read full entry »


Re: Attribute order recommendations

Posted 8/25/2020 2:11:12 PM

For templates I like: mode, match, as (when used), priority (when used) For parameters: name, as, tunnel, select I put select last so it's easy to cut and paste <xsl:with-param> to be <xsl:param> where @select is not retained (and visa-versa). Cheers, E. -- Eliot Kimber http://cont . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/25/2020 11:24:20 AM

It looks to me like that page has an example with a trailing ) which shouldn't be there: <xsl:variable name="inBrowser" select="system-property('xsl:product-name') eq 'Saxon-JS' and system-property('saxon:platform') eq 'Browser')"/> On Mon, Aug 24, . . . Read full entry »


Re: Attribute order recommendations

Posted 8/25/2020 10:40:32 AM

On Tue, Aug 25, 2020 at 08:24:02AM -0000, Norman Tovey-Walsh ndw@xxxxxxxxxx scripsit: [snip diverse examples] > I guess I do have a strong (subconscious) preference for putting the > name and the type on the same line! I appear to be the sort of consistency-valuing heathen who turns on " . . . Read full entry »


Re: Attribute order recommendations

Posted 8/25/2020 9:47:57 AM

On 25/08/2020 09:15, Michael Kay mike@xxxxxxxxxxxx wrote: [...] I think my instinct with attributes is to put them in order of rarity: the most common attributes first, then the less common ones. I would do much the same, except that if there is an xml:id (or any attribute of type ID) I always o . . . Read full entry »


Re: Attribute order recommendations

Posted 8/25/2020 8:35:49 AM

we also follow the same order as Michael described, it is easy when we define an order for the team you work with. On Tue, Aug 25, 2020 at 1:55 PM Damian Morris damian@xxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I think my instinct with attributes is to put them in or . . . Read full entry »


Re: Attribute order recommendations

Posted 8/25/2020 8:25:25 AM

I think my instinct with attributes is to put them in order of rarity: the most common attributes first, then the less common ones. So I tend to write I tend to follow the same approach as Michael describes when crafting APIs in general, but also in placing attributes in particular. On 25 Aug 2 . . . Read full entry »


Re: Attribute order recommendations

Posted 8/25/2020 8:23:57 AM

Michael MC<ller-Hillebrand mmh@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > Folks, [b&] > Have I missed some insightful source/post, or can we discuss the > benefits of attribute order conventions? Readability is an important aspect of coding, but Ibve never . . . Read full entry »


Re: Attribute order recommendations

Posted 8/25/2020 8:14:41 AM

I can't say I share the author's admiration for Chekhov. When I watch a Chekhov play, I'm usually sitting there wishing the characters would just get on with the action and cut out the small talk. Yes, Serhiy is right, consistency in naming is useful, and consistency is also useful in other aspect . . . Read full entry »


Attribute order recommendations

Posted 8/25/2020 7:45:21 AM

Folks, Understanding XSLT as quick as possible is important. This blog post with the motto "Spare the maintainer" impressed me some years ago: https://blog.xml.rocks/xslt-naming-conventions/ <https://blog.xml.rocks/xslt-naming-conventions/> But what about attribute order conventio . . . Read full entry »


Re: filtering maps by key characteristics?

Posted 8/24/2020 5:44:35 PM

On Mon, Aug 24, 2020 at 05:26:11PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: > Am 24.08.2020 um 19:12 schrieb Graydon graydon@xxxxxxxxx: > > On Mon, Aug 24, 2020 at 04:48:55PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > > > Perhaps something like > > > > . . . Read full entry »


Re: filtering maps by key characteristics?

Posted 8/24/2020 5:26:06 PM

Am 24.08.2020 um 19:12 schrieb Graydon graydon@xxxxxxxxx: On Mon, Aug 24, 2020 at 04:48:55PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: Perhaps something like map:remove($map, map:keys($map)[starts-with(map:keys(.), 'GUID-')]) "The required item type of the first argument of map:keys() is . . . Read full entry »


Re: filtering maps by key characteristics?

Posted 8/24/2020 5:12:38 PM

On Mon, Aug 24, 2020 at 04:48:55PM -0000, Michael Kay mike@xxxxxxxxxxxx scripsit: > Perhaps something like > > map:remove($map, map:keys($map)[starts-with(map:keys(.), 'GUID-')]) "The required item type of the first argument of map:keys() is map(*); supplied expression (.) has item . . . Read full entry »


Re: filtering maps by key characteristics?

Posted 8/24/2020 4:48:50 PM

Perhaps something like map:remove($map, map:keys($map)[starts-with(map:keys(.), 'GUID-')]) Michael Kay Saxonica > On 24 Aug 2020, at 17:41, Graydon graydon@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hello -- > > I have a content set traversal that creates . . . Read full entry »


filtering maps by key characteristics?

Posted 8/24/2020 4:41:11 PM

Hello -- I have a content set traversal that creates map entries when it finds id attributes in the source tree; one map entry maps a generated GUID to the node with the id attribute, and another map entry maps the value of the id attribute to the same GUID. The result is stored as a sequence of . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/24/2020 12:48:55 PM

My question is about Saxon-JS 2 however: http://www.saxonica.com/saxon-js/documentation/index.html#!conformance/xslt30 On Mon, Aug 24, 2020 at 2:32 PM Michele R Combs mrrothen@xxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > We use internal text entities with Saxon and have . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/24/2020 12:32:34 PM

We use internal text entities with Saxon and have had no problem. We're using Saxon9he Michele -----Original Message----- From: Martynas JuseviD ius martynas@xxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Monday, August 24, 2020 7:20 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Su . . . Read full entry »


Re: DTD entities in XSLT

Posted 8/24/2020 11:26:51 AM

> Thanks. Will this work in Saxon-HE? I'm looking for a solution that > could be used in open-source code. Yes, of course. There's nothing in the query "." that needs EE capabilities! You could also, of course, use a Java identity transformer (TransformerFactory.newProcessor()), w . . . 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

Attend a Live Webinar This Week!

Learn about Stylus Studio's unique features and benefits in just under an hour. Register for the Stylus Studio QuickStart Training WebCast!

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