]> granicus.if.org Git - libexpat/commitdiff
Change containsRef field in ATTRIBUTE to normalized
authorJames Clark <jjc@jclark.com>
Mon, 2 Feb 1998 11:15:15 +0000 (11:15 +0000)
committerJames Clark <jjc@jclark.com>
Mon, 2 Feb 1998 11:15:15 +0000 (11:15 +0000)
expat/xmltok/xmltok.h
expat/xmltok/xmltok_impl.c

index 2d22275b252bb86f7eed4a657fb0f1fecadeb1e9..3018cac9af89d6ab43c07c4664a85f09dc4a5d85 100755 (executable)
@@ -92,7 +92,7 @@ typedef struct {
   const char *name;
   const char *valuePtr;
   const char *valueEnd;
-  char containsRef;
+  char normalized;
 } ATTRIBUTE;
 
 struct encoding;
index 3be525c61394ad93e4311f938c8f38c53ebb2c69..cd621cb76089decc188af64c398d30bb7584bb2e 100755 (executable)
@@ -1186,7 +1186,7 @@ int PREFIX(getAtts)(const ENCODING *enc, const char *ptr,
       if (state == other) { \
        if (nAtts < attsMax) { \
          atts[nAtts].name = ptr; \
-         atts[nAtts].containsRef = 0; \
+         atts[nAtts].normalized = 1; \
        } \
        state = inName; \
       }
@@ -1223,13 +1223,15 @@ int PREFIX(getAtts)(const ENCODING *enc, const char *ptr,
       }
       break;
     case BT_AMP:
-      atts[nAtts].containsRef = 1;
+      atts[nAtts].normalized = 0;
       break;
     case BT_S: case BT_CR: case BT_LF:
       /* This case ensures that the first attribute name is counted
          Apart from that we could just change state on the quote. */
       if (state == inName)
         state = other;
+      if (state == inValue)
+       atts[nAtts].normalized = 0;
       break;
     case BT_GT:
     case BT_SOL: