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: Same Indent in converted output xml

Posted 4/21/2021 7:05:09 AM

Saxon-HE does not have an option to produce this format. With Saxon-PE and higher you can set saxon:indent-spaces="0". However, you can of course preserve all the whitespace in the input document and copy it manually to the output: in fact, that's the default action if you don't use xsl: . . . Read full entry »


Re: Same Indent in converted output xml

Posted 4/21/2021 5:10:41 AM

I am using saxon9he On Thu, Apr 15, 2021 at 10:01 AM Byomokesh Sahoo <sahoo.byomokesh@xxxxxxxxx> wrote: > Hi, > > Any way to same indentation will appear while converting One XML to > Another XML format. I am using indent="yes" but the same indent does not > appear . . . Read full entry »


Re: How to correctly position breaks in mixed content?

Posted 4/17/2021 6:05:57 AM

Thank you both cheers T From: Geert Bormans geert@xxxxxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, 15 April 2021 00:48 To: xsl-list <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Re: How to correctly position breaks in mixed content? then a typo occur . . . Read full entry »


Re: problem with key

Posted 4/15/2021 3:09:48 PM

Thank you all. I am happy with my working batch file method. Jim Albright Wycliffe Bible Translators 704-562-1529 On Thu, Apr 15, 2021 at 2:47 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Am 15.04.2021 um 00:28 schrieb Albright, Jim jim_alb . . . Read full entry »


Re: problem with key

Posted 4/15/2021 6:47:32 AM

Am 15.04.2021 um 00:28 schrieb Albright, Jim jim_albright@xxxxxxxxxxxx: In thinking about this, it looks like this can be written as a recursive routine.B Is this correct? Right now I run a batch file and increment the level for each step. It might be easier for us to help of if you start with a n . . . Read full entry »


Re: Same Indent in converted output xml

Posted 4/15/2021 6:39:45 AM

Am 15.04.2021 um 08:38 schrieb Martin Honnen martin.honnen@xxxxxx: Am 15.04.2021 um 06:32 schrieb Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx: EXPECTED OUTPUT: <journal-meta> <journal-id journal-id-type="publisher-id">ier</journal-id> <journal-id journal-id-type=" . . . Read full entry »


Re: Same Indent in converted output xml

Posted 4/15/2021 6:38:10 AM

Am 15.04.2021 um 06:32 schrieb Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx: Hi, Any way to same indentationB will appear while converting One XML to Another XML format. I am using indent="yes" but the same indent does not appear in converted output xml. I can not use xsl:copy because I hav . . . Read full entry »


Same Indent in converted output xml

Posted 4/15/2021 4:32:02 AM

Hi, Any way to same indentation will appear while converting One XML to Another XML format. I am using indent="yes" but the same indent does not appear in converted output xml. I can not use xsl:copy because I have to apply one format to another format with different scenarios. *XSL:* . . . Read full entry »


Re: problem with key

Posted 4/14/2021 10:28:27 PM

In thinking about this, it looks like this can be written as a recursive routine. Is this correct? Right now I run a batch file and increment the level for each step. Jim Albright Wycliffe Bible Translators 704-562-1529 On Wed, Apr 14, 2021 at 4:48 PM Albright, Jim jim_albright@xxxxxxxxxxxx < . . . Read full entry »


Re: problem with key

Posted 4/14/2021 8:48:26 PM

Thank you David and Dimitre, You are both right. Thank you. I would have responded sooner but it took me some time to find a bug that caused the file to grow. I now pass a /level/ parameter to facilitate deleting duplicates. Here is working XSLT <xsl:param name="level"></xsl . . . Read full entry »


Re: How to correctly position breaks in mixed content?

Posted 4/14/2021 12:47:09 PM

then a typo occurred to me... <var type="s" id="ID01"/>n<superscript type="s" id="ID02"/ >th<superscript type="e" id="ID02" ><var type=" r " id="ID01"/> should read <var type="s" id . . . Read full entry »


Re: How to correctly position breaks in mixed content?

Posted 4/14/2021 12:34:00 PM

Hi, Yep, this is essentially an overlap problem. What a wonderful thing, that we have workable solutions. :-> Cheers, Wendell On Wed, Apr 14, 2021 at 5:55 AM Geert Bormans geert@xxxxxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Trevor, > > One option . . . Read full entry »


Re: How to correctly position breaks in mixed content?

Posted 4/14/2021 9:55:05 AM

Hi Trevor, One option would be to replace the mixed content elements by empty elements <var>n<superscript>th</superscript></var> to become <var type="s" id="ID01"/>n<superscript type="s" id="ID02"/ >th<superscript type= . . . Read full entry »


How to correctly position breaks in mixed content?

Posted 4/14/2021 9:40:10 AM

NB currently XSL 2.0 I'm struggling with what I thought would be a simple enough problem: given content like this "<code>Mixed content, mainly text but with some text such as <var>variable names</var> wrapped in elements, sometimes nested like a reference to the & . . . Read full entry »


Re: problem with key

Posted 4/12/2021 5:20:20 AM

On Mon, 12 Apr 2021 06:08:46 +0200, Albright, Jim jim_albright@xxxxxxxxxxxx wrote: > > [1 <text/plain; UTF-8 (7bit)>] > [2 <text/html; UTF-8 (quoted-printable)>] > I am trying to upconvert from a flat-file. After I get it into XML form I try to add hierarchy using "k . . . Read full entry »


Re: problem with key

Posted 4/12/2021 4:25:00 AM

> <SubPossibilities> > <xsl:copy select="key('SemanticDomainByParent', '$parentSD')"/> > </SubPossibilities> I think you want to use *<xsl:copy-of>* here, and the XSLT processor probably should have raised an error. Cheers, . . . Read full entry »


problem with key

Posted 4/12/2021 4:08:27 AM

I am trying to upconvert from a flat-file. After I get it into XML form I try to add hierarchy using "key". ------------- OUTPUT ------------- I get NO results from <SubPossibilities> <xsl:copy select="key('SemanticDomainByParent', '$parentSD')"/> </Su . . . Read full entry »


Re: getting result documents out of a function that ca

Posted 3/31/2021 6:45:57 PM

On Wed, 2021-03-31 at 18:26 +0000, Graydon graydon@xxxxxxxxx wrote: > > How do I get those DEBUG result documents back out of the function? You probably do need to have your function take a map as an argument. A sequence of "documents-so-far" is even less elegant when you start de . . . Read full entry »


getting result documents out of a function that calls

Posted 3/31/2021 6:25:07 PM

In the interest of doing a bunch of small named transformations in a particular order (for refactoring, or to regularize content before processing it generally), I have this function: <xsl:function name="local:processList" as="document-node()"> <xsl:param as=" . . . Read full entry »


[ANN] Reminder: Balisage Paper submissions due 2 April

Posted 3/31/2021 1:52:29 PM

Balisage: The Markup Conference 2021 About: https://www.balisage.net/ Call for Participation: https://www.balisage.net/Call4Participation.html submissions due 2 April 2021 Proceedings of Previous Events: https://www.balisage.net/Proceedings/index.html Help or Information: info@xxxxxxxxxxxx . . . Read full entry »


