Hi Venu,
I have committed your patches. Thanks a lot for solving the long pending
issue. This would definitely help the readability of error messages and lessen the
debugging time for the users.
Thanks again,
Neeraj
Content-Type: multipart/alternative;
boundary="------------090400090509000209060305"
--------------090400090509000209060305
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi ,
Please find patch for bug 17294 with some more error messages fixed as
requested.
Regards
venu
K. Venugopal wrote:
> Hi Neeraj,
>
> Thankyou for checking in the files and providing feedback , i will
> provide a patch for rest of the errors soon.
>
> Regards
> venu
>
>
> Neeraj Bajaj wrote:
>
>> Hi Venu,
>>
>> Thanks for the patch. I have committed it. I
>> think while fixing this we should also fix other cases of attribute
>> errors like CloseQuoteExpected, OpenQuoteExpected, LessthanInAttValue
>> etc. so that error messages include the element name and the
>> attribute name as Glenn suggested.
>>
>> Could you provide another patch for the same :-)
>> thanks,
>> Neeraj
>>
>>
>>
>> K. Venugopal wrote:
>>
>>> Hi ,
>>>
>>> I am new to Xerces-J developer group and look forwad to being an
>>> active contributor. Please find patch for bug 17294 attached .
>>>
>>> Regards
>>> venu
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>Index: XML11DocumentScannerImpl.java
>>>===================================================================
>>>RCS file:
>>>/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XML11DocumentScannerImpl.java,v
>>>retrieving revision 1.4
>>>diff -u -r1.4 XML11DocumentScannerImpl.java
>>>--- XML11DocumentScannerImpl.java 9 Dec 2002 18:51:29 -0000 1.4
>>>+++ XML11DocumentScannerImpl.java 27 Mar 2003 09:42:03 -0000
>>>@@ -388,7 +388,7 @@
>>> XMLString nonNormalizedValue,
>>> String atName,
>>> XMLAttributes attributes, int attrIndex,
>>>- boolean checkEntities)
>>>+ boolean checkEntities,String eleName)
>>> throws IOException, XNIException
>>> {
>>> // quote
>>>@@ -564,7 +564,7 @@
>>> }
>>> else if (c != -1 && XML11Char.isXML11Invalid(c)) {
>>> reportFatalError("InvalidCharInAttValue",
>>>- new Object[] {Integer.toString(c, 16)});
>>>+ new Object[] {Integer.toString(c,
>>>16),atName,eleName});
>>> fEntityScanner.scanChar();
>>> if (entityDepth == fEntityDepth) {
>>> fStringBuffer2.append((char)c);
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>Index: XMLDTDScannerImpl.java
>>>===================================================================
>>>RCS file:
>>>/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLDTDScannerImpl.java,v
>>>retrieving revision 1.38
>>>diff -u -r1.38 XMLDTDScannerImpl.java
>>>--- XMLDTDScannerImpl.java 3 Mar 2003 22:17:16 -0000 1.38
>>>+++ XMLDTDScannerImpl.java 27 Mar 2003 09:43:03 -0000
>>>@@ -1389,7 +1389,7 @@
>>> // AttValue
>>> boolean isVC = !fStandalone && (fSeenExternalDTD || fSeenExternalPE)
>>> ;
>>> scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
>>>- fAttributes, 0, isVC);
>>>+ fAttributes, 0, isVC,elName);
>>> }
>>> return defaultType;
>>>
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>Index: XMLDocumentFragmentScannerImpl.java
>>>===================================================================
>>>RCS file:
>>>/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java,v
>>>retrieving revision 1.29
>>>diff -u -r1.29 XMLDocumentFragmentScannerImpl.java
>>>--- XMLDocumentFragmentScannerImpl.java 3 Mar 2003 22:17:16 -0000 1.29
>>>+++ XMLDocumentFragmentScannerImpl.java 27 Mar 2003 09:44:18 -0000
>>>@@ -883,7 +883,7 @@
>>> boolean isVC = fHasExternalDTD && !fStandalone;
>>> scanAttributeValue(fTempString, fTempString2,
>>> fAttributeQName.rawname, attributes,
>>>- oldLen, isVC);
>>>+ oldLen, isVC,fCurrentElement.rawname);
>>> attributes.setValue(oldLen, fTempString.toString());
>>> attributes.setNonNormalizedValue(oldLen, fTempString2.toString());
>>> attributes.setSpecified(oldLen, true);
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>Index: msg/XMLMessages.properties
>>>===================================================================
>>>RCS file:
>>>/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/msg/XMLMessages.properties,v
>>>retrieving revision 1.17
>>>diff -u -r1.17 XMLMessages.properties
>>>--- msg/XMLMessages.properties 12 Feb 2003 17:10:34 -0000 1.17
>>>+++ msg/XMLMessages.properties 27 Mar 2003 09:46:15 -0000
>>>@@ -65,7 +65,7 @@
>>>
>>> # Messages common to Document and DTD
>>> # 2.2 Characters
>>>- InvalidCharInAttValue = An invalid XML character (Unicode: 0x{2}) was
>>>found in the value of attribute \"{1}\".
>>>+ InvalidCharInAttValue = An invalid XML character (Unicode: 0x{0}) was
>>>found in the value of attribute \"{1}\" and the element is \"{2}\".
>>> InvalidCharInComment = An invalid XML character (Unicode: 0x{0}) was found
>>> in the comment.
>>> InvalidCharInPI = An invalid XML character (Unicode: 0x{0}) was found in
>>> the processing instruction.
>>> InvalidCharInInternalSubset = An invalid XML character (Unicode: 0x{0})
>>> was found in the internal subset of the DTD.
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>Index: XMLNSDocumentScannerImpl.java
>>>===================================================================
>>>RCS file:
>>>/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLNSDocumentScannerImpl.java,v
>>>retrieving revision 1.12
>>>diff -u -r1.12 XMLNSDocumentScannerImpl.java
>>>--- XMLNSDocumentScannerImpl.java 24 Mar 2003 22:00:00 -0000 1.12
>>>+++ XMLNSDocumentScannerImpl.java 27 Mar 2003 09:44:56 -0000
>>>@@ -391,7 +391,7 @@
>>> // REVISIT: it seems that this function should not take attributes, and
>>> length
>>> scanAttributeValue(this.fTempString, fTempString2,
>>> fAttributeQName.rawname, attributes,
>>>- oldLen, isVC);
>>>+ oldLen, isVC,fCurrentElement.rawname);
>>> String value = fTempString.toString();
>>> attributes.setValue(oldLen, value);
>>> attributes.setNonNormalizedValue(oldLen, fTempString2.toString());
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>Index: XMLScanner.java
>>>===================================================================
>>>RCS file:
>>>/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLScanner.java,v
>>>retrieving revision 1.27
>>>diff -u -r1.27 XMLScanner.java
>>>--- XMLScanner.java 26 Mar 2003 04:19:22 -0000 1.27
>>>+++ XMLScanner.java 27 Mar 2003 09:45:30 -0000
>>>@@ -730,7 +730,7 @@
>>> XMLString nonNormalizedValue,
>>> String atName,
>>> XMLAttributes attributes, int attrIndex,
>>>- boolean checkEntities)
>>>+ boolean checkEntities,String eleName)
>>> throws IOException, XNIException
>>> {
>>> // quote
>>>@@ -903,7 +903,7 @@
>>> }
>>> else if (c != -1 && isInvalidLiteral(c)) {
>>> reportFatalError("InvalidCharInAttValue",
>>>- new Object[] {Integer.toString(c, 16)});
>>>+ new Object[]
>>>{Integer.toString(c, 16),atName,eleName});
>>> fEntityScanner.scanChar();
>>> if (entityDepth == fEntityDepth) {
>>> fStringBuffer2.append((char)c);
>>>
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>
>
--------------090400090509000209060305
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Hi ,<br>
<br>
Please find patch for bug 17294 with some more error messages fixed as
requested.<br>
<br>
Regards<br>
venu<br>
<br>
K. Venugopal wrote:<br>
<blockquote type="cite" cite="[EMAIL PROTECTED]">
<title></title>
Hi Neeraj,<br>
<br>
Thankyou for checking in the files and providing feedback , i will
provide
a patch for rest of the errors soon.<br>
<br>
Regards<br>
venu<br>
<br>
<br>
Neeraj Bajaj wrote:<br>
<blockquote type="cite" cite="[EMAIL PROTECTED]">
<title></title>
Hi Venu,<br>
<br>
Thanks for the patch. I have committed it. I think
while fixing this we should also fix other cases of attribute errors like
CloseQuoteExpected, OpenQuoteExpected, LessthanInAttValue etc. so that error
messages include the element name and the attribute name as Glenn suggested.<br>
<br>
Could you provide another patch for the same :-) <br>
thanks,<br>
Neeraj<br>
<br>
<br>
<br>
K. Venugopal wrote:<br>
<blockquote type="cite" cite="[EMAIL PROTECTED]">Hi , <br>
<br>
I am new to Xerces-J developer group and look forwad to being an
active
contributor. Please find patch for bug 17294 attached . <br>
<br>
Regards <br>
venu <br>
<br>
<br>
<pre wrap=""><hr width="90%" size="4">
Index: XML11DocumentScannerImpl.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XML11DocumentScannerImpl.java,v
retrieving revision 1.4
diff -u -r1.4 XML11DocumentScannerImpl.java
--- XML11DocumentScannerImpl.java 9 Dec 2002 18:51:29 -0000 1.4
+++ XML11DocumentScannerImpl.java 27 Mar 2003 09:42:03 -0000
@@ -388,7 +388,7 @@
XMLString nonNormalizedValue,
String atName,
XMLAttributes attributes, int attrIndex,
- boolean checkEntities)
+ boolean checkEntities,String eleName)
throws IOException, XNIException
{
// quote
@@ -564,7 +564,7 @@
}
else if (c != -1 && XML11Char.isXML11Invalid(c)) {
reportFatalError("InvalidCharInAttValue",
- new Object[] {Integer.toString(c, 16)});
+ new Object[] {Integer.toString(c,
16),atName,eleName});
fEntityScanner.scanChar();
if (entityDepth == fEntityDepth) {
fStringBuffer2.append((char)c);
</pre>
<pre wrap=""><hr width="90%" size="4">
Index: XMLDTDScannerImpl.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLDTDScannerImpl.java,v
retrieving revision 1.38
diff -u -r1.38 XMLDTDScannerImpl.java
--- XMLDTDScannerImpl.java 3 Mar 2003 22:17:16 -0000 1.38
+++ XMLDTDScannerImpl.java 27 Mar 2003 09:43:03 -0000
@@ -1389,7 +1389,7 @@
// AttValue
boolean isVC = !fStandalone && (fSeenExternalDTD ||
fSeenExternalPE) ;
scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
- fAttributes, 0, isVC);
+ fAttributes, 0, isVC,elName);
}
return defaultType;
</pre>
<pre wrap=""><hr width="90%" size="4">
Index: XMLDocumentFragmentScannerImpl.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java,v
retrieving revision 1.29
diff -u -r1.29 XMLDocumentFragmentScannerImpl.java
--- XMLDocumentFragmentScannerImpl.java 3 Mar 2003 22:17:16 -0000 1.29
+++ XMLDocumentFragmentScannerImpl.java 27 Mar 2003 09:44:18 -0000
@@ -883,7 +883,7 @@
boolean isVC = fHasExternalDTD && !fStandalone;
scanAttributeValue(fTempString, fTempString2,
fAttributeQName.rawname, attributes,
- oldLen, isVC);
+ oldLen, isVC,fCurrentElement.rawname);
attributes.setValue(oldLen, fTempString.toString());
attributes.setNonNormalizedValue(oldLen, fTempString2.toString());
attributes.setSpecified(oldLen, true);
</pre>
<pre wrap=""><hr width="90%" size="4">
Index: msg/XMLMessages.properties
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/msg/XMLMessages.properties,v
retrieving revision 1.17
diff -u -r1.17 XMLMessages.properties
--- msg/XMLMessages.properties 12 Feb 2003 17:10:34 -0000 1.17
+++ msg/XMLMessages.properties 27 Mar 2003 09:46:15 -0000
@@ -65,7 +65,7 @@
# Messages common to Document and DTD
# 2.2 Characters
- InvalidCharInAttValue = An invalid XML character (Unicode: 0x{2}) was found
in the value of attribute \"{1}\".
+ InvalidCharInAttValue = An invalid XML character (Unicode: 0x{0}) was found
in the value of attribute \"{1}\" and the element is \"{2}\".
InvalidCharInComment = An invalid XML character (Unicode: 0x{0}) was found in
the comment.
InvalidCharInPI = An invalid XML character (Unicode: 0x{0}) was found in the
processing instruction.
InvalidCharInInternalSubset = An invalid XML character (Unicode: 0x{0}) was
found in the internal subset of the DTD.
</pre>
<pre wrap=""><hr width="90%" size="4">
Index: XMLNSDocumentScannerImpl.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLNSDocumentScannerImpl.java,v
retrieving revision 1.12
diff -u -r1.12 XMLNSDocumentScannerImpl.java
--- XMLNSDocumentScannerImpl.java 24 Mar 2003 22:00:00 -0000 1.12
+++ XMLNSDocumentScannerImpl.java 27 Mar 2003 09:44:56 -0000
@@ -391,7 +391,7 @@
// REVISIT: it seems that this function should not take attributes, and length
scanAttributeValue(this.fTempString, fTempString2,
fAttributeQName.rawname, attributes,
- oldLen, isVC);
+ oldLen, isVC,fCurrentElement.rawname);
String value = fTempString.toString();
attributes.setValue(oldLen, value);
attributes.setNonNormalizedValue(oldLen, fTempString2.toString());
</pre>
<pre wrap=""><hr width="90%" size="4">
Index: XMLScanner.java
===================================================================
RCS file: /home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/XMLScanner.java,v
retrieving revision 1.27
diff -u -r1.27 XMLScanner.java
--- XMLScanner.java 26 Mar 2003 04:19:22 -0000 1.27
+++ XMLScanner.java 27 Mar 2003 09:45:30 -0000
@@ -730,7 +730,7 @@
XMLString nonNormalizedValue,
String atName,
XMLAttributes attributes, int attrIndex,
- boolean checkEntities)
+ boolean checkEntities,String eleName)
throws IOException, XNIException
{
// quote
@@ -903,7 +903,7 @@
}
else if (c != -1 && isInvalidLiteral(c)) {
reportFatalError("InvalidCharInAttValue",
- new Object[] {Integer.toString(c, 16)});
+ new Object[]
{Integer.toString(c, 16),atName,eleName});
fEntityScanner.scanChar();
if (entityDepth == fEntityDepth) {
fStringBuffer2.append((char)c);
</pre>
<pre wrap=""><hr width="90%" size="4">
---------------------------------------------------------------------
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated"
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated"
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a></pre>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>
--------------090400090509000209060305--
---------------------------------------------------------------------
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]