You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/04/10 21:43:31 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl XML11DocumentScannerImpl.java XML11DTDScannerImpl.java
neilg 2003/04/10 12:43:31
Modified: java/src/org/apache/xerces/impl
XML11DocumentScannerImpl.java
XML11DTDScannerImpl.java
Log:
fix to XML 1.1 attribute normalization. Thanks to Michael Glavassevich
Revision Changes Path
1.7 +3 -16 xml-xerces/java/src/org/apache/xerces/impl/XML11DocumentScannerImpl.java
Index: XML11DocumentScannerImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XML11DocumentScannerImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XML11DocumentScannerImpl.java 7 Apr 2003 05:31:21 -0000 1.6
+++ XML11DocumentScannerImpl.java 10 Apr 2003 19:43:30 -0000 1.7
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 1999-2002 The Apache Software Foundation.
+ * Copyright (c) 1999-2003 The Apache Software Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -633,6 +633,7 @@
boolean dataok = true;
while (true) {
int c = fEntityScanner.scanChar();
+ // REVISIT: none of these except \n and 0x20 should make it past the entity scanner
if (c == ' ' || c == '\n' || c == '\r' || c == 0x85 || c == 0x2028) {
if (!skipSpace) {
// take the first whitespace as a space and skip the others
@@ -664,20 +665,6 @@
}
return dataok;
}
-
- /**
- * Normalize whitespace in an XMLString converting all whitespace
- * characters to space characters.
- */
- protected void normalizeWhitespace(XMLString value) {
- int end = value.offset + value.length;
- for (int i = value.offset; i < end; i++) {
- int c = value.ch[i];
- if (XML11Char.isXML11Space(c)) {
- value.ch[i] = ' ';
- }
- }
- }
// returns true if the given character is not
// valid with respect to the version of
1.5 +3 -16 xml-xerces/java/src/org/apache/xerces/impl/XML11DTDScannerImpl.java
Index: XML11DTDScannerImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XML11DTDScannerImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XML11DTDScannerImpl.java 9 Dec 2002 18:51:29 -0000 1.4
+++ XML11DTDScannerImpl.java 10 Apr 2003 19:43:30 -0000 1.5
@@ -2,7 +2,7 @@
* The Apache Software License, Version 1.1
*
*
- * Copyright (c) 1999-2002 The Apache Software Foundation.
+ * Copyright (c) 1999-2003 The Apache Software Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -180,6 +180,7 @@
boolean dataok = true;
while (true) {
int c = fEntityScanner.scanChar();
+ // REVISIT: it could really only be \n or 0x20; all else is normalized, no? - neilg
if (c == ' ' || c == '\n' || c == '\r' || c == 0x85 || c == 0x2028) {
if (!skipSpace) {
// take the first whitespace as a space and skip the others
@@ -211,20 +212,6 @@
}
return dataok;
}
-
- /**
- * Normalize whitespace in an XMLString converting all whitespace
- * characters to space characters.
- */
- protected void normalizeWhitespace(XMLString value) {
- int end = value.offset + value.length;
- for (int i = value.offset; i < end; i++) {
- int c = value.ch[i];
- if (XML11Char.isXML11Space(c)) {
- value.ch[i] = ' ';
- }
- }
- }
// returns true if the given character is not
// valid with respect to the version of
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org