Search found 96 matches

by Martin Honnen
Fri Mar 08, 2024 6:26 pm
Forum: XSLT and FOP
Topic: Performance issue when using “following-sibling“
Replies: 1
Views: 182

Re: Performance issue when using “following-sibling“

Can you tell us which XSLT processor you are using to run the tests? Is that Saxon 12? And if so, will it be the HE edition or can you also use the EE edition provided in oXygen? I would certainly think that doing e.g. <xsl:template match="doc:Catalogue"> <xsl:for-each-group select="c...
by Martin Honnen
Mon Dec 18, 2023 8:01 pm
Forum: XSLT and FOP
Topic: OAI - resumption Token - xsl:iterate
Replies: 1
Views: 333

Re: OAI - resumption Token - xsl:iterate

I would consider a recursive function e.g. <xsl:function name="mf:process-records" as="node()*"> <xsl:param name="recordList" as="element(oai:ListRecords)"/> <xsl:for-each select="oai:record"> <xsl:variable name="record" select="copy-o...
by Martin Honnen
Mon Dec 18, 2023 7:41 pm
Forum: XSLT and FOP
Topic: Can I use a character map for &gt;
Replies: 1
Views: 193

Re: Can I use a character map for &gt;

Instead of using apply-templates, I would suggest to use the serialize function e.g.

Code: Select all

<xsl:value-of select="serialize(node(), map { 'method' : 'xml' })"/>
by Martin Honnen
Wed May 10, 2023 11:07 pm
Forum: Feature Request
Topic: Evaluate as you type for XSLT
Replies: 2
Views: 560

Evaluate as you type for XSLT

In oXygen the XPath/XQuery builder has an option to enable automatic evaluation (evaluate as you type) to see direct results of your XPath or XQuery as you edit/type it. For XSLT it would be nice to have that as well as an option for rapid prototyping and a direct experience of the results of your c...
by Martin Honnen
Sat Mar 18, 2023 1:58 pm
Forum: Feature Request
Topic: XSLT transformation of JSON as the primary input document (like Saxon offers with -json option)
Replies: 1
Views: 576

XSLT transformation of JSON as the primary input document (like Saxon offers with -json option)

