There is information here: http://xml.apache.org/xalan-j/bugreporting.html on how to report a bug, but the same information applies to JIRA issues that are not bugs.
Once you have a JIRA id and you have opened a JIRA issue against XALANJ you can attach your patch to the issue. Be sure to click the checkbox granting license to Apache otherwise we can't use the patch. - Brian Mansour <[EMAIL PROTECTED] com> To xalan-dev@xml.apache.org 12/28/2007 02:38 cc PM Subject Re: XSLT 2.0 Please respond to [EMAIL PROTECTED] che.org 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]