Java Code Examples for com.sun.org.apache.xerces.internal.xni.Augmentations#getItem()

The following examples show how to use com.sun.org.apache.xerces.internal.xni.Augmentations#getItem() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ValidatorHandlerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
AttributePSVI getAttributePSVIByName(String uri, String localname) {
    if (fAttributes != null) {
        Augmentations augs = fAttributes.getAugmentations(uri, localname);
        if (augs != null) {
            return (AttributePSVI) augs.getItem(Constants.ATTRIBUTE_PSVI);
        }
    }
    return null;
}
 
Example 2
Source File: ValidatorHandlerImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
AttributePSVI getAttributePSVIByName(String uri, String localname) {
    if (fAttributes != null) {
        Augmentations augs = fAttributes.getAugmentations(uri, localname);
        if (augs != null) {
            return (AttributePSVI) augs.getItem(Constants.ATTRIBUTE_PSVI);
        }
    }
    return null;
}
 
Example 3
Source File: ValidatorHandlerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
AttributePSVI getAttributePSVIByName(String uri, String localname) {
    if (fAttributes != null) {
        Augmentations augs = fAttributes.getAugmentations(uri, localname);
        if (augs != null) {
            return (AttributePSVI) augs.getItem(Constants.ATTRIBUTE_PSVI);
        }
    }
    return null;
}
 
Example 4
Source File: ValidatorHandlerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
AttributePSVI getAttributePSVIByName(String uri, String localname) {
    if (fAttributes != null) {
        Augmentations augs = fAttributes.getAugmentations(uri, localname);
        if (augs != null) {
            return (AttributePSVI) augs.getItem(Constants.ATTRIBUTE_PSVI);
        }
    }
    return null;
}
 
Example 5
Source File: ValidatorHandlerImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private TypeInfo getAttributeType( int index ) {
    checkState(false);
    if( index<0 || fAttributes.getLength()<=index )
        throw new IndexOutOfBoundsException(Integer.toString(index));
    Augmentations augs = fAttributes.getAugmentations(index);
    if (augs == null) return null;
    AttributePSVI psvi = (AttributePSVI)augs.getItem(Constants.ATTRIBUTE_PSVI);
    return getTypeInfoFromPSVI(psvi);
}
 
Example 6
Source File: DOMNormalizer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
* The end of an element.
*
* @param element The name of the element.
* @param augs    Additional information that may include infoset augmentations
*
* @exception XNIException
*                   Thrown by handler to signal an error.
*/
   public void endElement(QName element, Augmentations augs) throws XNIException {
           if (DEBUG_EVENTS) {
                   System.out.println("==>endElement: " + element);
           }

   if(augs != null) {
           ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
           if (elementPSVI != null) {
                   ElementImpl elementNode = (ElementImpl) fCurrentNode;
                   if (fPSVI) {
                           ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
                   }
                   // include element default content (if one is available)
                   String normalizedValue = elementPSVI.getSchemaNormalizedValue();
                   if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
               if (normalizedValue !=null)
                               elementNode.setTextContent(normalizedValue);
                   }
                   else {
                           // NOTE: this is a hack: it is possible that DOM had an empty element
                           // and validator sent default value using characters(), which we don't
                           // implement. Thus, here we attempt to add the default value.
                           String text = elementNode.getTextContent();
                           if (text.length() == 0) {
                                   // default content could be provided
                   if (normalizedValue !=null)
                       elementNode.setTextContent(normalizedValue);
                           }
                   }
           }
   }
   }
 
Example 7
Source File: ValidatorHandlerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private TypeInfo getAttributeType( int index ) {
    checkState(false);
    if( index<0 || fAttributes.getLength()<=index )
        throw new IndexOutOfBoundsException(Integer.toString(index));
    Augmentations augs = fAttributes.getAugmentations(index);
    if (augs == null) return null;
    AttributePSVI psvi = (AttributePSVI)augs.getItem(Constants.ATTRIBUTE_PSVI);
    return getTypeInfoFromPSVI(psvi);
}
 
