You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mu...@apache.org on 2024/04/10 13:54:46 UTC
(xalan-java) branch xalan-j_xslt3.0 updated: committing little improvement to xsl:analyze-string instruction's implementation
This is an automated email from the ASF dual-hosted git repository.
mukulg pushed a commit to branch xalan-j_xslt3.0
in repository https://gitbox.apache.org/repos/asf/xalan-java.git
The following commit(s) were added to refs/heads/xalan-j_xslt3.0 by this push:
new 3d0a2121 committing little improvement to xsl:analyze-string instruction's implementation
3d0a2121 is described below
commit 3d0a2121e3a96d679cf7ed7a3d7e84a267f2fa87
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Wed Apr 10 19:24:28 2024 +0530
committing little improvement to xsl:analyze-string instruction's implementation
---
src/org/apache/xalan/templates/ElemAnalyzeString.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/org/apache/xalan/templates/ElemAnalyzeString.java b/src/org/apache/xalan/templates/ElemAnalyzeString.java
index f7bfc5aa..98ac76c7 100644
--- a/src/org/apache/xalan/templates/ElemAnalyzeString.java
+++ b/src/org/apache/xalan/templates/ElemAnalyzeString.java
@@ -34,6 +34,8 @@ import org.apache.xpath.functions.RegexEvaluationSupport;
import org.apache.xpath.objects.XObject;
import org.apache.xpath.regex.Matcher;
+import xml.xpath31.processor.types.XSString;
+
/**
* XSLT 3.0 analyze-string element.
*
@@ -230,7 +232,14 @@ public class ElemAnalyzeString extends ElemTemplateElement implements Expression
XObject xpathEvalResult = m_selectExpression.execute(xctxt);
- String strToBeAnalyzed = xpathEvalResult.str();
+ String strToBeAnalyzed = null;
+
+ if (xpathEvalResult instanceof XSString) {
+ strToBeAnalyzed = ((XSString)xpathEvalResult).stringValue();
+ }
+ else {
+ strToBeAnalyzed = xpathEvalResult.str();
+ }
if (m_regex == null) {
throw new javax.xml.transform.TransformerException("XTSE0010 : xsl:analyze-string element must "
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org