Project

Profile

Help

Bug #4881

"Xpath is invalid" in Eclipse | "Attribute value is not allowed here" in IntelliJ with XSLT3.0

Added by d5f95438 9bf20aa3 about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
High
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-01-19
Due date:
% Done:

0%

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

Description

I got XSL error in Java IDEs.

The error is specific for XSLT3.0 when using map or <xsl:mode on-no-match="shallow-copy"/>

Other XSL codes which are XSLT2.0 don't give me any error.

Either Saxon HE 10.2 or HE 10.3 gives me same problem. I recall the system didn't have this error few months ago.

Can you shed some light on the XSLT3.0 error?

Thanks!

Saxon-detect-xslt2.0.jpg (132 KB) Saxon-detect-xslt2.0.jpg d5f95438 9bf20aa3, 2021-01-19 06:34

History

#1 Updated by d5f95438 9bf20aa3 about 1 month ago

FYI: I just migrated all the binaries and codes to another laptop.

But I recall Saxon is set via gradle.build or maven POM.xml, is it right? Do I need to install anything else?

The config file is something like:

<dependency>
	<groupId>net.sf.saxon</groupId>
	<artifactId>Saxon-HE</artifactId>
	<version>10.3</version>
</dependency>

#2 Updated by d5f95438 9bf20aa3 about 1 month ago

It is very odd:
The data has been transformed into the database as expected but the IDE still marks all the XSLT3.0 related functions as "Xpath is invalid" ??

#3 Updated by d5f95438 9bf20aa3 about 1 month ago

Seems like the system only detect a XSLT2.0 processor after I manually add the JARS.

Let me know if another version could detect XSLT3.0

#4 Updated by Michael Kay about 1 month ago

If Saxon handles the stylesheet OK, but Eclipse and IntelliJ object to it, then perhaps you're using some kind of Saxon extension that Eclipse and IntelliJ don't know about? Please post a complete stylesheet that demonstrates the problem: without that, there's no way we can investigate it.

(Note that Saxonica has no involvement with either the Eclipse or IntelliJ integrations. If you weren't getting problems with both of them, then the response would simply be "not our problem".)

#5 Updated by d5f95438 9bf20aa3 about 1 month ago

You are right. It is not a Saxon problem.

As for now, I have fixed the "Xpath is invalid" error and the Eclipse XSLT plugin can validate template correctly.

I appreciate your prompt attention!

#6 Updated by d5f95438 9bf20aa3 about 1 month ago

Fiona Chen wrote:

I got XSL error in Java IDEs.

The error is specific for XSLT3.0 when using map or <xsl:mode on-no-match="shallow-copy"/>

Other XSL codes which are XSLT2.0 don't give me any error.

Can you shed some light on the XSLT3.0 error?

Thanks!

Fiona Chen wrote:

I got XSL error in Java IDEs.

The error is specific for XSLT3.0 when using map or <xsl:mode on-no-match="shallow-copy"/>

Other XSL codes which are XSLT2.0 don't give me any error.

Either Saxon HE 10.2 or HE 10.3 gives me same problem. I recall the system didn't have this error few months ago.

Can you shed some light on the XSLT3.0 error?

Thanks!

#7 Updated by Michael Kay about 1 month ago

I'm not sure what I can add to my previous answer. If the IDE isn't accepting XSLT 3.0 syntax, then that's a matter to raise with the IDE support channel.

#8 Updated by d5f95438 9bf20aa3 about 1 month ago

Hi, Michael:

My latest update merely reflects that my original post indicating SAXON giving me the problem in IDE is the wrong statement. I don't waste your time.

That being said, the existing native Java IDEs such as Eclipse, IntelliJ ( community or commercial ) doesn't support XSLT 3.0 | XPath 3.0+.

I installed 3rd party code plugin so that IDE(Eclipse) can intelligently digest XML (XSLT3.0&XPath3.0+).

It is critical to point out that IDE needs to differentiate a genuine XML error (e.g. invalid XPath, unresolved templates, missing param, naming conflict, invalid XML catalog and schema..) from the "unrecognizable" language (in this case, XSLT3.0 functions).

The ideal situation is that IDE should also be capable of debugging codes and modules. The fact is that even Oxygen only supports up to SAXON EE 9+. If XSLT is expected to gain more commercial traction, then it boils down if a robust and compatible testing and debug platform is in place.

Please register to edit this issue

Also available in: Atom PDF