Example 8
Source File: ValidatorHandlerImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private TypeInfo getAttributeType( int index ) {
    checkState(false);
    if( index<0 || fAttributes.getLength()<=index )
        throw new IndexOutOfBoundsException(Integer.toString(index));
    Augmentations augs = fAttributes.getAugmentations(index);
    if (augs == null) return null;
    AttributePSVI psvi = (AttributePSVI)augs.getItem(Constants.ATTRIBUTE_PSVI);
    return getTypeInfoFromPSVI(psvi);
}
 
Example 9
Source File: ValidatorHandlerImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
AttributePSVI getAttributePSVIByName(String uri, String localname) {
    if (fAttributes != null) {
        Augmentations augs = fAttributes.getAugmentations(uri, localname);
        if (augs != null) {
            return (AttributePSVI) augs.getItem(Constants.ATTRIBUTE_PSVI);
        }
    }
    return null;
}
 
Example 10
Source File: ValidatorHandlerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private TypeInfo getAttributeType( int index ) {
    checkState(false);
    if( index<0 || fAttributes.getLength()<=index )
        throw new IndexOutOfBoundsException(Integer.toString(index));
    Augmentations augs = fAttributes.getAugmentations(index);
    if (augs == null) return null;
    AttributePSVI psvi = (AttributePSVI)augs.getItem(Constants.ATTRIBUTE_PSVI);
    return getTypeInfoFromPSVI(psvi);
}
 
Example 11
Source File: DOMNormalizer.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
* The end of an element.
*
* @param element The name of the element.
* @param augs    Additional information that may include infoset augmentations
*
* @exception XNIException
*                   Thrown by handler to signal an error.
*/
   public void endElement(QName element, Augmentations augs) throws XNIException {
           if (DEBUG_EVENTS) {
                   System.out.println("==>endElement: " + element);
           }

   if(augs != null) {
           ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
           if (elementPSVI != null) {
                   ElementImpl elementNode = (ElementImpl) fCurrentNode;
                   if (fPSVI) {
                           ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
                   }
                   // include element default content (if one is available)
                   String normalizedValue = elementPSVI.getSchemaNormalizedValue();
                   if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
               if (normalizedValue !=null)
                               elementNode.setTextContent(normalizedValue);
                   }
                   else {
                           // NOTE: this is a hack: it is possible that DOM had an empty element
                           // and validator sent default value using characters(), which we don't
                           // implement. Thus, here we attempt to add the default value.
                           String text = elementNode.getTextContent();
                           if (text.length() == 0) {
                                   // default content could be provided
                   if (normalizedValue !=null)
                       elementNode.setTextContent(normalizedValue);
                           }
                   }
           }
   }
   }
 
Example 12
Source File: XPointerElementHandler.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private boolean isIdAttribute(XMLAttributes attributes,Augmentations augs, int index) {
    Object o = augs.getItem(Constants.ID_ATTRIBUTE);
    if( o instanceof Boolean )
        return ((Boolean)o).booleanValue();
    return "ID".equals(attributes.getType(index));
}
 
Example 13
Source File: DOMNormalizer.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 * The end of an element.
 *
 * @param element The name of the element.
 * @param augs    Additional information that may include infoset augmentations
 *
 * @exception XNIException
 *                   Thrown by handler to signal an error.
 */
public void endElement(QName element, Augmentations augs) throws XNIException {
    if (DEBUG_EVENTS) {
        System.out.println("==>endElement: " + element);
    }

    if (augs != null) {
        ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
        if (elementPSVI != null) {
            ElementImpl elementNode = (ElementImpl) fCurrentNode;
            if (fPSVI) {
                ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
            }
            // Updating the TypeInfo for this element.
            if (elementNode instanceof ElementNSImpl) {
                XSTypeDefinition type = elementPSVI.getMemberTypeDefinition();
                if (type == null) {
                    type = elementPSVI.getTypeDefinition();
                }
                ((ElementNSImpl) elementNode).setType(type);
            }
            // include element default content (if one is available)
            String normalizedValue = elementPSVI.getSchemaValue().getNormalizedValue();
            if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
                if (normalizedValue !=null)
                    elementNode.setTextContent(normalizedValue);
            }
            else {
                // NOTE: this is a hack: it is possible that DOM had an empty element
                // and validator sent default value using characters(), which we don't
                // implement. Thus, here we attempt to add the default value.
                String text = elementNode.getTextContent();
                if (text.length() == 0) {
                    // default content could be provided
                    if (normalizedValue !=null)
                        elementNode.setTextContent(normalizedValue);
                }
            }
            return;
        }
    }
    // DTD; elements have no type.
    if (fCurrentNode instanceof ElementNSImpl) {
        ((ElementNSImpl) fCurrentNode).setType(null);
    }
}
 
