org.apache.xerces.impl

Class XML11DocumentScannerImpl

public class XML11DocumentScannerImpl extends XMLDocumentScannerImpl

This class is responsible for scanning XML document structure and content. The scanner acts as the source for the document information which is communicated to the document handler.

This component requires the following features and properties from the component manager that uses it:

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.

Version: $Id: XML11DocumentScannerImpl.java,v 1.22 2004/10/04 21:45:49 mrglavas Exp $

Author: Glenn Marcy, IBM Andy Clark, IBM Arnaud Le Hors, IBM Eric Ye, IBM

Constructor Summary
XML11DocumentScannerImpl()
Default constructor.
Method Summary
protected StringgetVersionNotSupportedKey()
protected booleanisInvalid(int value)
protected booleanisInvalidLiteral(int value)
protected intisUnchangedByNormalization(XMLString value)
Checks whether this string would be unchanged by normalization.
protected booleanisValidNameChar(int value)
protected booleanisValidNameStartChar(int value)
protected booleanisValidNameStartHighSurrogate(int value)
protected booleanisValidNCName(int value)
protected voidnormalizeWhitespace(XMLString value)
Normalize whitespace in an XMLString converting all whitespace characters to space characters.
protected voidnormalizeWhitespace(XMLString value, int fromIndex)
Normalize whitespace in an XMLString converting all whitespace characters to space characters.
protected booleanscanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, boolean checkEntities, String eleName)
Scans an attribute value and normalizes whitespace converting all whitespace characters to space characters.
protected intscanContent()
Scans element content.
protected booleanscanPubidLiteral(XMLString literal)
Scans public ID literal.
protected booleanversionSupported(String version)

Constructor Detail

XML11DocumentScannerImpl

public XML11DocumentScannerImpl()
Default constructor.

Method Detail

getVersionNotSupportedKey

protected String getVersionNotSupportedKey()

isInvalid

protected boolean isInvalid(int value)

isInvalidLiteral

protected boolean isInvalidLiteral(int value)

isUnchangedByNormalization

protected int isUnchangedByNormalization(XMLString value)
Checks whether this string would be unchanged by normalization.

Returns: -1 if the value would be unchanged by normalization, otherwise the index of the first whitespace character which would be transformed.

isValidNameChar

protected boolean isValidNameChar(int value)

isValidNameStartChar

protected boolean isValidNameStartChar(int value)

isValidNameStartHighSurrogate

protected boolean isValidNameStartHighSurrogate(int value)

isValidNCName

protected boolean isValidNCName(int value)

normalizeWhitespace

protected void normalizeWhitespace(XMLString value)
Normalize whitespace in an XMLString converting all whitespace characters to space characters.

normalizeWhitespace

protected void normalizeWhitespace(XMLString value, int fromIndex)
Normalize whitespace in an XMLString converting all whitespace characters to space characters.

scanAttributeValue

protected boolean scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, boolean checkEntities, String eleName)
Scans an attribute value and normalizes whitespace converting all whitespace characters to space characters. [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"

Parameters: value The XMLString to fill in with the value. nonNormalizedValue The XMLString to fill in with the non-normalized value. atName The name of the attribute being parsed (for error msgs). checkEntities true if undeclared entities should be reported as VC violation, false if undeclared entities should be reported as WFC violation. eleName The name of element to which this attribute belongs.

Returns: true if the non-normalized and normalized value are the same Note: This method uses fStringBuffer2, anything in it at the time of calling is lost.

scanContent

protected int scanContent()
Scans element content.

Returns: Returns the next character on the stream.

scanPubidLiteral

protected boolean scanPubidLiteral(XMLString literal)
Scans public ID literal. [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'" [13] PubidChar::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] The returned string is normalized according to the following rule, from http://www.w3.org/TR/REC-xml#dt-pubid: Before a match is attempted, all strings of white space in the public identifier must be normalized to single space characters (#x20), and leading and trailing white space must be removed.

Parameters: literal The string to fill in with the public ID literal.

Returns: True on success. Note: This method uses fStringBuffer, anything in it at the time of calling is lost.

versionSupported

protected boolean versionSupported(String version)
Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.