[ANN] XSLT 3 training - 20th - 22nd April 2021 (new

Posted 3/29/2021 9:12:43 PM

A change of dates to make it easier for people attending JATS-Con: I'll be running XSLT 3 training on the 20th, 21st, 22nd April - the week before ATS-Con this year. It's mid-week to try & minimize impact on people's work. This is really a two and a half day course when delivered online. In p . . . Read full entry »


Re: RDF graph to SVG force-directed layout

Posted 3/29/2021 8:49:16 AM

Hi, thanks for the suggestions. Ibm not after a standalone tool, Ibm integrating graph layout into our UI which is XSLT-based rendering of RDF data, both server- and client-side. "By means of interactive XSLT extensions, it can deliver the rich user experience of a modern web application w . . . Read full entry »


Re: RDF graph to SVG force-directed layout

Posted 3/29/2021 8:47:22 AM

Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > We also used Graphviz for the streamabililty diagrams in early drafts > of XSLT 3.0, see for example > > https://www.w3.org/TR/2010/WD-xslt-21-20100511/#streamability-examples > > The graph was . . . Read full entry »


Re: RDF graph to SVG force-directed layout

Posted 3/29/2021 8:36:12 AM

We also used Graphviz for the streamabililty diagrams in early drafts of XSLT 3.0, see for example https://www.w3.org/TR/2010/WD-xslt-21-20100511/#streamability-examples The graph was transformed to DotML vocabulary from a high-level XML description of the tree structure. Michael Kay Saxonica . . . Read full entry »


Re: RDF graph to SVG force-directed layout

Posted 3/29/2021 12:33:45 AM

I use Graphviz for this stuff: https://graphviz.org/ It's kind of on-topic because it takes an XML graph as input. - Chris . . . Read full entry »


Re: RDF graph to SVG force-directed layout

Posted 3/28/2021 9:40:33 PM

Hi Paul, I wonder if that JSON-LD/d3.js code can be found anywhere? :) Martynas atomgraph.com On Thu, Oct 15, 2020 at 3:16 AM Paul Tyson phtyson@xxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I also thought of d3.js, but donbt know if it fits your overall archit . . . Read full entry »


Re: Find/replace algorithm

Posted 3/28/2021 5:30:38 PM

Here is a multi-replace transformation I wrote as an answer to this SO question in 2012 (no regex, just replace one whole string with another). This is just a recursive algorithm: https://stackoverflow.com/a/12505924/36305 In the example there, it transforms: <t>The quick brown fox</t& . . . Read full entry »


Re: Find/replace algorithm

Posted 3/28/2021 9:26:08 AM

Hi Jim, If you can express the substitutions as proper XSLT regular expressions (i.e., no \b), then you could add as one more possibility the use of tan:batch-replace(), which allows you to stay within XSLT. One passes as parameters a sequence of elements with attributes corresponding to fn:ma . . . Read full entry »


Re: RDF graph to SVG force-directed layout

Posted 3/26/2021 10:22:33 PM

Hi Michael, I wanted to pick up this thread as I started working on this stylesheet again. I've implemented some of the optimizations suggested in this thread. https://github.com/AtomGraph/Web-Client/blob/master/src/main/webapp/static/co m/atomgraph/client/xsl/converters/RDFXML2SVG.xsl I want to . . . Read full entry »


Re: Find/replace algorithm

Posted 3/26/2021 1:40:46 PM

An ancient but very powerful tool called Consistent Changes handles this very easily. Program available for free at https://software.sil.org/cc/ The table would be 'xxxx' > 'yyyyyyy' 'as many items' > 'that you like' 'very efficient' > 'but old program' I use this progra . . . Read full entry »


Re: Find/replace algorithm

Posted 3/25/2021 5:34:51 PM

On Thu, 2021-03-25 at 16:29 +0000, rick@xxxxxxxxxxxxxx wrote: > Thank you Michael. I like the idea of keeping the processing cost > constant > but I was going to use regular expressions in my map, so I may still > have to > loop through the lookup structure. An alternative to consid . . . Read full entry »


Re: Find/replace algorithm

Posted 3/25/2021 4:36:00 PM

Hi Rick, I'm a noob so this may not be the best answer. For free-form regsubs that aren't on word boundaries, maybe you could pass your sequence of <entry> nodes to an XSLT function, then that function applies the first <entry> and calls itself with the remainder? Then you could use th . . . Read full entry »


Re: Find/replace algorithm

Posted 3/25/2021 4:28:33 PM

Thank you Michael. I like the idea of keeping the processing cost constant but I was going to use regular expressions in my map, so I may still have to loop through the lookup structure. From: Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, March . . . Read full entry »


Re: Find/replace algorithm

Posted 3/25/2021 3:03:27 AM

Is it coincidence that your examples are all approximate string matches? If not, an alternate multi-stage approach might be to check all non-words for approximate match to target list, followed by find and replace operation. Open-source libraries are available for approximate string matching. . . . Read full entry »


Re: Find/replace algorithm

Posted 3/25/2021 12:03:31 AM

that 'lookup' document could be transformed into a transform that applies the changes mentioned.. that's how I'd resolve the issue myself... - brian On Wed, Mar 24, 2021 at 1:28 PM rick@xxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hello All, > > > > I h . . . Read full entry »


Re: Find/replace algorithm

Posted 3/24/2021 11:47:49 PM

My instinct would be (a) build a map containing the replacements (b) for each text node, tokenize the content, then scan the tokens looking each one up in the map. The big advantage of this approach is that the cost is constant regardless how many substitutions there are, whereas most other appr . . . Read full entry »


Re: Find/replace algorithm

Posted 3/24/2021 8:56:29 PM

I know this is xsl-list but have you considered $ sed -e 's/\bWid\b/Widget/g' -e 's/\bAssbly\b/Assembly/g' -e 's/\bEng\b/Engine/g' zz1.xml <?xml version="1.0" encoding="UTF-8"?> <products> <product>ACME Widget Assembly</product> <product> . . . Read full entry »


Re: Find/replace algorithm

Posted 3/24/2021 8:42:54 PM

On 24.03.2021 21:38, Martin Honnen martin.honnen@xxxxxx wrote: On 24.03.2021 21:28, rick@xxxxxxxxxxxxxx wrote: Hello All, I have a fairly large XML file similar to this: <?xml version="1.0" encoding="UTF-8"?> <products> <product>ACME Wid Assbly</pro . . . Read full entry »


Re: Find/replace algorithm

Posted 3/24/2021 8:38:16 PM

On 24.03.2021 21:28, rick@xxxxxxxxxxxxxx wrote: Hello All, I have a fairly large XML file similar to this: <?xml version="1.0" encoding="UTF-8"?> <products> <product>ACME Wid Assbly</product> <product>Ford Eng Rebuild Kit</product& . . . Read full entry »


Find/replace algorithm

Posted 3/24/2021 8:28:28 PM

Hello All, I have a fairly large XML file similar to this: <?xml version="1.0" encoding="UTF-8"?> <products> <product>ACME Wid Assbly</product> <product>Ford Eng Rebuild Kit</product> </products> I want to do an i . . . Read full entry »


Re: messing about with XSLT

Posted 3/21/2021 5:42:58 PM

On 21.03.2021 17:34, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx wrote: Is it appropriate to share xsltfiddles on here when asking for advice? The message itself should probably still contains theminimal-but-sufficient snippets to describe the question, but the xsltfiddle could pro . . . Read full entry »


Re: messing about with XSLT

Posted 3/21/2021 5:16:09 PM

>> My trick is to put the XSLT line number in the message, which serves >> the same purpose. > using {saxon:line-bumber()} ? > Just hard coded: <xsl:comment>(L623)</xsl:comment> It doesn't matter if it drifts off a bit, it's only intended to be temporary scaffoldin . . . Read full entry »


Re: messing about with XSLT

Posted 3/21/2021 5:09:16 PM

On Sun, 2021-03-21 at 11:34 +0000, Michael Kay mike@xxxxxxxxxxxx wrote: > > > > I do as well. I've also developed a habit of wrapping such > > diagnostic output in a <testDD/>, where DD = the current date. That > > way I can quickly find both the diagnostic output and . . . Read full entry »


Re: messing about with XSLT

Posted 3/21/2021 4:33:51 PM

Great discussion! Is it appropriate to share xsltfiddles on here when asking for advice? The message itself should probably still contains theminimal-but-sufficient snippets to describe the question, but the xsltfiddle could provide a (still hopefully minimal) complete testcase for anyone to dive . . . Read full entry »


Re: messing about with XSLT

Posted 3/21/2021 11:33:54 AM

> I do as well. I've also developed a habit of wrapping such diagnostic output in a <testDD/>, where DD = the current date. That way I can quickly find both the diagnostic output and the XSLT code that generated it. Children elements label individual parts of the output, e.g., > My tri . . . Read full entry »


Re: messing about with XSLT

Posted 3/21/2021 5:24:24 AM

I do as well. I've also developed a habit of wrapping such diagnostic output in a <testDD/>, where DD = the current date. That way I can quickly find both the diagnostic output and the XSLT code that generated it. Children elements label individual parts of the output, e.g., <test21> . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 9:31:29 PM