Example 14
Source File: XPointerElementHandler.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private boolean isIdAttribute(XMLAttributes attributes,Augmentations augs, int index) {
    Object o = augs.getItem(Constants.ID_ATTRIBUTE);
    if( o instanceof Boolean )
        return ((Boolean)o).booleanValue();
    return "ID".equals(attributes.getType(index));
}
 
Example 15
Source File: XMLDTDValidator.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 * Character content.
 *
 * @param text The content.
 *
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void characters(XMLString text, Augmentations augs) throws XNIException {

    boolean callNextCharacters = true;

    // REVISIT: [Q] Is there a more efficient way of doing this?
    //          Perhaps if the scanner told us so we don't have to
    //          look at the characters again. -Ac
    boolean allWhiteSpace = true;
    for (int i=text.offset; i< text.offset+text.length; i++) {
        if (!isSpace(text.ch[i])) {
            allWhiteSpace = false;
            break;
        }
    }
    // call the ignoreableWhiteSpace callback
    // never call ignorableWhitespace if we are in cdata section
    if (fInElementContent && allWhiteSpace && !fInCDATASection) {
        if (fDocumentHandler != null) {
            fDocumentHandler.ignorableWhitespace(text, augs);
            callNextCharacters = false;
        }
    }

    // validate
    if (fPerformValidation) {
        if (fInElementContent) {
            if (fGrammarBucket.getStandalone() &&
                fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
                if (allWhiteSpace) {
                    fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
                                                "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
                                                null, XMLErrorReporter.SEVERITY_ERROR);
                }
            }
            if (!allWhiteSpace) {
                charDataInContent();
            }

            // For E15.2
            if (augs != null && augs.getItem(Constants.CHAR_REF_PROBABLE_WS) == Boolean.TRUE) {
                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                           "MSG_CONTENT_INVALID_SPECIFIED",
                                           new Object[]{ fCurrentElement.rawname,
                                               fDTDGrammar.getContentSpecAsString(fElementDepth),
                                               "character reference"},
                                           XMLErrorReporter.SEVERITY_ERROR);
            }
        }

        if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
            charDataInContent();
        }
    }

    // call handlers
    if (callNextCharacters && fDocumentHandler != null) {
        fDocumentHandler.characters(text, augs);
    }

}
 
Example 16
Source File: XMLDTDValidator.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Character content.
 *
 * @param text The content.
 *
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void characters(XMLString text, Augmentations augs) throws XNIException {

    boolean callNextCharacters = true;

    // REVISIT: [Q] Is there a more efficient way of doing this?
    //          Perhaps if the scanner told us so we don't have to
    //          look at the characters again. -Ac
    boolean allWhiteSpace = true;
    for (int i=text.offset; i< text.offset+text.length; i++) {
        if (!isSpace(text.ch[i])) {
            allWhiteSpace = false;
            break;
        }
    }
    // call the ignoreableWhiteSpace callback
    // never call ignorableWhitespace if we are in cdata section
    if (fInElementContent && allWhiteSpace && !fInCDATASection) {
        if (fDocumentHandler != null) {
            fDocumentHandler.ignorableWhitespace(text, augs);
            callNextCharacters = false;
        }
    }

    // validate
    if (fPerformValidation) {
        if (fInElementContent) {
            if (fGrammarBucket.getStandalone() &&
                fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
                if (allWhiteSpace) {
                    fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
                                                "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
                                                null, XMLErrorReporter.SEVERITY_ERROR);
                }
            }
            if (!allWhiteSpace) {
                charDataInContent();
            }

            // For E15.2
            if (augs != null && augs.getItem(Constants.CHAR_REF_PROBABLE_WS) == Boolean.TRUE) {
                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                           "MSG_CONTENT_INVALID_SPECIFIED",
                                           new Object[]{ fCurrentElement.rawname,
                                               fDTDGrammar.getContentSpecAsString(fElementDepth),
                                               "character reference"},
                                           XMLErrorReporter.SEVERITY_ERROR);
            }
        }

        if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
            charDataInContent();
        }
    }

    // call handlers
    if (callNextCharacters && fDocumentHandler != null) {
        fDocumentHandler.characters(text, augs);
    }

}
 
