changeset 339:219e720a1baa

Merge
author lana
date Tue, 26 Jun 2012 22:47:23 -0700
parents 7920ead2cc75 57476f66e13c
children 9cb8be5e6119
files
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Jun 26 15:28:21 2012 -0700
+++ b/.hgtags	Tue Jun 26 22:47:23 2012 -0700
@@ -165,3 +165,4 @@
 6f5c0e17415de7a9c74900ef4ba12f47accdf88b jdk8-b41
 39ee03c1602155ff02e5feb6cd44869452f24cf7 jdk8-b42
 eff4ece9c8bc43b3ce2b3758574c4c20147f0689 jdk8-b43
+0b3f3a4ce13930430b32b616a717dfc7fe385b28 jdk8-b44
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java	Tue Jun 26 15:28:21 2012 -0700
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java	Tue Jun 26 22:47:23 2012 -0700
@@ -402,6 +402,16 @@
 
         boolean dataFoundForTarget = false;
         boolean sawSpace = fEntityScanner.skipSpaces();
+        // since pseudoattributes are *not* attributes,
+        // their quotes don't need to be preserved in external parameter entities.
+        // the XMLEntityScanner#scanLiteral method will continue to
+        // emit -1 in such cases when it finds a quote; this is
+        // fine for other methods that parse scanned entities,
+        // but not for the scanning of pseudoattributes.  So,
+        // temporarily, we must mark the current entity as not being "literal"
+        Entity.ScannedEntity currEnt = fEntityManager.getCurrentEntity();
+        boolean currLiteral = currEnt.literal;
+        currEnt.literal = false;
         while (fEntityScanner.peekChar() != '?') {
             dataFoundForTarget = true;
             String name = scanPseudoAttribute(scanningTextDecl, fString);
@@ -499,6 +509,9 @@
             }
             sawSpace = fEntityScanner.skipSpaces();
         }
+        // restore original literal value
+        if(currLiteral)
+            currEnt.literal = true;
         // REVISIT: should we remove this error reporting?
         if (scanningTextDecl && state != STATE_DONE) {
             reportFatalError("MorePseudoAttributes", null);