[
https://issues.apache.org/jira/browse/XERCESJ-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Pedruzzi updated XERCESJ-1752:
-----------------------------------
Attachment: Test.xsd
Test.xml
> Cannot use latest IBM ICU with latest Xerces, need support for the latest
> Eclipse XPath Engine
> ----------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1752
> URL: https://issues.apache.org/jira/browse/XERCESJ-1752
> Project: Xerces2-J
> Issue Type: Improvement
> Reporter: Ivan Pedruzzi
> Priority: Major
> Attachments: Test.xml, Test.xsd
>
>
> The latest ICU 72
> [https://github.com/unicode-org/icu/releases/download/release-72-1/icu4j-72_1.jar]
> breaks the Eclipse XPath engine 1.2.1 bundled with Xerces.
> the ICU lib removed function isHighSurrogate from class UCharacter which
> is used by the constructor of class StringCodePointIterator
> Exception in thread "main" java.lang.NoSuchMethodError:
> com.ibm.icu.lang.UCharacter.isHighSurrogate(C)Z
> at
> org.eclipse.wst.xml.xpath2.processor.internal.utils.StringCodePointIterator.<init>(StringCodePointIterator.java:35)
> to fix the problem, you may think to update to the latest Eclipse XPath
> engine 2.1
> [https://www.jabylon.org/maven/org/eclipse/wst/xml/xpath2/processor/2.1.100/processor-2.1.100.jar]
> but that breaks Xerces 2.1
> because Eclipse XPath removed the constructor of class DefaultEvaluator used
> by AbstractXPath2EngineImpl.evaluateXPathExpr
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.<init>(Lorg/eclipse/wst/xml/xpath2/processor/DynamicContext;Lorg/w3c/dom/Document;Lorg/w3c/dom/Node;)V
> at
> org.apache.xerces.impl.xs.AbstractXPath2EngineImpl.evaluateXPathExpr(Unknown
> Source)
>
> Looking at the new constructor rather than taking a single org.w3c.dom.Node,
> now it takes an array of objects, it seems that they accept a sequence of
> nodes as context
>
> public DefaultEvaluator(
> org.eclipse.wst.xml.xpath2.api.StaticContext staticContext,
> org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext,
> Object[] contextItems) {
>
> this(staticContext, dynamicContext);
>
> // initialize context item with root of document
> ResultBuffer rs = new ResultBuffer();
> for (Object obj : contextItems)
> { if (obj instanceof Node)
> rs.add(NodeType.dom_to_xpath((Node)obj, _sc.getTypeModel())); }
> set_focus(new Focus(rs.getSequence()));
> _param = null;
> }
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]