Example 17
Source File: XMLDTDValidator.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Character content.
 *
 * @param text The content.
 *
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void characters(XMLString text, Augmentations augs) throws XNIException {

    boolean callNextCharacters = true;

    // REVISIT: [Q] Is there a more efficient way of doing this?
    //          Perhaps if the scanner told us so we don't have to
    //          look at the characters again. -Ac
    boolean allWhiteSpace = true;
    for (int i=text.offset; i< text.offset+text.length; i++) {
        if (!isSpace(text.ch[i])) {
            allWhiteSpace = false;
            break;
        }
    }
    // call the ignoreableWhiteSpace callback
    // never call ignorableWhitespace if we are in cdata section
    if (fInElementContent && allWhiteSpace && !fInCDATASection) {
        if (fDocumentHandler != null) {
            fDocumentHandler.ignorableWhitespace(text, augs);
            callNextCharacters = false;
        }
    }

    // validate
    if (fPerformValidation) {
        if (fInElementContent) {
            if (fGrammarBucket.getStandalone() &&
                fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
                if (allWhiteSpace) {
                    fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
                                                "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
                                                null, XMLErrorReporter.SEVERITY_ERROR);
                }
            }
            if (!allWhiteSpace) {
                charDataInContent();
            }

            // For E15.2
            if (augs != null && augs.getItem(Constants.CHAR_REF_PROBABLE_WS) == Boolean.TRUE) {
                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                           "MSG_CONTENT_INVALID_SPECIFIED",
                                           new Object[]{ fCurrentElement.rawname,
                                               fDTDGrammar.getContentSpecAsString(fElementDepth),
                                               "character reference"},
                                           XMLErrorReporter.SEVERITY_ERROR);
            }
        }

        if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
            charDataInContent();
        }
    }

    // call handlers
    if (callNextCharacters && fDocumentHandler != null) {
        fDocumentHandler.characters(text, augs);
    }

}
 
Example 18
Source File: XMLDTDValidator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Character content.
 *
 * @param text The content.
 *
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void characters(XMLString text, Augmentations augs) throws XNIException {

    boolean callNextCharacters = true;

    // REVISIT: [Q] Is there a more efficient way of doing this?
    //          Perhaps if the scanner told us so we don't have to
    //          look at the characters again. -Ac
    boolean allWhiteSpace = true;
    for (int i=text.offset; i< text.offset+text.length; i++) {
        if (!isSpace(text.ch[i])) {
            allWhiteSpace = false;
            break;
        }
    }
    // call the ignoreableWhiteSpace callback
    // never call ignorableWhitespace if we are in cdata section
    if (fInElementContent && allWhiteSpace && !fInCDATASection) {
        if (fDocumentHandler != null) {
            fDocumentHandler.ignorableWhitespace(text, augs);
            callNextCharacters = false;
        }
    }

    // validate
    if (fPerformValidation) {
        if (fInElementContent) {
            if (fGrammarBucket.getStandalone() &&
                fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
                if (allWhiteSpace) {
                    fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
                                                "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
                                                null, XMLErrorReporter.SEVERITY_ERROR);
                }
            }
            if (!allWhiteSpace) {
                charDataInContent();
            }

            // For E15.2
            if (augs != null && augs.getItem(Constants.CHAR_REF_PROBABLE_WS) == Boolean.TRUE) {
                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                           "MSG_CONTENT_INVALID_SPECIFIED",
                                           new Object[]{ fCurrentElement.rawname,
                                               fDTDGrammar.getContentSpecAsString(fElementDepth),
                                               "character reference"},
                                           XMLErrorReporter.SEVERITY_ERROR);
            }
        }

        if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
            charDataInContent();
        }
    }

    // call handlers
    if (callNextCharacters && fDocumentHandler != null) {
        fDocumentHandler.characters(text, augs);
    }

}
 
