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!


[ANN] Balisage 2017 Program Announced

Posted 5/17/2017 6:27:15 PM

Balisage: The Markup Conference 2017 Program Now Available http://www.balisage.net/2017/Program.html Balisage: where serious markup practitioners and theoreticians meet every August. The 2017 program includes papers discussing XML vocabularies, cutting-edge digital humanities, lossless JSON/XML r . . . Read full entry »


Re: Remove internal parsing and exclude one child

Posted 5/16/2017 6:18:53 PM

Thank you Graydon and Martin! These both work perfectly, and it's kind of neat to see the rather different approaches to the same issue. I groped along each path before asking for help. Martin, regarding XSLT 1.0 and Saxon 9, I was mixing concerns. I'm using Saxon on my own machine, but the enviro . . . Read full entry »


Re: Remove internal parsing and exclude one child

Posted 5/16/2017 5:38:48 PM

On 16.05.2017 19:29, Charles O'Connor coconnor@xxxxxxxxxxxx wrote: Using XSLT 1.0/Saxon9he I have this input <aff id="aff1"><label>1</label>Jet Propulsion Laboratory (JPL), 4800 Oak Grove Dr Pasadena, CA <addr-line><postal-code>91109</postal-code>, & . . . Read full entry »


Remove internal parsing and exclude one child

Posted 5/16/2017 5:29:19 PM

Hi, Using XSLT 1.0/Saxon9he I have this input <aff id="aff1"><label>1</label>Jet Propulsion Laboratory (JPL), 4800 Oak Grove Dr Pasadena, CA <addr-line><postal-code>91109</postal-code>, <country>USA</country></addr-line></aff> . . . Read full entry »


Re: How To Use Streaming To Group Elements in a Flat

Posted 5/2/2017 10:25:28 PM

Running your code on Saxon 9.7, I get XTSE3430: Template rule is declared streamable but it does not satisfy the streamability rules. * The xsl:for-each-group/@group-starting-with pattern is not motionless That's because *[position()] involves counting preceding siblings. Or to look at it ano . . . Read full entry »


How To Use Streaming To Group Elements in a Flat List?

Posted 5/2/2017 8:55:04 PM

I have some very large (100s of MBs) XML database dump docs that I want to break into smaller docs. This is an easy application of for-each-group or of a simple tail recursion approach but I wanted to use this as an opportunity to learn more about XSLT 3 streaming. Ibve read through the XSLT 3 sp . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 9:38:32 PM

I still have my copy of "APL An Interactive Approach" by Gilman/Rose 1974. I did APL on a Vector Graphics terminal with that great keyboard of all the special symbols. Curiously, met some APL developers at XML Summer School when I went a few years back. On May 1, 2017 11:21 PM, " . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 9:21:15 PM

It looks like, if Ibm reading the Wikipidea entry for APL correctly: https://en.wikipedia.org/wiki/APL_syntax_and_symbols During my IBM new-hire orientation they asked how many of us had written one-line APL chess programs. About 4 people out of the 100 or so in the room raised their hands. Chee . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 9:15:22 PM

An APL-> XSLT compiler..... Now there's a challenge ! Did the APL character set ever get defined in Unicode? J Sent from my iPad > On 1 May 2017, at 21:49, Liam R. E. Quin liam@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On the other hand even experienced APL pr . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 8:49:35 PM

