Hello,

I needed to know if a Notation declaration was external or in the internal
DTD subset in DTDGrammar, so since there was support for that for
elements and attributes declaration, I added support in DTDGrammar.
Is this useful for a patch or was the lack of it intended ?

Regards.
-- 
# Stef Epardaud, # Teachers have potentially more power than military,
# Java Defeater  #   the former can teach us how to not need the latter.
#     Earth      # Lunatech Research,
#  Solar System  #   soon we'll quit researching and start finding...
Index: src/org/apache/xerces/impl/dtd/DTDGrammar.java
===================================================================
RCS file: 
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/dtd/DTDGrammar.java,v
retrieving revision 1.23
diff -r1.23 DTDGrammar.java
316a317,321
>     // additional fields(columns) for the notation Decl pool in the Grammar
> 
>     /** flag if the NotationDecl is External. */
>     private int fNotationDeclIsExternal[][] = new int[INITIAL_CHUNK_COUNT][];
> 
361a367,383
>      * Returns true if the specified notation declaration is external.
>      *
>      * @param notationDeclIndex The notation declaration index.
>      */
>     public boolean getNotationDeclIsExternal(int notationDeclIndex) {
> 
>         if (notationDeclIndex < 0) {
>             return false;
>         }
> 
>         int chunk = notationDeclIndex >> CHUNK_SHIFT;
>         int index = notationDeclIndex & CHUNK_MASK;
>         return (fNotationDeclIsExternal[chunk][index] != 0);
> 
>     } // getElementDeclIsExternal(int):boolean
> 
>     /**
1950a1973
>        fNotationDeclIsExternal[chunk][index] = fReadingExternalDTD? 1 : 0;
2515a2539
>             fNotationDeclIsExternal = resize(fNotationDeclIsExternal, 
> fNotationDeclIsExternal.length * 2);
2528a2553
>         fNotationDeclIsExternal[chunk] = new int[CHUNK_SIZE];

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to