Example 19
Source File: XMLDTDValidator.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Character content.
 *
 * @param text The content.
 *
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void characters(XMLString text, Augmentations augs) throws XNIException {

    boolean callNextCharacters = true;

    // REVISIT: [Q] Is there a more efficient way of doing this?
    //          Perhaps if the scanner told us so we don't have to
    //          look at the characters again. -Ac
    boolean allWhiteSpace = true;
    for (int i=text.offset; i< text.offset+text.length; i++) {
        if (!isSpace(text.ch[i])) {
            allWhiteSpace = false;
            break;
        }
    }
    // call the ignoreableWhiteSpace callback
    // never call ignorableWhitespace if we are in cdata section
    if (fInElementContent && allWhiteSpace && !fInCDATASection) {
        if (fDocumentHandler != null) {
            fDocumentHandler.ignorableWhitespace(text, augs);
            callNextCharacters = false;
        }
    }

    // validate
    if (fPerformValidation) {
        if (fInElementContent) {
            if (fGrammarBucket.getStandalone() &&
                fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
                if (allWhiteSpace) {
                    fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
                                                "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
                                                null, XMLErrorReporter.SEVERITY_ERROR);
                }
            }
            if (!allWhiteSpace) {
                charDataInContent();
            }

            // For E15.2
            if (augs != null && augs.getItem(Constants.CHAR_REF_PROBABLE_WS) == Boolean.TRUE) {
                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                           "MSG_CONTENT_INVALID_SPECIFIED",
                                           new Object[]{ fCurrentElement.rawname,
                                               fDTDGrammar.getContentSpecAsString(fElementDepth),
                                               "character reference"},
                                           XMLErrorReporter.SEVERITY_ERROR);
            }
        }

        if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
            charDataInContent();
        }
    }

    // call handlers
    if (callNextCharacters && fDocumentHandler != null) {
        fDocumentHandler.characters(text, augs);
    }

}
 
Example 20
Source File: XMLDTDValidator.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Character content.
 *
 * @param text The content.
 *
 * @param augs   Additional information that may include infoset augmentations
 *
 * @throws XNIException Thrown by handler to signal an error.
 */
public void characters(XMLString text, Augmentations augs) throws XNIException {

    boolean callNextCharacters = true;

    // REVISIT: [Q] Is there a more efficient way of doing this?
    //          Perhaps if the scanner told us so we don't have to
    //          look at the characters again. -Ac
    boolean allWhiteSpace = true;
    for (int i=text.offset; i< text.offset+text.length; i++) {
        if (!isSpace(text.ch[i])) {
            allWhiteSpace = false;
            break;
        }
    }
    // call the ignoreableWhiteSpace callback
    // never call ignorableWhitespace if we are in cdata section
    if (fInElementContent && allWhiteSpace && !fInCDATASection) {
        if (fDocumentHandler != null) {
            fDocumentHandler.ignorableWhitespace(text, augs);
            callNextCharacters = false;
        }
    }

    // validate
    if (fPerformValidation) {
        if (fInElementContent) {
            if (fGrammarBucket.getStandalone() &&
                fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
                if (allWhiteSpace) {
                    fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
                                                "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
                                                null, XMLErrorReporter.SEVERITY_ERROR);
                }
            }
            if (!allWhiteSpace) {
                charDataInContent();
            }

            // For E15.2
            if (augs != null && augs.getItem(Constants.CHAR_REF_PROBABLE_WS) == Boolean.TRUE) {
                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                           "MSG_CONTENT_INVALID_SPECIFIED",
                                           new Object[]{ fCurrentElement.rawname,
                                               fDTDGrammar.getContentSpecAsString(fElementDepth),
                                               "character reference"},
                                           XMLErrorReporter.SEVERITY_ERROR);
            }
        }

        if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
            charDataInContent();
        }
    }

    // call handlers
    if (callNextCharacters && fDocumentHandler != null) {
        fDocumentHandler.characters(text, augs);
    }

}