I often use xsl:comment or xsl:text to add debugging output in preference to xsl:message - or even literal result elements. It's often more useful to see these messages interspersed with the real stylesheet output. Michael Kay Saxonica > On 20 Mar 2021, at 19:29, Chris Papademetrious christoph . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 8:30:50 PM

I also use https://xsltfiddle.liberty-development.net/ almost every day. It's a great tool to quickly test code. It's also a great way to share code samples and solutions, often used on StackOverflow. Thanks Martin for providing this tool. On Sat, Mar 20, 2021, 08:30 Martin Honnen martin.honnen@ . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 7:57:52 PM

On 20.03.2021 20:29, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx wrote: Ahh, I'll switch to xsltfiddle -- thanks very much for doing this for the community! The only thing I wish it had was a console pane that showed <xsl:message/> output. Yes, I understand that is a missing . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 7:29:07 PM

Hi Martin, Ahh, I'll switch to xsltfiddle -- thanks very much for doing this for the community! The only thing I wish it had was a console pane that showed <xsl:message/> output. This would let me instrument code in real-time as I try things out. . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 6:25:24 PM

Lots of <xsl:output> statements lol Michele ******* Michele Combs Lead Archivist, Special Collections Research Center Syracuse University 315-443-2081 mrrothen@xxxxxxx ________________________________ From: Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx <xsl-list-service@xx . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 12:43:42 PM

I use the xslt3fiddle from Martin Honnen and I find it fabulous. Thanks so much, Martin. https://martin-honnen.github.io/xslt3fiddle/ On Sat, Mar 20, 2021, 13:30 Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Am 20.03.2021 um 13:23 schrieb Chris P . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 12:30:05 PM

Am 20.03.2021 um 13:23 schrieb Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx: Whats your favorite way to mess about with XSLT to try things out? Ive been using site, which shows the output in real-time (almost) as you edit the code: xsltransform.net/ It also lets you save your X . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 12:27:23 PM

Oxygen has an interactive mode where your xml is on the left, your stylesheet is in the center, and the result is on the right. . . . Read full entry »


Re: messing about with XSLT

Posted 3/20/2021 12:26:01 PM

Looks very much like https://xsltfiddle.liberty-development.net/ ? On Sat, Mar 20, 2021 at 1:23 PM Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi folks, > > > > Whatbs your favorite way to mess about wi . . . Read full entry »


messing about with XSLT

Posted 3/20/2021 12:23:14 PM

Hi folks, What's your favorite way to mess about with XSLT to try things out? I've been using site, which shows the output in real-time (almost) as you edit the code: xsltransform.net/ It also lets you "save" your XSLT doodle to a persistent URL that can be shared with others. I also u . . . Read full entry »


Re: what's the best way to validate input parameters t

Posted 3/19/2021 10:37:48 PM

