Project

Profile

Help

Support #6499

open

Reg: SAXON EE migration from 10.5 to 12.2

Added by Ashok Kumar NV 3 months ago. Updated about 2 months ago.

Status:
In Progress
Priority:
High
Category:
Build and release
Sprint/Milestone:
-
Start date:
2024-08-08
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Java

Description

Hi Team, We are migrating from SAXON-EE 10.5 version to 12.2 version, During migration we found two of the classes are removed.

net.sf.saxon.value.UntypedAtomicValue;
net.sf.saxon.trace.InstructionInfo;

Since these classes are removed, I am not finding an alternative for this. Kindly help me out of this.

Actions #1

Updated by Ashok Kumar NV 3 months ago

Mit freundlichen Grüßen / Best regards

Venkateshappa Ashok Kumar Neelatur

Integrated Project Management (SDS/EPM2)
Robert Bosch GmbH | Postfach 10 60 50 | 70049 Stuttgart | GERMANY | www.bosch.com
Mobile +91-99025-34871 |

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart, HRB 14000;
Chairman of the Supervisory Board: Prof. Dr. Stefan Asenkerschbaumer;
Managing Directors: Dr. Stefan Hartung, Dr. Christian Fischer, Dr. Markus Forschner,
Stefan Grosch, Dr. Markus Heyn, Dr. Frank Meyer, Dr. Tanja Rückert

Actions #2

Updated by Michael Kay 3 months ago

The class UntypedAtomicValue has been merged into its parent class, StringValue. You can detect whether a StringValue is untyped atomic by calling getPrimitiveType(), which will return BuiltInAtomicType.UNTYPED_ATOMIC. I'm afraid I forget exactly why this change was made

InstructionInfo (an interface) was present in Saxon 10 but no longer used: there were no classes that implemented this interface. At one time it was used as part of the TraceListener interface, but in that role it had been replaced by net.sf.saxon.trace.Traceable.

Both these classes were part of what we call the "system programming interface" - available to applications that want to do deep integration, but not guaranteed stable from one release to another. If you want the best possible stability, try to stick to interfaces in the s9api package.

I would recommend you move to the latest maintenance release on the 12.x branch, that is 12.6 rather than 12.2, to get all the latest bug fixes.

Actions #3

Updated by Ashok Kumar NV 3 months ago

Hi @Michael Kay, Thanks for your quick reply.

This is regarding InstructionInfo class, It has a method called getProperty("select") :

  StructuredQName getObjectName();

  Object getProperty(String var1);

  Iterator<String> getProperties();

Since this interface is removed tried modifying my code by using Traceable instance but not able to succeed to getThe properties. any code snippet/test class to achieve these features

Actions #4

Updated by Michael Kay 3 months ago

Well, as far as I can see in 10.x the interface InstructionInfo has no concrete implementation classes, so I don't know where an instance of the class would be coming from to enable you to call getProperties().

If we go back a little earlier, in 9.9, InstructionInfo was passed as the first argument to TraceListener.enter(), and that's where you're most likely to encounter it. At that stage many XSLT instructions and XPath expressions implemented this interface, and they returned different sets of properties. In 10.x TraceListener.enter() expects a Traceable, which has an interface gatherProperties(), to which you supply BiConsumer<String, Object>`.

I think that if you do something like

HashMap<String, Object> props = new HashMap<>();
traceable.gatherProperties((k, v) -> properties.put(k, v));

then this will put the properties into a map for you.

However, the default implementation of TraceLlistener.enter() doesn't examine the properties of the supplied Traceable, because the properties to be traced are provided in a separate argument, the second argument of TraceListener.enter().

I think the design was changed to allow dynamic properties to be included in the trace output as well as static properties.

Actions #5

Updated by Ashok Kumar NV 2 months ago

Hi Team,

I am not finding https://mvnrepository.com/artifact/com.saxonica/Saxon-EE 12.3 version in maven repository, I am missing anything?

Actions #7

Updated by Michael Kay 2 months ago

  • Category set to Build and release
  • Status changed from New to In Progress
  • Assignee set to Norm Tovey-Walsh
Actions #8

Updated by Martin Honnen 2 months ago

Ashok Kumar NV wrote in #note-5:

I am not finding https://mvnrepository.com/artifact/com.saxonica/Saxon-EE 12.3 version in maven repository, I am missing anything?

You can download Saxon EE from https://www.saxonica.com/download/java.xml or use Saxonica's Maven repository https://dev.saxonica.com/maven/, e.g. https://maven.saxonica.com/maven/com/saxonica/Saxon-EE/12.5/index.html. See also https://blog.saxonica.com/norm/2020/10/02-maven.html.

Actions #9

Updated by Ashok Kumar NV about 2 months ago

Hi Norm Tovey-Walsh Tovey-Walsh,

Can we wait to have this feature? Kindly update the progress so it will be helpful to take further actions in our product.

Regards, Ashok

Actions #10

Updated by Michael Kay about 2 months ago

Sorry, what exactly is holding up your progress? If it's the Maven repository you need, please use Saxon's Maven repository. (Note that because Saxon-EE is a commercial product requiring a license, you can't expect to do a fully-automated Maven install).

Actions #11

Updated by Ashok Kumar NV about 2 months ago

We have the license and we are using Saxons 12.5, Since we are not supporting UntypedAtomicValue in the latest version, My assumption was this will be put it back to the product.

Actions #12

Updated by Michael Kay about 2 months ago

No, we have no intention to reintroduce UntypedAtomicValue as a separate class. As I think I explained, these are internal classes forming part of the low-level "system programming interface", which is available for use (and may be the only way of doing low-level instrumentation) but is subject to change between releases. If you want a stable API, you need to stick to classes in the s9api package. In 12.5 untyped atomic values are represented as instances of the StringValue class which can be examined to see if they are untypedAtomic using the isUntypedAtomic() method.

Please register to edit this issue

Also available in: Atom PDF