On Mon, 2017-05-01 at 20:01 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > > And here is an XPath 2.0 expression: > > [...[ > B B B B B B B empty(/*/*[not(self::A)][. >> /*/A[1] and /*/A[last()] >> .]) > > This XPath expression happens to be slightly short . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 8:00:30 PM

> And here is an XPath 2.0 expression: > > empty(/*/B[. >> /*/A[1] and /*/A[last()] >> .]) Making this more general: empty(/*/*[not(self::A)][. >> /*/A[1] and /*/A[last()] >> .]) This XPath expression happens to be slightly shorter (by 3 characters) than . . . Read full entry »


XSL-List Guidelines

Posted 5/1/2017 6:44:15 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: XPath for expressing contiguous elements?

Posted 5/1/2017 6:43:00 PM

And here is an XPath 2.0 expression: empty(/*/B[. >> /*/A[1] and /*/A[last()] >> .]) On Mon, May 1, 2017 at 5:59 AM, Costello, Roger L. costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > I want an XPath expression that implements this . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 4:34:03 PM

If it's possible to use some XSLT2.0 to set up a variable before then checking it via XPATH, could use the group-adjacent feature of for-each-group to set up a variable $adjacentAs <xsl:variable name="adjacentAs" as="element(adjacentAs)*> <xsl:for-each-group select=&quo . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 4:03:48 PM

not(/*/A[following-sibling::*[not(self::A)][following-sibling::A]]) returns true() if and only if there is a non-A element with following-sibling an A element, and this non-A element also has a following A sibling. -- Cheers, Dimitre Novatchev --------------------------------------- Truly grea . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 3:27:19 PM

Sorry, this works only on Roger's examples ... > Here is one without any negation: > > /*/A[preceding-sibling::A][following-sibling::A] > [preceding-sibling::*[1][self::A]] > [following-sibling::*[1][self::A]] > and true() On Mon, May 1, 2017 at 8:06 AM, . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 3:07:13 PM

Here is one without any negation: /*/A[preceding-sibling::A][following-sibling::A] [preceding-sibling::*[1][self::A]] [following-sibling::*[1][self::A]] and true() On Mon, May 1, 2017 at 7:21 AM, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 2:21:28 PM

not(*[not(self::A)][following-sibling::A][preceding-sibling::A]) returns true if and only if there is no non-A element that is both preceded and followed by an A element, which I think is equivalent to your expression and rather simpler. Michael Kay Saxonica > On 1 May 2017, at 14:00, Costel . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 2:09:26 PM

On Mon, May 01, 2017 at 12:59:57PM -0000, Costello, Roger L. costello@xxxxxxxxx scripsit: > Hi Folks, > > I want an XPath expression that implements this rule: > > All <A> elements shall be contiguous within <Test>. I think it's easier to think of this as "is the . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 1:19:44 PM

On 01.05.17 15:13, Syd Bauman s.bauman@xxxxxxxxxxxxxxxx wrote: But if what you really want is a simple Schematron test, then | <sch:rule context="A"> | <sch:report test="following-sibling::B[following-sibling::A]">oops</sch:report> | </sch:rule> has th . . . Read full entry »


Re: XPath for expressing contiguous elements?

Posted 5/1/2017 1:13:41 PM

Roger -- I'm just wondering if this isn't the wrong tool for the job. element Test { B*, A*, B* } While non-deterministic, does ensure that all As are contiguous. (And, if at least one A is required, i.e. "A+" instead of "A*", then it is deterministic.) But if what you rea . . . Read full entry »


XPath for expressing contiguous elements?

Posted 5/1/2017 12:59:49 PM

Hi Folks, I want an XPath expression that implements this rule: All <A> elements shall be contiguous within <Test>. In this example all A's are contiguous, so the rule is satisfied: <Test> <B/> <A/> <A/> <A/> <B/> </Test> . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/19/2017 9:47:02 PM

> My context node is the <chapter> element. I want to select everything up to > and including the first <section>. In case this will be needed more than once, then using XSLT 1.0 one can do this: key('kPreceding', generate-id(/*/section[1])) | /*/section[1] where the . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/19/2017 9:19:35 PM

Hi, Or there is the XSLT Way, namely modes <xsl:template match="section"/> <xsl:template match="body"> <intro> <xsl:apply-templates/> </intro> <xsl:apply-templates select="section" mode="now-sections"/> </xs . . . Read full entry »


Re: Serializing elements in CDATA, based on an attribu

Posted 4/13/2017 9:11:23 AM

Ok, thanks a lot. I'm gonna look at both solutions. Best regards, Christophe Le 2017-04-12 18:14, Michael Kay mike@xxxxxxxxxxxx a C)critB : The only way of getting CDATA sections output by the serializer using standard XSLT capabilities, or using standard Saxon capabilities, is the cdata-section-el . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/13/2017 7:24:29 AM

Hi Rick, In Michael Kay's book, check under xsl:for-each-group, "Using group-starting-with", there is an example "Handling flat XHTML documents" which describes the situation. I think it is easier to understand group-starting-with="section" instead of group-ending-wi . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/13/2017 4:27:21 AM

May be something like this *[not(self::section)] | section[1] (not tested) On 13 April 2017 at 02:36, Rick Quatro rick@xxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi All, > > Here is my xml: > > <?xml version="1.0" encoding="UTF-8&qu . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/12/2017 10:12:49 PM

How about for-each-groups? <?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-result-prefixes="xs" version="2.0"> B <xs . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/12/2017 9:58:15 PM

I've always regretted that we don't have operators "until" "until-and-including". But with 3.0 you can implement them as higher-order-functions: declare function until-and-including ($seq, $condition) { head($seq), until-and-including(tail($seq)[$condition(head($seq))], $cond . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/12/2017 9:30:19 PM

If only section elements can follow intro you can also do: select=b* except (section[preceding-sibling::section])b This transform: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="htt . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/12/2017 9:28:09 PM

Hi Martin, That does work. Thank you very much. I am not familiar with this construction. Does the . refer to the section[1] element? Thanks. Rick -----Original Message----- From: Martin Honnen martin.honnen@xxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: Wednesday, April 12, 2017 . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/12/2017 9:21:30 PM

On Wed, Apr 12, 2017 at 09:06:24PM -0000, Rick Quatro rick@xxxxxxxxxxxxxx scripsit: > Hi All, > > Here is my xml: > > <?xml version="1.0" encoding="UTF-8"?> > <chapter> > <title>Title</title> > <intro> > . . . Read full entry »


Re: Select everything up to and including the first <

Posted 4/12/2017 9:19:47 PM

On 12.04.2017 23:06, Rick Quatro rick@xxxxxxxxxxxxxx wrote: Hi All, Here is my xml: <?xml version="1.0" encoding="UTF-8"?> <chapter> <title>Title</title> <intro> <p>Intro</p> </intro> <section>& . . . Read full entry »


Select everything up to and including the first <secti

Posted 4/12/2017 9:06:17 PM

Hi All, Here is my xml: <?xml version="1.0" encoding="UTF-8"?> <chapter> <title>Title</title> <intro> <p>Intro</p> </intro> <section></section> <section></section> <secti . . . Read full entry »


Re: Passing parameter into tag name

Posted 4/12/2017 4:18:50 PM

My preference when I see poorly-designed XML like this is to start by writing a transformation that turns it into well-designed XML, in this case converting > <Level_1_Amt>100</Level_1_Amt> to > <Amt level="1">100</Amt> The great advantage of this is that . . . Read full entry »


Re: Serializing elements in CDATA, based on an attribu

Posted 4/12/2017 4:14:02 PM

The only way of getting CDATA sections output by the serializer using standard XSLT capabilities, or using standard Saxon capabilities, is the cdata-section-elements property, and that is driven entirely by element name. For finer-grained control you'll have to do something else. One approach woul . . . Read full entry »


Serializing elements in CDATA, based on an attribute

Posted 4/12/2017 1:23:08 PM

Hello, In a document, I write many tags of metadata. Part of them, based on @code value (debug & info), MUST be serialized with a CDATA content. With this input : <metadata code="dummy">Standard serialization</metadata> <metadata code="debug">C-Data seria . . . Read full entry »


Re: Passing parameter into tag name

Posted 4/12/2017 1:18:04 PM

Thank you Martin! From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sent: Wednesday, April 12, 2017 9:11 AM Subject: Re: Passing parameter into tag name On 12.04.2017 15:06, Steve Wisniewski stevewiz7 . . . Read full entry »


Re: Passing parameter into tag name

Posted 4/12/2017 1:11:23 PM

On 12.04.2017 15:06, Steve Wisniewski stevewiz76@xxxxxxxxx wrote: <foo> <Level> <Level_No>1</Level_No> </Level> <Level> <Level_No>2</Level_No> </Level> <Level> <Level_No>3</Level_No> </Level> <Cost ID='1'> <Leve . . . Read full entry »


Passing parameter into tag name

Posted 4/12/2017 1:06:01 PM

Hello all, I have a data scenario like this (edited down for clarity) where I have multiple tags that have the actual level number in the tag name: <foo> <Level> <Level_No>1</Level_No> </Level> <Level> <Level_No>2</Level_No> </Level> <Level&g . . . Read full entry »


Re: SV: questions about preceding::processing-instruct

Posted 4/10/2017 2:39:15 PM

Ah yes, then the processor can do some optimization and stop looking for 'anchor' processing instructions right after the first anchor PI has been found on the preceding axis. On 10.04.2017 16:35, Erik Zander erik.zander@xxxxxxxxxxxxxxxxxxxx wrote: Thanks Gerrit, You pointed me in the right d . . . Read full entry »


SV: questions about preceding::processing-instruction

Posted 4/10/2017 2:35:31 PM

Thanks Gerrit, You pointed me in the right direction so I could avoid the timeout :) The solution was close at hand <xsl:variable name="currentPage" select="substring-before(substring-after(./preceding::processing-instruction( 'anchor')[1], 'Page.'), '&quot;')"/> Ju . . . Read full entry »


Re: questions about preceding::processing-instruction

Posted 4/10/2017 1:30:33 PM

On 10.04.2017 15:12, Erik Zander erik.zander@xxxxxxxxxxxxxxxxxxxx wrote: Hi All! I have an optimization problem concerning preceding::processing-instruction. First some background in my xml I have processing instructions like <?anchor xml:id="orgPage.7"/?> representing the start . . . Read full entry »


questions about preceding::processing-instruction

Posted 4/10/2017 1:12:00 PM

Hi All! I have an optimization problem concerning preceding::processing-instruction. First some background in my xml I have processing instructions like <?anchor xml:id="orgPage.7"/?> representing the start of a page. And I have a template that matches on text(). In the template . . . Read full entry »


Fwd: Submissions open for TEI-C MM and Conference

Posted 4/7/2017 6:39:29 PM

For all you TEI users out there (with apologies for cross-posting): -------- Forwarded Message -------- Subject: Submissions open for TEI-C MM and Conference Date: Fri, 7 Apr 2017 13:48:51 -0400 From: Kathryn Tomasek <tomasek_kathryn@xxxxxxxxxxxxxxxxxx> Reply-To: Kathryn Tomasek <toma . . . Read full entry »


[ann] oXygen XML Editor, version 19

Posted 4/7/2017 8:26:30 AM

Hi all, I am happy to announce that a new version of oXygen XML Editor is available from our website: http://www.oxygenxml.com In version 19 we support Saxon 9.7.0.15, thus you can experiment with the latest XSLT, XQuery and XPath versions supported by Saxon. The default validation for XSLT sc . . . Read full entry »


Re: Moving stylesheet from Java Saxon to .NET Saxon

Posted 4/6/2017 5:09:25 PM

Thanks! Mark On 4/6/2017 10:07 AM, Michael Kay mike@xxxxxxxxxxxx wrote: Transform -it:main -xsl:xslt/content.subject.xsl . . . Read full entry »


Re: Moving stylesheet from Java Saxon to .NET Saxon

Posted 4/6/2017 5:06:34 PM

It shouldn't be necessary to do anything other than changing > java -jar saxon97\saxon9he.jar -it:main -xsl:xslt/content.subject.xsl to > Transform -it:main -xsl:xslt/content.subject.xsl The stylesheet generates a text file with x0A as the line ending, you might want to change that to x0D . . . Read full entry »


Moving stylesheet from Java Saxon to .NET Saxon

Posted 4/6/2017 4:51:34 PM

I have always used the Java version of Saxon but have been asked to supply a .Net version of a stylesheet and Windows batch file. I have never used .NET. Can anyone tell me what has to change to do this? Obviously, the call to Java must change, but how, and what else? The batch file and styleshe . . . Read full entry »


[ANN] Balisage Submissions due FRIDAY

Posted 4/4/2017 6:54:16 PM

Submissions to "Balisage: The Markup Conference" and pre-conference symposium: "Up-Translation and Up-Transformation: Tasks, Challenges, and Solutions" are due on April 7. Detailed Call for Participation: http://balisage.net/Call4Participation.html About Balisage: http://balis . . . Read full entry »


Re: [BigList Fwd] Re: XML: From flat to hierarchical w

Posted 3/30/2017 10:36:14 AM

Sorry, yes, it was harsh. I was feeling grumpy. Michael Kay Saxonica > On 30 Mar 2017, at 11:20, Pieter Lamers pieter.lamers@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Not only harsh but also incorrect. the opening post had > <xsl:stylesheet version=&q . . . Read full entry »


Re: [BigList Fwd] Re: XML: From flat to hierarchical w

Posted 3/30/2017 10:20:06 AM

Not only harsh but also incorrect. the opening post had <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" so Nicola did mention 1.0 in the first place. Other than that, it may be interesting to see if the setup Nicola uses may be altered to acc . . . Read full entry »


AW: Fwd: [BigList Fwd] Re: XML: From flat to hierarchi

Posted 3/30/2017 4:23:41 AM

Hi Nicola, Did you change the version attribute in the xsl:stylesheet to "2.0"? Maybe XSLT 2.0 is supported and you just have to enable it. However, for XSLT 1.0 I gave you already the solution: Just replace your template for rec1 with mine. At least it worked for me!? Patrik ------- . . . Read full entry »


Re: [BigList Fwd] Re: XML: From flat to hierarchical w

Posted 3/30/2017 1:49:49 AM

Hey now, that's kinda harsh... Michele ******* Michele Combs Lead Archivist, Special Collections Research Center Syracuse University 315-443-2081 mrrothen@xxxxxxx ________________________________________ From: Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wed . . . Read full entry »


Re: [BigList Fwd] Re: XML: From flat to hierarchical w

Posted 3/30/2017 12:08:37 AM

Is it totally unreasonable to expect that if you wanted a solution using a technology that was superseded 10 years ago, you should say so in the first place rather than wasting our time? Michael Kay Saxonica > > Could you help me, please, with a solution in XSLT 1.0? > > > Thanks a . . . Read full entry »


Fwd: [BigList Fwd] Re: XML: From flat to hierarchical

Posted 3/29/2017 11:51:44 PM

Hi Patrik, Thank you very much for your help. I appreciate your solution of rec2 recursion key. It's a good idea! For XSLT 2.0, unfortunatelly it's unsupported. Perhaps is for this that <xsl:copy> <xsl:for-each-group select="*" group-starting-with="rec1"> . . . Read full entry »


Re: XML: From flat to hierarchical with grouping

Posted 3/29/2017 1:32:19 PM

You can adapt the code at http://stackoverflow.com/questions/42932880/ which gives a general approach to converting a flat sequence with level numbers into a nested hierarchy. This approach handles an arbitrary number of levels; if you only have a maximum of three then you could possibly simplif . . . Read full entry »


AW: XML: From flat to hierarchical with grouping

Posted 3/29/2017 4:41:46 AM

Hi Nicola, you need to process the rec2 elements that you got with key('k2', generate-id()) recursively instead of just copying them. And since rec1 does not contain rec2 elements the <xsl:apply-templates select="rec2" /> has no effect. So this template should work: <xsl:templa . . . Read full entry »


XML: From flat to hierarchical with grouping

Posted 3/29/2017 2:12:09 AM

I need to manipolate this XML: <root> <row> <rec1> <fld1-1/> </rec1> <rec2> <fld2-1/> </rec2> <rec3> <fld3-1/> </rec3> <rec3> <fld3-2/> </rec3> <rec2 . . . Read full entry »


Re: Case-insensitive filter match for template wanted

Posted 3/28/2017 11:42:27 AM

On 28/03/17 10:57, Michael Kay mike@xxxxxxxxxxxx wrote: > It depends a bit about whether you care what happens to characters > like "dotless i" (which probably aren't going to appear in your input > unless you are Turkish). Or Irish :-) ///Peter . . . Read full entry »


Re: Case-insensitive filter match for template wanted

Posted 3/28/2017 9:57:07 AM

> So I tried: > <x:template match="section[ parameter/@name='Rule' ][ upper-case( parameter/value/@entry ) = 'INPUT' ]" mode="processes" > > > But that gives me (using Saxon HE9.7.0.5): > bA sequence of more than one item is not allowed as the first argumen . . . Read full entry »


Re: Case-insensitive filter match for template wanted

Posted 3/28/2017 9:56:47 AM

In your first expression you were comparing two sequences: foo/bar/@att is a sequence of attributes and b= bINPUTbb is effectively b = (bINPUTb)b, that is a sequence of one item. Sequences are comparable such that if any item in the left-hand sequence matches any item in the right-hand sequ . . . Read full entry »


Re: Case-insensitive filter match for template wanted

Posted 3/28/2017 9:49:31 AM

That's brilliant. Works fine. Thanks Martin. I was tempted to say "that was easy" but it's only easy if you know the answer... Regards, Richard. Richard Kerry BNCS Engineer, SI SOL Telco & Media Vertical Practice T: +44 (0)20 3618 2669 M: +44 (0)7812 325518 Lync: +44 (0) 20 3618 . . . Read full entry »


Re: Case-insensitive filter match for template wanted

Posted 3/28/2017 9:39:26 AM

On 28.03.2017 11:35, Kerry, Richard richard.kerry@xxxxxxxx wrote: So I tried: <x:template match="section[ parameter/@name='Rule' ][ upper-case( parameter/value/@entry ) = 'INPUT' ]" mode="processes" > But that gives me (using Saxon HE9.7.0.5): bA sequence of more tha . . . Read full entry »


Case-insensitive filter match for template wanted

Posted 3/28/2017 9:35:20 AM

I have a template for which I need it to do a case-insensitive match on a value in an attribute. When my template's filter was case-sensitive it worked happily. Ie. <x:template match="section[ parameter/@name='Rule' ][ parameter/value/@entry = 'INPUT' ]" mode="processes" > . . . Read full entry »


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 »



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