While oXygen allows me to apply XSLT 3.0 on JSON by using the xsl:initial-template and pass the JSON as a parameter (as described in https://www.oxygenxml.com/doc/versions/25.1/ug-editor/topics/json-transforming-xslt.html?hl=transforming%2Cjson%2Cdocuments%2Cxslt) I would like to have also an option...
by Martin Honnen
Tue Feb 21, 2023 12:51 pm
Forum: XSLT and FOP
Topic: How to replace entire document, including prolog
Replies: 8
Views: 1421

Re: How to replace entire document, including prolog

I would try whether sourceLocation allows you to provide solely / instead of /article. The same for targetLocation. But I haven't tested whether oXygen allows/supports that.
by Martin Honnen
Thu Feb 16, 2023 5:13 pm
Forum: XSLT and FOP
Topic: What are parameters for collection() function
Replies: 2
Views: 651

Re: What are parameters for collection() function

This depends on the used XSLT/XPath/XQuery processor, for Saxon 11 see the documentation at https://www.saxonica.com/html/documenta ... ories.html
by Martin Honnen
Mon Feb 13, 2023 2:26 pm
Forum: XSLT and FOP
Topic: SCH: initialize a variable during built to XSLT
Replies: 4
Views: 914

Re: SCH: initialize a variable during built to XSLT

It looks to me as if you should be able to use the other document in a Schematron variable e.g. <sch:let name="PartyLegalId" value="doc('PartyLegalId.xml')//*:defaultId/normalize-space() => string-join(',')"/> (queryBinding="xslt3") or <sch:let name="PartyLegalId&q...
by Martin Honnen
Tue Dec 13, 2022 2:17 pm
Forum: XSLT and FOP
Topic: Test seems to catch more than the template match should select
Replies: 6
Views: 1211

Re: Test seems to catch more than the template match should select

Schematron, if implemented in XSLT, usually allows you to make use of xsl:function or xsl:key so if you want to use that grouping construct you could try to put it into a function you call then from your Schematron rule or, as grouping/keying is basically the same approach, use e.g. <xsl:key name=&q...
by Martin Honnen
Sat Dec 10, 2022 1:08 pm
Forum: XSLT and FOP
Topic: Test seems to catch more than the template match should select
Replies: 6
Views: 1211

Re: Test seems to catch more than the template match should select

If you use a context of e.g. `cac:Item[cbc:Description[2]]` you can then check e.g. `count(distinct-values(cbc:Description/@languageID)) lt count(cbc:Description/@languageID)`. Or perhaps in terms of Schematron <pattern> <rule context="cac:Item[cbc:Description[2]]"> <assert test="coun...
by Martin Honnen
Sat Oct 15, 2022 1:46 pm
Forum: XQuery
Topic: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Replies: 4
Views: 5336

Re: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml

It appears the new release 25 has quite improved, now the result is shown in the results pane as an "unnamed node" with the serialization of e.g. <?xml version="1.0" encoding="UTF-8"?> <map xmlns="http://www.w3.org/2005/xpath-functions"> <string key="key&...
by Martin Honnen
Wed Oct 05, 2022 11:02 am
Forum: XQuery
Topic: XQuery doesn't execute
Replies: 1
Views: 787

Re: XQuery doesn't execute

The syntax of an `if` expression in XQuery is simply e.g. `if (condition-expression) then expression1 else expression2`, there is no `return` involved, neither in the `then expression1` nor in the `else expression2`.
by Martin Honnen
Tue Sep 13, 2022 8:42 pm
Forum: XQuery
Topic: help with a xQuery-task
Replies: 1
Views: 994

Re: help with a xQuery-task

The (Saxon) documentation of fn:put is here: https://www.saxonica.com/html/documenta ... n/put.html
by Martin Honnen
Tue Sep 13, 2022 8:29 pm
Forum: XQuery
Topic: help with a xQuery-task
Replies: 1
Views: 994

Re: help with a xQuery-task

Are you required to use XQuery or can you use XSLT and e.g. `xsl:result-document`?

If you use XQuery, is it inisde of oXygen with Saxon EE and XQuery update/fn:put support?
by Martin Honnen
Tue Sep 06, 2022 10:33 pm
Forum: XSLT and FOP
Topic: Check for duplicates attribute value
Replies: 2
Views: 1075

Re: Check for duplicates attribute value

Validation is usually done with a schema language like XSD or Schematron (which is often implemented with XSLT under the hood). So yes, you can can of course define the languagesID attribute with an xs:ID type and you would get a validation error for your sample. In XSLT you can use a key or use for...
by Martin Honnen
Thu Sep 01, 2022 11:33 am
Forum: General XML Questions
Topic: How to implement a Xspec unit testing
Replies: 0
Views: 991

Re: How to implement a Xspec unit testing

Here is a simple example: <x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="sheet1.xsl"> <x:scenario label="attribute match to child elements"> <x:context> <Persons> <Person NameTitle="Sir"/> <Person NameTitle="Dr"/> </Perso...
by Martin Honnen
Wed Aug 17, 2022 2:01 pm
Forum: XSLT and FOP
Topic: expand-text on xslt 2.0
Replies: 2
Views: 855

Re: expand-text on xslt 2.0

Saxon 9.8 and later are XSLT 3 processors, so even if you put `version="2.0"` into your code it doesn't take away XSLT 3 elements or other features like text value templates. I think you would need to go back to 9.7 or earlier to have some difference between using `version="2.0"`...
by Martin Honnen
Sun Aug 14, 2022 12:52 pm
Forum: XSLT and FOP
Topic: Inconsistent table structure after applying an XSLT on title element
Replies: 3
Views: 1171

Re: Inconsistent table structure after applying an XSLT on title element

What kind of view is that, are you using a browser's developer console where you inspect the rendered document tree after the browser parsed your input document as HTML5? HTML has rules to fix the parse tree e.g. a HTML span doesn't belong into a HTML table element, nor are there HTML row elements (...
by Martin Honnen
Fri Jul 29, 2022 4:11 pm
Forum: XSLT and FOP
Topic: I get the wrong output of my XSLT-file
Replies: 2
Views: 976

Re: I get the wrong output of my XSLT-file

You don't have the right XPath expressions to select the attribute, should be <xsl:variable name="high" select="count(pc:car[pc:main_descriptions/@quantity_of_kilometer &gt; $Standart])" /> <xsl:variable name="low" select="count(pc:car[pc:main_descriptions/@qua...
by Martin Honnen
Fri Jun 17, 2022 5:01 pm
Forum: XQuery
Topic: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Replies: 4
Views: 5336

Re: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml

Thanks. I take it their is currently no way when I do pure XPath (3.1) evaluation? Of course in the editor it is easy to switch to XQuery but then of course one might write some non XPath expressions in the editor without necessarily noticing while wanting to "develop" some XPath code you ...
by Martin Honnen
Fri Jun 17, 2022 12:12 pm
Forum: XQuery
Topic: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Replies: 4
Views: 5336

More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml

If I have an XML sample containing JSON e.g. <root>{ "key": "val" }</root> then, in XPath 3.1 or XQuery 3.1 I can write path expressions constructing XML "on the fly" with e.g. expressions like /root/json-to-xml(.) However, if I do that in the XPath selector input or ev...
by Martin Honnen
Thu Apr 21, 2022 9:36 am
Forum: XSLT and FOP
Topic: Transforming multiple XML element occurrence into one element occurrence using XSLT
Replies: 1
Views: 1503

Re: Transforming multiple XML element occurrence into one element occurrence using XSLT

As you are asking in the oXygen forum, I suppose you use oXygen where you have Saxon 10 or 9 to run XSLT 2 or 3 so you can easily use `for-each-group group-adjacent` or `for-each-group starting-with`, have a look at the examples in the XSLT specification on `xsl:for-each-group`. Even if you are not ...
by Martin Honnen
Mon Mar 21, 2022 11:45 pm
Forum: SDK-API, Frameworks - Document Types
Topic: XProc Calabash validation error
Replies: 2
Views: 1033

XProc Calabash validation error

I don't really use XProc 1 but recently I tried to write a pipeline in oXygen 24.1 using the built-in Calabash version and run into a strange error about an XPath expression not being compiled with validation for a validated input document. First I attributed it to my lack of XProc skills but as htt...
by Martin Honnen
Tue Oct 12, 2021 9:06 am
Forum: XSLT and FOP
Topic: XSLT "4.0" editing
Replies: 2
Views: 1476

XSLT "4.0" editing

While playing with SaxonCS recently released by Saxonica I have tried to edit XSLT stylesheets with version="4.0" instead of version="3.0", kind of expecting it wouldn't hurt my editing experience, but it did, it seems the syntax and completions suggestions, if they happen, are r...
by Martin Honnen
Thu Feb 04, 2021 1:57 am
Forum: Feature Request
Topic: Modern Javascript support
Replies: 1
Views: 1153

Modern Javascript support

Are there any plans to update the Javascript editing support to support modern Javascript features like backtick string literal? I kind of feel like most of my Javascript code gives me some syntax error messages in oXygen although modern browsers or Node.js support the syntax I use.
by Martin Honnen
Fri Aug 21, 2020 6:12 pm
Forum: Feature Request
Topic: XPath 3.1 map and array support in Schematron with queryBinding="xslt3"
Replies: 2
Views: 1579

Re: XPath 3.1 map and array support in Schematron with queryBinding="xslt3"

Ah, I first had them declared on the root element but then found that Schematron needs the `ns` element, then I thought the namespace declaration would no longer be needed. So I need both to have the Schematron compiler happy and my failing memory happy to work with content completion.

Thanks.
by Martin Honnen
Wed Aug 19, 2020 2:20 am
Forum: Feature Request
Topic: XPath 3.1 map and array support in Schematron with queryBinding="xslt3"
Replies: 2
Views: 1579

XPath 3.1 map and array support in Schematron with queryBinding="xslt3"

When using Schematron with `queryBinding="xslt3"` and namespace declarations like `<sch:ns prefix="map" uri="http://www.w3.org/2005/xpath-functions/map"/>` I would like to see content completion for functions from that namespace like `map:merge`, `map:keys`. The same fo...
by Martin Honnen
Sat May 23, 2020 1:09 pm
Forum: XSLT and FOP
Topic: Combine 2 nodes into one in XML using XSLT
Replies: 1
Views: 1515

Re: Combine 2 nodes into one in XML using XSLT

Consider to indent your XML samples so that we can identify the structure. And even if don't know how to write the necessary XSLT you will need to explain in plain English which transformation you want to achieve. Just dumping two samples doesn't allow us to see which transformation you want to impl...
by Martin Honnen
Sun Mar 22, 2020 2:09 pm
Forum: Feature Request
Topic: Saxon 10 plugin?
Replies: 1
Views: 1237

Saxon 10 plugin?

Hi,

are you planning to offer a Saxon 10 plugin for oXygen 22?
by Martin Honnen
Tue Feb 25, 2020 5:12 pm
Forum: Common Problems
Topic: XProc error err:XC0050 access denied
Replies: 7
Views: 2578

Re: XProc error err:XC0050 access denied

Instead of using p:store inside of the p:for-each I have simply tried to output the document-uri(.) of each document processed there and outside of oXygen, with Calabash from the command line, the URIs point to the current working directory where I have the XML document and the XProc file and where ...