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 bu...@apache.org on 2002/12/24 12:50:18 UTC
DO NOT REPLY [Bug 15645] New: -
java.lang.StackOverflow when validating an attribute using regular expression in xml schema
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15645>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15645
java.lang.StackOverflow when validating an attribute using regular expression in xml schema
Summary: java.lang.StackOverflow when validating an attribute
using regular expression in xml schema
Product: Xerces2-J
Version: 2.2.1
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Critical
Priority: Other
Component: XML Schema Structures
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: odoolman@mercadosw.com
I perform a SAX parsing on an XML file using an (external) validating schema
(xsd file). During parsing I get the following error:
java.lang.StackOverflowError
at java.lang.String.charAt(String.java:454)
at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString
(RegularExpression.java:1701)
at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString
(RegularExpression.java:1940)
at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString
(RegularExpression.java:1914)
at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString
(RegularExpression.java:1940)
at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString
(RegularExpression.java:1914)
at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString
(RegularExpression.java:1940)
at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString
(RegularExpression.java:1914)
....
I tried to debug a little and saw that the problem is caused with a specific
value which is 1719 characters long.
The regular expression from my xsd file is:
<xsd:pattern value="(\{[^}|"<>]+\})?\i\c*\|([^\\]|\\\\|\\\|)
*\|"/>
(legal expressions are for example: "|abc|def|" or "|ab\\c|def|")
The value it tries to evaluate:
Books_prod_info|100553088|103872294|This is "an account of of the domestic
life of Samuel Clemens. . . . Willis discusses Olivia's role as reformer
of her husband's lifestyle and editor of his work She also writes . . .
about Olivia's role in the education of her children, the individual
aspirations and problems of each child, and theirrelationships with their
parents." (Am Lit) Bibliography. Index. Mark Twain is America's best-
known and perhaps most popular writer. But until now little has been known
about the love of his life--Olivia Langdon Clemens, his adored
"Livy". In Mark and Livy, Resa Willis has redressed this oversight,
presenting us with the fullest insights and details of four decades of
courtship and marriage, showing us a famous writer at home and at work, and the
splendid woman who was his consistent critic and companion, editor and muse,
trusted advisor and beloved wife. The daughter of a prominent, wealthy, and
broad-minded family--they were founding members of the local Congregational
Church, abolitionists, and helpers on the underground railroad--in upstate New
York, Olivia Langdon was just twenty-two when she and Samuel Clemens first met
at Christmastime in 1867. (In his autobiography, he would later claim that he
had seen her before--in a photograph owned by her brother, whom Clemens had
befriended on his trip to the Holy Land--and fallen in love at first sight.) A
lifelong diarist, reader, and commentator on her own readings, Livy at first
resisted his courtship, but soon she relented, providing Clemens with the
"sivilizing" influence that he craved, even as he thought himself
unworthy, and that made life possible for him as he composed the books that
made his fortune and reputation. |27|||
Thanks a lot.
And if you need my xml file and my schema file - I have it (I didn't see any
way to submit them using bugzilla).
Ori.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org