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: Outputting UTF-8

Posted 3/25/2017 3:33:41 PM

Hi, Martin. That is absolutely correct. I remember now that in my testing I had used 'txt' as the extension and when I loaded it into Excel set the UTF-8 flag. Problem solved. Face red. Thanks, Mark On 3/25/2017 7:50 AM, Martin Honnen martin.honnen@xxxxxx wrote: On 25.03.2017 15:39, Mark Wilson p . . . Read full entry »


Re: Outputting UTF-8

Posted 3/25/2017 2:50:08 PM

On 25.03.2017 15:39, Mark Wilson pubs@xxxxxxxxxxxx wrote: While writing and testing my XSL stylesheet, the direct output was in UTF-8. However, as soon as I switched to result-document, I got garbage characters for diacritics from my original xml. That is, for 'ZC<rich', I get ' ZCB<rich'. . . . Read full entry »


Outputting UTF-8

Posted 3/25/2017 2:39:14 PM

While writing and testing my XSL stylesheet, the direct output was in UTF-8. However, as soon as I switched to result-document, I got garbage characters for diacritics from my original xml. That is, for 'ZC<rich', I get ' ZCB<rich'. Except for the absence of UTF-8, everything else works . . . Read full entry »


Re: Generate separate elements, not just attribute val

Posted 3/24/2017 6:58:00 AM

Hi Charles, you mentionend that an XSLT 1.0 version would come handy... <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="1. . . . Read full entry »


Re: Generate separate elements, not just attribute val

Posted 3/23/2017 8:48:12 PM

Thanks Martin and Michael for the help and the information. Greatly appreciated! When I saw your responses, I got a bit of a laugh at how bad my original .xsl was. -Charles -----Original Message----- From: Martin Honnen martin.honnen@xxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: . . . Read full entry »


Re: Generate separate elements, not just attribute val

Posted 3/23/2017 8:01:35 PM

On 23.03.2017 19:23, Charles O'Connor coconnor@xxxxxxxxxxxx wrote: Hi all, Extreme novice here, so I appreciate your help. Using XSLT 2.0 (explained later) and Saxon9 HE. I have JATS 1.1 (archiving) input: . . . <contrib-group> <contrib contrib-type="author"> <name& . . . Read full entry »


Re: Generate separate elements, not just attribute val

Posted 3/23/2017 7:59:25 PM

> On 23 Mar 2017, at 18:23, Charles O'Connor coconnor@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi all, > > Extreme novice here, so I appreciate your help. > > Using XSLT 2.0 (explained later) and Saxon9 HE. > > I have JATS 1.1 (archiving) in . . . Read full entry »


Generate separate elements, not just attribute values

Posted 3/23/2017 6:23:28 PM

Hi all, Extreme novice here, so I appreciate your help. Using XSLT 2.0 (explained later) and Saxon9 HE. I have JATS 1.1 (archiving) input: . . . <contrib-group> <contrib contrib-type="author"> <name> <surname>Franzke</surname> <given-names> . . . Read full entry »


Re: Streaming and grouping in XSLT 3.0

Posted 3/21/2017 12:21:27 PM

