You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2011/02/09 00:36:58 UTC
[jira] Updated: (XERCESJ-1495) Xerces 2.11 "]" problem ( Right
square bracket )
[ https://issues.apache.org/jira/browse/XERCESJ-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich updated XERCESJ-1495:
------------------------------------------
Fix Version/s: (was: 2.11.0)
> Xerces 2.11 "]" problem ( Right square bracket )
> ------------------------------------------------
>
> Key: XERCESJ-1495
> URL: https://issues.apache.org/jira/browse/XERCESJ-1495
> Project: Xerces2-J
> Issue Type: Bug
> Affects Versions: 2.11.0
> Reporter: Ugur Seker
>
> Hi
> I see following problem after upgrading from Xerces1 to Xerces2
> Xerces2 misbehaves if the value includes "]" character.
> Here is an example for old (Xerces1) and new (Xerces2) behaviour the given xml chunk. ( Problem not exist for CDATA fields )
> I believe same problem (logically) was reported for Xerces C++ before
> (https://issues.apache.org/jira/browse/XERCESC-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs )
> XML Chunk
> ```````````````````````
> <pattern>[A-Za-z0-9/_]+</pattern>
> Source Logic
> `````````````````````
> public void characters(char[] ch, int start, int length)
> {
> final String text = new String( ch, start, length );
> final String text1 = text.trim();
> System.out.println("MYTEXT :"+ text1.toString());
> System.out.println("MYSTART :"+ start);
> System.out.println("MYLENGTH :"+ length);
> System.out.println("MYELEMENT :" + element.toString());
> System.out.println("------------------------------");
> }
> Xerces1 behaviour (output from character function)
> ```````````````````````````````````````````
> ------------------------------
> MYTEXT :[A-Za-z0-9/_]+
> MYSTART :10320
> MYLENGTH :21
> MYELEMENT :pattern
> ------------------------------
> Xerces2 behaviour - has bug (output from character function)
> ```````````````````````````````````````````
> ------------------------------
> MYTEXT :[A-Za-z0-9/_
> MYSTART :27
> MYLENGTH :19
> MYELEMENT :pattern
> ------------------------------
> MYTEXT :]
> MYSTART :0
> MYLENGTH :1
> MYELEMENT :pattern
> ------------------------------
> MYTEXT :+
> MYSTART :47
> MYLENGTH :1
> MYELEMENT :pattern
> ------------------------------
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org