I couldnbt use a qualifier on / itself: /[b&] But I was able to use one on the root element: /*[b&] and that is fine too. p From: Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, March 19, 2021 6:30 PM To: x . . . Read full entry »


Re: what's the best way to validate input parameters t

Posted 3/19/2021 10:29:39 PM

Hey, I really like that! Although I think Ibll use $valid-args, then use a b/not($valid-args)b match. Thank you!! * Chris From: Wendell Piez wapiez@xxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, March 19, 2021 6:08 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Su . . . Read full entry »


Re: what's the best way to validate input parameters t

Posted 3/19/2021 10:08:06 PM

Hey Chris, You could pull the logic into a static variable: <xsl:variable name="doc-fails" as="xs:boolean" select="matches($from.att, '^@\w+=\w+$') and matches($to.att, '^@\w+=\w+$')"/> then <xsl:template match="/[$doc-fails]"> ... this docu . . . Read full entry »


what's the best way to validate input parameters to a

Posted 3/19/2021 9:57:38 PM

Hello! I've got a stylesheet that takes two string parameters: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:param name="from.att" as="xs:string&qu . . . Read full entry »


Re: sorting, xslt 2.0

Posted 3/16/2021 4:30:44 PM

On Tue, 16 Mar 2021 at 16:24, Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > In the rare cases where you can't, call out to a function: compute the sort key in a separate xsl:function, and call the function in xsl:sort/@select. so <xsl:sort select=&q . . . Read full entry »


Re: sorting, xslt 2.0

Posted 3/16/2021 4:28:29 PM

There's another option which I forgot about because I tend to prefer one of the others: compute the sort key in the body of xsl:sort: >> <xsl:for-each select="term"> >> <xsl:sort> >> <xsl:choose> >> <xsl:when test="fr/@sort"&g . . . Read full entry »


Re: sorting, xslt 2.0

Posted 3/16/2021 4:28:01 PM

Used to it David ;-) On Tue, 16 Mar 2021 at 16:15, David Carlisle d.p.carlisle@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > possibly though, use a more conventional spelling of select > > On Tue, 16 Mar 2021 at 16:13, David Carlisle <d.p.carlisle@xxxxxxxxx> . . . Read full entry »


Re: sorting, xslt 2.0

Posted 3/16/2021 4:24:44 PM

As David C and Martin suggest, write the sort key computation as a single XPath expression if you can. In the rare cases where you can't, call out to a function: compute the sort key in a separate xsl:function, and call the function in xsl:sort/@select. Michael Kay Saxonica > On 16 Mar 2021, . . . Read full entry »


Re: sorting, xslt 2.0

Posted 3/16/2021 4:20:02 PM

Thanks David, Martin. <grin/> I'll get used to 2 eventually. regards On Tue, 16 Mar 2021 at 16:15, David Carlisle d.p.carlisle@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > possibly though, use a more conventional spelling of select > > On Tue, 16 Mar 202 . . . Read full entry »


Re: sorting, xslt 2.0

Posted 3/16/2021 4:15:44 PM

possibly though, use a more conventional spelling of select On Tue, 16 Mar 2021 at 16:13, David Carlisle <d.p.carlisle@xxxxxxxxx> wrote: > lose the xsl:variable and use > > <xsl:sort sect="( fr/@sort, lower-case(substring(fr,1,1)))[1]"/> > > On Tue, 16 Mar 202 . . . Read full entry »


Re: sorting, xslt 2.0

Posted 3/16/2021 4:15:03 PM

On 16.03.2021 17:08, Dave Pawson dave.pawson@xxxxxxxxx wrote: xml <term> <fr sort="">sourire</fr> ... </term> context is term I want to sort on fr/@sort or (if empty) <xsl:value-of select="(lower-case(substring(fr,1,1)))"/> error XTSE0010 Wit . . . Read full entry »


Re: sorting, xslt 2.0

Posted 3/16/2021 4:14:22 PM

lose the xsl:variable and use <xsl:sort sect="( fr/@sort, lower-case(substring(fr,1,1)))[1]"/> On Tue, 16 Mar 2021 at 16:08, Dave Pawson dave.pawson@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > xml > > <term> > <fr sort=""> . . . Read full entry »


sorting, xslt 2.0

Posted 3/16/2021 4:08:00 PM

xml <term> <fr sort="">sourire</fr> ... </term> context is term I want to sort on fr/@sort or (if empty) <xsl:value-of select="(lower-case(substring(fr,1,1)))"/> error XTSE0010 Within xsl:for-each, xsl:sort elements must come before other ins . . . Read full entry »


Re: for vs. for-each

Posted 3/15/2021 3:03:10 PM

Finally a good progress has been made on one of the proposals for XPath 4: Retrieving a sequence of items from a given sequence based on a sequence of indexes (https://github.com/qt4cg/qtspecs/issues/50) With this proposal: https://github.com/qt4cg/qtspecs/issues/50#issuecomment-799228627 , Micha . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 9:47:01 PM

On Sun, 2021-03-14 at 20:09 +0000, Wendell Piez wapiez@xxxxxxxxxxxxxxx wrote: > Hi, > > Another way to gloss this is that while "$values[.]" doesn't have the > intended effect, > > <xsl:for-each select="1 to count($values)"> > B B B <xsl:variable . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 8:08:24 PM

Hi, Another way to gloss this is that while "$values[.]" doesn't have the intended effect, <xsl:for-each select="1 to count($values)"> <xsl:variable name="p" select="."/> <xsl:sequence select="$values[$p]"/> </xsl:for- . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 7:48:32 PM

On Sun, Mar 14, 2021 at 11:55 AM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > For 4.0, however, I would like to see better ways of accessing items in a > sequence by position, and there has been much discussion about how best to > achiieve this. . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 7:03:35 PM

> I hope this helps. All of your comments, dear colleagues, helped me remember things and hopefully sharpen my mind. Thanks, - Michael PS: Interestingly, the first time I am happily using fold-left() I stumbled across something quite basic. PPS: Good luck to the discussions about "acce . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 6:57:08 PM

In: <xsl:sequence select="$values[.]"/> ... the context when opening the predicate is $values and not the current item from the for-each. In: <xsl:sequence select="$values[current()]"/> ... the context when opening the predicate begins at $values but curr . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 6:57:07 PM

In: <xsl:sequence select="$values[.]"/> ... the context when opening the predicate is $values and not the current item from the for-each. In: <xsl:sequence select="$values[current()]"/> ... the context when opening the predicate begins at $values but curr . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 6:55:44 PM

$values[.] obviously doesn't work because the value of the context item within square brackets is different from the value outside. The fact that the value of "." is context-dependent often causes difficulties like this, but it's fundamental to the design of XPath.. The real culprit her . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 6:54:14 PM

The dot in your second expression picks up the context from $values. You should use current(): <xsl:for-each select="1 to count($values)"> <xsl:sequence select="$values[current()]"/> </xsl:for-each> jk On 2021-03-14 14:04, Michael MC<ller-Hillebrand mm . . . Read full entry »


Re: for vs. for-each

Posted 3/14/2021 6:12:30 PM

On 14.03.2021 19:04, Michael MC<ller-Hillebrand mmh@xxxxxxxxx wrote: Given a variable with a sequence of values <xsl:variable name="values" select="(1,2,3,4,5)" as="xs:double+"/> these are three methods to report its content: <xsl:sequence select=" . . . Read full entry »


for vs. for-each

Posted 3/14/2021 6:04:21 PM

Folks, Given a variable with a sequence of values <xsl:variable name="values" select="(1,2,3,4,5)" as="xs:double+"/> these are three methods to report its content: <xsl:sequence select="for $i in 1 to count($values) return $values[$i]"/> < . . . Read full entry »


Re: position() > 1 not working

Posted 3/5/2021 7:52:04 PM

:face-palm:: That's a lot easier lol It's looking fine now, thanks :) Michele -----Original Message----- From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, March 5, 2021 2:38 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: position() > . . . Read full entry »


Re: position() > 1 not working

Posted 3/5/2021 7:40:58 PM

Needs to be: <xsl:if test="position() gt 1" /> with gt instead of > as the operator. On Fri, Mar 5, 2021, 20:37 Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On 05.03.2021 20:22, Michele R Combs mrrothen@xxxxxxx wrote: > &g . . . Read full entry »


Re: position() > 1 not working

Posted 3/5/2021 7:37:40 PM

On 05.03.2021 20:22, Michele R Combs mrrothen@xxxxxxx wrote: Ah.B Ok, so if I understand correctly, I need to change the variable assignment to grab the position of the <DATA> element within the parent <ROW>, rather than within the for-each?B How would I do that? I think what David . . . Read full entry »


Re: position() > 1 not working

Posted 3/5/2021 7:22:27 PM

Hi David b Ah. Ok, so if I understand correctly, I need to change the variable assignment to grab the position of the <DATA> element within the parent <ROW>, rather than within the for-each? How would I do that? But then also, why didnbt the second option work, where I for-each al . . . Read full entry »


Re: position() > 1 not working

Posted 3/5/2021 7:09:04 PM

there are 4 DATA children so <xsl:for-each select="fmp:COL[3]/fmp:DATA[position() > 1]"> selects the 2nd, 3rd and 4th the scope of that position() is just that step of the xpath, within the body of the for-each, position() counts the selected items so as there are three items . . . Read full entry »


position() > 1 not working

Posted 3/5/2021 6:54:53 PM

I want to select all the child <DATA> elements of a <COL> except for the first one. I've tried several different things but I must be missing something stupidly obvious since it isn't working. Input data: <ROW> <COL><DATA></DATA></COL> <COL>& . . . Read full entry »


[ANN] Oxygen XML Editor version 23.1 release

Posted 3/5/2021 11:41:44 AM

Hi everyone, We are excited to announce that Oxygen XML Author/Editor version 23.1 is now available! Listing below some new features which may be useful for the XSLT community: XSLT ================================== * A new option called Enable Profiling was added in the advanced Saxon settin . . . Read full entry »


[ANN] Balisage 2021 - All Virtual, All Live

Posted 3/4/2021 11:33:09 PM

BALISAGE 2021 will be ALL VIRTUAL All sessions, conversations, social events, and other conference-related activities will be online. BALISAGE 2021 will be ALL LIVE All paper presentations, discussions, question and answer sessions, and social events will be live; there will be no recorded or can . . . Read full entry »


Re: Re: Add element at the end of a variable group of

Posted 3/3/2021 10:55:13 PM

NB also Liam's variable could be recast as a function, to be namespace-safe: <xsl:function name="z:is-early" as="xs:boolean"> <xsl:param name="who" as="element()"/> <xsl:sequence select="exists($who/(self::bar|self::foo|self::mercury| . . . Read full entry »


Re: Re: Add element at the end of a variable group of

Posted 3/3/2021 7:59:25 PM

On Wed, 2021-03-03 at 16:22 +0000, Charles O'Connor coconnor@xxxxxxxxxxxx wrote: > > Liam, I will continue to annoy my IT/Engineering group to upgrade to > a 3.0 processor. I suspect I'll get the same response. Haha! note that i included an XSLT 2 approach that may be slightly easier to . . . Read full entry »


Re: Add element at the end of a variable group of ele

Posted 3/3/2021 4:21:26 PM

It should be added no matter what, so I believe the solutions presented here will work for my use case. The one wrinkle is that a <moon> element may already exist and should be replaced, but I believe I can handle that with my current (such as they are) skills. Thank you everyone for your an . . . Read full entry »


Re: Add element at the end of a variable group of ele

Posted 3/3/2021 2:27:28 PM

Are there any conditions for adding <moon> -- like, add <moon> only if <earth>? Or do you want to add it 100% of the time, no matter what? Michele -----Original Message----- From: Charles O'Connor coconnor@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesd . . . Read full entry »


Re: Add element at the end of a variable group of ele

Posted 3/3/2021 5:25:33 AM

On Wed, 2021-03-03 at 00:01 +0000, Charles O'Connor coconnor@xxxxxxxxxxxx wrote: > Hi all, > > Using XSLT 2.0, I'd like to add an element at the end of a group of > elements that may vary whether they exist. First, some XSLT 3 approaches... The following works fine: <?xml versio . . . Read full entry »


Re: Re: Add element at the end of a variable group of

Posted 3/3/2021 2:44:29 AM

Chris, how would you like it if someone dropped an unexpected change in a spec on you at the last minute?! :{)} (you know I'm kidding, right?) Thankfully, your requirement is readily met by turning my solution around only a slight bit. Instead of looking at it as the new data preceding identifi . . . Read full entry »


Re: Add element at the end of a variable group of ele

Posted 3/3/2021 1:04:10 AM

Hi, Like Ken's solution, this relies on a 'pull'. It gives different outputs on a different set of unspecified inputs. (Scatter multiple earths into different places in your solar system and you will see.) <xsl:template match="root"> <xsl:variable name="earthandbeyon . . . Read full entry »


Re: Add element at the end of a variable group of ele

Posted 3/3/2021 12:12:12 AM

I would approach this as a grouping issue and not a matching issue. I hope this helps. . . . . . Ken ~/t/ftemp $ cat charles.xml <?xml version="1.0" encoding="UTF-8"?> <root> <foo/> <bar/> <mercury/> <venus/> <earth earth- . . . Read full entry »


Re: Add element at the end of a variable group of ele

Posted 3/3/2021 12:09:50 AM

Hi Charles, I'm interested to see the solutions to this problem. In particular, I'm hoping there is a solution that can handle *no* elements before the insertion point: <root> <!-- moon should go here --> <mars/> </root> as well as no elements after the insertion point: . . . Read full entry »


Add element at the end of a variable group of elements

Posted 3/3/2021 12:00:51 AM

Hi all, Using XSLT 2.0, I'd like to add an element at the end of a group of elements that may vary whether they exist. This seems like a classic case that people have to deal with all the time, but I've searched without luck, and I'm on maybe lesson 4 of ??? of the online XSLT course I've been ta . . . Read full entry »


XSL-List Guidelines

Posted 3/1/2021 3:48: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: Apply Comment Position

Posted 2/27/2021 7:09:56 PM

Hi, Since I dig grouping Martinbs solution is clever and thanks for reminding me of tail()! Depending on the underlying logic, you might rather loop over the ext-link: <xsl:template match="article-meta"> <xsl:copy> <xsl:for-each select="ext-link"> . . . Read full entry »


Re: Apply Comment Position

Posted 2/26/2021 7:24:47 AM

On 26.02.2021 07:22, Martin Honnen martin.honnen@xxxxxx wrote: On 26.02.2021 06:13, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote: Hi, Please look at the below xml, xslt and required output. I tried positionB function to get the comment inside <mail> in respective <ext-link>. I am . . . Read full entry »


Re: Apply Comment Position

Posted 2/26/2021 6:22:35 AM

On 26.02.2021 06:13, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote: > Hi, > > Please look at the below xml, xslt and required output. I tried > positionB function to get the comment inside <mail> in respective > <ext-link>. I am facing a problem whereB ( <!--xmltex . . . Read full entry »


Re: Outputting White Space Only Nodes from Variables

Posted 2/23/2021 7:53:41 PM

Hi again, White space ... <xsl:variable name="generatedTextAfter" as="xs:string" xml:space="preserve"> </xsl:variable> Not exactly sure what advantage it gives here, but this is handy to be able to do. (I wouldn't use it for a space, but I might use it f . . . Read full entry »


Re: How can the mere switch from DTD to XSD in the sou

Posted 2/23/2021 3:21:54 PM

Thank you, Martin, Michael, and Liam, for your replies! I understand now. Best regards, Wolfhart On 22-02-21 19:33, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: On Mon, 2021-02-22 at 20:55 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: So this is a Saxon-specific issue? No. it's a . . . Read full entry »


Re: How can the mere switch from DTD to XSD in the sou

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

On Mon, 2021-02-22 at 20:55 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > > So this is a Saxon-specific issue? No. it's a difference between XSLT 1 and 2, and DTD-less vs. with a DTD. The _only_ whitespace that can officially be dropped by an XML parser is when a DTD is . . . Read full entry »


Re: How can the mere switch from DTD to XSD in the sou

Posted 2/22/2021 10:31:03 PM

When a document is validated against a DTD or schema, the fact that an element is described as having element-only content acts as a signal to treat the whitespace within that element as ignorable. If everything is working well, the parser notifies the XSLT processor that the whitespace can be igno . . . Read full entry »


Re: How can the mere switch from DTD to XSD in the sou

Posted 2/22/2021 8:54:22 PM

Dear Martin, Thank you for the prompt reply! To answer your questions: 1) When doing these tests, I ran Saxon with the following command: java -cp "/home/wolfhart/Programs/Saxon/saxon9he.jar" net.sf.saxon.Transform -s:Test.xml -xsl:Test.xsl -o:Test.txt 2) Yes, the content of the < . . . Read full entry »


Re: How can the mere switch from DTD to XSD in the sou

Posted 2/22/2021 7:48:39 PM

On 22.02.2021 20:41, Martin Honnen martin.honnen@xxxxxx wrote: How exactly do you run Saxon? I think it might depend on the behaviour of the underlying parser and I am not sure Saxon HE, as it itself does not support schema-aware XSLT, uses any xsi:schemaLocation hint or passes it to the XML parse . . . Read full entry »


Re: How can the mere switch from DTD to XSD in the sou

Posted 2/22/2021 7:41:18 PM

On 22.02.2021 20:24, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: After switching from DTD to XSD in my project, I encountered -- apart from the odd behavior of Chrome described in my post from two days ago -- another puzzling problem, namely that, after this switch, one of the styleshe . . . Read full entry »


How can the mere switch from DTD to XSD in the source

Posted 2/22/2021 7:23:46 PM

Dear list, After switching from DTD to XSD in my project, I encountered -- apart from the odd behavior of Chrome described in my post from two days ago -- another puzzling problem, namely that, after this switch, one of the stylesheets of my project produced unexpected output, specifically in . . . Read full entry »


Re: How to use parse-xml-fragment with a string that

Posted 2/22/2021 5:38:51 PM

> Is there an elegant, simple solution to this problem, without manually changing <![endif] to &lt;![endif]? > The elegant solution is to use a parser designed for the grammar of the language you are trying to parse, not some other grammar of which that is a bastardised version. But . . . Read full entry »


How to use parse-xml-fragment with a string that conta

Posted 2/22/2021 5:30:46 PM

Hi Folks, I want to parse, as XML, the contents of this comment: <!--abc<style>hello, world</style>def--> The contents of that comment is not well-formed XML, so I extracted the contents and placed a <wrapper> element around it: <xsl:variable name="wrapped-commen . . . Read full entry »


Re: Outputting White Space Only Nodes from Variables

Posted 2/22/2021 1:19:54 PM

Thank you both, Liam and Wendell. After Liam's reference to the relevant part of the spec I checked it and realized the <xsl:text> approach would work and had my obligatory "D'oh!" moment. I think I'll use that as I find it more legible. Don On Monday, February 22, 2021, 06:40: . . . Read full entry »


Re: Outputting White Space Only Nodes from Variables

Posted 2/22/2021 1:19:46 PM

I also found using @select instead of whitespace only content of <xsl:variable> did the job. (Thus I suspect the problem is on reading in and parsing the XSLT document the XML parser is dropping that whitespace as insignificant.) ________________________________ I tried, <xsl:variable na . . . Read full entry »


Re: Outputting White Space Only Nodes from Variables

Posted 2/22/2021 12:40:29 PM

Hi, You could also have: <xsl:variable name="generatedTextAfter" as="xs:string?"><xsl:text> </xsl:text></xsl:variable> The deal is that directly inside that xsl:variable, a whitespace-only text node in the XSLT is considered to be 'cosmetic' and dropp . . . Read full entry »


Re: Outputting White Space Only Nodes from Variables

Posted 2/22/2021 5:07:21 AM

On Mon, 2021-02-22 at 02:14 +0000, Don Smith dsmith_lockesmith@xxxxxxxxx wrote: > > 1. Use different instructions for the output of the variable: value- > of, copy-of, and sequence2. Created the variables as both strings and > elements and even RTFs3. Tried a character map4. Tried an a . . . Read full entry »


Outputting White Space Only Nodes from Variables

Posted 2/22/2021 2:13:41 AM

I'm receiving user input through an application and part of what the user can input are generated text strings that can be placed above, before, after, and below element content. So here's a simple example of the input XML: <test>B B <p class="title">Book Title</p>B B . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 12:40:36 PM

Thank you very much, all of you, for your replies! You were right, the source of the problem is not the parsing of the XSD. I removed "xsi:noNamespaceSchemaLocation=...", and it didn't resolve the problem. Then I also removed "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 11:37:29 AM

Am 21.02.2021 um 04:57 schrieb Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx: Thank you, Kurt, Liam, and Michele, for the prompt replies! Kurt's and Michele's suggestions did not resolve my problem. Installing the "XML Tree" extension for Chrome did not accelerate the processing of t . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 11:10:42 AM

On 21/02/2021 02:00, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: I have made a couple of changes to my project in the last couple of days. The project mainly consists in many small XML files that I write with an XML editor but read with a web browser (Chrome). That is, I have an XSL . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 9:38:43 AM

I would be rather surprised if XSD validation is the actual cause of the problem. A simple way to verify this hypothesis would be to see what happens when the XML is invalid against the schema. There's something else going on here -- but I'm afraid I don't know what it is. Michael Kay Saxonica &g . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 6:26:40 AM

I'd second Liam's recommendation about watching the network tab.in the Chrome console and see if the XSD is actually even being read. I'd be surprised if it was, as even Google's own documentation states that when validation is required it should be done prior to the XML file being downloaded, as t . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 4:32:18 AM

On Sun, 2021-02-21 at 03:58 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > > To Liam's suggestions: > > > Are you producing XHTML with a DOCTYPE? > > No, just HTML (see below). > > rate, are the preambles of the XML files and of the stylesheet: > . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 3:57:43 AM

Thank you, Kurt, Liam, and Michele, for the prompt replies! Kurt's and Michele's suggestions did not resolve my problem. Installing the "XML Tree" extension for Chrome did not accelerate the processing of the XSL stylesheet, and Firefox still refuses to execute the stylesheet after ch . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 3:25:33 AM

You can view in Firefox if you disable the privacy.file_unique_origin security setting -- see https://support.mozilla.org/en-US/questions/1264318 Michele Sent from Nine<http://www.9folders.com/> ________________________________ From: "Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx& . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 2:48:06 AM

On Sun, 2021-02-21 at 02:00 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > I would have thought that > switching from a DTD to an XSD would not have any effect on the > performance of the XSL processor because the processor would ignore > the > associated DTD o . . . Read full entry »


Re: Why does Chrome's XSL processor validate my XML fi

Posted 2/21/2021 2:33:39 AM

I use the XML Tree extension for Chrome ( https://chrome.google.com/webstore/detail/xml-tree/gbammbheopgpmaagmckhpjbfgdfkpadb?hl=en). Not only does it color code the output and allow for collapsing sections, but I suspect it disables the schema parssing.that the Chrome native processor uses. *Kurt . . . Read full entry »


Why does Chrome's XSL processor validate my XML files

Posted 2/21/2021 1:59:49 AM

Dear list, I have run into a performance issue to which I cannot find the solution. I have made a couple of changes to my project in the last couple of days. The project mainly consists in many small XML files that I write with an XML editor but read with a web browser (Chrome). That is, I have . . . Read full entry »


Re: transform() and xsl:result-document

Posted 2/20/2021 8:02:54 PM

On Fri, Feb 19, 2021 at 11:02:36PM -0000, Martin Honnen martin.honnen@xxxxxx scripsit: > If I set the key > > 'base-output-uri' : 'urn:from-string', > > in the map passed to fn:transform Saxon gives the primary output that > URI but the secondary URIs or map keys in the resu . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/20/2021 1:17:06 AM

Here is one working solution, using a key :half the way": <xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:key name="kPrecedingFoo" mat . . . Read full entry »


Re: transform() and xsl:result-document

Posted 2/20/2021 12:09:34 AM

On Fri, 2021-02-19 at 22:20 +0000, Graydon graydon@xxxxxxxxx wrote: > > Is there some way to get back a map entry with a key that doesn't > have a prepended scheme?B "file1" in this case? No, or there shouldn't be, because that's how "output" is distinguished from an . . . Read full entry »


Re: transform() and xsl:result-document

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

On 19.02.2021 23:20, Graydon graydon@xxxxxxxxx wrote: I'm using Saxon 10.3 to process an XSLT 3 stylesheet. Using xsl:result-document inside the stylesheet called by the transform() function, I get back a map entry in the map returned by transform() where the key derives from the href attribute of . . . Read full entry »


transform() and xsl:result-document

Posted 2/19/2021 10:19:45 PM

I'm using Saxon 10.3 to process an XSLT 3 stylesheet. Using xsl:result-document inside the stylesheet called by the transform() function, I get back a map entry in the map returned by transform() where the key derives from the href attribute of xsl:result-document. So if I do something like: < . . . Read full entry »


XPath to retrieve the content of each fake comment in

Posted 2/19/2021 8:16:48 PM

Hi Folks, Consider this element: <style> blah, blah <![CDATA[ <!-- a,b,c --> ]]> foo, foo <![CDATA[ <!-- d,e,f --> ]]> </style> The content of the <style> element is this string: blah, bla . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/19/2021 5:00:44 PM

Hi again, Then too: <xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="node() | @*"/> </xsl:copy> </xsl:template> <xsl:template match="foo[preceding-sibling::*[not(self::foo)]]"/> (I know it probab . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/19/2021 4:43:06 PM

David, sibling recursion over the foo elements... <xsl:template match="b"> <zzz> <xsl:apply-templates select="*[1]/self::foo"/> </zzz> </xsl:template> <xsl:template match="foo"> <x . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/19/2021 1:02:35 PM

Hello, Just eyeballing this, Dmitry, I'm not convinced it would work if Wolfhart was sitting at a <foo> at the time he made his request, in which case the <foo> he was at would incorrectly be included. Granted the original requirement is underspecified in this regard, so perhaps my . . . Read full entry »


[ANN] XSLT 3 training - dates for February, March, Apr

Posted 2/19/2021 7:29:50 AM

I'll be running XSLT 3 training on * 23rd, 24th, 25th of February, B (likely in CET times, e.g. 09:30-17:00) * 23rd, 24th, 25t of March, * 27th, 28th, 28th of April (i think this is the week after JATSCon) The courses are live video (not pre-recorded); classes are limited to eight people at a ti . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/19/2021 3:22:34 AM

On Thu, Feb 18, 2021 at 6:24 PM G. Ken Holman g.ken.holman@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Just eyeballing this, Dmitry, I'm not convinced > it would work if Wolfhart was sitting at a <foo> > at the time he made his request, in which case > the . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/19/2021 2:24:35 AM

Just eyeballing this, Dmitry, I'm not convinced it would work if Wolfhart was sitting at a <foo> at the time he made his request, in which case the <foo> he was at would incorrectly be included. Granted the original requirement is underspecified in this regard, so perhaps my observation . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/19/2021 1:29:09 AM

Here is a short and efficient XSLT 1.0 solution using keys: <xsl:stylesheet version="1.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:key name="kPrecedingFoo" match= . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 10:26:16 PM

Indeed, I was going to add that the "real" way to do this under 1.0 was XSLT sibling recursion, but I forgot. Thanks David! On Thu, Feb 18, 2021 at 4:35 PM David Carlisle d.p.carlisle@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > I am facing an XPath . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 9:35:12 PM

> I am facing an XPath problem The answers so far have answered the question asked, but I wonder if that is the wrong question. To select the consecutive sequence of foo elements in xpath 1 requires some kind of double pass over the list and quadratic behaviour in the number of elements in the . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 9:12:19 PM

On Thu, 2021-02-18 at 18:44 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > Hello again, > > Thank you, Wendell! > > The proposed solutions leave me with two questions: > > > 1) Is there a way to do what I originally had in mind, i.e., go > forward t . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 9:05:22 PM

Hi again, Is it worth adding that in 2.0 this could be (following-sibling::boo) except ((following-sibling::* except following-sibling::boo)/following-sibling::boo)? Untested ... Cheers, Wendell On Thu, Feb 18, 2021 at 4:00 PM Wendell Piez <wapiez@xxxxxxxxxxxxxxx> wrote: > Wolfhart, . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 9:01:02 PM

Wolfhart, What Ken says is correct, name() is not namespace-safe. Here we hit a wall in XPath 1.0. In 2.0 there is a function node-name() to help with that. As for the notion of 'preceding-sibling::current()' that fails because current() is not an XPath 1.0 node test, so it does not parse as a pa . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 7:37:12 PM

self::a:b is namespace-sensitive. name(.)='a:b' is not namespace-sensitive. Namespace sensitivity always is preferred. I hope this helps. . . . . . . . Ken At 2021-02-18 18:43 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: Hello again, Thank you, Wendell! The proposed solution . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 6:43:05 PM

Hello again, Thank you, Wendell! The proposed solutions leave me with two questions: 1) Is there a way to do what I originally had in mind, i.e., go forward to the first non-"foo" sibling and from there go backwards, taking all the "foo" siblings up to the current node? Ask . . . Read full entry »


[Markup] [ANN] Balisage 2021 - Call for Participation

Posted 2/18/2021 5:35:46 PM

================================================= Call for Participation "Balisage: The Markup Conference 2021b Balisage: where serious markup practitioners and theoreticians meet every summer. Critical Dates - 02 April 2021 b Paper submissions due - 2b6 August 2021 b BALISAGE: THE MARK . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 4:06:01 PM

Hi, With a sequence of variable declarations: <xsl:variable name="name" select="name()"/> <xsl:variable name="followers" select="following-sibling::*[name()=$name]"/> <xsl:variable name="interlopers" select="following-sibling:: . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 4:11:33 AM

On Thu, 2021-02-18 at 04:00 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > Dear Liam, > > Thanks for your proposal! As far as I can see, your solution does not > work in all cases. If I understand correctly, the problem is that > your > formula works only when . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 3:59:19 AM

Dear Liam, Thanks for your proposal! As far as I can see, your solution does not work in all cases. If I understand correctly, the problem is that your formula works only when the current node is "foo", but not when it is non-"foo". By the way, there is a little syntax erro . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 3:21:10 AM

Dear Ken, Thank you for the prompt reply! I cannot use the "intersect" operator because it is XPath 2.0, but your suggestion made me look into how I can get the intersection of two node sets with XPath 1.0, and so I found out that there is the so-called Kaysian method for that, namely . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 3:18:14 AM

On Thu, 2021-02-18 at 01:33 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: > Dear list, > > I want to select all following sibling elements of name "foo" up to > the first non-"foo" element. So, given that this is XSLT 1, following-sibling::*[( . . . Read full entry »


Re: with XPath 1.0, select all following sibling eleme

Posted 2/18/2021 2:12:01 AM

Would something like the following work for you? following-sibling::foo intersect following-sibling::*[not(self::foo)][1]/preceding-sibling::foo . . . . . . . Ken At 2021-02-18 01:32 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: Content-Transfer-Encoding: 8bit Dear list, . . . Read full entry »


with XPath 1.0, select all following sibling elements

Posted 2/18/2021 1:32:09 AM

Dear list, I am facing an XPath problem for which I cannot find the solution. I want to select all following sibling elements of name "foo" up to the first non-"foo" element. So, in the following case, the first two <foo> elements should be selected: <foo/> < . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files forwell-

Posted 2/17/2021 10:27:16 PM

On Wed, 2021-02-17 at 16:52 +0000, Roger L Costello costello@xxxxxxxxx wrote: > I ran xmlwf on a folder that contains 10,000 XHTML files. Wow! It > checked all of them in a couple seconds. However, the error messages > are poor. For example, here is one of the error messages: > > B . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files forwell-

Posted 2/17/2021 5:03:13 PM

On 17.02.2021 17:52, Roger L Costello costello@xxxxxxxxx wrote: I ran xmlwf on a folder that contains 10,000 XHTML files. Wow! It checked all of them in a couple seconds. However, the error messages are poor. For example, here is one of the error messages: xhtml\htmloutput10.xhtml:206:2: mismat . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files forwell-

Posted 2/17/2021 4:51:52 PM

Hi Folks, Thank you for your recommendations on how to check a bunch of XHTML files for well-formedness. Here's what I found: 1. I was unable to obtain an EXE for the xml parser that Richard Tobin created, RXP. This page http://www.cogsci.ed.ac.uk/~richard/rxp.html has a link to an EXE of RXP: . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/17/2021 1:51:33 AM

On Tue, 2021-02-16 at 21:42 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > On 16.02.2021 22:10, Liam R. E. Quin liam@xxxxxxxxxxxxxxxxx wrote: > > On Tue, 2021-02-16 at 21:04 +0000, Martin Honnen > > martin.honnen@xxxxxx > > wrote: > > > > > > In theory I . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 10:25:21 PM

On 16/02/2021 20:53, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I have a folder containing a large number of XHTML files. I want to know: for each file, is it well-formed? What is the easiest and fastest way to see if each file is well-formed? Install rxp and run $ for f in *.xhtml; d . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 9:42:08 PM

On 16.02.2021 22:10, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: On Tue, 2021-02-16 at 21:04 +0000, Martin Honnen martin.honnen@xxxxxx wrote: In theory I think that should check with doc-available if the file is well-formed or not. Haven't tested however. It catches some problems, but will try to . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 9:38:30 PM

Roger b Do you need to know from XSLT, or is it sufficient to just know? I use xmb lwfb on the commandline almost daily. It is nearly instantaneous. Here it processes all 830 TEI specification files (relatively small files, that is) in < 0.04 s of real time:[1] $ ls -1 *.xml | wc 830 . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 9:22:06 PM

On 16.02.2021 22:10, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: On Tue, 2021-02-16 at 21:04 +0000, Martin Honnen martin.honnen@xxxxxx wrote: In theory I think that should check with doc-available if the file is well-formed or not. Haven't tested however. It catches some problems, but will try to . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 9:18:08 PM

In addition to all the other suggestions, something I've done is I've used unparsed-text-available() to know whether or not the file is there, followed by doc-available() to know whether or not the file is well-formed. Just using doc-available() will fail if the file is not there or if it is n . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 9:10:15 PM

On Tue, 2021-02-16 at 21:04 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > > In theory I think that should check with doc-available if the file is > well-formed or not. Haven't tested however. It catches some problems, but will try to load the DTD. You can use try/catch in XSLT to ge . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 9:10:05 PM

On 16.02.2021 22:03, Martin Honnen martin.honnen@xxxxxx wrote: Start with a named template and pull in the files or URIs with the Saxon specific argument to the "collection" or "uri-collection" function: <xsl:template name="xsl:initial-template"> B <xsl:val . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 9:03:38 PM

On 16.02.2021 21:53, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I have a folder containing a large number of XHTML files. I want to know: for each file, is it well-formed? What is the easiest and fastest way to see if each file is well-formed? My thinking has been to create a super-si . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 9:03:03 PM

Hi Roger, If you can do this in linux, you can run xmllint --noout xhtml/*.xhtml if the directory is flat, or find xhtml/ -name '*.xhtml' -print0 | xargs -0 xmllint --noout if the directory has hierarchy. (Using "find -print0" plus "xargs -0" allows filenames with spaces . . . Read full entry »


Re: Use XSLT to check a bunch of XHTML files for well

Posted 2/16/2021 8:58:33 PM

if you're on a unix/linux, often you can use a fairly ubiquitous tool 'xmllint' in bash: for i in *.xhtml; do xmllint $i >& /dev/null || echo "$i not a well-formed document." done On Tue, Feb 16, 2021 at 12:53 PM Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxx . . . Read full entry »


Use XSLT to check a bunch of XHTML files for well-for

Posted 2/16/2021 8:53:20 PM

Hi Folks, I have a folder containing a large number of XHTML files. I want to know: for each file, is it well-formed? What is the easiest and fastest way to see if each file is well-formed? My thinking has been to create a super-simple XSLT program: <xsl:stylesheet xmlns:xsl="http://ww . . . Read full entry »


Re: How to generate a path expression which shows the

Posted 2/5/2021 4:54:16 PM

Use the fn:path() function in XPath 3.x. Michael Kay Saxonica > On 5 Feb 2021, at 16:36, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Folks, > > I have an XHTML document. Here is an example: > > <html xmlns:o="urn:s . . . Read full entry »


How to generate a path expression which shows the nam

Posted 2/5/2021 4:36:31 PM

Hi Folks, I have an XHTML document. Here is an example: <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40"> <head> <title>Example</title> </head> <body> < . . . Read full entry »


Re: Pluralsight Free Weekend: Friday 2/5 - Sunday 2/7

Posted 2/5/2021 3:36:01 PM

On Fri, Feb 5, 2021 at 7:32 AM Dimitre Novatchev <dnovatchev@xxxxxxxxx> wrote: > Pluralsight announced this *Free Weekend: > <https://www.pluralsight.com/offer/2021/Q1-free-weekend>* > > > > Some of the XML / XSLT / XPath - related courses can be seen seen on this . . . Read full entry »


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

Posted 2/5/2021 3:33:04 PM

Pluralsight announced this *Free Weekend: <https://www.pluralsight.com/offer/2021/Q1-free-weekend>* https://www.pluralsight.com/offer/2021/Q1-free-weekend Watch for free all my courses on XSLT (3.0, 2.0 and 1.0) and XPath 3.0, and any of the 7000+ courses developed in Pluralsight. Some . . . Read full entry »


Re: [Xslt 3 Start] Use case for Function Call Invocati

Posted 2/4/2021 4:01:26 PM

On Thu, Feb 4, 2021 at 12:24 AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > If you have a module/a function library you can use a function of it with > e.g. > > let $xslt := <xsl:package xmlns:xsl="http://www.w3.org/1999/XSL . . . Read full entry »


Re: [Xslt 3 Start] Use case for Function Call Invocati

Posted 2/4/2021 9:48:02 AM

Thanks a lot, mixed-language was indeed not in my mind when reading the recommandation ! Christophe Le 04/02/2021 ` 10:08, Michael Kay mike@xxxxxxxxxxxx a icrit : > If there's a use case for mixed-language programming, then there's a > use case for calling a function written in one langua . . . Read full entry »


Re: [Xslt 3 Start] Use case for Function Call Invocati

Posted 2/4/2021 9:46:37 AM

Ok, thanks for these explanations. I was stuck to XSL usage. Christophe Le 04/02/2021 C 09:52, Martin Honnen martin.honnen@xxxxxx a C)critB : > > > On 04.02.2021 09:25, Martin Honnen martin.honnen@xxxxxx wrote: >> >> >> On 04.02.2021 09:07, Christophe Marchand cmarchan . . . Read full entry »


Re: [Xslt 3 Start] Use case for Function Call Invocati

Posted 2/4/2021 9:08:21 AM

If there's a use case for mixed-language programming, then there's a use case for calling a function written in one language from a function written in another. It's hard to dream up good use cases for mixed-language programming, because it's something you generally want to avoid when you can. It . . . Read full entry »


Re: [Xslt 3 Start] Use case for Function Call Invocati

Posted 2/4/2021 8:51:59 AM

On 04.02.2021 09:25, Martin Honnen martin.honnen@xxxxxx wrote: > > > On 04.02.2021 09:07, Christophe Marchand cmarchand@xxxxxxxxxx wrote: >> >> Hello ! >> >> Reading the recommandation, I was not able to imagine a use-case for >> Function Call Invocation >& . . . Read full entry »


Re: [Xslt 3 Start] Use case for Function Call Invocati

Posted 2/4/2021 8:24:48 AM

On 04.02.2021 09:07, Christophe Marchand cmarchand@xxxxxxxxxx wrote: > > Hello ! > > Reading the recommandation, I was not able to imagine a use-case for > Function Call Invocation > <https://www.w3.org/TR/xslt-30/#invoking-initial-function>[1]. > > Recommandation only . . . Read full entry »


[Xslt 3 Start] Use case for Function Call Invocation

Posted 2/4/2021 8:07:40 AM

Hello ! Reading the recommandation, I was not able to imagine a use-case for Function Call Invocation <https://www.w3.org/TR/xslt-30/#invoking-initial-function>[1]. Recommandation only speeks of raw result, and 2.3.5 section does not mention a "starting environment". Saxon imp . . . Read full entry »


XSL-List Guidelines

Posted 2/1/2021 3:50:07 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: finding word count within a document, with xsl:ac

Posted 1/24/2021 9:49:26 PM

Search this list history, you'll find questions on real use-cases. Christophe Le 22/01/2021 C 18:51, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx a C)critB : On Fri, 2021-01-22 at 06:33 +0000, Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx wrote: On Thu, Jan 21, 2021 at 5:05 PM Peter Flynn peter@xxxxxxxxxxxx &l . . . Read full entry »


Re: finding word count within a document, with xsl:ac

Posted 1/22/2021 8:18:26 PM

On 22/01/2021 17:51, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: On Fri, 2021-01-22 at 06:33 +0000, Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx wrote: On Thu, Jan 21, 2021 at 5:05 PM Peter Flynn peter@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: I haven't found a use case for xsl . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 7:16:57 PM

On Fri, 2021-01-22 at 18:57 +0000, Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx wrote: > I don't know enough about S1000D to know whether this approach is > feasible though. There's a lot of hidden information in attributes, but you could plausibly render the attributes visible. I tend . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 6:56:26 PM

Yes, it is often hard to go full round-trip. What sometimes works better is this: If HTML rendering stylesheets exist for both formats, to tweak both stylesheets so that, with a little or large bit of normalization, identical textual outputs emerge. I don't know enough about S1000D to know whet . . . Read full entry »


Re: finding word count within a document, with xsl:ac

Posted 1/22/2021 5:51:19 PM

On Fri, 2021-01-22 at 06:33 +0000, Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx wrote: > On Thu, Jan 21, 2021 at 5:05 PM Peter Flynn peter@xxxxxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > I haven't found a use case for xsl:accumulator yet. The case for accumula . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 3:58:55 PM

Hi Gerrit, Good to know that I may be on the right track with the normalized text diff. It would be almost impossible to go back to the original SGML structure from the XML. The main difficulty is that a lot of the structure in the SGML uses inclusions to allow tables and figures in almost any loca . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 3:58:51 PM

KISS principles? Usually, if I know the element, ns, parent I can find the offending input element that I've omitted. <xsl:template match="*"> <xsl:message> *****<xsl:value-of select="name(..)"/>/{<xsl:value-of select="namespace-uri()"/> . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 3:51:18 PM

On Fri, 2021-01-22 at 14:43 +0000, Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx wrote: > Hear hear! (Even from DH & XML experts I have been told the data is > consistent, only to find it is not.) > > One of my favorite pair of templates looks something like > > B <xsl:template . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 2:42:35 PM

Hear hear! (Even from DH & XML experts I have been told the data is consistent, only to find it is not.) One of my favorite pair of templates looks something like <xsl:template match="node()" priority="-12"> <xsl:processing-instruction name="SBerr" . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 1:55:58 PM

On 22/01/2021 11:29, ian.proudfoot@xxxxxxxxxxx wrote: [...] This got me thinking about ways to verify the output text content against the input despite significantly different structure. Others have made good suggestions wrt content. A simple first step I tend to use is a wildcard element templa . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 12:31:50 PM

Would a character count of output (stripped white space) suffice? regards On Fri, 22 Jan 2021 at 12:11, Paul Tyson phtyson@xxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I had a similar challenge some years back. I met it with schematron. > > Write a 2nd styl . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 12:12:17 PM

Have you looked at using XSpec for this? Michael Kay Saxonica > On 22 Jan 2021, at 11:29, ian.proudfoot@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi everyone, > > I am working on a project to convert several thousand SGML files (S1000D 1.7) into a more . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 12:11:08 PM

I had a similar challenge some years back. I met it with schematron. Write a 2nd stylesheet that generates schematron rules describing the expected structure and content of the output files. Run these against the output. Of course there is a risk that your schematron rules will be incomplete i . . . Read full entry »


Re: Does the new structure include the same text conte

Posted 1/22/2021 11:45:19 AM

Hi Ian, diffing normalized text output is a good approach in my experience. However, if the 4.1 structures differ significantly from 1.7 as you say, it might be a good idea to transform the 4.1 output back to 1.7 prior to the diff. Or maybe not "transform it back to match the input exactly . . . Read full entry »


Does the new structure include the same text content?

Posted 1/22/2021 11:28:43 AM

Hi everyone, I am working on a project to convert several thousand SGML files (S1000D 1.7) into a more recent XML version (S1000D 4.1). My finished XSLT style sheet does the job that is expected. However during the development I did run into a problem where an error in the stylesheet allowed t . . . Read full entry »


Re: finding word count within a document, with xsl:ac

Posted 1/22/2021 6:32:27 AM

On Thu, Jan 21, 2021 at 5:05 PM Peter Flynn peter@xxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I haven't found a use case for xsl:accumulator yet. > I can see that, there are few xsl:accumulator examples mentioned at, https://www.w3.org/TR/xslt-30/#accumulator-examp . . . Read full entry »


Re: finding word count within a document, with xsl:ac

Posted 1/22/2021 5:24:28 AM

On Thu, Jan 21, 2021 at 5:36 PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > You would need to wrap the string in a document: > > <xsl:variable name="input-doc" as="document-node()"> > <xsl:document> > . . . Read full entry »



PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

Learn XQuery in 10 Minutes!

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

Ask Someone You Know

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

 
Free Stylus Studio XML Training:
W3C Member