First question: in your grouping of properties using the rdf:about attribute, are the groups adjacent? The for-each-group[@group-adjacent] instruction is fully streamable according to the XSLT 3.0 rules, and the Saxon implementation is also streamable (though in some circumstances -- I would need t . . . Read full entry »


Re: Streaming and grouping in XSLT 3.0

Posted 3/21/2017 11:38:22 AM

Thanks Martin. That's a start :) As for the reason we want to use streaming, I guess the answer is both: - loading external documents such as http://dbpedia.org/resource/Copenhagen might result in large data volumes. Right now we are processing them in memory, but we are running out of it (not usi . . . Read full entry »


Re: Streaming and grouping in XSLT 3.0

Posted 3/21/2017 11:19:55 AM

On 21.03.2017 11:44, Martynas JuseviD ius martynas@xxxxxxxxxxxx wrote: Now my question is, how do I even begin analyzing the streamability of this approach in XSLT 3.0? I guess my main concern is that such grouping would not be streamable, but maybe there are other solutions? As the stylesheet uses . . . Read full entry »


Streaming and grouping in XSLT 3.0

Posted 3/21/2017 10:43:51 AM

Hi all, fistly I must admit I'm a complete novice when it comes to XSLT 3.0 and streaming (though not XSLT 2.0). My use case is as follows -- a triplestore returns streaming RDF/XML (omitting namespaces): <rdf:RDF> <rdf:Description rdf:about="http://dbpedia.org/resource/Copenhage . . . Read full entry »


XSLT docset for Dash app?

Posted 3/20/2017 7:16:47 PM

I've just been testing out Dash (https://kapeli.com/dash), a documentation browser / code snippet manager for OS X and iOS. It comes off the shelf with XSLT as a supported documentation set, but it's only XSLT 1.0 (including both XSLT elements and XPath functions). Has anyone out there generated . . . Read full entry »


[ANN] Balisage Submissions due in 3 Weeks

Posted 3/16/2017 9:19:42 PM

Submissions to "Balisage: The Markup Conference" and pre-conference symposium: "Up-Translation and Up-Transformation: Tasks, Challenges, and Solutions" are on April 7. It is time to start writing! Balisage: The Markup Conference 2017 August 1 b 4, 2017, Rockville, MD (a subu . . . Read full entry »


xspec: testing template matching document root

Posted 3/8/2017 9:15:52 AM

hi group, I have tried to post this question on the google Xspec list, but the messages didn't arrive. I hope the post is not misplaced here... I use xspec often to test bug fixes on my company's style sheets. They helped me a lot, especially when it comes to old features: some 'fixes' appear . . . Read full entry »


Re: whitespace normalization around keyword-like phras

Posted 3/8/2017 9:10:12 AM

On 07/03/17 21:20, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: [...] > Yes indeed, why I like to say information is fractal. No matter how > fine we get, there is always a raggedy edge. I just had a call from a user thanking me for my help on [topic] and saying this would be the last time he . . . Read full entry »


Re: whitespace normalization around keyword-like phras

Posted 3/7/2017 9:19:57 PM

Peter, Gerrit and XSL-List, On Tue, Mar 7, 2017 at 4:49 AM, Flynn, Peter pflynn@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On 06/03/17 21:24, Liam R. E. Quin liam@xxxxxx wrote: >> On Mon, 2017-03-06 at 14:11 +0000, Imsieke, Gerrit, le-tex >> gerrit.imsieke@xxxxx . . . Read full entry »


Re: sort on one key - duplicates

Posted 3/7/2017 10:01:14 AM

> On 7 Mar 2017, at 09:44, Dr. Patrik Stellmann patrik.stellmann@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Raimund, > > You could just replace the "l_name" by "concat(l_name, ' ', f_name)" within the xsl:key, key() and xsl:sort. A b . . . Read full entry »


Re: whitespace normalization around keyword-like phras

Posted 3/7/2017 9:49:24 AM

On 06/03/17 21:24, Liam R. E. Quin liam@xxxxxx wrote: > On Mon, 2017-03-06 at 14:11 +0000, Imsieke, Gerrit, le-tex > gerrit.imsieke@xxxxxxxxx wrote: >> Over the weekend Ive been writing a whitespace normalization >> stylesheet > > Sounds like you could wrestle a Balisage pa . . . Read full entry »


AW: sort on one key - duplicates

Posted 3/7/2017 9:44:34 AM

Hi Raimund, You could just replace the "l_name" by "concat(l_name, ' ', f_name)" within the xsl:key, key() and xsl:sort. BTW: Since the 2nd and 3rd for-each loops are identical you might consider putting them into a separate template to avoid duplicated code. Regards, Patrik . . . Read full entry »


sort on one key - duplicates

Posted 3/7/2017 9:31:32 AM

Hi Folks, I have an XSL which pulls out all last names and creates a sorted list of these. Works fine, but now I noticed that for duplicated last names only the first person is created in the output! So I need to also take the first name into account! But Ibm lacking the idea to accomplish this! . . . Read full entry »


Re: whitespace normalization around keyword-like phras

Posted 3/6/2017 11:17:22 PM

Sorry, Tommie, for misspelling your nameb& And yes, Tommy, I could bring my family but Balisage is just before . . . Read full entry »


Re: whitespace normalization around keyword-like phras

Posted 3/6/2017 11:10:34 PM

On 06.03.2017 22:23, Liam R. E. Quin liam@xxxxxx wrote: Sounds like you could wrestle a Balisage paper out of this, if you're willing to travel to the USA.... Traveling to the USA is not much of an issue for me because a) Ibm unlikely to be detained and interrogated upon arrival and b) although . . . Read full entry »


Re: whitespace normalization around keyword-like phras

Posted 3/6/2017 10:54:34 PM

Consider bringing your family to Balisage. There are a lot of interesting things to do/see in the general area. See: https://www.balisage.net/2017/2017LocalActivities.html for a few of them. b Tommie > On Mar 6, 2017, at 5:34 PM, Gerrit Imsieke gerrit.imsieke@xxxxxxxxx <xsl-list-service@xx . . . Read full entry »


Re: whitespace normalization around keyword-like phras

Posted 3/6/2017 10:33:47 PM

Yes, this might fit nicely into the pre-conf symposium. Not sure though whether The Boss will let me go because itbs vacation season and Ibm supposed^H^H^H^H^H^H^H^H inclined to spend time with my family. Besides, the stylesheet does already handle punctuation in nested elements. Punctuation (br . . . Read full entry »


Re: whitespace normalization around keyword-like phras

Posted 3/6/2017 9:22:53 PM

On Mon, 2017-03-06 at 14:11 +0000, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: > Over the weekend Ibve been writing a whitespace normalization > stylesheet Sounds like you could wrestle a Balisage paper out of this, if you're willing to travel to the USA.... A related issue is . . . Read full entry »


whitespace normalization around keyword-like phrases

Posted 3/6/2017 2:10:38 PM

Hi Folks, Over the weekend Ibve been writing a whitespace normalization stylesheet that transforms input like <emphasis>Nested<glossterm> phrases </glossterm>with whitespace </emphasis> into <emphasis>Nested <glossterm>phrases</glossterm> with whitespace . . . Read full entry »


Re: boolean(string(false())) is true - always?

Posted 3/2/2017 10:02:49 PM

Martin, David, Thank you very much for restoring sanity in my brain! - Michael > Am 02.03.2017 um 16:27 schrieb Sewell, David R. (drs2n) dsewell@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: > > The difference in return value between fn:boolean('false') and xs:boolean('f . . . Read full entry »


Re: boolean(string(false())) is true - always?

Posted 3/2/2017 3:27:00 PM

The difference in return value between fn:boolean('false') and xs:boolean('false') must be in the top ten of XPath "gotcha's" -- I usually forget that despite having worked with XPath for more than a decade. David On Thu, 2 Mar 2017, Martin Honnen martin.honnen@xxxxxx wrote: > On . . . Read full entry »


Re: boolean(string(false())) is true - always?

Posted 3/2/2017 3:19:14 PM

On 02.03.2017 16:00, Michael MC<ller-Hillebrand mmh@xxxxxxxxx wrote: <xsl:function name="dy:isFoo" as="xs:boolean"> <xsl:param name="node" as="node()"/> <xsl:choose> <xsl:when test="$node[self::bar/@foo = 'x']" . . . Read full entry »


boolean(string(false())) is true - always?

Posted 3/2/2017 3:00:28 PM

Hi folks, I was visiting some old code: <xsl:function name="dy:isFoo" as="xs:boolean"> <xsl:param name="node" as="node()"/> <xsl:choose> <xsl:when test="$node[self::bar/@foo = 'x']"> <xsl:value- . . . Read full entry »


XSL-List Guidelines

Posted 3/1/2017 8:46:53 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: axes in XPath patterns

Posted 3/1/2017 4:42:48 PM

The pattern syntax in XSLT 1.0 and XSLT 2.0, for no good reason at all, allows the "//" pseudo-operator but does not allow *explicit* use of the descendant or descendant-or-self axes. This is fixed in 3.0, which allows all the downward axes to be used. Michael Kay Saxonica > On 1 Ma . . . Read full entry »


Re: axes in XPath patterns

Posted 3/1/2017 4:32:44 PM

On 01.03.2017 17:29, Birnbaum, David J djbpitt@xxxxxxxx wrote: Dear XSL-list, If I9ve understood correctly, the only axes supported in an XPath pattern in XSLT 2.0 are the child and the attribute axes. For that reason, a construction like: <xsl:template match="paragraph/descendant::inner& . . . Read full entry »


axes in XPath patterns

Posted 3/1/2017 4:28:51 PM

Dear XSL-list, If I9ve understood correctly, the only axes supported in an XPath pattern in XSLT 2.0 are the child and the attribute axes. For that reason, a construction like: <xsl:template match="paragraph/descendant::inner"> should raise an error, as it does in <oXygen/> . . . Read full entry »


Re: Filtering on a tokenized list

Posted 2/24/2017 6:24:23 AM

I played with your use case, and I think you need something like below: XML document <?xml version="1.0" encoding="UTF-8"?> <X colwidth="0.439in 1.845in"/> XSLT program <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xm . . . Read full entry »


Re: Filtering on a tokenized list

Posted 2/23/2017 1:01:09 PM

On 23.02.2017 13:49, Rick Quatro rick@xxxxxxxxxxxxxx wrote: I have an attribute value that I want to convert to a sequence of decimals: @colwidth="0.439in 1.845in" I am using tokenize to drop the measurement units before I convert each member to decimal: tokenize($widths,'[^\.\d]') Th . . . Read full entry »


Filtering on a tokenized list

Posted 2/23/2017 12:48:55 PM

Hi All, I have an attribute value that I want to convert to a sequence of decimals: @colwidth="0.439in 1.845in" I am using tokenize to drop the measurement units before I convert each member to decimal: tokenize($widths,'[^\.\d]') This works, except I get a empty string as the last i . . . Read full entry »


Re: XPath Expressions: Separate predicates or one pre

Posted 2/22/2017 10:13:29 AM

> On 22 Feb 2017, at 00:10, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >> But it occurs to me that in this case the expressions are functionally identical: the set of predicates is effectively an AND group. > >> Is there any . . . Read full entry »


Re: XPath Expressions: Separate predicates or one pre

Posted 2/22/2017 12:10:26 AM

> But it occurs to me that in this case the expressions are functionally identical: the set of predicates is effectively an AND group. > Is there any reason to prefer one form expression over the other? No, but the ordering of the sub-expressions (assuming the processor does shortcuts) can . . . Read full entry »


Re: XPath Expressions: Separate predicates or one pre

Posted 2/21/2017 11:00:25 PM

> On 21 Feb 2017, at 22:08, Eliot Kimber ekimber@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Ibm updating code that has expressions like: > > <xsl:when test=b*[@a = b1b and @b = b2b and @c = b3b]b> > > My normal practice would be to us . . . Read full entry »


XPath Expressions: Separate predicates or one predicat

Posted 2/21/2017 10:07:55 PM

Ibm updating code that has expressions like: <xsl:when test=b*[@a = b1b and @b = b2b and @c = b3b]b> My normal practice would be to use separate predicates: <xsl:when test=b*[@a = b1b][@b = b2b][@c = b3b]b> But it occurs to me that in this case the expressions are f . . . Read full entry »


Re: Output from XSLT showing if SAXON Licence Features

Posted 2/21/2017 8:06:36 PM

Hi, As Ken says there are system functions for reflecting the processor and version. In addition, there are the XSLT functions function-available and element-available, which you can use to check dynamically whether a feature is exposed with a function or (extension) element. That's not quite th . . . Read full entry »


[ann] [webinar] Unit testing XSLT with XSpec and oXyge

Posted 2/21/2017 7:41:05 AM

Hi, I would like to invite you to attend our webinar next week, covering XSLT unit testing support in oXygen, built around XSpec: Tuesday, Feb 28 @ 8 AM PST = 11 AM EST = 5 PM CET https://www.oxygenxml.com/events/2017/webinar_unit_testing_xslt_with_xspec_and_oxygen.html Best Regards, George -- G . . . Read full entry »


Output from XSLT showing if SAXON Licence Features are

Posted 2/20/2017 2:33:33 PM

Hi, Is there a way, within an XSL style sheet, to test whether a Saxon (9.6 EE) transformation is running with licence features enabled or not? Ideally, applying the transformation would just return: <result>true</result> or <result>false</result> accordingly. This might th . . . Read full entry »


Re: Output from XSLT showing if SAXON Licence Features

Posted 2/20/2017 2:32:25 PM

Have you tried using system-property('xsl:product-version')? I hope this helps. . . . . . . Ken At 2017-02-20 14:12 +0000, Neil Hunter huntern@xxxxxxx wrote: Hi, Is there a way, within an XSL style sheet, to test whether a Saxon (9.6 EE) transformation is running with licence features enabled . . . Read full entry »


Output from XSLT showing if SAXON Licence Features are

Posted 2/20/2017 2:12:04 PM

Hi, Is there a way, within an XSL style sheet, to test whether a Saxon (9.6 EE) transformation is running with licence features enabled or not? Ideally, applying the transformation would just return: <result>true</result> or <result>false</result> accordingly. This might th . . . Read full entry »


Re: Passing NodeSet into XSLT 1.0 in Java 7 via setPa

Posted 2/17/2017 3:05:19 PM

The best information I can find on what values Xalan accepts is: The setParameter() method provides a value for a parameter that overrides any value used in the stylesheet itself. The processor is responsible for converting the Java object type passed to a reasonable XSLT equivalent. This should w . . . Read full entry »


Re: Passing NodeSet into XSLT 1.0 in Java 7 via setPa

Posted 2/17/2017 2:44:12 PM

Oops. I didn't look at the name of the author. But it doesn't matter, I've only said good things about XOM ! ;) Le 2017-02-17 15:41, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx a C)critB : On 17.02.2017 15:35, cmarchand@xxxxxxxxxx wrote: b& If you want to manipulate the tree, have a look . . . Read full entry »


Re: Passing NodeSet into XSLT 1.0 in Java 7 via setPa

Posted 2/17/2017 2:40:54 PM

On 17.02.2017 15:35, cmarchand@xxxxxxxxxx wrote: b& If you want to manipulate the tree, have a look to XOM, which is a tree API much more comfortable than DOM, and much more efficient. It must be reassuring when someone recommends using your own library ;) XOM was written by Elliotte Rusty Ha . . . Read full entry »


Re: Passing NodeSet into XSLT 1.0 in Java 7 via setPa

Posted 2/17/2017 2:35:20 PM

JAXP API do not let you send anything else than simple types, i.e. String, numbers, etc... To do this, you have to choose another API, and Saxon is for sure the right one. Manipulating the DOM isn't a good idea : compared to XSL, it requires a lot of code, so it is very expensive. In my opinion . . . Read full entry »


Passing NodeSet into XSLT 1.0 in Java 7 via setParamet

Posted 2/17/2017 1:54:31 PM

Baseline: * Java 7 * Bundled version of Xalan * java.xml.transformers.Transformer * DOM I want to create and pass a set of elements from Java into the model where the stylesheet can add them to my output. Is this possible? In particular, is there a type I can use from Java such as NodeIterator t . . . Read full entry »


Re: Transform a million XML documents

Posted 2/13/2017 3:23:22 PM

I can report that collection() worked fine on my smaller test set of about 50K documents. Will have a test against the full 1 million data set in the next day or two. Again, this is a Saxon-specific feature. Cheers, E. -- Eliot Kimber http://contrext.com On 2/13/17, 8:39 AM, "Matthew Sto . . . Read full entry »


Re: Transform a million XML documents

Posted 2/13/2017 3:23:22 PM

I can report that collection() worked fine on my smaller test set of about 50K documents. Will have a test against the full 1 million data set in the next day or two. Again, this is a Saxon-specific feature. Cheers, E. -- Eliot Kimber http://contrext.com On 2/13/17, 8:39 AM, "Matthew Sto . . . Read full entry »


Re: Transform a million XML documents

Posted 2/13/2017 2:39:20 PM

Ibve done this on a smaller scale: about 44,000 input documents, minimum of 2K per doc. I chose to loop with collection function and send each input node to a result tree written out with result document to a temp , working directory, and generate directly from the loop a shell script that then . . . Read full entry »


Re: Transform a million XML documents

Posted 2/10/2017 9:52:33 PM

> Here is a summary of the ensuing discussion. > > Scenario: There are a million XML documents that need to be transformed. Each file is in the 1-4KB range. The files are organized into directories about 4 or 5 deep and some directories have 100s or 1000s of files. > > Transforming a . . . Read full entry »


Transform a million XML documents

Posted 2/10/2017 6:43:09 PM

Hi Folks, Eliot Kimber raised a neat question on the SAXON mailing list. Here is a summary of the ensuing discussion. Scenario: There are a million XML documents that need to be transformed. Each file is in the 1-4KB range. The files are organized into directories about 4 or 5 deep and some dire . . . Read full entry »


Re: Three announcements!

Posted 2/7/2017 10:00:42 PM

> Does this mean we can run xslt3 via saxon-js via node.js? We're intending to turn our attention to node.js, but it's not something we've done any work on yet. Meanwhile feel free to experiment and share any experiences. If you have any views on XML parsers and DOM implementations that one sh . . . Read full entry »


Re: Three announcements!

Posted 2/7/2017 9:45:18 PM

Hi, Does this mean we can run xslt3 via saxon-js via node.js? Curious... thanks, Brian On Tue, Feb 7, 2017 at 11:26 AM, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > 7 February 2017 is a big day for XSLT... > > ONE: The second and definitely the . . . Read full entry »


Re: Attribute constructor for @xml:id

Posted 2/7/2017 8:09:29 PM

Thanks indeed, that's exactly what I needed to know! Cheers, Martin On 2017-02-07 11:31 AM, Michael Kay mike@xxxxxxxxxxxx wrote: This problem is envisaged in the XSLT spec. See B'11.1.2: The xml:base, xml:lang, xml:space, and xml:id attributes have two effects in XSLT. They behave as standard XSL . . . Read full entry »


Re: Attribute constructor for @xml:id

Posted 2/7/2017 7:31:14 PM

This problem is envisaged in the XSLT spec. See B'11.1.2: The xml:base, xml:lang, xml:space, and xml:id attributes have two effects in XSLT. They behave as standard XSLT attributes, which means for example that if they appear on a literal result element, they will be copied to the result tree in t . . . Read full entry »


Three announcements!

Posted 2/7/2017 7:26:43 PM

7 February 2017 is a big day for XSLT... ONE: The second and definitely the final Candidate Recommendation for XSLT 3.0 has been published at https://www.w3.org/TR/xslt-30/ There aren't any exciting feature differences since the previous CR from November 2015, but there's a lot of minor tidying- . . . Read full entry »


Attribute constructor for @xml:id

Posted 2/7/2017 5:15:22 PM

Hi all, I just hit a problem uploading what I thought was good XSLT 2.0 into exist-db. This is what the problem looks like: <xsl:variable name="xmlSource"> <div type="ajaxFragment" xml:id="{$thisId}" n="{$sortKey}"> <head><xsl: . . . Read full entry »


Call for Participation: Balisage 2017

Posted 2/2/2017 8:29:25 PM

Balisage: The Markup Conference 2017 August 1 b 4, 2017, Rockville, MD (a suburb of Washington, DC) July 31, 2017 b Symposium Up-Translation and Up-Transformation https://www.balisage.net/ Balisage: where serious markup practitioners and theoreticians meet every August. We solicit papers on any . . . Read full entry »


'XSL-FO, CSS and Paged Output' session at XML Prague

Posted 2/2/2017 10:24:36 AM

Are you going to XML Prague next week? Antenna House is hosting a 'XSL-FO, CSS and Paged Output' session on the 'unconference day' on Thursday, 9 February. See: http://www.xmlprague.cz/2017/01/23/xsl-fo-css-and-paged-output/ The session will be open to you to share your interesting challenges an . . . Read full entry »


XSL-List Guidelines

Posted 2/1/2017 6:39:17 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: General algorithm for finding nodes between PIs

Posted 1/30/2017 1:01:10 PM

Good question, but these xml documents come from Adobe FrameMaker, which has a "conditional text" feature. Since this feature is part of both unstructured and structured (sgml- or xml-based) FrameMaker, it uses processing-instructions to mark the bounds of each condition format. The purpo . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/30/2017 11:40:21 AM

On 27/01/17 18:21, Rick Quatro rick@xxxxxxxxxxxxxx wrote: > Thank you all for the help. Unrelated to the solution in this case, but from an encoding standpoint, I'm curious to know if there was any opportunity to choose another schema/dtd for this document or application; specifically to use on . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 7:19:44 PM

Yes, I think that is it. Thanks for the pointer. -----Original Message----- From: David Carlisle d.p.carlisle@xxxxxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: Friday, January 27, 2017 1:52 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: General algorithm for finding nodes betw . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 6:51:50 PM

white space after the PI? On 27 January 2017 at 18:50, Rick Quatro rick@xxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > OK, I understand. It didn't work with the self::* test on it so let me see if I can figure out why. Thank you very much. > > -----Original Messag . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 6:50:52 PM

OK, I understand. It didn't work with the self::* test on it so let me see if I can figure out why. Thank you very much. -----Original Message----- From: David Carlisle d.p.carlisle@xxxxxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: Friday, January 27, 2017 1:36 PM To: xsl-list@xxxxx . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 6:35:19 PM

On 27 January 2017 at 18:21, Rick Quatro rick@xxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi David, > > That works well, except I had to change this: > > <xsl:when test="following-sibling::node()[1]/self::* and starts-with(.,'Condstart ')"> . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 6:21:18 PM

Hi David, That works well, except I had to change this: <xsl:when test="following-sibling::node()[1]/self::* and starts-with(.,'Condstart ')"> to this: <xsl:when test="following-sibling::node()[1] and starts-with(.,'Condstart ')"> Thank you all for the help. Ri . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 4:50:35 PM

or sometimes it's easier with xslt- style sibling recursion rather then using for-each-group Not sure I have all the cases but <x> <p><?Fm Condstart USB?>If you need this, do that.<?Fm Condend USB?>text<?Fm Condstart foo?>Some text<?Fm Condend foo?>another te . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 3:30:49 PM

The requirement is that if the Condstart PI occurs before a text node, it has to be the first in the parent element. And the corresponding Condend PI has to be the last node in that element. So any of the middle PIs would be ignored. So, in this case: <p><?Fm Condstart USB?>If you need . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 3:13:11 PM

Hi Martin, That is fantastic, thank you very much! As you can see from my immediately preceding email, I need something a little different. But with your solution (which answered the original question), I can run a second pass to get what I need (as stated in the last email). Thank you again for y . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 3:06:49 PM

On 27.01.2017 15:57, Rick Quatro rick@xxxxxxxxxxxxxx wrote: Thanks for the reply. What I really want is this: Input: <?xml version="1.0" encoding="UTF-8"?> <info> <?Fm Condstart VbV-VCO?> <p>For this, use <b>that </b>to do that.</ . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 2:57:22 PM

Thanks for the reply. What I really want is this: Input: <?xml version="1.0" encoding="UTF-8"?> <info> <?Fm Condstart VbV-VCO?> <p>For this, use <b>that </b>to do that.</p> <p>Another paragraph</p> <?Fm C . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 2:57:14 PM

On 27.01.2017 15:24, Rick Quatro rick@xxxxxxxxxxxxxx wrote: I modified my input document slightly: <?xml version="1.0" encoding="UTF-8"?> <info> <?Fm Condstart VbV-VCO?> <p>For this, use <b>that </b>to do that.</p> <?Fm C . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 2:41:20 PM

On 27.01.2017 15:24, Rick Quatro rick@xxxxxxxxxxxxxx wrote: I modified my input document slightly: <?xml version="1.0" encoding="UTF-8"?> <info> <?Fm Condstart VbV-VCO?> <p>For this, use <b>that </b>to do that.</p> <?Fm C . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/27/2017 2:24:24 PM

I modified my input document slightly: <?xml version="1.0" encoding="UTF-8"?> <info> <?Fm Condstart VbV-VCO?> <p>For this, use <b>that </b>to do that.</p> <?Fm Condend VbV-VCO?> <p><?Fm Condstart USB?>I . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/26/2017 10:41:04 PM

I think this could be simplified: > <xsl:template match="*[processing-instruction('Fm')[starts-with(., 'Condstart')]]"> > <xsl:for-each-group select="node()" group-starting-with="processing-instruction('Fm')[starts-with(., 'Condstart')]"> > & . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/26/2017 8:31:11 PM

On 26.01.2017 20:53, Martin Honnen martin.honnen@xxxxxx wrote: On 26.01.2017 20:45, Rick Quatro rick@xxxxxxxxxxxxxx wrote: I have XML with a bunch of different processing instructions in them; here is a sample: <?xml version="1.0" encoding="UTF-8"?> <info> <? . . . Read full entry »


Re: General algorithm for finding nodes between PIs

Posted 1/26/2017 7:53:15 PM

On 26.01.2017 20:45, Rick Quatro rick@xxxxxxxxxxxxxx wrote: I have XML with a bunch of different processing instructions in them; here is a sample: <?xml version="1.0" encoding="UTF-8"?> <info> <?Fm Condstart VbV-VCO?> <p>For this, use <b>t . . . Read full entry »


General algorithm for finding nodes between PIs

Posted 1/26/2017 7:45:18 PM

Hello All, I have XML with a bunch of different processing instructions in them; here is a sample: <?xml version="1.0" encoding="UTF-8"?> <info> <?Fm Condstart VbV-VCO?> <p>For this, use <b>that </b>to do that.</p> <?Fm . . . Read full entry »


Re: Matching on keys

Posted 1/20/2017 5:36:12 PM

Excellent points, thank you! Cheers, Wendell On Thu, Jan 19, 2017 at 7:15 PM, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: >> >> A late response, but watch that if you're using other people's HTML, >> class values are ascii-case-insensiti . . . Read full entry »


Re: Unexpected MSXML Javascript extension results

Posted 1/20/2017 10:11:42 AM

On 19.01.2017 22:23, C. Edward Porter cep@xxxxxxx wrote: Hello all, We have an XSL transformation that runs using some form of MSXML for the actual transformation. Given that MSXML is XSL 1.0, I am trying to code around the fact that it lacks regular expression functions by writing a JavaScript . . . Read full entry »


Re: Matching on keys

Posted 1/20/2017 12:14:38 AM

> A late response, but watch that if you're using other people's HTML, > class values are ascii-case-insensitive. > > XPath 3.1 and XSLT 3 have fn:contains-token(@class, "foo") to meet this > use case more precisely. > > https://www.w3.org/TR/2017/PR-xpath-functions-3 . . . Read full entry »


Unexpected MSXML Javascript extension results

Posted 1/19/2017 9:22:47 PM

Hello all, We have an XSL transformation that runs using some form of MSXML for the actual transformation. Given that MSXML is XSL 1.0, I am trying to code around the fact that it lacks regular expression functions by writing a JavaScript extension function to match Greek characters and wrap them . . . Read full entry »


Re: Matching on keys

Posted 1/19/2017 8:41:52 PM

On Fri, 2017-01-06 at 17:56 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: > [...] > An idiom for matching any element .foo (CSS selector) could be > > <xsl:template match="*[tokenize(@class,'\s+')='foo')]"> > B B B ... > </xsl:template> A late response . . . Read full entry »


Re: Case incensitive key

Posted 1/17/2017 3:14:49 AM

Of course! OK, my mistake was I have variables $ABC and $abc setup for just these sort of translate operations, but of course you can't use that in a key definition so the error exception I got was complaining about the variables in a key actually. Thanks Dmitri! Karl.. On Mon, Jan 16, 2017 at . . . Read full entry »


Re: Case incensitive key

Posted 1/17/2017 2:02:45 AM

> Is case insensitive keys possible in XSLT 1.0? Use (for Latin alphabet): <xsl:key name="kName" match="row" use="translate(Description/email, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" /> and, of course, you need to call the correspondin . . . Read full entry »


Case incensitive key

Posted 1/17/2017 1:35:26 AM

Hello, Is case insensitive keys possible in XSLT 1.0? It isn't the end of the world, as I can simply abandon the key but would rather not. For sake of discussion, here's my use of a key: <xsl:key name="key_goty-email" match="row" use="Description/email"/> &l . . . Read full entry »


Re: In XSLT 3.0, should the "document" function be av

Posted 1/16/2017 7:40:34 PM

Actually, the spec of fn:function-lookup says: If the arguments to fn:function-lookup identify a function that is present in the static context of the function call, the function will always return the same function that a static reference to this function would bind to. If there is no such functi . . . Read full entry »


Re: In XSLT 3.0, should the "document" function be av

Posted 1/16/2017 7:04:03 PM

Looks pretty clear it's a bug. I also spotted recently that Saxon's xsl:evaluate allows you to call stylesheet functions that are (explicitly or implicitly) private. We'll only catch these things if people notice them and report them. Michael Kay Saxonica > On 16 Jan 2017, at 15:04, Martin H . . . Read full entry »


Re: In XSLT 3.0, should the "document" function be av

Posted 1/16/2017 3:03:42 PM

On 16.01.2017 15:55, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: Have you also tried the XPath function doc() ? Yes, using 'doc' instead of 'document' all three implementations return the same result, namely two times the stylesheet code. But I am not so much looking for a solution to get some . . . Read full entry »


Re: In XSLT 3.0, should the "document" function be av

Posted 1/16/2017 2:55:31 PM

Have you also tried the XPath function doc() ? On Mon, Jan 16, 2017 at 6:35 AM, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Both the latest internal draft of the XSLT 3.0 spec in > https://www.w3.org/XML/Group/qtspecs/specifications/xslt-3 . . . Read full entry »


In XSLT 3.0, should the "document" function be availab

Posted 1/16/2017 2:35:34 PM

Both the latest internal draft of the XSLT 3.0 spec in https://www.w3.org/XML/Group/qtspecs/specifications/xslt-30/html/#dynamic-xpath as well as the official https://www.w3.org/TR/xslt-30/#element-evaluate say about the function signatures in the context of dynamic XPath evaluation using xsl:e . . . Read full entry »


Re: [XSL-FO] marginal notes

Posted 1/12/2017 12:17:25 PM

On 12/01/2017 12:03, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx wrote: Yes Tony, I did, sorry for not replying Have been testing the suggestions found here and on the Antenna House list, but I can't seem to get it right on 6.3 MR1 need to install the recent 6.4 first and will come back then Maybe I'm . . . Read full entry »


Re: [XSL-FO] marginal notes

Posted 1/12/2017 12:02:36 PM

Yes Tony, I did, sorry for not replying Have been testing the suggestions found here and on the Antenna House list, but I can't seem to get it right on 6.3 MR1 need to install the recent 6.4 first and will come back then Thanks for taking the time to respond... and follow up will keep you posted . . . Read full entry »


Re: [XSL-FO] marginal notes

Posted 1/12/2017 11:53:13 AM

Geert, did you see this from the Antenna House mailing list? On 07/01/2017 17:18, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx wrote: ... 1. The float="outside" works well in a one column layout to put my notes in the left margin on even pages and the right margin on odd pages However I can't . . . Read full entry »


[ANN] Classes for People working with XML and Textual

Posted 1/10/2017 8:49:22 PM

Some people say bXML is XML; it all works the same wayb. Most of the people who say that have no experience with textual documents. Working with books, journal articles, and other textual documents is substantially different from working with bank transactions, electronic invoices, test data, or . . . Read full entry »


Re: streaming through a table, but don't stream the ro

Posted 1/9/2017 2:47:09 PM

Thanks Michael, That did the trick. My apologies for confirming so late. I had some issues getting this to work with xsl:stream on Saxon EE 9.6 Moving to EE 9.7 and using xsl:source-document with your suggestion works like a charm Thanks a lot Geert At 18:48 7/01/2017, Michael Kay mike@xxxxxxxx . . . Read full entry »


Re: Validation XML Document with XML Schema 1.1

Posted 1/9/2017 2:43:57 PM

On 09.01.2017 14:49, VISHNU SINGH svishnu.singh4@xxxxxxxxx wrote: I am using XML Schema 1.1. How can I validate XML document against this schema using command prompt. What will be the command line to validate the XML Document using XML Schema version 1.1. Well, there a different tools, which too . . . Read full entry »


Re: Validation XML Document with XML Schema 1.1

Posted 1/9/2017 2:41:24 PM

https://msv.java.net > On Jan 9, 2017, at 08:28, G. Ken Holman g.ken.holman@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > This is the wrong list for XML Schema questions. You should try: > > https://lists.w3.org/Archives/Public/xmlschema-dev/ > > But, . . . Read full entry »


Re: Need help sorting groups

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

Thanks Martin! From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sent: Monday, January 9, 2017 9:37 AM Subject: Re: Need help sorting groups On 09.01.2017 15:25, Steve Wisniewski stevewiz76@xxxxxxxxx . . . Read full entry »


Re: Need help sorting groups

Posted 1/9/2017 2:36:47 PM

On 09.01.2017 15:25, Steve Wisniewski stevewiz76@xxxxxxxxx wrote: My question is, how can I sort the groups so that they are sorted in value order like this: <table> <thead> <tr> <th>Range</th> <th>Total Value</th> </tr> </thead> <tbody> . . . Read full entry »


Re: Validation XML Document with XML Schema 1.1

Posted 1/9/2017 2:28:27 PM

This is the wrong list for XML Schema questions. You should try: https://lists.w3.org/Archives/Public/xmlschema-dev/ But, in the mean time, I use https://github.com/ndw/xjparse for XML Schema 1.0 from the command line ... perhaps the libraries can be configured to use 1.1 I hope this helps. . . . . Read full entry »


Re: Validation XML Document with XML Schema 1.1

Posted 1/9/2017 2:24:50 PM

Hey Vishnu, on Windows, we are using StdInParse.exe (part of Xerces-C) for validation from command line. Not sure if it supports 1.1 however. https://xerces.apache.org/xerces-c/stdinparse-3.html Martynas atomgraph.com On Mon, Jan 9, 2017 at 2:49 PM, VISHNU SINGH svishnu.singh4@xxxxxxxxx <xsl . . . Read full entry »


Need help sorting groups

Posted 1/9/2017 2:24:47 PM

Hi all, I have this (dumbed-down) source: <?xml version="1.0" encoding="UTF-8"?><locations> <location> <city>New York</city> <class>1</class> <value>1000</value> </location> <location> <city>New York</cit . . . Read full entry »


Re: *****SPAM***** Validation XML Document with XML S

Posted 1/9/2017 2:04:01 PM

AFAIK, there is no command line tool to do this. You can have a look at a piece of code that do this : https://github.com/cmarchand/gaulois-pipe/blob/master/gaulois-pipe/src/main/java/fr/efl/chaine/xslt/config/ConfigUtil.java method buildConfig(HashMap<String,ParameterValue); lines 100 and a . . . Read full entry »


Validation XML Document with XML Schema 1.1

Posted 1/9/2017 1:49:24 PM

Hi Team, I am using XML Schema 1.1. How can I validate XML document against this schema using command prompt. What will be the command line to validate the XML Document using XML Schema version 1.1. Thanks, Vishnu -- Vishnu Singh | http://marklogicgd.blogspot.in/ . . . Read full entry »


Re: Generating a <div>-toggling ID as a variable

Posted 1/9/2017 8:45:49 AM

On 1/9/2017 4:21 PM, David Maus lists@xxxxxxxxxx wrote: The first template assumes that there is only one <hom> and the <hom> is a sibling of the <dictScrap>. You might need to adjust that. The important part is the use of generate-id(): If you call it with the same node, it gene . . . Read full entry »


Re: Generating a <div>-toggling ID as a variable

Posted 1/9/2017 7:21:21 AM

On Mon, 09 Jan 2017 06:33:03 +0100, Charles Muller acmuller@xxxxxxxxxxxxxxx wrote: > > Writing the javascript and HTML code to toggle one section based on a > <div> ID is no problem, but in order for each <hom> section of each of > the many <entry(s)> in the dictionar . . . Read full entry »


Re: Generating a <div>-toggling ID as a variable

Posted 1/9/2017 5:55:25 AM

On Mon, Jan 09, 2017 at 05:32:51AM -0000, Charles Muller acmuller@xxxxxxxxxxxxxxx scripsit: > Writing the javascript and HTML code to toggle one section based on a <div> > ID is no problem, but in order for each <hom> section of each of the many > <entry(s)> in the dictio . . . Read full entry »


Generating a <div>-toggling ID as a variable

Posted 1/9/2017 5:32:43 AM

Dear XSLT'ers, I am trying to help a student in my XML class solve a problem for which I'm not sure there is a solution. She is encoding and transforming a Sino-Japanese character dictionary done with the TEI dictionaries recommendations. Like all standard dictionaries of this type, the format . . . Read full entry »


Re: [XSL-FO] marginal notes

Posted 1/8/2017 12:32:46 AM

On Sat, 2017-01-07 at 17:18 +0000, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx wrote: >B > 1. [...] I can't seem to figure out how to put margins on the left > for the left column and on the right for the right columnB I know that Antenna House started impementing some of the XSL-FO 2.0 pro . . . Read full entry »


Re: [XSL-FO] marginal notes

Posted 1/7/2017 6:44:00 PM

At 2017-01-07 17:19 +0000, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx wrote: I need to add marginal notes to a two column layout in XSL-FO (I am using Antenna House) And in general this works well using floats <fo:change-bar-begin change-bar-class="CBP-{generate-id()}" change-bar-offset= . . . Read full entry »


Re: streaming through a table, but don't stream the ro

Posted 1/7/2017 5:48:38 PM

XSLT 3.0 allows you to do <xsl:source-document href="input.xml" streamable="yes"> <xsl:apply-templates select="/*/row/copy-of(.)"/> </xsl:source-document> or in earlier drafts <xsl:stream href="input.xml"> <xsl:apply-template . . . Read full entry »


[XSL-FO] marginal notes

Posted 1/7/2017 5:18:14 PM

All, I need to add marginal notes to a two column layout in XSL-FO (I am using Antenna House) And in general this works well using floats <fo:change-bar-begin change-bar-class="CBP-{generate-id()}" change-bar-offset="5mm"> <fo:float float="outside"> . . . Read full entry »


streaming through a table, but don't stream the row le

Posted 1/7/2017 5:07:43 PM

All, I might be missing something An XML serialisation of an excel sheet just exploded into 1.4 GByte I have an XSLT that works on smaller subsets that I now want to apply on the big file and if possible, I would prefer to not change all of my functions and templates (that work on the row lev . . . Read full entry »


Re: Recursive string replace in XSLT 2.0

Posted 1/6/2017 10:26:59 PM

Hi David, OK, I get it now. Thank you for clarifying. Rick From: David Carlisle d.p.carlisle@xxxxxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: Friday, January 06, 2017 4:41 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Recursive string replace in XSLT 2.0 not here . . . Read full entry »


Re: Recursive string replace in XSLT 2.0

Posted 1/6/2017 9:40:31 PM

not here <xsl:param name="regexes" as="element(regex)*"> Michael meant here, in the template definition <xsl:param name="regex"/> You could declare your top level initialiser to also be a sequence of elements but then your initial call woul . . . Read full entry »


Re: Recursive string replace in XSLT 2.0

Posted 1/6/2017 9:37:08 PM

Thank you Michael. Oddly enough, when I add the as="element(regex)*" the finds/changes fail. Here is the entire stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="ht . . . Read full entry »


Re: Matching on keys

Posted 1/6/2017 9:29:19 PM

Hi Mike Kay, Graydon, and XSL-List, All your remarks are very interesting and helpful. In the main case I am looking at, I can hard-wire the order of the rules by setting @priority ... which I suppose will help that problem. (Except: then I use next-match to set up a cascade, ha! ... so there goe . . . Read full entry »


Re: Recursive string replace in XSLT 2.0

Posted 1/6/2017 9:24:28 PM

If you don't like head-tail recursion for this kind of problem, there are a couple of alternatives you might consider. One is xsl:iterate, which looks something like this: <xsl:iterate select="$list-of-replacements"> <xsl:param name="str" as="xs:string"/&g . . . Read full entry »


Re: Matching on keys

Posted 1/6/2017 9:10:16 PM

> Question: I can define a key, as in > > <xsl:key name="elements-by-class" match="*[matches(@class,'\S')]" > use="tokenize(@class,'\s+')"/> > > then > > <xsl:template match="key('elements-by-class','foo')"> > ... > & . . . Read full entry »


Re: Recursive string replace in XSLT 2.0

Posted 1/6/2017 8:43:25 PM

> On 6 Jan 2017, at 19:41, David Carlisle d.p.carlisle@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I'd have written it as a function rather than template, but the main > issue is you want your parameter to be (always) a sequence of elements > not sometimes a . . . Read full entry »


Re: Matching on keys

Posted 1/6/2017 8:16:46 PM

On Fri, Jan 06, 2017 at 05:56:02PM -0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx scripsit: > Question: I can define a key, as in > > <xsl:key name="elements-by-class" match="*[matches(@class,'\S')]" > use="tokenize(@class,'\s+')"/> > > then > . . . Read full entry »


Re: Recursive string replace in XSLT 2.0

Posted 1/6/2017 7:54:22 PM

Excellent David! Thank you for your generous help. -Rick -----Original Message----- From: David Carlisle d.p.carlisle@xxxxxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: Friday, January 06, 2017 2:42 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Recursive string replace in XSLT . . . Read full entry »


Re: Recursive string replace in XSLT 2.0

Posted 1/6/2017 7:41:18 PM

I'd have written it as a function rather than template, but the main issue is you want your parameter to be (always) a sequence of elements not sometimes a sequence of elements and sometimes a document node with a sequence of child elements. <?xml version="1.0" encoding="UTF-8&qu . . . Read full entry »


Recursive string replace in XSLT 2.0

Posted 1/6/2017 7:10:10 PM

Hi. I am trying to make a recursive template so I can do a series of find/changes on text nodes. I may have a lot of them, so I wanted to avoid nested replace function calls. I am using a parameter for my find/change pairs. In the recursive call, I am trying to use the current parameter with [posit . . . Read full entry »


Re: Matching on keys

Posted 1/6/2017 6:37:11 PM

This comes up a lot in the DITA stylesheets. John Lumley did a fair bit of work on optimizing such patterns, and the basic technology is there in current Saxon releases, but not well productized, so you have to configure it using some pretty complex configuration files. As it happens I've just been . . . Read full entry »


Matching on keys

Posted 1/6/2017 5:55:54 PM

Hello XSL-List, I am having more and more occasions these days to handle HTML @class semantics, which as you probably know can be 'overloaded' in the sense that multiple values (NMTOKEN) of 'class' may have to be distinguished and handled separately. An idiom for matching any element .foo (CSS se . . . Read full entry »


XSL-List Guidelines

Posted 1/1/2017 9:53:57 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: Unrequested stdout output

Posted 12/21/2016 4:53:27 PM

Thanks Michael, That clears it up entirely. Mark On 12/21/2016 9:08 AM, Michael Kay mike@xxxxxxxxxxxx wrote: The rule in the spec is that a principal result document is written if either (a) there is no secondary result document, or (b) the raw result of the initial template is a non-empty sequence . . . Read full entry »


Re: Unrequested stdout output

Posted 12/21/2016 4:07:53 PM

The rule in the spec is that a principal result document is written if either (a) there is no secondary result document, or (b) the raw result of the initial template is a non-empty sequence. My guess would be that in your case the raw result contains some whitespace text nodes. I usually avoid th . . . Read full entry »


Re: Unrequested stdout output

Posted 12/21/2016 2:39:57 PM

On 21.12.2016 15:14, Mark Wilson mark@xxxxxxxxxxxx wrote: I build one of my websites (www.cpslib.org) using a Windows batch file that has 45 distinct steps (I have never learned XProc and am 77 years old so maybe never will). Even though I am using <xsl:result-document> in the style sheet, th . . . Read full entry »


Re: Unrequested stdout output

Posted 12/21/2016 2:38:50 PM

Hi Mark, you can either declare the principal output as text: <xsl:output method="text"/> Or you can divert standard output into //./NUL at batch file level by appending > //./NUL to your java command line. Gerrit On 21.12.2016 15:14, Mark Wilson mark@xxxxxxxxxxxx wrote: I bu . . . Read full entry »


Re: Re: Image size with XSL?

Posted 12/21/2016 2:38:25 PM

On 21/12/16 14:17, Mark Wilson pubs@xxxxxxxxxxxx wrote: > Hi Perter, > In an earlier post in this thread I provided an ImageMagick command line > that actually wrapped the data in XML, thus no need for a script. Missed that, sorry. Thanks...very useful. ///Peter . . . Read full entry »


Re: Re: Image size with XSL?

Posted 12/21/2016 2:17:14 PM

Hi Perter, In an earlier post in this thread I provided an ImageMagick command line that actually wrapped the data in XML, thus no need for a script. Mark On 12/21/2016 6:55 AM, Flynn, Peter pflynn@xxxxxx wrote: I would probably write a small script that uses the identify command from ImageMagick . . . Read full entry »


Unrequested stdout output

Posted 12/21/2016 2:14:10 PM

I build one of my websites (www.cpslib.org) using a Windows batch file that has 45 distinct steps (I have never learned XProc and am 77 years old so maybe never will). Even though I am using <xsl:result-document> in the style sheet, the characters <?xml version="1.0" encod . . . Read full entry »


Re: Re: Image size with XSL?

Posted 12/21/2016 1:54:44 PM

On 19/12/16 21:01, Roger L. Cauvin roger@xxxxxxxxxx wrote: > Isn't CSS designed (and better suited) to deal with this sort of challenge? > > Roger > > -----Original Message----- > From: Mark Wilson [...] > I would like to add the placement-index to the XML data source > prog . . . Read full entry »


Re: Assigning new attribute value

Posted 12/20/2016 9:07:03 PM

Thanks Michael and Martin. I tried to use the name() earlier, but failed. Mush have been doing it wrong (got a 'not a QName' error). I will try your methods now. Mark On 12/20/2016 1:25 PM, Michael Kay mike@xxxxxxxxxxxx wrote: Try <Location> <xsl:attribute name="{name(@*[1])}&q . . . Read full entry »


Re: Assigning new attribute value

Posted 12/20/2016 8:26:11 PM

On 20.12.2016 21:11, Mark Wilson pubs@xxxxxxxxxxxx wrote: I am doing an identity transformation that has presented me with a problem. The element <Location> in the original XML must have one and only one of seven possible attributes. Whichever attribute is present, I must keep its name but ch . . . Read full entry »


Re: Assigning new attribute value

Posted 12/20/2016 8:25:00 PM

Try <Location> <xsl:attribute name="{name(@*[1])}" select="$placement-index"/> </Location> The [1] isn't necessary if you know there will always be exactly one attribute, but it makes it a bit more robust. Michael Kay Saxonica > On 20 Dec 2016, at 20:1 . . . Read full entry »


Assigning new attribute value

Posted 12/20/2016 8:11:17 PM

I am doing an identity transformation that has presented me with a problem. The element <Location> in the original XML must have one and only one of seven possible attributes. Whichever attribute is present, I must keep its name but change its value. I have created a brute-force template . . . Read full entry »


Re: Re: Image size with XSL?

Posted 12/19/2016 10:45:34 PM

On Mon, 2016-12-19 at 21:01 +0000, Roger L. Cauvin roger@xxxxxxxxxx wrote: > Isn't CSS designed (and better suited) to deal with this sort of > challenge? The final generated page uses CSS for styling but the question is about generating the pages on the server.B By the way - on http://www . . . Read full entry »


Re: Image size with XSL?

Posted 12/19/2016 9:01:10 PM

Isn't CSS designed (and better suited) to deal with this sort of challenge? Roger -----Original Message----- From: Mark Wilson Sent: Sunday, December 18, 2016 1:53 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Image size with XSL? I have an XSL stylesheet driven by an XML data source tha . . . Read full entry »


Re: Image size with XSL?

Posted 12/19/2016 4:42:18 PM

A nice way to choreograph all this, regardless of how you extract the image size, is with Xproc [1]. You can avoid writing the intermediate files to disk. Regards, --Paul [1] http://www.w3.org/TR/xproc/ > On Dec 19, 2016, at 10:08, Mark Wilson mark@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxx . . . Read full entry »


Re: Image size with XSL?

Posted 12/19/2016 4:07:37 PM

Thanks, Max. Problem solved. Yours proved to be the simplest for me to implement. If anyone needs to deal with image sizes in XSLT, here is how to generate an XML file with all the pertinent information. Mark For the archives: I had a spot of trouble getting this solution to work and went off li . . . Read full entry »


Re: escaping curly braces in attribute values

Posted 12/19/2016 12:57:12 PM

Thanks ! Le 19/12/2016 C 13:29, Martin Honnen martin.honnen@xxxxxx a C)crit : On 19.12.2016 13:27, Christophe Marchand cmarchand@xxxxxxxxxx wrote: I want to create a variable : <xsl:variable name="foe" as="element(element)"> <element path="/Q{http://www.w3.or . . . Read full entry »


Re: escaping curly braces in attribute values

Posted 12/19/2016 12:29:13 PM

On 19.12.2016 13:27, Christophe Marchand cmarchand@xxxxxxxxxx wrote: I want to create a variable : <xsl:variable name="foe" as="element(element)"> <element path="/Q{http://www.w3.org/1999/XSL/Transform}stylesheet[1]/Q{http://www.w3.org/1999/XSL/Transform}templa . . . Read full entry »


escaping curly braces in attribute values

Posted 12/19/2016 12:26:48 PM

Hello, I want to create a variable : <xsl:variable name="foe" as="element(element)"> <element path="/Q{http://www.w3.org/1999/XSL/Transform}stylesheet[1]/Q{http://www.w3.org/1999/XSL/Transform}template[1]"/> </xsl:variable> Where element/@path i . . . Read full entry »


Re: Image size with XSL?

Posted 12/19/2016 11:15:45 AM

At first I was under impression that we were calling identify.exe once per each image, but actually it works even simpler - identifier can receive a file pattern with a wildcard such as "*.jpg *.png *.tif " and iterate over files itself. Glad that it works for you! - Max On 18.12.20 . . . Read full entry »


Re: Image size with XSL?

Posted 12/19/2016 7:20:27 AM

Thanks. Nice to know the problem is not sully and has received attention. Mark On 12/18/2016 10:03 PM, Liam R. E. Quin liam@xxxxxx wrote: On Sun, 2016-12-18 at 19:54 +0000, Mark Wilson mark@xxxxxxxxxxxx wrote: [...] Is there a way to obtain the height or width of a jpeg image from the file itself ( . . . Read full entry »


Re: Image size with XSL?

Posted 12/19/2016 5:02:53 AM

On Sun, 2016-12-18 at 19:54 +0000, Mark Wilson mark@xxxxxxxxxxxx wrote: > [...] Is there a way to obtain the height or width of a > jpegB > image from the file itself (image.jpg, for instance) using XSLT? Yes. I've done this for JPEG and GIF and maybe some others. It relies on XSLT 2 o . . . Read full entry »


Re: Image size with XSL?

Posted 12/18/2016 9:18:18 PM

Hi Max, I saw that application but did not realize that it could be used the way you suggested (in a batch mode). I now have two solutions to explore, yours and John's binary module. Should keep me off the streets for a few days. Thanks everyone. Very, very helpful. Regards, Mark On 12/18/2016 2 . . . Read full entry »


Re: Image size with XSL?

Posted 12/18/2016 9:15:19 PM

Thanks! Mark On 12/18/2016 2:10 PM, John Lumley john@xxxxxxxxxxxx wrote: Versions of Oxygen that contain Saxon versions from 9.6 will support it, provided you make sure that PE/EE is set as the transformation engine. Sent from my iPad On 18 Dec 2016, at 20:28, Mark Wilson pubs@xxxxxxxxxxxx <xs . . . Read full entry »


Re: Image size with XSL?

Posted 12/18/2016 9:10:11 PM

Versions of Oxygen that contain Saxon versions from 9.6 will support it, provided you make sure that PE/EE is set as the transformation engine. Sent from my iPad > On 18 Dec 2016, at 20:28, Mark Wilson pubs@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I use the . . . Read full entry »


Re: Image size with XSL?

Posted 12/18/2016 9:07:07 PM

We had a similar task on one of our projects. However there was not so many files, we also invoked an external utility to read the metadata. We used Image Magick (imagemagick.org). You can iterate over image files and call identify.exe with "-format" option that contains XML tags: &l . . . Read full entry »


Re: Image size with XSL?

Posted 12/18/2016 8:28:49 PM

Hi John, I use the free version of Saxon 96 (but also have Oxygen, which may have some other processor). Will your citation work with that? (I am very much a novice with XSLT). Went to your citation and was pleased to see the ASN1 reference -- I developed several C++/ASN1/BER applications for Z3 . . . Read full entry »


Re: Image size with XSL?

Posted 12/18/2016 8:15:07 PM

Thanks Graydon, I will look into what you have said and not post further here as apparently XSLT is not going to come to my rescue. Mark On 12/18/2016 1:03 PM, Graydon graydon@xxxxxxxxx wrote: On Sun, Dec 18, 2016 at 07:54:10PM -0000, Mark Wilson mark@xxxxxxxxxxxx scripsit: [snip] I would like to . . . Read full entry »


Re: Image size with XSL?

Posted 12/18/2016 8:14:14 PM

If your XSLT processor supports EXPath Binary (Saxon-PE/EE does ), then you can use the technique illustrated at http://expath.org/spec/binary#example%E2%80%93JPEG. Alternatively if you can execute Java functions as extension functions, then are quite a few possibilities through that route. John L . . . Read full entry »


Re: Image size with XSL?

Posted 12/18/2016 8:02:51 PM

On Sun, Dec 18, 2016 at 07:54:10PM -0000, Mark Wilson mark@xxxxxxxxxxxx scripsit: [snip] > I would like to add the placement-index to the XML data source > programmatically. Is there a way to obtain the height or width of a jpeg > image from the file itself (image.jpg, for instance) using . . . Read full entry »


Image size with XSL?

Posted 12/18/2016 7:54:02 PM

I have an XSL stylesheet driven by an XML data source that produces about 5000 different pages, many with multiple images. I have been adding by hand a placement-index to the XML data source that arranges the images neatly, as with this page: http://www.cpslib.org/amp/europa-themes.htm. I a . . . Read full entry »


Re: selecting specific elements from a second file

Posted 12/17/2016 4:13:13 PM

Thanks Mark On 12/17/2016 9:05 AM, Graydon graydon@xxxxxxxxx wrote: On Sat, Dec 17, 2016 at 03:37:38PM -0000, Mark Wilson mark@xxxxxxxxxxxx scripsit: Thank you, Martin, Made one small change: <xsl:template match="Stamp"> <xsl:copy> <xsl:apply-templates . . . Read full entry »


Re: selecting specific elements from a second file

Posted 12/17/2016 4:04:59 PM

On Sat, Dec 17, 2016 at 03:37:38PM -0000, Mark Wilson mark@xxxxxxxxxxxx scripsit: > Thank you, Martin, > Made one small change: > <xsl:template match="Stamp"> > <xsl:copy> > <xsl:apply-templates select="@*, node(), key('flaws', > C . . . Read full entry »


Re: selecting specific elements from a second file

Posted 12/17/2016 3:37:32 PM

Thank you, Martin, Made one small change: <xsl:template match="Stamp"> <xsl:copy> <xsl:apply-templates select="@*, node(), key('flaws', CatNumbers/@pofis-number, doc('../work/flaws3.xml'))/node()"/> </xsl:copy> </xsl:te . . . Read full entry »


Re: selecting specific elements from a second file

Posted 12/17/2016 3:31:36 PM

Hi Martin, Sorry again, it has been some time since I posted. Saxon, version 2 -- I sent a follow up with the stylesheet so far. I will try what you have written. Mark On 12/17/2016 8:27 AM, Martin Honnen martin.honnen@xxxxxx wrote: On 17.12.2016 16:19, Mark Wilson mark@xxxxxxxxxxxx wrote: I want . . . Read full entry »


Re: selecting specific elements from a second file

Posted 12/17/2016 3:27:09 PM

On 17.12.2016 16:19, Mark Wilson mark@xxxxxxxxxxxx wrote: I want to select elements from the second file to add to the first file when their @pofis-number match (in this instance 2966 has a match, 2967 does not. Well, which XSLT processor do you use, which XSLT version? With XSLT 2.0 you could def . . . Read full entry »


Re: selecting specific elements from a second file

Posted 12/17/2016 3:26:48 PM

I should have included my stylesheet so far. (flaws3.xml is the second file) Sorry: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-re . . . Read full entry »


selecting specific elements from a second file

Posted 12/17/2016 3:19:15 PM

I want to select elements from the second file to add to the first file when their @pofis-number match (in this instance 2966 has a match, 2967 does not. Any help appreciated. Mark ----- File to Merge to (simplified: the element <Stamp> is much further from the root) <List> ..... . . . Read full entry »


Saxon-JS 0.9.1 beta release

Posted 12/9/2016 5:10:21 PM

We're delighted to announce the latest public beta release of Saxon-JS 0.9.1. Details here: http://www.saxonica.com/saxon-js/index.xml Saxon-JS allows execution of XSLT 3.0 stylesheets in the browser. This release works on Internet Explorer and Edge, as well as Safari, Firefox and Chrome. Saxon-JS . . . Read full entry »


[ANN] XML Prague 2017 - Call for Papers Reminder

Posted 12/5/2016 8:13:07 PM

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, this is gentle reminder that there is still 10 days for completing submission for XML Prague conference. The XML Prague conference will include two full days of single track sessions, as well as a multitrack pre-conference day. The conference . . . Read full entry »


Re: Comparing two dates when one is potentially malfor

Posted 12/5/2016 4:11:38 PM

Hi Wolfgang - On Mon, Dec 5, 2016 at 3:18 AM, Wolfgang Laun wolfgang.laun@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > If all the "malformed forms" are due to omitted seconds and if it is only > the date you are interested in, truncate values at the separato . . . Read full entry »


Re: *****SPAM***** Comparing two dates when one is po

Posted 12/5/2016 8:26:21 AM

There is no standard function for parsing dates. Here is the code we use, when we need to manage dates. Comments are in French, sorry about that, and code is XSLT 2.0. Using XSLT 3.0, you can use try/catch, that makes it simpler. HPH, Christophe <xd:doc> <xd:desc> . . . Read full entry »


Re: Comparing two dates when one is potentially malfor

Posted 12/5/2016 8:18:54 AM

If all the "malformed forms" are due to omitted seconds and if it is only the date you are interested in, truncate values at the separator 'T' and compare the date. Even a string comparison would work on the yyyy-mm-dd formatted values. Or truncate at the length that includes hh:mm and co . . . Read full entry »


Comparing two dates when one is potentially malformed

Posted 12/5/2016 4:02:55 AM

Hi all -- I'm wondering about best practices when dealing with potentially malformed dates. I confess that I haven't worked with dates (xs:date, xs:time, xs:dateTime) very much and so I'm not sure if I'm thinking about things correctly. I have the following input: <test> <fie . . . Read full entry »


XSL-List Guidelines

Posted 12/2/2016 1:16:19 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: Cannot mix nodes and atomic values - how comes?

Posted 11/14/2016 2:58:18 PM

Hi, Indeed, there are those who have been heard to suggest that providing attribute defaults in a schema is poor architecture. Maybe the only reason schema languages offer the feature at all is ultimately an historic one -- and providing attribute values (even nominally 'default' values) is a tran . . . Read full entry »


Re: Cannot mix nodes and atomic values - how comes?

Posted 11/14/2016 9:58:22 AM

Am 12.11.2016 um 14:07 schrieb Mukul Gandhi gandhi.mukul@xxxxxxxxx <mailto:gandhi.mukul@xxxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx <mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>>: > > The idea I've illustrated is, getting a default value of an attribute from an XS . . . Read full entry »


Re: Cannot mix nodes and atomic values - how comes?

Posted 11/12/2016 1:06:48 PM

I've tried to reproduce your question using my own sample, which is below. XML document: bars.xml <?xml version="1.0" encoding="UTF-8"?> <bars> <bar foo="x"/> <bar/> </bars> XSD 1.0 document: bars.xsd <?xml version="1.0&q . . . Read full entry »


Re: Cannot mix nodes and atomic values - how comes?

Posted 11/11/2016 2:16:26 PM

Thank you very much or the help, and also for the reminder to (again) look at the XSLT 3 stuff, like this: > Hence the need for the "!" operator in 3.0. - Michael . . . Read full entry »


Re: Cannot mix nodes and atomic values - how comes?

Posted 11/11/2016 11:21:51 AM

> On 11 Nov 2016, at 10:30, Michael MC<ller-Hillebrand mmh@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi experts, > > We ran into an error that made me think about the idea of mixed data types in sequences. Take this instance: > > <?xml version=& . . . Read full entry »


Cannot mix nodes and atomic values - how comes?

Posted 11/11/2016 10:30:06 AM

Hi experts, We ran into an error that made me think about the idea of mixed data types in sequences. Take this instance: <?xml version="1.0" encoding="UTF-8"?> <bars> <bar foo="x"/> <bar/> </bars> We need to process all <bar> . . . Read full entry »


Re: XSLT 2nd Edition : Appendix F

Posted 11/10/2016 3:40:43 PM

Hi Michael, Thanks for your reply. Its very insightful. with best regards, Mukul gandhi On 9 November 2016 at 20:24, Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > The changes to the XSLT part of JAXP have been very modest over the years. > Ther . . . Read full entry »


Re: saxon:next-in-chain and memory usage

Posted 11/9/2016 5:19:33 PM

Thanks for the pointer. Unfortunately, it looks like we'll have to take a very different route: the XProc processors I've looked at (Calabash, MorganaXProc) run into the same problem. FWIW: I'm now trying (with XSLT 2.0) to use a combination of xsl:result-document and saxon:next-in-chain to sp . . . Read full entry »


Re: XSLT 2nd Edition : Appendix F

Posted 11/9/2016 2:54:27 PM

The changes to the XSLT part of JAXP have been very modest over the years. There's a two-argument form of TransformerFactory.getInstance(), and there are clarifications to the Javadoc descriptions of some methods [often, sadly, just documenting the bugs in the Xalan implementation ;-)], and I think . . . Read full entry »


XSLT 2nd Edition : Appendix F

Posted 11/9/2016 2:13:24 PM

I'm fortunate to read Michael Kay's book XSLT 2nd Edition (XSLT 1.0 version). I've also read a lot of his XSLT 2.0 book as well. This is with reference to Appendix F (TrAX & JAXP 1.1 references in it) of Mike's XSLT 1.0 book. Is anyone aware of the differences between JAXP 1.1 and latest versi . . . Read full entry »


Re: saxon:next-in-chain and memory usage

Posted 11/9/2016 1:01:52 PM

I remember at some stage doing some work to ensure that saxon:next-in-chain released memory from one stylesheet before running the next, but I haven't checked that this is the case today, and there have been considerable changes in the way it's implemented. And in any case 9.1 is a pretty old relea . . . Read full entry »


saxon:next-in-chain and memory usage

Posted 11/9/2016 12:56:57 PM

Hello, I am running a pipeline of XML transformations over an XML file of about 130Mb, using Saxon 9.1.0.5J and Java 1.8.0_112. The pipeline is implemented using saxon:next-in-chain. It works fine as long as I have fewer than about five steps, but when I have five or more, then Java runs out . . . Read full entry »


Re: XSLT 2: Best Way to Synthesize Elements Given List

Posted 11/5/2016 6:31:25 PM

> fold-left(reverse(tokenize($path, '/')), $stuff-from-somewhere-else, f:wrap#2) While I am all for using FP, this is the most unreadable of all proposed solutions. Eliot specifically asked for XSLT 2 solution. The 10-lines non-recursive, based on practical limitations XSLT 2.0 solution, co . . . Read full entry »


Re: XSLT 2: Best Way to Synthesize Elements Given List

Posted 11/5/2016 6:22:04 PM

> Surely this doesn't satisy Eliot's requirement that the path can be "arbitrarily long"? > > Michael Kay Yes, as well as the fact that probably every XML parser has a limit for the maximum depth of an XML document that it can process. Knowing this limit, one needs to make a m . . . Read full entry »


Re: XSLT 2: Best Way to Synthesize Elements Given List

Posted 11/5/2016 6:21:27 PM

In 3.0, apart from xsl:iterate as suggested by John Lumley, you could consider using a fold: <xsl:function name="f:wrap" as="element(*)"> <xsl:param name="e" as="element(*)"/> <xsl:param name="n" as="xs:string"/> & . . . Read full entry »


Re: XSLT 2: Best Way to Synthesize Elements Given List

Posted 11/5/2016 6:13:49 PM

Surely this doesn't satisy Eliot's requirement that the path can be "arbitrarily long"? Michael Kay Saxonica > On 5 Nov 2016, at 16:50, Dimitre Novatchev dnovatchev@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I'd suggest this non-recursive solution: > . . . Read full entry »


Re: XSLT 2: Best Way to Synthesize Elements Given List

Posted 11/5/2016 6:11:38 PM

>> I'd suggest this non-recursive solution: > > > Personally, I classify this approach as recursive: > > <xsl:template match="*"> > ... > <xsl:apply-templates select="*"/> > ... > </xsl:template> > Yes, we ar . . . Read full entry »


Re: XSLT 2: Best Way to Synthesize Elements Given List

Posted 11/5/2016 5:12:43 PM

Here is my recursive solution, which actually takes the ancestor elements, rather than the list of element types names (I need to copy attributes of the ancestors): <xsl:function name="local:makeWrapperElements" as="element()"> <xsl:param name="ancestors" a . . . Read full entry »


Re: XSLT 2: Best Way to Synthesize Elements Given List

Posted 11/5/2016 5:10:10 PM

At 2016-11-05 16:50 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: I'd suggest this non-recursive solution: Personally, I classify this approach as recursive: <xsl:template match="*"> ... <xsl:apply-templates select="*"/> ... </xsl:template& . . . Read full entry »


Re: XSLT 2: Best Way to Synthesize Elements Given List

Posted 11/5/2016 5:08:55 PM

On Sat, Nov 5, 2016 at 10:01 AM, Eliot Kimber ekimber@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > That's very clever. I'm not sure it's clearer than my current recursive > solution though :-) Why, this is non-recursive, 10-lines transformation that contains just two . . . 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!

Ask Someone You Know

Does your company use Stylus Studio? Do your competitors? Engineers from over 100,000 leading companies use Stylus Studio, and now you can ask someone from your own organization about their experiences using Stylus Studio.

 
Free Stylus Studio XML Training:
W3C Member