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: List Item Content

Posted 4/23/2024 1:46:03 PM

I do not think this is what you really want, because I cannot pretend to actually understand what you are trying to do. While there are probably better ways to do this, the following does take the posted input and generate the desired output. Maybe you can tweak it into what you really need. <? . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/22/2024 9:01:31 PM

On 22/04/2024 22:51, Mark Giffin m1879@xxxxxxxxxxxxx wrote: > Oops! Thanks for the correction. Any idea if Oxygen is using Xerces? These days with Java in one way (embedded version of Xerces in the JRE/JDK) or another (a custom Xerces installation) I assume they do. But ask their support about . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/22/2024 8:51:23 PM

Oops! Thanks for the correction. Any idea if Oxygen is using Xerces? Mark -----Original Message----- From: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Apr 21, 2024 3:07 AM To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Re: Ignoring a DTD with document() Am 21.04.2024 um 04:06 schrieb . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/21/2024 10:07:27 AM

Am 21.04.2024 um 04:06 schrieb Mark Giffin m1879@xxxxxxxxxxxxx: Thanks Michael, I'm using Saxon-PE 10.6 from inside Oxygen v24.1. I don't know what XML parser is used in this setup, I assume Xalan. Xalan is an XSLT 1 processor, not an XML parser. Xerces is an XML parser. . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/21/2024 5:52:09 AM

Hi Mark, DTDs are special, compared to other schema languages, in that they allow entity declarations that need to be resolved during parsing. Saxon's -dtd option only controls whether the document be validated against the DTD *after* it has been successfully parsed. If the document does not use . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/21/2024 2:06:35 AM

Thanks Michael, I'm using Saxon-PE 10.6 from inside Oxygen v24.1. I don't know what XML parser is used in this setup, I assume Xalan. This is the error I get: I/O error reported by XML parser processing file:/C:/Users/mark/Desktop/company/ExportPub/myfile.xml: D:\DocTypes\dita-oasis\1.2\techni . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/20/2024 12:40:44 PM

The answer is, it depends entirely on the XSLT processor you are using. Most XSLT processors are likely to give you access to some kind of resolver mechanism that enables you to control the options used for XML parsing; and at that point it depends on the XML parser you are using. Michael Kay Saxo . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/19/2024 11:07:19 PM

On 19/04/2024 21:46, Mark Giffin m1879@xxxxxxxxxxxxx wrote: I'm using XSLT 2.0, trying to open an XML file with document(), the XML file references a DTD that is not available, and document() fails. How can I get document() to ignore the DTD? My immediate reaction is just to edit the document and r . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/19/2024 9:08:10 PM

