How can I submit patches?

Index: /home/mansour/workspace/xalan.src.trunk/src/org/apache/xalan/lib/ExsltStrings.java
===================================================================
--- /home/mansour/workspace/xalan.src.trunk/src/org/apache/xalan/lib/ExsltStrings.java (revision 607166) +++ /home/mansour/workspace/xalan.src.trunk/src/org/apache/xalan/lib/ExsltStrings.java (working copy)
@@ -352,4 +352,34 @@
        }
    }
+ /**
+     * returns a NodList that holds the newly generated text. For exmaple:
+ * replace("hello world", "world", "WORLD") will results in "hello WORLD". The
+     * NodeList will look like:
+     *
+     *   <replaced>hello WORLD</replaced>
+ * + * + * @author Mansour Al Akeel + * + * @param The String to search.
+     *   @param The search pattern. It can be any regex.
+ * @param The replacement String. It will replace any occurance of the matching pattern. + * + * @return The NodeList containing the processed test.
+     */
+ public static NodeList replace(String str, String regex, String replacement)
+    {
+
+        NodeSet resultSet = new NodeSet();
+        Document doc = DocumentHolder.m_doc;
+ + Element element = doc.createElement("replaced"); + element.appendChild(doc.createTextNode(str.replaceAll(regex, replacement)));
+        resultSet.addNode(element);
+ + return resultSet;
+    }
+ + }


Mansour wrote:
Is there any interest in upgrading xalan to support XSLT 2.0. If yes, what branch do I check out ? I have seen an xslt2.0 directory on the svn server. Is this the right place ?




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Index: 
/home/mansour/workspace/xalan.src.trunk/src/org/apache/xalan/lib/ExsltStrings.java
===================================================================
--- 
/home/mansour/workspace/xalan.src.trunk/src/org/apache/xalan/lib/ExsltStrings.java
  (revision 607166)
+++ 
/home/mansour/workspace/xalan.src.trunk/src/org/apache/xalan/lib/ExsltStrings.java
  (working copy)
@@ -352,4 +352,34 @@
         }
     }
   
+    /**
+     * returns a NodList that holds the newly generated text. For exmaple: 
+     * replace("hello world", "world", "WORLD") will results in "hello WORLD". 
The
+     * NodeList will look like:
+     * 
+     *   <replaced>hello WORLD</replaced>
+     *   
+     *   
+     *   @author Mansour Al Akeel
+     *   
+     *   @param The String to search.
+     *   @param The search pattern. It can be any regex. 
+     *   @param The replacement String. It will replace any occurance of the 
matching pattern.
+     *   
+     *   @return The NodeList containing the processed test.
+     */
+    public static NodeList replace(String str, String regex, String 
replacement)
+    {
+
+        NodeSet resultSet = new NodeSet();
+        Document doc = DocumentHolder.m_doc;
+        
+        Element element = doc.createElement("replaced");
+        element.appendChild(doc.createTextNode(str.replaceAll(regex, 
replacement)));
+        resultSet.addNode(element);
+        
+        return resultSet;
+    }
+    
+    
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to