Home > XSL-List Blog
The XSL-LIST BlogThe 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: Seek an XPath expression which concatenates an arPosted 3/16/2024 2:05:19 AMOn Fri, 2024-03-15 at 14:12 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > > B B B B B B fold-left(//binary-value, '', function($a, $b) { $a || $b > }) A very minor note on this - i usually caution people in the classes i run to include a literal string whenever they use || B B . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 5:22:34 PM> Why doesn't my XPath work: concat(for $i in //binary-value return $i) > > I thought that I was simply employing XPath's "composable language" capability. > > The XPath specification says this: > > XPath is a composable language > > What does that mean? &g . . . Read full entry » Re: Re: Seek an XPath expression which concatenates anPosted 3/15/2024 4:28:51 PMOn 15/03/2024 17:23, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: In XPath 4.0 this definition is extended and the following expression is evaluated successfully: B B concat(for $i in 1 to 3 return $i) and produces the expected result using BaseX v.11: 123 Great, it also seems to work in Saxo . . . Read full entry » Re: Re: Seek an XPath expression which concatenates anPosted 3/15/2024 4:23:42 PM> Then, per the "composable language" capability I will embed that for-loop inside the call to concat: > > concat(for $i in //binary-value return $i) > > But that doesn't work. Is XPath truly a composable language? If so, why doesn't my XPath work? This is because of h . . . Read full entry » Re: Re: Seek an XPath expression which concatenates anPosted 3/15/2024 4:18:24 PMOn 15/03/2024 17:11, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > Thank you for your replies. The string-join solution works fine. > > But, but, but, ... > > Why doesn't my XPath work: concat(for $i in //binary-value return $i) > > I thought that I was simp . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 4:12:28 PM> Eek! A basic question... > > I have an XML document containing an arbitrary number of <binary-value> elements: > > <Document> > <binary-value>0100</binary-value> > <binary-value>11</binary-value> > <binary-value& . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 4:11:36 PMHi Folks, Thank you for your replies. The string-join solution works fine. But, but, but, ... Why doesn't my XPath work: concat(for $i in //binary-value return $i) I thought that I was simply employing XPath's "composable language" capability. The XPath specification says this: . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 2:48:13 PMIndeed, and if we're into XSLT let's also not forget xsl:apply-templates. (How could we.) Cheers, Wendell From: Michael Mueller-Hillebrand michael.mueller-hillebrand@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, March 15, 2024 10:26 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/15/2024 2:34:50 PMHello again Roger and XSL-List, Since I'm still learning XSpec features I thought I would try and improve my answer for you even further - taking a tip from Dimitre N. BTW, for XSpec matters see not only the XSpec wiki but Amanda Galtman's excellent blog at https://medium.com/@xspectacles ... So . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 2:25:40 PMTwo more similar short options apart from the simple rewrite bbinary-value => string-join()b: <xsl:sequence select="binary-value/text()"/> <xsl:value-of select="binary-value" separator=""/> Have fun! Michael MH From: David Carlisle d.p.carli . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 2:20:49 PMOn 15/03/2024 15:12, Martin Honnen martin.honnen@xxxxxx wrote: > > > On 15/03/2024 14:53, Roger L Costello costello@xxxxxxxxx wrote: >> I have an XML document containing an arbitrary number of <binary-value> elements: >> >> <Document> >> <binary- . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 2:11:51 PMOn 15/03/2024 14:53, Roger L Costello costello@xxxxxxxxx wrote: > I have an XML document containing an arbitrary number of <binary-value> elements: > > <Document> > <binary-value>0100</binary-value> > <binary-value>11</binary-value> > . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 1:55:41 PMstring-join( binary-value,'') On Fri, 15 Mar 2024 at 13:53, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > Eek! A basic question... > > I have an XML document containing an arbitrary number of <binary-value> > el . . . Read full entry » Re: Seek an XPath expression which concatenates an arPosted 3/15/2024 1:55:17 PMstring-join() ? On 15/03/2024 13:53, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > Eek! A basic question... > > I have an XML document containing an arbitrary number of <binary-value> elements: > > <Document> > <binary-value>0100</bin . . . Read full entry » Seek an XPath expression which concatenates an arbitraPosted 3/15/2024 1:53:22 PMHi Folks, Eek! A basic question... I have an XML document containing an arbitrary number of <binary-value> elements: <Document> <binary-value>0100</binary-value> <binary-value>11</binary-value> <binary-value>1010001</binary-value> . . . . Read full entry » Re: Capture stray carriage returns?Posted 3/14/2024 4:04:05 PMDan, If I couldn't control the thing that was doing the so-called 'pretty printing', I would probably be thinking about a standalone whitespace-rectification XSLT to run before the ASCII-doc generation in my pipeline. But well tested since those can also be destructive of information. Good luck, . . . Read full entry » Re: Capture stray carriage returns?Posted 3/13/2024 11:29:50 PMYour question is very unclear, and you show no example. > <xsl:template match="text()" > > <xsl:value-of select="normalize-space()"/> > </xsl:template> that would match (and remove) all line ends which are necessarily part of text nodes, and so wou . . . Read full entry » Re: Capture stray carriage returns?Posted 3/13/2024 11:05:04 PMNever done stream work, so never thought to mention that. I am processing individual files.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 3/13/24 3:41 PM ( . . . Read full entry » Re: Capture stray carriage returns?Posted 3/13/2024 10:40:58 PMOn 13/03/2024 23:32, dvint@xxxxxxxxx wrote: I'm trying to convert some XML/DITA content to asciidoc/flat text file. asciidoc is very picky about where spaces and blank lines occur. Typically I would just use a catch all template possibly with some modes assigned <xsl:template match="text()& . . . Read full entry » Capture stray carriage returns?Posted 3/13/2024 10:31:56 PMI'm trying to convert some XML/DITA content to asciidoc/flat text file. asciidoc is very picky about where spaces and blank lines occur. Typically I would just use a catch all template possibly with some modes assigned <xsl:template match="text()" /> And just process specific e . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/13/2024 9:09:17 PMHi Roger, > <xsl:value-of select=" > if (substring($magVar,1,1) eq 'E') then 'East' > else if (substring($magVar,1,1) eq 'W') then 'West' > else 'True'"/> Just have this XPath expression: let $m := map{'E' : 'East', 'W': 'We . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/13/2024 7:41:23 PMHi again Roger, So here is an XSpec I wrote as a starter illustration for you: <x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="roger.xsl" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <x:variable name="cardinal-points&q . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/13/2024 6:45:14 AMHi Roger, On Tue, Mar 12, 2024 at 6:51b/PM Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: I do not know how to declaratively describe the other part of the mapping > -- map dddd to ddd.d (where d = digit) > > How do I declaratively describe th . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/12/2024 8:53:36 PM>A declarative description seems to me like just a procedural description but with less detail Well, one distinction that people make is that a declarative description says what the answer should be, a procedural description says how to go abount computing it. So on that basis, yes, a declarati . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/12/2024 8:53:31 PM>A declarative description seems to me like just a procedural description but with less detail Well, one distinction that people make is that a declarative description says what the answer should be, a procedural description says how to go abount computing it. So on that basis, yes, a declarati . . . Read full entry » Re: Re: How to declaratively describe a mapping thatPosted 3/12/2024 8:18:54 PM> Do you agree that a declarative description is like a procedural description but with less detail? Definitely not. If the "less detail" is sufficient for finding the solution to the problem, then any other solution that needs "more detail" is obviously sub-optimal and may . . . Read full entry » Re: Get the most recent datePosted 3/12/2024 8:08:16 PMThanks, Marting, this is perfect - format-dateTime(max(//records[sf:ActivityCategory_GCC__c = 'Additional Information']/sf:LastModifiedDate/xs:dateTime(.)), ...) From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, March 12, 2024 3:25 PM To: xsl . . . Read full entry » Re: Get the most recent datePosted 3/12/2024 7:24:58 PMOn 12/03/2024 19:26, LEGAULT, PHILLIP plegault@xxxxxxxxxx wrote: > > Thanks Martin, > > I tried this and first Ibm missing the namespace xs, > > I added xmlns:xs=http://www.w3.org/2001/XMLSchema > > Then I get the error message > > Error on line 1332 of process.xsl: & . . . Read full entry » Re: Get the most recent datePosted 3/12/2024 6:26:36 PMThanks Martin, I tried this and first Ibm missing the namespace xs, I added xmlns:xs=http://www.w3.org/2001/XMLSchema Then I get the error message Error on line 1332 of process.xsl: FORG0006: Effective boolean value is not defined for an item other than a boolean, number, string, or URI This is . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/12/2024 5:53:41 PMSomeone sent me this response: "A declarative description seems to me like just a procedural description but with less detail: it's a continuum rather than a sharp dichotomy. I see no obvious limit to how "declarative" we could make things, particularly as AI gets better and better . . . Read full entry » Re: Get the most recent datePosted 3/12/2024 4:09:41 PMOn 12/03/2024 17:03, LEGAULT, PHILLIP plegault@xxxxxxxxxx wrote: > I have an XML file with the following sections with date fields. > I need the latest sf:LastModifiedDate field when sf:ActivityCategory_GCC__c = Additional Information That sounds like B max(//records[sf:ActivityCategory_ . . . Read full entry » Get the most recent datePosted 3/12/2024 4:03:32 PMI have an XML file with the following sections with date fields. I need the latest sf:LastModifiedDate field when sf:ActivityCategory_GCC__c = Additional Information <records xsi:type="sf:Task"> <sf:Id xsi:nil="true"/> <sf:ActivityAwaren . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/12/2024 3:51:48 PM> Bonus points if you can also answer this question: > > Computer Science Theory Question: If it is impossible to declaratively express the above mapping, does that mean there is a limit to declarative descriptions? Is the set of declarative descriptions smaller than the set of procedural . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/12/2024 2:43:10 PMRoger, The path forward here leads through XSpec. The theoretical question is interesting. Whether all mappings can be formally specified is doubtful. However some would argue (circularly) that if it is not at least potentially expressible formally, it is not a mapping. Others might counter that . . . Read full entry » Re: How to declaratively describe a mapping that involPosted 3/12/2024 1:26:52 PMRemember that <xsl:analyze-string> takes a variable for the regex if you use an attribute value template. Could you compose the regex based on your semantic requirements, then parse the string using that regex? If you track your left parentheses, you may be able to hardwire the regex-grou . . . Read full entry » How to declaratively describe a mapping that involvesPosted 3/12/2024 1:20:45 PMHi Folks, I am mapping an old XML format to a new XML format. To carry out the mapping, I want to write as little code as possible; instead, I want to declaratively describe the mapping in an XML document and then have a tiny piece of generic code which, with little or no knowledge of the old and . . . Read full entry » XSL-List GuidelinesPosted 3/1/2024 2:52:45 PMThis 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: Ant XSLT task issues - redoPosted 2/19/2024 3:52:43 PMYou might have an early / optional ant task to remove 'nuisance' files (e.g. xslt output) which should get over the 'ah don't bother' aspect? HTH On Mon, 19 Feb 2024 at 15:49, Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I am an ant newbie . . . Read full entry » Re: Ant XSLT task issues - redoPosted 2/19/2024 3:49:10 PMI am an ant newbie also trying to run XSLT from within ant (particularly on lots of input files in parallel), so I cannot contribute much to help you. But one thought does jump to mind: I discovered that the xslt task had an optimization feature, that if the stylesheet or content hadn't changed, i . . . Read full entry » Re: Ant XSLT task issues - redoPosted 2/19/2024 3:38:46 PMI posted her as an XSLT adjacent question. I figured if anyone was using ant with xslt it would be here.Since posting, I continued to work on the problem. For the record, I dropped the use of the xslt task and switched to the Java task to run my stylesheets. For whatever reason, I was having issues . . . Read full entry » Re: Resolving character entitiesPosted 2/15/2024 4:55:43 PMPhase 1: the parser converts character entities into characters. Phase 2: the XSLT processor manipulates characters. Phase 3: the XSLT processor passes characters to the serializer for output, which escapes them if they need escaping. There's no way that phase 3 can be influenced by what happened i . . . Read full entry » Re: Resolving character entitiesPosted 2/15/2024 4:00:47 PMOn 15/02/2024 16:52, rick@xxxxxxxxxxxxxx wrote: > > Hi All, > > I have this as the input: > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE subtask [ > > <!ENTITY lt "&"> > > <!ENTITY gt " . . . Read full entry » Re: Resolving character entitiesPosted 2/15/2024 4:00:06 PMamp lt and gt are pre-defined in xml so your definitions will be essentially ignored (which is good as the definition of lt is not well formed you need an extra level of &-quoting) so the entity references were expanded on parsing but your serializer chose to use the named references on seriali . . . Read full entry » Resolving character entitiesPosted 2/15/2024 3:52:11 PMHi All, I have this as the input: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE subtask [ <!ENTITY lt "&"> <!ENTITY gt ">"> <!ENTITY amp "&"> ]> <subtask> <title> . . . Read full entry » Re: Ant XSLT task issues - redoPosted 2/15/2024 3:44:05 PMHi Dan, Sorry to say, I think it's going to be hit or miss for you to get help with your off-topic question. It's an Ant question, right? Notwithstanding the typo in your third line. As for that - no it's not, actually oXygen supports several different ways of interacting with your system ('tie . . . Read full entry » Ant XSLT task issues - redoPosted 2/13/2024 5:30:23 PMSorry had a operator error and sent before completed. I'm trying to use oXygen's environment to run a conversion effort that will be applied several hundred times to different bundles of DITA content. oXygen has a transform process that ties into their projects and environments. At is the only . . . Read full entry » Ant XSLT processingPosted 2/13/2024 5:20:48 PMI'm trying to use oXygen's environment to run a conversion effort that will be applied several hundred times to different bundles of DITA content. oXygen has a transform process that ties into their projects and environments. At is the only "programming" language supported to do this . . . Read full entry » Re: Find several different attribute values on many ePosted 2/10/2024 1:05:05 AMOr, of course, just XPath 1.0 and a bit of shell work: $ xmlstarlet sel -t -m "//@audience | //@platform | //@props" -v "." -n ditaDir/*.dita ditaDir/*.xml | sort | uniq -c | sort -nrs ________________________________ Content is a bunch of dita topics of varying lengths and com . . . Read full entry » Re: Find several different attribute values on many ePosted 2/9/2024 4:45:43 PMThanks, this works greatSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 2/9/24 8:03 AM (GMT-08:00) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Find se . . . Read full entry » Re: Find several different attribute values on many ePosted 2/9/2024 4:03:36 PMOn 09/02/2024 02:46, dvint dvint@xxxxxxxxx wrote: > The performance issue in the first came from running multiple for > loops on the same content, getting down to one for loop has improved > the performance. > > I agree, I don't understand why changing p to * makes a difference, > . . . Read full entry » Re: Online XSLT transformation servicePosted 2/9/2024 3:53:01 PMOn 09/02/2024 16:46, Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx wrote: https://www.softwarebytes.org/xslt3/ (uses Apache XalanJ XSLT 3.0 transformations, with an XSLT 3.0 prototype processor with anonymousB access. XSLT 3.0 and XPath 3.1 features available with this are described at https://xalan.apache . . . Read full entry » Online XSLT transformation servicePosted 2/9/2024 3:45:57 PMHi all, I've just thought of letting this list know about this. I've hosted following online XSLT transformation sites, https://www.softwarebytes.org/xslt1/ (uses Apache XalanJ 2.7.3 XSLT 1.0 transformations with anonymous access) https://www.softwarebytes.org/xslt3/ (uses Apache XalanJ . . . Read full entry » Re: Getting all the text of an element, except for onePosted 2/9/2024 2:15:26 PM> Here is my stylesheet but I am missing something in my understanding. Thanks in advance for your help. > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xs="http://ww . . . Read full entry » Re: Getting all the text of an element, except for onePosted 2/9/2024 2:10:40 PMHi Rick, Martin's and Syd's approaches using detailed template matches are preferable, but let me just point out what you were missing. Let me paraphrase the expression slightly: title/descendant-or-self::* except ./data where . is the section element that the template matches. But section has . . . Read full entry » Re: Getting all the text of an element, except for onePosted 2/9/2024 2:05:39 PMThere are many ways to skin this cat. Here is one: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0"> <xsl:output indent="yes"/> <xsl:mode on-no-match=&qu . . . Read full entry » Re: Getting all the text of an element, except for onePosted 2/9/2024 2:03:33 PMOn 09/02/2024 14:57, rick@xxxxxxxxxxxxxx wrote: > > Hi All. Here is my input: > > <?xml version="1.0" encoding="UTF-8"?> > > <pub> > > B B B <section> > > B B B B B B B <title>This is my clever title with <ph>a phrase . . . Read full entry » Getting all the text of an element, except for one typPosted 2/9/2024 1:57:10 PMHi All. Here is my input: <?xml version="1.0" encoding="UTF-8"?> <pub> <section> <title>This is my clever title with <ph>a phrase</ph> and some data.<data>12345</data></title> <p> . . . Read full entry » Re: Find several different attribute values on many ePosted 2/9/2024 3:18:59 AMHi, Would something like this run any better? <xsl:value-of (string-join((distinct-values(collection($ditacollectionString)//*/@*[local-n ame() in ('audience', 'platform', 'props')]), ' ')"/> Regards. Le jeu. 8 fC)vr. 2024, C 17 h 11, dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxx . . . Read full entry » Re: Find several different attribute values on many ePosted 2/9/2024 1:46:12 AMThe performance issue in the first came from running multiple for loops on the same content, getting down to one for loop has improved the performance.I agree, I don't understand why changing p to * makes a difference, but it does.I'll give your suggestion a try in the morning.Content is a bunch of . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 11:51:40 PMOn 09/02/2024 00:32, dvint@xxxxxxxxx wrote: Here is where I'm at now <xsl:variable name="ditacollectionString" B B B B select="concat($srcPath, '?select=(*.dita|*.xml)')"/> <xsl:template match="/"> <xsl:variable name="CONDITIONS" > B B B B . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 11:32:09 PMHere is where I'm at now <xsl:variable name="ditacollectionString" select="concat($srcPath, '?select=(*.dita|*.xml)')"/> <xsl:template match="/"> <xsl:variable name="CONDITIONS" > <xsl:for-each select="collection($ditacollectio . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 11:13:41 PMThat form gave me troubles but (*.dita|*.xml) workedSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 2/8/24 2:42 PM (GMT-08:00) To: xsl-list@xxxxxxxxxxxxxxxx . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 11:10:20 PMThanks, I just copied the earlier for-each and didn't rework it.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 2/8/24 2:19 PM (GMT-08:00) To: xsl-list@xx . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:55:11 PMOn 08/02/2024 23:11, dvint@xxxxxxxxx wrote: I'm trying to process a collection of documents and extract the distinct-values for several attributes. My first attempt was this which is very slow B B B B <xsl:variable name="ditacollectionString" B B B B B B B select="concat($srcPath . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:42:02 PMOn 08/02/2024 23:11, dvint@xxxxxxxxx wrote: > > I also need to do this with both .dita and .xml files and I'm planning > on making 2 collections, is there a way to do one collection()? > From the Saxon documentation https://www.saxonica.com/html/documentation12/sourcedocs/collections/ . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:39:41 PMSaxon under oXygenSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 2/8/24 2:22 PM (GMT-08:00) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Find several . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:32:41 PMSaxon under oXygenSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 2/8/24 2:22 PM (GMT-08:00) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Find several . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:32:41 PMSaxon under oXygenSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 2/8/24 2:22 PM (GMT-08:00) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Find several . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:31:53 PMDan, Martin's question re: version is important because matching atomic values, not nodes, is something we've only been able to do since ... five years ago now? I.e., it requires XSLT 3.0. Under XSLT 2.0 or (blessings upon you) older techs, other methods are better anyway such as what Ken describ . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:28:27 PMHi Dan, There are a bunch of things I might change about this approach, but the error you are getting could be addressed (simply enough, I think) by changing your template matching "@product | @audience" to match strings instead -- or even untyped atomic values, if that's what distinct-v . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:22:54 PMOn 08/02/2024 23:11, dvint@xxxxxxxxx wrote: I'm trying to process a collection of documents and extract the distinct-values for several attributes. My first attempt was this which is very slow B B B B <xsl:variable name="ditacollectionString" B B B B B B B select="concat($srcPath . . . Read full entry » Re: Find several different attribute values on many ePosted 2/8/2024 10:19:33 PMYes, the error is apt because distinct-values() returns strings. I'm assuming this is because you don't want to process elements of duplicate string value. If you use <xsl:for-each-group group-by="." select="........"> then you will have control at the first element of . . . Read full entry » Find several different attribute values on many elemenPosted 2/8/2024 10:11:22 PMI'm trying to process a collection of documents and extract the distinct-values for several attributes. My first attempt was this which is very slow <xsl:variable name="ditacollectionString" select="concat($srcPath, '?select=*.dita')"/> <xsl:variable name="x . . . Read full entry » Re: Are there XSLT processors that support EXI?Posted 2/8/2024 4:55:37 PMThere is an EXI implementation called Exificent. This is supported in eXist-db. If you invoke your XSLT from XQuery (e.g. fn:transform or transform:transform) in eXist-db, eXist-db will send the XSLT through Saxon, the results will be available in the calling XQuery as an XDM instance, you may the . . . Read full entry » Re: Are there XSLT processors that support EXI?Posted 2/8/2024 3:24:50 PM> Are there any XSLT processors that are built on top of an XML parser that consumes EXI? The whole point is that you don't build an XSLT processor "on top of an XML parser", you build it on top of an API such as SAX, and there are implementations of the SAX API that consume EXI; and . . . Read full entry » Are there XSLT processors that support EXI?Posted 2/8/2024 12:53:59 PMHi Folks, Way back in 2011 I wrote a Powerpoint tutorial on EXI. As I reviewed my slides today, I see this bullet: - The real benefit of EXI is when XML parsers consume EXI directly. Then, XML applications, such as XML Schema validators and XSLT processors, will process the EXI exactly as they've . . . Read full entry » Re: push data within doctypePosted 2/6/2024 9:24:06 AMOn 06/02/2024 07:32, Joga Singh Rawat jrawat@xxxxxxxxxxxxxx wrote: > > Hi Team, > > Could anyone of you please let me know how to write data within > DOCTYPE as shown in the OUTPUT > > INPUT > > <doc> > > <bdy> > > <fig id="a"> > . . . Read full entry » Re: How to write data within DOCTYPEPosted 2/6/2024 7:32:33 AMOn Tue, 2024-02-06 at 06:45 +0000, Joga Singh Rawat jrawat@xxxxxxxxxxxxxx wrote: > Hi Team, > Could anyone of you let me know, how write data within DOCTYPE. > B > INPUT > <doc> > <bdy> > <img src="gr1.jpg"/> > <img src="gr2.jpg"/> . . . Read full entry » How to write data within DOCTYPEPosted 2/6/2024 6:44:31 AMHi Team, Could anyone of you let me know, how write data within DOCTYPE. INPUT <doc> <bdy> <img src="gr1.jpg"/> <img src="gr2.jpg"/> <img src="gr1.jpg"/> </doc> OUTPUT <!DOCTYPE chapter SYSTEM "temp.dtd"[ . . . Read full entry » push data within doctypePosted 2/6/2024 6:32:06 AMHi Team, Could anyone of you please let me know how to write data within DOCTYPE as shown in the OUTPUT INPUT <doc> <bdy> <fig id="a"> <ti>A.</ti> <img src="gr1.jpg"/> </fig> <fig id="b"> <ti>B.</ti& . . . Read full entry » XSL-List GuidelinesPosted 2/1/2024 1:46:37 PMThis 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: Need an elegant (succinct) XPath expression to decPosted 1/26/2024 3:28:45 PM"Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > The value is encoded. I need an XPath expression which decodes it. > > If the first digit is non-zero, then the decoding is: the first two digits, decimal point, the last digit. > & . . . Read full entry » Re: Need an elegant (succinct) XPath expression to decPosted 1/26/2024 3:22:53 PMI would suggest if (starts-with(RNP, '0')) then xs:double(replace(RNP, '(..)(.)', '$1e-$2') => xs:decimal => round(1) else xs:integer(RNP) div 10 Michael Kay > On 26 Jan 2024, at 15:01, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > . . . Read full entry » Re: Need an elegant (succinct) XPath expression to decPosted 1/26/2024 3:15:20 PMOn 26/01/2024 16:01, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, My XML document contains an element named RNP (Required Navigation Performance, which is the required performance of an aircraft, measured in nautical miles). Its value is three digits, e.g., <RNP>152</RNP> The . . . Read full entry » Need an elegant (succinct) XPath expression to decodePosted 1/26/2024 3:00:49 PMHi Folks, My XML document contains an element named RNP (Required Navigation Performance, which is the required performance of an aircraft, measured in nautical miles). Its value is three digits, e.g., <RNP>152</RNP> The value is encoded. I need an XPath expression which decodes it. . . . Read full entry » Re: Not able to calculate @colname due to @morerowsPosted 1/23/2024 10:00:23 AMHi JSR, check out this https://ajwelch.blogspot.com/2006/09/table-normalization-in-xslt-20.html It is the definitive answer and wroth looking into. Other solutions do not scale well with larger tables. I used it multiple times. - Michael From: Joga Singh Rawat jrawat@xxxxxxxxxxxxxx <xsl-list . . . Read full entry » Not able to calculate @colname due to @morerowsPosted 1/23/2024 9:48:46 AMHi Team, I am not able to calculate correct @colname due to @morerows. Please help. Source XML <tbody> <row> <entry morerows="2">col1</entry> <entry>col2</entry> <entry>col3</entry> </row> <row> <entry>col2< . . . Read full entry » Re: problem reqarding linkPosted 1/18/2024 2:47:42 PMHi, An alternative is to look at it the other way by wiring it into your key: <xsl:key name="ids" match="p[@class = 'Bib_entry'] use="'#' || @id"/> Which approach is better depends on the case. Naming the key helps make sense of it: <xsl:key name="bib-entr . . . Read full entry » Re: problem reqarding linkPosted 1/18/2024 11:37:03 AMThanks an lot Michael!!! From: Michael Kay mike@xxxxxxxxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: 18 January 2024 14:31 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: problem reqarding link The simplest approach would be to change <xsl:for-each select="key('ids . . . Read full entry » Re: problem reqarding linkPosted 1/18/2024 9:01:03 AMThe simplest approach would be to change <xsl:for-each select="key('ids', .)"> to <xsl:for-each select="key('ids', translate(., '#', ''))"> to strip out the '#' character. This would be applied to @id attributes as well as @href attributes, but if the @id attribu . . . Read full entry » problem reqarding linkPosted 1/18/2024 8:02:08 AMHi Team, I am not able to get required OUTPUT of @sn <link> because of hash (#) problem. Please help in this regard. Input <html> <p>Text. <a href="#bibx" class="bibcit">1</a> xxx <a href="#biby" class="bibcit">2&l . . . Read full entry » [ANN] In-Person XML Training Feb 2024 - The Complete XPosted 1/17/2024 2:46:53 PMEvolved Binary are launching our new range of Training Courses beginning with The Complete XML Developer in February 2024, and we would like to invite you and your colleagues to join us in London. The Complete XML Developer covers XPath, XSLT, XQuery, and XML Databases, it is taught in-person, and . . . Read full entry » XSL-List GuidelinesPosted 1/1/2024 4:20:58 PMThis 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: Remove duplicate affiliationPosted 12/24/2023 10:58:45 PMThis will do what you want: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet exclude-result-prefixes="xs math xd" version="2.0" xmlns:math="http://www.w3.org/2005/xpath-functions/math" B B B xmlns:xd="http://www.oxygenxml.com/ns . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/21/2023 12:45:54 AMOn Wed, 2023-12-20 at 21:58 +0000, Adam Retter adam.retter@xxxxxxxxxxxxxx wrote: > If only XPath supported the the `\U` and `\L` operators for the > replacement pattern in fn:replace, then I think we could likely have > done it in a single regular expression... Yes - i've always missed \l . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/20/2023 9:57:42 PMIf only XPath supported the the `\U` and `\L` operators for the replacement pattern in fn:replace, then I think we could likely have done it in a single regular expression... On Wed, 20 Dec 2023 at 22:55, Adam Retter <adam.retter@xxxxxxxxxxxxxx> wrote: > > I am not sure this is "s . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/20/2023 9:56:20 PMI am not sure this is "slick" but I think its interesting: fn:string-join( for $word in tokenize("NEW YORK") let $lower-codepoints := fn:string-to-codepoints(fn:lower-case($word)) let $capitalised-codepoints := (fn:head($lower-codepoints) - 32, fn:tail($lower-codepoints)) . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/20/2023 7:13:37 PMOn Wed, Dec 20, 2023 at 06:59:15PM -0000, dvint dvint@xxxxxxxxx scripsit: > I have twist on this question. > > I need to escape multiple characters in a string. Chracters like : [ ] # need > to be escaped with a \ in all cases. I think quotes are going to be added to > this list. I . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/20/2023 7:05:55 PMOn 20/12/2023 20:04, Martin Honnen martin.honnen@xxxxxx wrote: On 20/12/2023 19:59, dvint dvint@xxxxxxxxx wrote: I have twist on this question. I need to escape multiple characters in a string. Chracters like : [ ] # need to be escaped with a \ in all cases. I think quotes are going to be added to . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/20/2023 7:04:30 PMOn 20/12/2023 19:59, dvint dvint@xxxxxxxxx wrote: I have twist on this question. I need to escape multiple characters in a string. Chracters like : [ ] # need to be escaped with a \ in all cases. I think quotes are going to be added to this list. I need a transalate() on steroids. Can't you use . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/20/2023 6:59:08 PMI have twist on this question.I need to escape multiple characters in a string. Chracters like : [ ] # need to be escaped with a \ in all cases. I think quotes are going to be added to this list. I need a transalate() on steroids.Sent from my Verizon, Samsung Galaxy smartphone -------- Original mes . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/20/2023 6:50:49 PM<xsl:stylesheet version="3.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> <xsl:template name="m"> <xsl:sequence select=" string-join(tokenize('NEW YORK',' +')! concat(upper-case(substring(.,1,1)),lower-case(substring(.,2))), . . . Read full entry » Re: Got a slick XPath expression to convert NEW YORK tPosted 12/20/2023 6:37:12 PM(tokenize($in) ! (substring(., 1, 1) || lower-case(substring(., 2)) => string-join('_') Michael Kay Saxonica > On 20 Dec 2023, at 18:28, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Folks, > > I need to convert multi-word name . . . Read full entry » Got a slick XPath expression to convert NEW YORK to NPosted 12/20/2023 6:27:43 PMHi Folks, I need to convert multi-word names that are space-separated and uppercase to names that are underscore-separated, first letter of each word uppercase and remaining letters of the word lowercase. Example: NEW YORK --> New_York Example: SIMULATION INDICATOR --> Simulation_Indicator . . . Read full entry » Re: Remove duplicate affiliationPosted 12/20/2023 11:15:20 AMThanks a lot Michael!!! From: Michael Mueller-Hillebrand michael.mueller-hillebrand@xxxxxxxxx [mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx] Sent: 20 December 2023 15:59 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Remove duplicate affiliation Hi Joga Singh Rawat, deduplication is o . . . Read full entry » Re: Remove duplicate affiliationPosted 12/20/2023 10:28:49 AMHi Joga Singh Rawat, deduplication is often successfully performed with xsl:for-each-group. After you have processed the author names, you could try something along <xsl:for-each-group select="author/affiliation" group-by="@xreflabel"> <xsl:apply-templates select=& . . . Read full entry » Remove duplicate affiliationPosted 12/20/2023 10:01:42 AMHi Friends, We need to remove duplicate affiliation that can be unique by @xreflabel. Could you please let me know any clue. Input <authorgroup> <author> <name>a</name> <affiliation xreflabel="1"><org>..</org> First affiliation</affiliati . . . Read full entry » [ANN] Balisage 2024 - Call for ParticipationPosted 12/18/2023 3:02:08 PM================================================= Call for Participation "Balisage: The Markup Conference 2024b Balisage: where serious markup practitioners and theoreticians meet every summer. Critical Dates - 5 April 2024 b Paper submissions due - 29 July b 2 August 2024 b BALISAGE: T . . . Read full entry » Re: XSLT 3.0 references?Posted 12/14/2023 12:38:00 AMOn Wed, 2023-12-13 at 20:06 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > > Liam is always looking for students for [its/their] XSLT 3 course, I > think. Yes, i am; thanks! i may run one in Jan or Feb, if there is demand. liam -- Liam Quin,B https://www.delightfulcomputing.com/ Ava . . . Read full entry » Re: XSLT 3.0 references?Posted 12/13/2023 10:30:20 PMHi Mark Not sure you are drawing the right conclusion from this. (Also not talking high numbers anyway, so maybe irrelevant) For the past 10 years I believe that I trained a good 5 people at least per year in projects, Over half of them really new in the game (often greenfield projects) the other . . . Read full entry » Re: XSLT 3.0 references?Posted 12/13/2023 8:19:17 PMAs for XPath 3, this Pluralsight video-course provides complete coverage: https://www.pluralsight.com/library/courses/xpath-3-0-whats-new/table-of-cont ents Hope this helps, Dimitre On Wed, Dec 13, 2023 at 12:15b/PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx . . . Read full entry » Re: XSLT 3.0 references?Posted 12/13/2023 8:18:19 PM>> I hypothesize from this that there are very few people coming to XSLT >> from the ground up these days, only old farts updating their skills. Very hard to assess that, there's just no reliable data. There are certainly some, but a lot of people start with very simple XSLT 1.0 transf . . . Read full entry » Re: XSLT 3.0 references?Posted 12/13/2023 8:17:02 PMThis Pluralsight video-course on XSLT 3.0 covers almost everything that is not streaming-related: https://www.pluralsight.com/library/courses/xslt-3-0-whats-new-part1/table-of -contents Hope this helps, Dimitre On Wed, Dec 13, 2023 at 12:05b/PM Martin Honnen martin.honnen@xxxxxx < xsl-list-s . . . Read full entry » Re: XSLT 3.0 references?Posted 12/13/2023 8:15:17 PMOn 13/12/2023 20:52, Mark Giffin m1879@xxxxxxxxxxxxx wrote: Anyway, I can use google or something and look for information, but I'd rather get info from this list. What are some good references on XSLT 3.0? Another XPath 3.1 function reference compiled by Max Toro is at https://maxtoroq.github.i . . . Read full entry » Re: XSLT 3.0 references?Posted 12/13/2023 8:05:52 PMOn 13/12/2023 20:52, Mark Giffin m1879@xxxxxxxxxxxxx wrote: I've been using XSLT 2 for many years and I decided I need to get up to speed on XSLT 3.0 for various reasons. Surprise! No books on it that I have found. I've depended on the 4th edition of Michael Kay's XSLT 2.0 etc for a long time, but . . . Read full entry » XSLT 3.0 references?Posted 12/13/2023 7:52:06 PMI've been using XSLT 2 for many years and I decided I need to get up to speed on XSLT 3.0 for various reasons. Surprise! No books on it that I have found. I've depended on the 4th edition of Michael Kay's XSLT 2.0 etc for a long time, but he's apparently not doing a new one. There is nothing on . . . Read full entry » Re: XML to text - converting DITA to asciidocPosted 12/9/2023 7:50:44 PMThanks, the <xml:strip-space> did the trickSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 12/9/23 10:45 AM (GMT-08:00) To: xsl-list@xxxxxxxxxxxxxxxxx . . . Read full entry » Re: XML to text - converting DITA to asciidocPosted 12/9/2023 6:45:30 PMOn 09/12/2023 19:04, dvint@xxxxxxxxx wrote: I'm trying to process complex inline DITA content to text and at the same time both process inline markup and strip excess whitespace that comes from having the content in a pretty printed format. I suppose a quick fix might be to go through and un=pretty . . . Read full entry » Re: XML to text - converting DITA to asciidocPosted 12/9/2023 6:15:29 PMI did find a stylesheet that will flatten the structure but I would like to avoid the extra step.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 12/9/23 10:04 AM (GMT-08:00) T . . . Read full entry » XML to text - converting DITA to asciidocPosted 12/9/2023 6:04:07 PMI'm trying to process complex inline DITA content to text and at the same time both process inline markup and strip excess whitespace that comes from having the content in a pretty printed format. I suppose a quick fix might be to go through and un=pretty the XML in a pre-pass. Anyone got somet . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/4/2023 2:53:33 PMHi again, Just adding as an almost-gratuitous aside that one of the XSLT 3.0 features I am enjoying is the binding of functions to variables: <xsl:variable name="is:LBJ" select="function($book as element(Book)) as xs:boolean {$book/Title eq 'LBJ Bio' and $book/Author eq 'Caro')& . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/4/2023 2:42:17 PMHi, In my view both of Mike's suggestions below are better than an XPath optimized for something other than readability: ('action 1'[/Book/Title eq 'Path to Power' and /Book/Author eq 'Robert A. Caro'], 'action 2'[/Book/Title eq 'Power Broker' and /Book/Author eq 'Robert A. Caro'], 'Error')[1] . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/2/2023 10:31:13 PMOn Sat, 2023-12-02 at 15:36 +0000, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > I am converting prose like this: > > If the title = "Path to Power" and the author = "Robert A. Caro" > (Lyndon Baines Johnson (LBJ)), then > process LBJ as follows . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/2/2023 6:24:55 PM> > Here is the wanted "pure XPath" that preserves the "readability": > > > > let $LBJ := /Book/Title eq 'Path to Power' and /Book/Author eq 'Robert A. Caro', > > $RM := /Book/Title eq 'Power Broker' and /Book/Author eq 'Robert A. . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/2/2023 6:12:18 PM> Here is the wanted "pure XPath" that preserves the "readability": > > let $LBJ := /Book/Title eq 'Path to Power' and /Book/Author eq 'Robert A. Caro', > $RM := /Book/Title eq 'Power Broker' and /Book/Author eq 'Robert A. Caro' > return & . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/2/2023 5:57:07 PMHere is the wanted "pure XPath" that preserves the "readability": let $LBJ := /Book/Title eq 'Path to Power' and /Book/Author eq 'Robert A. Caro', $RM := /Book/Title eq 'Power Broker' and /Book/Author eq 'Robert A. Caro' return if($LBJ) then ' . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/2/2023 4:52:52 PMOn Sat, 2 Dec 2023 at 15:35, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > . I need to stick with pure XPath. What XPath do you recommend? > what do you mean by pure xpath here, do you mean to exclude xslt so exclude xslt defined functions or . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/2/2023 4:14:15 PMOn 02/12/2023 16:36, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > I am converting prose like this: > > If the title = "Path to Power" and the author = "Robert A. Caro" (Lyndon Baines Johnson (LBJ)), then > process LBJ as follows > action 1 . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/2/2023 4:07:21 PMHow about simple Boolean variables? <xsl:variable name="LBJ" select="..." as="xsd:boolean"/> <xsl:variable name="RM" select="..." as="xsd:boolean"/> ... <xsl:value-of select="if( $LBJ ) then 'action 1' . . . Read full entry » Re: How to do macro substitution in XPath?Posted 12/2/2023 3:49:28 PMOn 02/12/2023 16:36, Roger L Costello costello@xxxxxxxxx wrote: Hi Folks, I am converting prose like this: If the title = "Path to Power" and the author = "Robert A. Caro" (Lyndon Baines Johnson (LBJ)), then process LBJ as follows action 1 If the title = "Power Broke . . . Read full entry » How to do macro substitution in XPath?Posted 12/2/2023 3:35:56 PMHi Folks, I am converting prose like this: If the title = "Path to Power" and the author = "Robert A. Caro" (Lyndon Baines Johnson (LBJ)), then process LBJ as follows action 1 If the title = "Power Broker" and the author = "Robert A. Caro" (Robert Moses . . . Read full entry » XSL-List GuidelinesPosted 12/1/2023 4:34:07 PMThis 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 » Job Opening: Editorial and Technical Specialist, RotunPosted 11/14/2023 12:50:01 AMSharing on behalf of UVA Press, this opening with the Rotunda imprint of digital editions. While not exclusively an XSLT position, strong skills with XML and related technologies are highly desirable. https://jobs.virginia.edu/us/en/job/R0054553/Editorial-and-Technical-Speciali st Experience with . . . Read full entry » Re: Converting XML to CSV - how to eliminate output wPosted 11/6/2023 5:02:51 PMHi Norm, Thanks! Your suggestion was close, but it also removed all the newlines: customer,1234schemaName,schema_nameschemaVersion,1.0PN_ID,1111111111PN_ID,111 1111ADM_ORG_CD,urn:NORM:DEPTentUserRoles,a:b:c But I was able to add <xsl:text> to get it to work: <?xml version="1.0&qu . . . Read full entry » Re: Converting XML to CSV - how to eliminate output wPosted 11/6/2023 1:37:26 PMHello, Also for handling whitespace (or not) from well-controlled inputs, don't forget the top-level xsl:strip-space and xsl:preserve-space settings, which can help to reduce whitespace-perturbation quite a bit. (To say nothing of a schema binding and a processor that knows how to use that.) Chee . . . Read full entry » Re: Converting XML to CSV - how to eliminate output wPosted 11/6/2023 8:24:15 AM> Notice the whitespace in front of each line and also the blank lines > between sub-nodes, e.g., so the output would be just: Try adding <xsl:strip-space elements="*"/>. I think that will fix it, though my XSLT 1.0 is a bit rusty these days. . . . Read full entry » Re: Converting XML to CSV - how to eliminate output wPosted 11/6/2023 2:26:52 AMOn Mon, Nov 06, 2023 at 02:13:29AM -0000, ohaya ohaya@xxxxxxxxx scripsit: > Is it possible to remove/suppress both the whitespace and the blank lines using XSLT? It looks like the default template is picking up the whitespace only text nodes and copying them into the result tree. <xsl:templ . . . Read full entry » Converting XML to CSV - how to eliminate output whitePosted 11/6/2023 2:13:22 AMHi, I am trying to use XSLT to convert an XML file to a CSV, where the CSV has the node names+node values. Thus far I have this XSLT (note: I can only use XSLT 1.0 because I am going be using xsltproc): <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet ver . . . Read full entry » Re: problem with XPath count()Posted 11/1/2023 3:07:05 PMOf course empty(preceding-sibling::*) and not(preceding-sibling::*) test that the current <text> node does not have any preceding sibling elements. As I (mis-)?read the OP, the request was about preceding <text> sibling elements, in which case empty( preceding-sibling::text ) . . . Read full entry » Re: problem with XPath count()Posted 11/1/2023 2:58:58 PMIndeed. Or, to be more literal and less XPath-idiomatic, empty(preceding-sibling::*) Thanks Mike! For this contribution and every other time you've rescued us from ourselves. Cheers, Wendell From: Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, No . . . Read full entry » XSL-List GuidelinesPosted 11/1/2023 1:55:45 PMThis 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: problem with XPath count()Posted 11/1/2023 8:48:44 AM> I want to count, for each element, the number of preceding <text> > elements that satisfy one or both of the following two conditions: 1) > the element is the first of the list or 2) its string value begins with > "x". Here is an example, with the expected number of th . . . Read full entry » Re: problem with XPath count()Posted 11/1/2023 5:51:40 AMHello Wolfhart, Your problem intrigued me, so I went about figuring how I would solve this. Yes, position() can be a tricky animal in terms of context. The most concise way Ibve found to get around this so far was with: count(preceding::text[ends-with(path(), '[1]') or substring(., 1, 1) = . . . Read full entry » Re: problem with XPath count()Posted 11/1/2023 5:19:55 AMThank you, Syd, for the prompt reply! I think that, thanks to your reply, I figured out what is going on: The preceding:: axis constructs a node set in reverse order. Hence, preceding::text[position() = 1] refers to the immediately preceding <text> element, not to the first <text> e . . . Read full entry » Re: problem with XPath count()Posted 11/1/2023 4:53:04 AMI am not sure I could explain precisely what is going on here with position() if I were fully awake, but there is no chance I can do so now (it is, after all way past my bedtime), but the apparent miscount boils down to the basic problem that position() doesnt mean what we often, at first blush, t . . . Read full entry » problem with XPath count()Posted 11/1/2023 4:40:02 AMDear list, There is a seemingly simple XPath problem to which I cannot find the solution. I'm hoping (or, rather, certain) that one of you can help me. I have a list of <text> elements, like so: <text>foo</text> <text>foo</text> <text>foo</text> <tex . . . Read full entry » Re: Exclude child node details if child node is not inPosted 10/30/2023 10:45:57 AMOK I figured it out anyway From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, October 28, 2023 5:00 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [EXTERNAL] Re: Exclude child node details if child node is not in the xml file On 27/10/2023 . . . Read full entry » Re: Exclude child node details if child node is not inPosted 10/28/2023 8:59:26 AMOn 27/10/2023 21:37, LEGAULT, PHILLIP plegault@xxxxxxxxxx wrote: > > I have a soap xml file Ibm downloading and transforming using saxon > xslt 2 , the file may or may not include child node > B bRelatedCases_GCC__cb, If not do not add empty tags. If so then add > tags with result . . . Read full entry » Exclude child node details if child node is not in thePosted 10/27/2023 7:37:08 PMI have a soap xml file Ibm downloading and transforming using saxon xslt 2 , the file may or may not include child node bRelatedCases_GCC__cb, If not do not add empty tags. If so then add tags with resulting text. Xslt example below xml details that fails. ====================XML file========= . . . Read full entry » Re: Here’s how to query an XML Schema that consists oPosted 10/20/2023 12:00:18 AMOn Thu, 2023-10-19 at 21:20 +0000, Martin Honnen martin.honnen@xxxxxx wrote: > > Yes, although someone does host an "XSLT 3.1 Elements reference" > documentation https://xsltdev.com/, I think they have been naming it > that way for quite a while already. At one point there wa . . . Read full entry » Re: Here’s how to query an XML Schema that consists oPosted 10/19/2023 9:19:26 PMOn 19.10.2023 22:20, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > > > On Thu, Oct 19, 2023 at 6:14b/AM Martin Honnen martin.honnen@xxxxxx > <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > XSLT version 3.1? I saw someone else wanting an XSLT 3.1 spec > recentl . . . Read full entry » Re: Here’s how to query an XML Schema that consists oPosted 10/19/2023 8:20:17 PMOn Thu, Oct 19, 2023 at 6:14b/AM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > XSLT version 3.1? I saw someone else wanting an XSLT 3.1 spec recently mandating XSLT 3.0 plus XPath 3.1 support but I don't think it has happened. > Do you need tha . . . Read full entry » Re Here’s how to query an XML Schema that consists ofPosted 10/19/2023 1:17:25 PM* XSLT version 3.1? Do you need that odd version number to run your code? Eek! Good catch Martin. Thank you! /Roger From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, October 19, 2023 9:15 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [ . . . Read full entry » Re: Here’s how to query an XML Schema that consists oPosted 10/19/2023 1:14:35 PMOn 19/10/2023 15:07, Roger L Costello costello@xxxxxxxxx wrote: > <xsl:stylesheetxmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:scm="http://ns.saxonica.com/schema-component-model" > exclude-result-p . . . Read full entry » Here’s how to query an XML Schema that consists of manPosted 10/19/2023 1:07:25 PMHi Folks, I have a large, complex XML Schema which is spread across dozens of files. While the use of multiple files is a nice divide-and-conquer strategy for organizing the schema, it can make queries challenging. For example, today I needed to find out what elements are declared to be of a type t . . . Read full entry » [ANN] Version 26 of the Oxygen XML Suite of Products iPosted 10/12/2023 6:35:49 AMHi everyone, We are excited to announce that Oxygen XML Developer/Editor version 26 is now available! Listing below some new features which may be useful for the XSL community: XSLT/XQuery ================================== * The built-in Saxon processor from Saxonica used for XSLT and XQuery . . . Read full entry » Mutual Recursion with Anonymous (Inline) Functions inPosted 10/5/2023 2:57:33 AMThought this topic might be interesting to some of us: https://medium.com/@dimitrenovatchev/mutual-recursion-with-anonymous-inline-functions-in-xpath-3-0eb7c961806f Also published in my blog. -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achi . . . Read full entry » [ANN] XSLT 3 + 4 course upcoming at Delightful ComputiPosted 9/30/2023 3:07:20 PMUpcoming soon: XSLT Three+ for XSLT Two Users (three days) - Week of 6th November This is a three-day remote course; it will be in a UK timezone, roughly (10 to 5pm or 11 to 6, to be negotiated with attendees). The = means there's some initial discussion of XSLT 4 in the course too, including XP . . . Read full entry » Re: Find elements with same key and merge sub-elementsPosted 9/26/2023 7:41:38 PMOn 26.09.2023 21:34, Larry Hayashi lhtrees@xxxxxxxxx wrote: Hi, I have an xml file containing dictionary entries with their meanings/senses. I'd like to find Entries that have 2 or more senses that have the same gloss. Sometimes an entry will have more than one sense but each sense will have its o . . . Read full entry » Find elements with same key and merge sub-elementsPosted 9/26/2023 7:34:11 PMHi, I have an xml file containing dictionary entries with their meanings/senses. I'd like to find Entries that have 2 or more senses that have the same gloss. Sometimes an entry will have more than one sense but each sense will have its own unique gloss. For the entries that have senses with ident . . . Read full entry » Re: Performance of link target search, and NormalisingPosted 9/22/2023 2:01:04 PMOn 22/09/2023 14:41, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx wrote: > > > I omitted to say that I'm currently using XSL 2 and Saxon HE. So the > two Saxon functions mentioned in your other responses are not > available to me (unfortunate, because they look like exactly what I > . . . Read full entry » Re: Performance of link target search, and NormalisingPosted 9/22/2023 12:40:51 PMHi Martin I omitted to say that I'm currently using XSL 2 and Saxon HE. So the two Saxon functions mentioned in your other responses are not available to me (unfortunate, because they look like exactly what I need). The urify function might be useful though. To answer your question, given a $ . . . Read full entry » Re: Performance of link target search, and NormalisingPosted 9/22/2023 12:35:28 PMOn 22/09/2023 14:09, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx wrote: > > I am working with sets of XML document files which include "include" > elements; the include elements are substituted by the content of the > file found at include/@srcfile, and inclusions may be nested . . . Read full entry » Re: Performance of link target search, and NormalisingPosted 9/22/2023 12:35:11 PMToo simple perhaps, a recursive function with the last param building the path rel to the path of this stylesheet? HTH On Fri, 22 Sept 2023 at 13:32, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On 22/09/2023 14:31, Martin Honnen martin. . . . Read full entry » Re: Performance of link target search, and NormalisingPosted 9/22/2023 12:32:19 PMOn 22/09/2023 14:31, Martin Honnen martin.honnen@xxxxxx wrote: > > > On 22/09/2023 14:28, Martin Honnen martin.honnen@xxxxxx wrote: >> >> >> On 22/09/2023 14:09, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx wrote: >>> >>> But if any file is not then this co . . . Read full entry » Re: Performance of link target search, and NormalisingPosted 9/22/2023 12:31:11 PMOn 22/09/2023 14:28, Martin Honnen martin.honnen@xxxxxx wrote: > > > On 22/09/2023 14:09, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx wrote: >> >> But if any file is not then this code produces verified/adjusted >> links where the srcfile may be something like >> &quo . . . Read full entry » Re: Performance of link target search, and NormalisingPosted 9/22/2023 12:27:54 PMOn 22/09/2023 14:09, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx wrote: > > But if any file is not then this code produces verified/adjusted links > where the srcfile may be something like "../../A/../B/../C/ccc.xml#xyz" > > Is there a simple way of normalising that path? If . . . Read full entry » Performance of link target search, and Normalising orPosted 9/22/2023 12:09:29 PMHi I am working with sets of XML document files which include "include" elements; the include elements are substituted by the content of the file found at include/@srcfile, and inclusions may be nested many levels deep. These documents contain link elements which point to elements . . . Read full entry » Re: Asymmetric string handling with processing-instruPosted 9/15/2023 6:25:39 AMThanks a lot for your feedback and thoughts, Martin, Special thanks for reminding me that a simple string can be treated/parsed as XML and there is no need for an element to use parse-xml-fragment(). When creating the text content of a processing instruction we have to decide which quotes to use . . . Read full entry » Re: Asymmetric string handling with processing-instruPosted 9/14/2023 4:08:41 PMOn 14.09.2023 17:27, Martin Honnen martin.honnen@xxxxxx wrote: > > > On 14.09.2023 16:05, Michael Mueller-Hillebrand > michael.mueller-hillebrand@xxxxxxxxx wrote: >> >> My bottom line: If you want to use saxon:get-pseudo-attribute(), >> because it is elegant and effici . . . Read full entry » Re: Asymmetric string handling with processing-instruPosted 9/14/2023 3:38:08 PMOn 14.09.2023 17:27, Martin Honnen martin.honnen@xxxxxx wrote: I was also playing with some attributes created on the fly to be serialized but as standalone attributes can't be serialized that doesn't work out; I am not sure whether creating an element with attributes on the fly and then serializin . . . Read full entry » Re: Asymmetric string handling with processing-instruPosted 9/14/2023 3:27:24 PMOn 14.09.2023 16:05, Michael Mueller-Hillebrand michael.mueller-hillebrand@xxxxxxxxx wrote: > > My bottom line: If you want to use saxon:get-pseudo-attribute(), > because it is elegant and efficient, and it could be possible you have > user content in processing instruction, you have tw . . . Read full entry » Asymmetric string handling with processing-instructionPosted 9/14/2023 2:05:32 PMDear colleagues, We are (finally) switching to Saxon 10 (shame on us for being so late) and experience the breaking change in the very welcome extension function saxon:get-pseudo-attribute(). The change history states: B7 The extension function saxon:get-pseudo-attribute() now parses the . . . Read full entry » Re: Some things I learned about writing codePosted 9/10/2023 12:04:56 PMHi Martin, I recently needed to convert JSON to XML for a one-off task, and your answer here was exactly what I needed: https://stackoverflow.com/questions/67312950/how-to-convert-json-to-xml-using -xslt My initial attempt to use it failed because some of my JSON fields were numeric instead of s . . . Read full entry » Re: Some things I learned about writing codePosted 9/10/2023 11:54:43 AMAm 10.09.2023 um 13:44 schrieb Roger L Costello costello@xxxxxxxxx: > > 1. > > > 2. There is input data that code consumes and output data that code > produces. What is the format of the input data? What is the format > of the output data? I like using a format that ha . . . Read full entry » Some things I learned about writing codePosted 9/10/2023 11:43:52 AM1. When writing code, I need to focus very intently. A momentary loss of focus often results in introducing erroneous code. 2. There is input data that code consumes and output data that code produces. What is the format of the input data? What is the format of the output data? I like using a . . . Read full entry » Re: Somewhat off-topic question (isolating XLST enginePosted 9/8/2023 1:17:00 PMOne approach to this is to put your own implementation of the JAXP TransformerFactory interface (in a JAR file with a suitable manifest) on the classpath, ahead of Saxon in the search order; and when it is invoked, explicitly call the Xalan implementation. In the part of the application that needs . . . Read full entry » Re: Somewhat off-topic question (isolating XLST enginePosted 9/8/2023 12:30:12 PM"ohaya ohaya@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > Sorry - per the subject this may be kind of off-topic for this list... Last time this came up, I thought Mike laid out a pretty convincing explanatin of the problem. You appear to have competing implemen . . . Read full entry » Somewhat off-topic question (isolating XLST engine) was Re:Posted 9/8/2023 11:49:30 AMHi, Sorry - per the subject this may be kind of off-topic for this list... This is a really a followup re. the discussion in this thread, but, basically, because of the problem with trying to get Saxon-HE (and apparently any XLST engine) integrated with the OUD (per this thread), I ended up prop . . . Read full entry » Declarative Amsterdam 2023 - Register nowPosted 9/5/2023 7:41:33 AMDeclarative Amsterdam 2023 will be happening at CWI, Amsterdam Science Park on Thursday/Friday November 2 and 3, 2023. * Thursday morning is a tutorial session, with a hands-on Advanced XForms Tutorial. It is a bbring your own deviceb event and you will be expected to have pre-loaded some materi . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 9/2/2023 3:38:07 AMOn Fri, Sep 01, 2023 at 05:07:19PM -0000, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx scripsit: > On Fri, 2023-09-01 at 08:14 +0000, Mukul Gandhi > mukulg@xxxxxxxxxxxxxxxxx wrote: >> As I've mentioned within another mail on this thread, I think XPath >> 3.1 function conversion rules pro . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 9/1/2023 5:07:05 PMOn Fri, 2023-09-01 at 08:14 +0000, Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx wrote: > > As I've mentioned within another mail on this thread, I think XPath > 3.1 function conversion rules prohibiting a string value '4' to be > cast to an xs:integer type is not very much right. Actually it' . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 9/1/2023 12:35:51 PMHi Mike, On Fri, Sep 1, 2023 at 2:26b/PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > You will find that people have a wide range of views on this. If you want > your views to be taken into account, you are very welcome to join the QT4 > initia . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 9/1/2023 8:56:16 AM> As I've mentioned within another mail on this thread, I think XPath 3.1 function conversion rules prohibiting a string value '4' to be cast to an xs:integer type is not very much right. These XPath 3.1 function conversion rules should be consistent with the result of following XPath expression . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 9/1/2023 8:52:13 AMOn Fri, 1 Sept 2023 at 09:13, Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Wendell, > > On Thu, Aug 31, 2023 at 7:24b/PM Piez, Wendell A. (Fed) > wendell.piez@xxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 9/1/2023 8:13:24 AMHi Wendell, On Thu, Aug 31, 2023 at 7:24b/PM Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > My thought is, why not > > > > <xsl:variable name="var1" select="4"/> > > > I'm currently not writ . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 8/31/2023 4:35:12 PM> I think, the XSLT 3.0 variable declaration, <xsl:variable name="var1" select="'4'" as="xs:integer"/> should work similarly (I think, it should succeed, and the specific XPath 3.1 function conversion rule seems to me is wrong if it, disallows this. Apologies . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 8/31/2023 3:23:07 PMHi Mike, On Thu, Aug 31, 2023 at 7:27b/PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Firstly, everything you talk about here was defined in XSLT 2.0, and was > unchanged in 3.0. > > You've left out a crucial phrase from your quotation, whic . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 8/31/2023 1:56:58 PMFirstly, everything you talk about here was defined in XSLT 2.0, and was unchanged in 3.0. You've left out a crucial phrase from your quotation, which is present in both 2.0 and 3.0: If the as attribute is specified, then the supplied value of the variable is converted to the required type, using . . . Read full entry » Re: xslt 3.0, and use of 'as' attribute with xsl:variaPosted 8/31/2023 1:54:31 PMHello Mukul, My thought is, why not <xsl:variable name="var1" select="4"/> ? Taken at face value, your question seems to me to be about why doesn't XPath 2.0+ do more implicit casting, which could give more 'intuitive' results in certain edge cases (such as declaring a . . . Read full entry » xslt 3.0, and use of 'as' attribute with xsl:variablePosted 8/31/2023 1:46:32 PMHi all, I'm trying to understand a simple concept with XSLT 3.0, when we use 'as' attribute with xsl:variable instruction. I'm using Saxon HE 12.2. I'd like to understand these concepts with a non schema aware XSLT transformation. My XSLT stylesheet is as follows (this one doesn't use 'as' att . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/28/2023 12:06:06 PMGreat advice, Thank you! From: Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Monday, August 28, 2023 7:51 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [EXTERNAL] Re: xslt create a variable from external xml file Hi Phillip, . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/28/2023 12:02:21 PMOn 28/08/2023 12:36, LEGAULT, PHILLIP plegault@xxxxxxxxxx wrote: Thanks everyone for your help. By way of an obiter dictum, I have appended what I used to tell students about running *any* software likely to need to open all sorts of files. The reason I have used "should" or "probabl . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/28/2023 11:50:52 AMHi Phillip, When something does not work as expected, I sometimes do the following: 1. Isolate the thing that is not working into a simple testcase. 2. If the simple testcase does not work as expected, then I need to correct my understanding of that feature. 3. If the simple testcase works as exp . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/28/2023 11:35:37 AMThanks everyone for your help. -Chris Obviously I did not try this, thank you! From: Chris Papademetrious chrispitude@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Sunday, August 27, 2023 8:28 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [EXTERNAL] Re: xslt create a variable . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/27/2023 1:17:57 PMOn 27.08.2023 12:50, LEGAULT, PHILLIP plegault@xxxxxxxxxx wrote: > > I have tried everything and Ibm unable to get the values from the > external xml file. > As others have said, describe exactly one intent that failed so that we can reproduce the failure and try to fix it. I note th . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/27/2023 12:46:20 PMQuick correction: And usually when I am not getting any results the first thing I check is whether I *have properly understood the relative path from the XSLT to the document Ibm trying to make it read. Elisa Beshero-Bondar, PhD (she/they) Chair, TEI Technical Council Program Chair of Digital Me . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/27/2023 12:42:17 PMo;?Dear Phillip and all,I understand the frustration because I see this sort of problem very frequently when working with my students. It is difficult to explain the whole context of the problem. When working with variables or params that store document nodes, you need to be absolutely clear about . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/27/2023 12:27:36 PMHi Phillip, Try a simple testcase consisting of the following three files in the same local directory: <!-- input.xml --> <result/> <!-- data.xml --> <data>hello</data> <!-- stylesheet.xsl --> <?xml version="1.0" encoding="UTF-8"?> . . . Read full entry » Re: xslt create a variable from external xml filePosted 8/27/2023 12:08:13 PM> I have tried everything and Ibm unable to get the values from the external xml file. > > That's not useful information. If you tell us one thing you tried, describe it precisely, and tell us how it failed, then we can help you move forward. Michael Kay Saxonica . . . Read full entry »
|
PURCHASE STYLUS STUDIO ONLINE TODAY!!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! 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! |