Do you have control over the document to be read in? If so you might want to issue $ xmllint --dropdtd /path/to/desired.xml > /path/to/desired_without_DOCTYPE.xmlb before you run the XSLT2 pgm. (Yes, I realize this does not actually answer the original question, but some folks may find it a use . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/19/2024 8:55:20 PM

I don't think you can ignore the dtd purely from xslt. If your xslt system gives you control over the xml parser you may be able to configure that or supply a catalogue that specifies a different location for a (possibly empty) dtd that is available. Failing that you could read the file with unpar . . . Read full entry »


Re: Ignoring a DTD with document()

Posted 4/19/2024 8:54:37 PM

On 19/04/2024 22:45, Mark Giffin m1879@xxxxxxxxxxxxx wrote: I'm using XSLT 2.0, trying to open an XML file with document(), the XML file references a DTD that is not available, and document() fails. How can I get document() to ignore the DTD? How are you using XSLT 2? From Java? There is a parser . . . Read full entry »


Ignoring a DTD with document()

Posted 4/19/2024 8:45:42 PM

I'm using XSLT 2.0, trying to open an XML file with document(), the XML file references a DTD that is not available, and document() fails. How can I get document() to ignore the DTD? Thanks, Mark . . . Read full entry »


Re: Checking if a file exists

Posted 4/19/2024 12:06:04 AM

Your main problem here is that you are thinking about things very procedurally: you are thinking about creating files and checking for the existence of files in terms of a world that is changing as your code executes, while XSLT is designed to create the illusion of a stateless world that doesn't c . . . Read full entry »


Re: Checking if a file exists

Posted 4/18/2024 11:40:49 PM

On Thu, 18 Apr 2024 at 23:58, dvint dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I'm trying to stop the result-document() from writing to the file more > than once. I had moved from the file:exist() because I need to use the > saxon-pe to use it, but oxygen an . . . Read full entry »


Re: Checking if a file exists

Posted 4/18/2024 10:58:14 PM

I'm trying to stop the result-document() from writing to the file more than once. I had moved from the file:exist() because I need to use the saxon-pe to use it, but oxygen ant transformation only allows the use of the HE edition.So am I right in thinking there may be ae sequencing/file writing iss . . . Read full entry »


Re: Checking if a file exists

Posted 4/18/2024 10:38:54 PM

On Thu, 2024-04-18 at 22:28 +0000, dvint@xxxxxxxxx wrote: > I need to take a list of XML files and rename them based upon values > provided by the writer. I know that my list has duplicate name tokens > for different files in the list. I do get duplicate names when > generated. > > . . . Read full entry »


Checking if a file exists

Posted 4/18/2024 10:27:03 PM

I need to take a list of XML files and rename them based upon values provided by the writer. I know that my list has duplicate name tokens for different files in the list. I do get duplicate names when generated. I'm trying to trap this situation and handle this while creating the files, I hav . . . Read full entry »


Re: Testing if first child is text or an element?

Posted 4/16/2024 1:53:47 AM

I pulled it out as a named template because I needed to test the general conditions in many places. Performance currently isn't an issue. After this conversion effort this code will not have a use.I may have more of these mixed content situations to handle and will keep this in mind for a possible . . . Read full entry »


Re: Testing if first child is text or an element?

Posted 4/16/2024 12:22:29 AM

Hi, Instead of a conditional on the container, how about handling only the node we want to amend? <xsl:template match="info/child::text()[1][matches(.,'\S')]"> <xsl:text>+</xsl:text> <xsl:next-match/> </xsl:template> Much simpler, I think, probably al . . . Read full entry »


Re: Testing if first child is text or an element?

Posted 4/15/2024 10:15:48 PM

sorry typo: self::text() not self::text On Mon, 15 Apr 2024 at 23:12, David Carlisle d.p.carlisle@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > On Mon, 15 Apr 2024 at 20:29, dvint@xxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >& . . . Read full entry »


Re: Testing if first child is text or an element?

Posted 4/15/2024 10:12:53 PM

On Mon, 15 Apr 2024 at 20:29, dvint@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > <xsl:when > test="local-name()='info'"> > <xsl:choose> . . . Read full entry »


Re: Testing if first child is text or an element?

Posted 4/15/2024 10:06:59 PM

That did the trick. Figured I needed a normalize-space in there somewhere, just not sure how to add it.Sent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 4/15/24 . . . Read full entry »


Re: Testing if first child is text or an element?

Posted 4/15/2024 7:35:42 PM

On 15/04/2024 21:29, dvint@xxxxxxxxx wrote: I've got some markup that allows mixed content in an element. When I process this content I need to do something different if the element starts with text vs an element. My content can be like this: <?xml version="1.0" encoding="UTF-8&qu . . . Read full entry »


Re: Testing if first child is text or an element?

Posted 4/15/2024 7:34:42 PM

Changing to this helps <xsl:choose> <xsl:when test="child::node()[1] instance of element()"> <!-- do nothing for info element with content --> </xsl:when> <xsl:when test="child::node()[1] instance of text()"> <xsl:text>+</xsl:text&g . . . Read full entry »


Testing if first child is text or an element?

Posted 4/15/2024 7:29:01 PM

I've got some markup that allows mixed content in an element. When I process this content I need to do something different if the element starts with text vs an element. My content can be like this: <?xml version="1.0" encoding="UTF-8"?> <doc> <step > . . . Read full entry »


Re: Computed dateTime

Posted 4/13/2024 9:32:58 AM

For what it's worth, herebs a bday of weekb implementation in SPARQL that uses XSD arithmetic: https://stackoverflow.com/a/55619260 On Sat, 13 Apr 2024 at 01.17, Peter Flynn peter@xxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Lots of good suggestions there, thanks ev . . . Read full entry »


Re: Computed dateTime

Posted 4/12/2024 11:17:32 PM

Lots of good suggestions there, thanks everyone. Peter . . . Read full entry »


Re: Computed dateTime

Posted 4/12/2024 10:37:04 PM

Martin already gave you the gist of it. Just adding to his response: If you'd like to work with day-of-the-week strings instead of ints and your own lookup table, there's also functx:day-of-week-name-en(). I ran the following functx tests (under MarkLogic, with the functx library that ships with . . . Read full entry »


Re: Computed dateTime

Posted 4/12/2024 8:34:03 PM

On Fri, 2024-04-12 at 20:05 +0000, Peter Flynn peter@xxxxxxxxxxx wrote: > > Before I go reinventing any wheels, is there a function I have missed > like weekdayinMonth($date as gYearMonth)[1] to return the date of the > first Sunday in the specified month and year? format-dateTime($dat . . . Read full entry »


Re: Computed dateTime

Posted 4/12/2024 8:15:50 PM

On 12/04/2024 22:04, Peter Flynn peter@xxxxxxxxxxx wrote: I need to do a number of calendar-based computations involving events determined by formulas such as "third Tuesday of the month" or "5th of the month provided it is not a Friday". It would be convenient to do them in the . . . Read full entry »


Computed dateTime

Posted 4/12/2024 8:04:42 PM

I need to do a number of calendar-based computations involving events determined by formulas such as "third Tuesday of the month" or "5th of the month provided it is not a Friday". It would be convenient to do them in the XSLT, although they could be done in a shell script p . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 5:32:56 PM

I see! All good to know. Indeed, that's how I'd be most likely to consume this - as an XML structure. That's what I mean when I say I haven't kept up much with XML in Java I haven't had to. I've been quite fortunate and happy in having many 'XML-tech-exclusive' engagements, where by that I mea . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 5:21:14 PM

Hah! That shows you how much I've been keeping up with XML in Java in general. Over the past 15+ years or so, most of my work has revolved around XSL/XSD development (spec conversions, schema authoing and consolidation, XSL-FO to PDF, custom code for services, xml-db operations, things like that) . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 5:21:11 PM

> Xerces2 Java has supported this stuff since around 2010. > Indeed so (Saxon's SCM has also been around a long while). I decided in Saxon to deliver the SCM as an XML structure rather than a Java structure because I reckoned many potential users would be happier accessing it using XQuery/XS . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 5:00:07 PM

Xerces2 Java has supported this stuff since around 2010. On Fri, Apr 12, 2024 at 9:54b/AM Anthony J (Tony) Bufort ajbufort@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Thanks very much for posting this to the list, Jeff. That level of > support from Xerces2 is . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 4:54:30 PM

Thanks very much for posting this to the list, Jeff. That level of support from Xerces2 is great to hear! -Tony Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Android XSL-List info and archiveEasyUnsubscribe (by email) . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 4:37:30 PM

The Xerces2 Java package ( https://xerces.apache.org/xerces2-j/index.html ) supports the Schema Component Designators ( https://www.w3.org/TR/2010/CR-xmlschema-ref-20100119/ ) . There is a DOM implementation (org.apache.xerces.dom.PSVIDOMImplementationImpl) provided that will, in conjunction with . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 2:01:51 PM

* What happens to attributes? There are no attributes. * What happens to choice particles? There are no choices. * What happens to model groups? There are no groups. * What happens to simple types? There are simpleTypes but all I am interested in is the elements b minOccu . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 1:38:17 PM

One example does not a specification make. What happens to attributes? What happens to choice particles? What happens to wildcards? What happens to model groups? What happens to simple types? Michael Kay Saxonica > On 12 Apr 2024, at 13:06, Roger L Costello costello@xxxxxxxxx <xsl-list-ser . . . Read full entry »


Re: Do you have XSLT code that converts a Schema Comp

Posted 4/12/2024 12:20:14 PM

On 12/04/2024 14:06, Roger L Costello costello@xxxxxxxxx wrote: > Hi Folks, > > The folks at SAXON have a wonderful tool that converts an XML Schema into a form that they call the Schema Component Model (SCM). The SCM contains lots of metadata (minOccurs, maxOccurs, default) about each ite . . . Read full entry »


Do you have XSLT code that converts a Schema Component

Posted 4/12/2024 12:05:49 PM

Hi Folks, The folks at SAXON have a wonderful tool that converts an XML Schema into a form that they call the Schema Component Model (SCM). The SCM contains lots of metadata (minOccurs, maxOccurs, default) about each item in the schema. I used the tool to generate a SCM for an XML Schema that I ha . . . Read full entry »


Re: evaluation of predicate using | mistyped as ||

Posted 4/11/2024 8:42:07 PM

The '||' operator has lower precedence than '|', so the predicate means > (descendant::foo | self::foo) || ancestor::foo So it evaluates both operands of '||' as node-sets, atomizes the results, concatenates them, and the predicate is true if the result of the concatation is a non-empty string . . . Read full entry »


evaluation of predicate using | mistyped as ||

Posted 4/11/2024 8:08:33 PM

I wrote a stylesheet where I wanted to use a template with a match pattern doing a union B <xsl:template match="node()[descendant::foo | self::foo | ancestor::foo]"> B B B <xsl:copy> B B B B B <xsl:apply-templates/> B B B </xsl:copy> B </xsl:template> bu . . . Read full entry »


Re: Tags in text content

Posted 4/11/2024 2:01:37 PM

For people that like to use XProc, in situations like this, XProc's <p:unescape-markup content-type="text/html"/> is my friend. It may generate some extra HTML elements that you don't want. I remove them with <p:unwrap match="html:html | html:head | html:body" xmlns . . . Read full entry »


Re: Tags in text content

Posted 4/11/2024 8:33:39 AM

> I have some xml where there are btagsb embedded in the text content. As Martin suggested, parse-xml-fragment() will do the job as long as all of the escaped markup is well-formed. If whatbs been escaped is HTML that may have come from a process that produced not-well-formed markup, for exa . . . Read full entry »


Re:   Tags in text content

Posted 4/11/2024 12:21:00 AM

Input: <?xml version="1.0" encoding="UTF-8"?> <root> <p>&lt;em&gt;Business day&lt;/em&gt; means a calendar day.</p> <p>No children.</p> </root> Stylesheet: <?xml version="1.0" encoding=&q . . . Read full entry »


Re:   Tags in text content

Posted 4/11/2024 12:06:09 AM

Martin, Thank you for the quick response. I will post some code tomorrow. -Rick From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, April 10, 2024 7:03 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Aw: Tags in text content Use the funct . . . Read full entry »


Aw:  Tags in text content

Posted 4/10/2024 11:02:59 PM

Use the function parse-xml-fragment -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 11.04.24, 00:53 schrieb "rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: HI All, I have some xml where there are btagsb embedded in the text . . . Read full entry »


Tags in text content

Posted 4/10/2024 10:53:04 PM

HI All, I have some xml where there are "tags" embedded in the text content. I need to convert these into regular elements. I haven't done any coding yet, but I want to see if there is a general approach that I should take before I get started. Here is a small example: <?xml v . . . Read full entry »


Re: Move Text

Posted 4/9/2024 7:13:57 AM

On 09/04/2024 06:23, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote: Hi, I am trying to move text to paragraph based on SUP value matching. Please find the below xml, output xml and xsl. XML -------- <body> B B <div id="FNid000"> B B <p margin-left="123.25pt" . . . Read full entry »


Move Text

Posted 4/9/2024 4:22:54 AM

Hi, I am trying to move text to paragraph based on SUP value matching. Please find the below xml, output xml and xsl. XML -------- <body> <div id="FNid000"> <p margin-left="123.25pt">8.3. In <a name="_ftnref1"/> <a h . . . Read full entry »


[Solution] Need an XPath expression which returns all

Posted 4/7/2024 2:59:38 PM

Hi Folks, Here is how to find all xs:pattern elements containing a regex that permits an unbounded number of characters: //xs:pattern[matches(@value, "regex")] Replace "regex" with this: ^(,[^\}]|\\.|\[(\\.|[^\]\\])*\]|[^*+,\[\\])*([*+]|,\}<file://.|[%5e/%5d/%5d)* /%5d|%5 . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/5/2024 3:01:52 PM

"Willem Van Lishout willemvanlishout@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes: > Is this even possible, theoretically speaking? As soon as you start > using lookaheads, square brackets, and so on, your patterns will > likely fail. I don't think regex can . . . Read full entry »


Re:   Need an XPath expression which returns all xs:pa

Posted 4/4/2024 11:54:12 PM

On Thu, 2024-04-04 at 15:47 +0000, Roger L Costello costello@xxxxxxxxx wrote: > David Carlisle devised a brilliant approach: One way to make this approach easier to maintain is to use a variable, e.g. in XSLT <xsl:variable name="normalisations" as="element(change)*"> . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 10:41:46 PM

On Thu, 2024-04-04 at 17:19 +0000, Dimitre Novatchev dnovatchev@xxxxxxxxx wrote: > > As one small first step, we could add such a timeout to the myriads > of options that are possible to provide to fn:transform. I think this should be left as a quality of implementation issue, although a . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 6:05:08 PM

You seem to be close to a reasonably good solution already. Unless I'm missing something, you've identified the only four ways that a regular expression can match an unbounded number of characters: the * and + operators, and a quantifier with a comma but no second argument. That's a good start, I . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 5:19:04 PM

> But like others I also wonder whether correctly recognizing such regexes actually achieves the underlying intended (but unstated) purpose. If the goal is to prevent an accidental or intentional DOS (Denial of Service) attack, we do have examples how this is successfully achieved in other case . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 4:50:15 PM

On Thu, 4 Apr 2024 at 17:10, Michael Kay michaelkay90@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I don't think these rules handle the fact that `*` and `+` within square > brackets are ordinary characters and do not need to be escaped. > > Michael Kay > Saxo . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 4:13:41 PM

Hi Roger, In order to deal with '\' used as an escape character, then such a solution must ignore '\\' as this is not an escape character but represents the (regular) character `\`. In the same way, '\\\\' represents 2 (regular) consecutive '\' characters, ..., and so on, ... And a sequence of odd . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 4:11:44 PM

On Thu, 4 Apr 2024 at 16:46, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > David Carlisle devised a brilliant approach: > > Do a series of replace operations: > > remove all whitespace: > > replace(@value,'\s','') > > r . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 4:10:07 PM

I don't think these rules handle the fact that `*` and `+` within square brackets are ordinary characters and do not need to be escaped. Michael Kay Saxonica > On 4 Apr 2024, at 16:46, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > David Ca . . . Read full entry »


Re:  Need an XPath expression which returns all xs:pat

Posted 4/4/2024 3:46:20 PM

David Carlisle devised a brilliant approach: Do a series of replace operations: remove all whitespace: replace(@value,'\s','') replace \-quoted characters by x: replace(@value,'\\.','x') replace {99,} constructs by * replace(@value,'\{[0-9]+,\}','*') Here are the replaces, inlin . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 3:39:59 PM

>Is this even possible, theoretically speaking? i wondered that myself. I think it's correct to say that a regex can't match an unbounded number of characters unless it contains one of the quantifiers indicated. So the question is whether these quantifiers can be detected reliably using a regu . . . Read full entry »


Re: indenting maps on write

Posted 4/4/2024 2:59:33 PM

On Thu, Apr 04, 2024 at 02:47:57PM -0000, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx scripsit: > Hating to sound like a broken record (who else knows what I'm talking about?), I can't help but notice that Graydon basically needs an XML parse that doesn't perform attribute value normalization. . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 2:52:00 PM

On Thu, 4 Apr 2024 at 15:38, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Holla again, > > > > With every reason to trust David C, nonetheless wouldnbt it be fine if we > could, say, set up a bunch of unit tests to actual . . . Read full entry »


Re: indenting maps on write

Posted 4/4/2024 2:47:50 PM

Hi again! Hating to sound like a broken record (who else knows what I'm talking about?), I can't help but notice that Graydon basically needs an XML parse that doesn't perform attribute value normalization. Couldn't that too be done using iXML? His processor would pick up a text file, parse it us . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 2:38:08 PM

Holla again, With every reason to trust David C, nonetheless wouldn't it be fine if we could, say, set up a bunch of unit tests to actually determine which of these subtle incantations do as we think they do? An XSpec sheet could be wired to test both regex-based and parsing-based solutions as im . . . Read full entry »


Re: indenting maps on write

Posted 4/4/2024 2:26:22 PM

On Wed, Apr 03, 2024 at 11:30:53AM -0000, David Carlisle d.p.carlisle@xxxxxxxxx scripsit: > The code I posted ran without error and handled removing the space it > my have got mangled by an email program I'll send it direct as an > attachment Your code works fine. The less-simplified ca . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 2:20:19 PM

On Thu, 4 Apr 2024 at 14:48, Willem Van Lishout willemvanlishout@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Is this even possible, theoretically speaking? As soon as you start using > lookaheads, square brackets, and so on, your patterns will likely fail. I > don' . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 2:06:54 PM

Hello XSL-List, Indeed (as Willem says). It's too bad we can't parse the regular expression with a parser. But wait! The real solution and the only truly 'easy' one (unless you like bleeding edges) is Invisible XML or something like it. https://invisiblexml.org/ find or make the iXML grammar an . . . Read full entry »


Re: Re:  Need an XPath expression which returns all xs

Posted 4/4/2024 2:03:25 PM

You didn't supply an example expression like that in your initial query. There's an awful lot of permutations of unbounded expressions. You could use more groups and "or" bars? Good luck! -----Original Message----- From: Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxx . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 1:48:34 PM

Is this even possible, theoretically speaking? As soon as you start using lookaheads, square brackets, and so on, your patterns will likely fail. I don't think regex can parse regex. On 4 Apr 2024, 20:15, at 20:15, "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxx . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 1:14:55 PM

On Thu, 4 Apr 2024 at 13:29, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > I want to find, in an XML Schema, all xs:pattern elements containing a > regex that permits an unbounded number of characters. > > Here are exa . . . Read full entry »


Re:  Need an XPath expression which returns all xs:pat

Posted 4/4/2024 1:02:59 PM

Hello Edward, >>> matches(@value, '[a-zA-Z]+(\*|\+|\{\d(,.\})?)') That assumes the regexes are all of this form: <xs:pattern value="A*"/> However, there are other forms that permit an unbounded number of characters, such as: <xs:pattern value="[0-9]{3}D*[ABC]&q . . . Read full entry »


Re: Aw:  Need an XPath expression which returns all xs

Posted 4/4/2024 12:52:21 PM

Yes, sorry, my answer is also predicated on using matches, e.g., matches(@value, '[a-zA-Z]+(\*|\+|\{\d(,.\})?)') From: Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, April 4, 2024 8:43 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Aw: Need an . . . Read full entry »


Re: Need an XPath expression which returns all xs:patt

Posted 4/4/2024 12:51:00 PM

Couldn't you just use a character group, something like this? [a-zA-Z]+(\*|\+|\{\d(,.\})?) That would match any number of letters followed by an *, +, or an unbounded range but not allow an escape character in between the letters and the quantifiers. -----Original Message----- From: Roger L Cost . . . Read full entry »


Aw:  Need an XPath expression which returns all xs:pat

Posted 4/4/2024 12:42:33 PM

Well, instead of contains use matches with a regular expression, I suppose. -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 04.04.24, 14:29 schrieb "Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: Hi Folks, I w . . . Read full entry »


Need an XPath expression which returns all xs:pattern

Posted 4/4/2024 12:28:59 PM

Hi Folks, I want to find, in an XML Schema, all xs:pattern elements containing a regex that permits an unbounded number of characters. Here are examples of xs:pattern elements that I want to find: <xs:pattern value="A*"/> <xs:pattern value="A+"/> <xs:pattern va . . . Read full entry »


Re: indenting maps on write

Posted 4/3/2024 11:30:46 AM

On Wed, 3 Apr 2024 at 12:16, Graydon graydon@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Wed, Apr 03, 2024 at 12:29:12AM -0000, David Carlisle > d.p.carlisle@xxxxxxxxx scripsit: > > If you want to force a newline in the serialisation you need to > > spe . . . Read full entry »


Re: indenting maps on write

Posted 4/3/2024 11:22:42 AM

On Wed, Apr 03, 2024 at 01:43:53AM -0000, Willem Van Lishout willemvanlishout@xxxxxxxxx scripsit: > In my experience, this is hard to get right. It shows that XML attributes > weren't really conceived with the idea to write code in them. > > Some ideas: > - Modify the XML parser to . . . Read full entry »


Re: indenting maps on write

Posted 4/3/2024 11:16:38 AM

On Wed, Apr 03, 2024 at 12:29:12AM -0000, David Carlisle d.p.carlisle@xxxxxxxxx scripsit: > If you want to force a newline in the serialisation you need to > special case the newline from the standard xml normalisation, I use @ > here but any character guaranteed not to be in the input wou . . . Read full entry »


Re: indenting maps on write

Posted 4/3/2024 1:43:46 AM

In my experience, this is hard to get right. It shows that XML attributes weren't really conceived with the idea to write code in them. Some ideas: - Modify the XML parser to not do attribute normalisation (if possible in your environment) - Maybe try parsing the map using xsl:evaluate and reconst . . . Read full entry »


Re: indenting maps on write

Posted 4/3/2024 12:29:04 AM

If you want to force a newline in the serialisation you need to special case the newline from the standard xml normalisation, I use @ here but any character guaranteed not to be in the input would work <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl=&q . . . Read full entry »


Re: indenting maps on write

Posted 4/3/2024 12:16:03 AM

On Wed, 3 Apr 2024 at 00:28, Graydon graydon@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Tue, Apr 02, 2024 at 09:19:29PM -0000, Michael Kay > michaelkay90@xxxxxxxxx scripsit: > > Well, `file:write` isn't going to add any whitespace, it will be some > proce . . . Read full entry »


Re: indenting maps on write

Posted 4/2/2024 11:28:49 PM

On Tue, Apr 02, 2024 at 09:19:29PM -0000, Michael Kay michaelkay90@xxxxxxxxx scripsit: > Well, `file:write` isn't going to add any whitespace, it will be some process prior to that (which you haven't shown us). If I boil the whole thing down to a simple example, if I start with: <?xml versi . . . Read full entry »


Re: indenting maps on write

Posted 4/2/2024 9:19:15 PM

Well, `file:write` isn't going to add any whitespace, it will be some process prior to that (which you haven't shown us). To know where the whitespace came from, we need to see more of the process by which this output was generated. Michael Kay Saxonica > On 2 Apr 2024, at 21:37, Graydon gray . . . Read full entry »


indenting maps on write

Posted 4/2/2024 8:36:42 PM

Hello -- I'm in an environment using Saxon-J PE 12.4. I have a large transform that I want to have consistently formatted because it goes into version control and it vexes my colleagues if there's random whitespace change when they're asked to review the actual changes to the transform. This tran . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/2/2024 10:55:26 AM

> And on April 1st everything is possible ... :) > > What about a default namespace problem? :) > That would have been my first thought if they were accessing elements rather than attributes. Michael Kay Saxonica . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/2/2024 6:18:21 AM

Hi Dan, Your assumption of column names being an indicator of column counts is the real problem. I know of tools which e.g., between col1 and col2 insert colname="col01", if the user clicks a button in the table editor interface to insert an additional column. The CALS table spec at http . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/1/2024 7:58:25 PM

I found at least one problem which is the substring-after. Not all of my tables use col as a prefix but use just c. Not sure how that happens as these are complex tables and I'm sure would have been created in the table editor.Now exploring regex to just match the digits, but that looks like analyz . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/1/2024 7:32:27 PM

On Mon, Apr 1, 2024 at 12:23b/PM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > My guess is that you've got the context wrong, i.e. that @namest and > @nameend are not selecting anything because the `<entry>` element isn't the > context item. . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/1/2024 7:23:17 PM

My guess is that you've got the context wrong, i.e. that @namest and @nameend are not selecting anything because the `<entry>` element isn't the context item. It's only a guess, but the code you've shown us is correct, which means the error must be in the code you haven't shown us, and that . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/1/2024 7:02:53 PM

On 01/04/2024 20:59, dvint dvint@xxxxxxxxx wrote: I don't recognize the use of {} in the comment. Can you use value-of and select the result? I'm outputting text not xml, so the comment wouldn't work. That was XSLT 3 with a text value template (expand-text="yes"), but it doesn't matter, . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/1/2024 6:59:03 PM

I don't recognize the use of {} in the comment. Can you use value-of and select the result? I'm outputting text not xml, so the comment wouldn't work.That was the minimal code in my example. I'll see if I can extract something fuller but simple.Sent from my Verizon, Samsung Galaxy smartphone ------ . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/1/2024 6:49:28 PM

Seems the problem is not in what you have described, but somewhere else. I cannot reproduce it. When this transformation: <xsl:stylesheet version="2.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:out . . . Read full entry »


Re: Doing math in XSLT?

Posted 4/1/2024 6:43:33 PM

On 01/04/2024 20:37, dvint@xxxxxxxxx wrote: I have the following XML <row> B B B B <entry nameend="col2" namest="col1"> B B B B B B B <p>OpenID Connect client settings</p> B B B B B B B <note B B B B B B B B B B B id="note_N1055C" B B B B . . . Read full entry »


Doing math in XSLT?

Posted 4/1/2024 6:36:55 PM

I have the following XML <row> <entry nameend="col2" namest="col1"> <p>OpenID Connect client settings</p> <note id="note_N1055C" >The following parameters are only applicable when this client supports the OpenID Connect use . . . Read full entry »


XSL-List Guidelines

Posted 4/1/2024 2:07:40 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: Why does my XSLT produce a Warning message with n

Posted 3/31/2024 11:14:12 AM

Thank you everyone for your excellent responses. I decided to go with Liam's solution: if (normalize-space($test) castable as xs:integer) then xs:integer(normalize-space($test)) div 10 else () That works great and no Warning messages are produced. /Roger . . . Read full entry »


Re: Why does my XSLT produce a Warning message with n

Posted 3/31/2024 10:00:38 AM

Usual problem when technology tries to be smart but isn't quite smart enough. Saxon is smart enough to work out that if `xs:integer($test)` is ever evaluated then it will give a failure. It's not smart enough to work out that the expression will never be evaluuated. Well, actually it is, but it on . . . Read full entry »


Re: Why does my XSLT produce a Warning message with n

Posted 3/31/2024 10:00:37 AM

Usual problem when technology tries to be smart but isn't quite smart enough. Saxon is smart enough to work out that if `xs:integer($test)` is ever evaluated then it will give a failure. It's not smart enough to work out that the expression will never be evaluuated. Well, actually it is, but it on . . . Read full entry »


Re: Why does my XSLT produce a Warning message with n

Posted 3/31/2024 8:43:13 AM

On Sun, 2024-03-31 at 07:57 +0000, Roger L Costello costello@xxxxxxxxx wrote: > > How can the XSLT code be written so that, when executed, it doesn't > produce a Warning message?B You may find that reversing the sense of the test gts rid of the warning - if (normalize-space($test) ne '' . . . Read full entry »


Re: Why does my XSLT produce a Warning message with n

Posted 3/31/2024 8:41:31 AM

Am 31.03.2024 um 09:56 schrieb Roger L Costello costello@xxxxxxxxx: I have a program that generates this XSLT code: <xsl:template match="/"> <xsl:variable name="test" select="' '" as="xs:string"/> <xsl:value-of select=&quo . . . Read full entry »


Re: Why does my XSLT produce a Warning message with n

Posted 3/31/2024 8:19:34 AM

Hi Roger, I don't know why Saxon doesn't determine that the xs:integer() branch will only be reached when normalize-space($test) has a length > 0. Interestingly, there is no warning (only a dynamic error when executing) for $test ! xs:integer(.) div 10 Maybe generate the following expression . . . Read full entry »


Why does my XSLT produce a Warning message with never

Posted 3/31/2024 7:56:32 AM

Hi Folks, I have a program that generates this XSLT code: <xsl:template match="/"> <xsl:variable name="test" select="' '" as="xs:string"/> <xsl:value-of select=" if (normalize-space($test) eq '') then () . . . Read full entry »


Re: What is the best way to get the value of a leaf e

Posted 3/30/2024 6:44:10 PM

I would choose between string($leaf-elmt) and data($leaf-elmt). If your document is untyped (not schema-validated) then they are almost equivalent: the difference is that string() returns a string whereas data() returns untypedAtomic, which allows it to participate for example in arithmetic operati . . . Read full entry »


Re: What is the best way to get the value of a leaf e

Posted 3/29/2024 1:04:48 PM

> On 29 Mar 2024, at 13:03, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Are there other ways? > <xsl:variable name="leaf-elmt-value" select="$leaf-elmt/string(.)b/> Cheers, Leo . . . Read full entry »


Re: What is the best way to get the value of a leaf e

Posted 3/29/2024 12:17:19 PM

On Fri, 29 Mar 2024 at 12:02, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > I have a variable which holds a leaf element: > > $leaf-elmt > > I want to store the value of the leaf element into this variable: . . . Read full entry »


Re: What is the best way to get the value of a leaf e

Posted 3/29/2024 12:14:02 PM

> Am 29.03.2024 um 13:03 schrieb Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: > > Hi Folks, > > I have a variable which holds a leaf element: > > $leaf-elmt > > I want to store the value of the leaf element into this variable: > . . . Read full entry »


What is the best way to get the value of a leaf elemen

Posted 3/29/2024 12:02:43 PM

Hi Folks, I have a variable which holds a leaf element: $leaf-elmt I want to store the value of the leaf element into this variable: $leaf-elmt-value What is the best way to declare $leaf-elmt-value and assign it the value of $leaf-elmt? Here are 3 ways of doing it: <xsl:variable name=&q . . . Read full entry »


Re: is there a more concise way of pulling diverse el

Posted 3/27/2024 8:05:44 AM

Template rules are your friend: replace the call on xsl:for-each with a call on xsl:apply-templates, perhaps with a named mode, and then write template rules for matching the indvidual elements. You might use one rule for each element: <xsl:template match="document">...</xsl:tem . . . Read full entry »


is there a more concise way of pulling diverse element

Posted 3/27/2024 6:47:11 AM

Hi Application is using XSL 2.0 Apologies if this is a standard pattern or a FAQ I have this issue in several places but the most obvious is where I am generating a TOC for a large document, and I need to extend it to pull in a few additional elements The stylesheet started with a t . . . Read full entry »


[ANN] Version 26.1 of the Oxygen XML Suite of Products

Posted 3/26/2024 9:50:12 AM

Hi everyone, We are excited to announce that Oxygen XML Developer/Editor version 26.1 is now available! Listing below some new features which may be useful for the XSL community: XSLT / XQuery / XPath / XProc ================================== * New versions for the Saxon XSLT and XQuery transf . . . Read full entry »


Re: Aw: Re: Trying to Extract a node with matching at

Posted 3/25/2024 1:41:16 AM

Martin (et al), That (changing to xsl:copy-of) did the trick!! Thanks!! Jim On Sunday, March 24, 2024 at 04:35:35 AM EDT, Martin Honnen <martin.honnen@xxxxxx> wrote: You need xsl:copy-of, not xsl:value-of, if you want to output the full node. But if there is some default namespace de . . . Read full entry »


Re: Trying to Extract a node with matching attribute

Posted 3/24/2024 10:40:44 AM

To show you an example where the suggested XPath, with the input as shown (edited to make it namespace well-formed) selects the wanted element node, see the following XSLT fiddle <https://martin-honnen.github.io/xslt3fiddle/?xslt=%3C%3Fxml+version%3D%221.0 %22+encoding%3D%22utf-8%22%3F%3E%0D%0A% . . . Read full entry »


Aw: Re: Trying to Extract a node with matching attrib

Posted 3/24/2024 8:35:41 AM

You need xsl:copy-of, not xsl:value-of, if you want to output the full node. But if there is some default namespace declaration the suggested XPath expression might not select anything. -- Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 24.03.24, 01:35 schrieb " . . . Read full entry »


Re: Trying to Extract a node with matching attribute

Posted 3/24/2024 1:01:08 AM

Are there any namespace declarations in your XML file? A common reason for XPath expressions not selecting anything is that you ignored the namespaces. Michael Kay Saxonica > On 24 Mar 2024, at 00:35, ohaya ohaya@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > I tri . . . Read full entry »


Re: Trying to Extract a node with matching attribute

Posted 3/24/2024 12:34:43 AM

I tried the XSL that Liam suggested, but it isn't finding anything :(....B Below is the xsltproc run with -v: -bash-4.4$ xsltproc -v mulberry.xsl configfile.xml creating dictionary for stylesheet reusing dictionary from mulberry.xsl for stylesheet xsltParseStylesheetProcess : found stylesheet xsl . . . Read full entry »


Re: Trying to Extract a node with matching attribute

Posted 3/23/2024 6:08:36 PM

Might need to use <xsl:output method="text"/> as well. On Fri, Mar 22, 2024 at 7:19b/PM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > On Sat, 2024-03-23 at 01:55 +0000, ohaya ohaya@xxxxxxxxx wrote: > [...] > > I think w . . . Read full entry »


Re: Trying to Extract a node with matching attribute

Posted 3/23/2024 2:19:53 AM

On Sat, 2024-03-23 at 01:55 +0000, ohaya ohaya@xxxxxxxxx wrote: [...] I think what you want is simply XPath here. But with XSLT you could use, <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> . . . Read full entry »


Trying to Extract a node with matching attribute value

Posted 3/23/2024 1:54:17 AM

Hi, I am trying to use xslt and xsltproc (on Redhat) to extract one of the nodes from a versy large XML file. The XML file is structured similar to the following: <xsd:Conf> B B <SettingHandler.... B B . B B . B B </SettingHandler> B B <SettingHandler.... B B . B B . B B . . . Read full entry »


Re: Seek an XPath expression which concatenates an ar

Posted 3/16/2024 3:19:47 PM

In 4.0 you can use `{$a}{$b}` as an alternative. Michael Kay Saxonica > On 16 Mar 2024, at 02:05, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On Fri, 2024-03-15 at 14:12 +0000, Martin Honnen martin.honnen@xxxxxx <mailto:martin.hon . . . Read full entry »


Re: Seek an XPath expression which concatenates an ar

Posted 3/16/2024 2:05:19 AM

On 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 ar

Posted 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 an

Posted 3/15/2024 4:28:51 PM

On 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 an

Posted 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 an

Posted 3/15/2024 4:18:24 PM

On 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 ar

Posted 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 ar

Posted 3/15/2024 4:11:36 PM

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 simply employing XPath's "composable language" capability. The XPath specification says this: . . . Read full entry »


Re: Seek an XPath expression which concatenates an ar

Posted 3/15/2024 2:48:13 PM

Indeed, 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 invol

Posted 3/15/2024 2:34:50 PM

Hello 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 ar

Posted 3/15/2024 2:25:40 PM

Two 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 ar

Posted 3/15/2024 2:20:49 PM

On 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 ar

Posted 3/15/2024 2:11:51 PM

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-value>0100</binary-value> > <binary-value>11</binary-value> > . . . Read full entry »


Re: Seek an XPath expression which concatenates an ar

Posted 3/15/2024 1:55:41 PM

string-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 ar

Posted 3/15/2024 1:55:17 PM

string-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 arbitra

Posted 3/15/2024 1:53:22 PM

Hi 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 PM

Dan, 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 PM

Your 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 PM

Never 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 PM

On 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 PM

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()" /> And just process specific e . . . Read full entry »


Re: How to declaratively describe a mapping that invol

Posted 3/13/2024 9:09:17 PM

Hi 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 invol

Posted 3/13/2024 7:41:23 PM

Hi 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 invol

Posted 3/13/2024 6:45:14 AM

Hi 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 invol

Posted 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 invol

Posted 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 that

Posted 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 date

Posted 3/12/2024 8:08:16 PM

Thanks, 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 date

Posted 3/12/2024 7:24:58 PM

On 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 date

Posted 3/12/2024 6:26:36 PM

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: 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 invol

Posted 3/12/2024 5:53:41 PM

Someone 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 date

Posted 3/12/2024 4:09:41 PM

On 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 date

Posted 3/12/2024 4:03:32 PM

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 <records xsi:type="sf:Task"> <sf:Id xsi:nil="true"/> <sf:ActivityAwaren . . . Read full entry »


Re: How to declaratively describe a mapping that invol

Posted 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 invol

Posted 3/12/2024 2:43:10 PM

Roger, 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 invol

Posted 3/12/2024 1:26:52 PM

Remember 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 involves

Posted 3/12/2024 1:20:45 PM

Hi 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 Guidelines

Posted 3/1/2024 2:52:45 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: Ant XSLT task issues - redo

Posted 2/19/2024 3:52:43 PM

You 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 - redo

Posted 2/19/2024 3:49:10 PM

I 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 - redo

Posted 2/19/2024 3:38:46 PM

I 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 entities

Posted 2/15/2024 4:55:43 PM

Phase 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 entities

Posted 2/15/2024 4:00:47 PM

On 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 "&#38;"> > > <!ENTITY gt "&#6 . . . Read full entry »


Re: Resolving character entities

Posted 2/15/2024 4:00:06 PM

amp 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 entities

Posted 2/15/2024 3:52:11 PM

Hi All, I have this as the input: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE subtask [ <!ENTITY lt "&#38;"> <!ENTITY gt "&#62;"> <!ENTITY amp "&#38;"> ]> <subtask> <title> . . . Read full entry »


Re: Ant XSLT task issues - redo

Posted 2/15/2024 3:44:05 PM

Hi 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 - redo

Posted 2/13/2024 5:30:23 PM

Sorry 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 processing

Posted 2/13/2024 5:20:48 PM

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 "programming" language supported to do this . . . Read full entry »


Re: Find several different attribute values on many e

Posted 2/10/2024 1:05:05 AM

Or, 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 e

Posted 2/9/2024 4:45:43 PM

Thanks, 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 e

Posted 2/9/2024 4:03:36 PM

On 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 service

Posted 2/9/2024 3:53:01 PM

On 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 service

Posted 2/9/2024 3:45:57 PM

Hi 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 one

Posted 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 one

Posted 2/9/2024 2:10:40 PM

Hi 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 one

Posted 2/9/2024 2:05:39 PM

There 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 one

Posted 2/9/2024 2:03:33 PM

On 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 typ

Posted 2/9/2024 1:57:10 PM

Hi 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 e

Posted 2/9/2024 3:18:59 AM

Hi, 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 e

Posted 2/9/2024 1:46:12 AM

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, 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 e

Posted 2/8/2024 11:51:40 PM

On 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 e

Posted 2/8/2024 11:32:09 PM

Here 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 e

Posted 2/8/2024 11:13:41 PM

That 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 e

Posted 2/8/2024 11:10:20 PM

Thanks, 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 e

Posted 2/8/2024 10:55:11 PM

On 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 e

Posted 2/8/2024 10:42:02 PM

On 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 e

Posted 2/8/2024 10:39:41 PM

Saxon 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 e

Posted 2/8/2024 10:32:41 PM

Saxon 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 e

Posted 2/8/2024 10:32:41 PM

Saxon 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 e

Posted 2/8/2024 10:31:53 PM

Dan, 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 e

Posted 2/8/2024 10:28:27 PM

Hi 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 e

Posted 2/8/2024 10:22:54 PM

On 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 e

Posted 2/8/2024 10:19:33 PM

Yes, 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 elemen

Posted 2/8/2024 10:11:22 PM

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 <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 PM

There 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 PM

Hi 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 doctype

Posted 2/6/2024 9:24:06 AM

On 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 DOCTYPE

Posted 2/6/2024 7:32:33 AM

On 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 »



PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

Attend a Live Webinar This Week!

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

Why Pay More for XML Tools?

With Stylus Studio® X14 XML Enterprise Suite, you get the most comprehensive XML tool suite at one incredibly low price. Value: it's just one of many reasons why smart XML developers are choosing Stylus Studio!

 
Free Stylus Studio XML Training:
W3C Member