mrglavas 2003/11/10 20:52:27
Modified: java/src/org/apache/xerces/impl Constants.java
java/src/org/apache/xerces/impl/dtd XMLDTDValidator.java
Log:
Make information about whether an attribute was declared by attaching this
information to its augmentations.
Absence of this property means that the attribute was not declared.
Revision Changes Path
1.34 +14 -7 xml-xerces/java/src/org/apache/xerces/impl/Constants.java
Index: Constants.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Constants.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- Constants.java 7 Nov 2003 00:26:17 -0000 1.33
+++ Constants.java 11 Nov 2003 04:52:27 -0000 1.34
@@ -272,12 +272,12 @@
/** Standard URI conformant feature ("standard-uri-conformant"). */
public static final String STANDARD_URI_CONFORMANT_FEATURE =
"standard-uri-conformant";
- /** Internal performance related feature:
- * false - the parser settings (features/properties) have not changed between
2 parses
- * true - the parser settings have changed between 2 parses
- * NOTE: this feature should only be set by the parser configuration.
- */
- public static final String PARSER_SETTINGS = "internal/parser-settings";
+ /** Internal performance related feature:
+ * false - the parser settings (features/properties) have not changed between 2
parses
+ * true - the parser settings have changed between 2 parses
+ * NOTE: this feature should only be set by the parser configuration.
+ */
+ public static final String PARSER_SETTINGS = "internal/parser-settings";
// xerces properties
@@ -361,6 +361,13 @@
/* Attribute PSVI is stored in augmentations using string "ATTRIBUTE_PSVI" */
public final static String ATTRIBUTE_PSVI = "ATTRIBUTE_PSVI";
+
+ /**
+ * Boolean indicating whether an attribute is declared in the DTD is stored
+ * in augmentations using string "ATTRIBUTE_DECLARED". The absence of this
+ * augmentation indicates that the attribute was not declared in the DTD.
+ */
+ public final static String ATTRIBUTE_DECLARED = "ATTRIBUTE_DECLARED";
// XML version constants
public final static short XML_VERSION_1_0 = 1;
1.55 +2 -1
xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
Index: XMLDTDValidator.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- XMLDTDValidator.java 7 Nov 2003 00:26:18 -0000 1.54
+++ XMLDTDValidator.java 11 Nov 2003 04:52:27 -0000 1.55
@@ -1318,6 +1318,7 @@
String type = getAttributeTypeName(fTempAttDecl);
attributes.setType(i, type);
+ attributes.getAugmentations(i).putItem(Constants.ATTRIBUTE_DECLARED,
Boolean.TRUE);
boolean changedByNormalization = false;
String oldValue = attributes.getValue(i);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]