Top Description Fields Constructors Methods
org.apache.xerces.impl

public Class XML11DocumentScannerImpl

extends XMLDocumentScannerImpl
Class Inheritance
Known Direct Subclasses
org.apache.xerces.impl.XML11NSDocumentScannerImpl
Imports
java.io.IOException, org.apache.xerces.impl.msg.XMLMessageFormatter, org.apache.xerces.util.XML11Char, .XMLChar, .XMLStringBuffer, org.apache.xerces.xni.XMLString, .XNIException

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:

Authors
Glenn Marcy, IBM, Andy Clark, IBM, Arnaud Le Hors, IBM, Eric Ye, IBM
Version
$Id: XML11DocumentScannerImpl.java 572055 2007-09-02 17:55:43Z mrglavas $

Field Summary

Modifier and TypeField and Description
private final XMLString
private final XMLStringBuffer
private final XMLStringBuffer
private final XMLStringBuffer
Inherited from org.apache.xerces.impl.XMLDocumentScannerImpl:
DISALLOW_DOCTYPE_DECL_FEATUREDTD_SCANNERfDisallowDoctypefDoctypeNamefDoctypePublicIdfDoctypeSystemIdfDTDDispatcherfDTDScannerfLoadExternalDTDfNamespaceContextfPrologDispatcherfScanningDTDfSeenDoctypeDeclfTrailingMiscDispatcherfValidationManagerfXMLDeclDispatcherLOAD_EXTERNAL_DTDNAMESPACE_CONTEXTSCANNER_STATE_DTD_EXTERNALSCANNER_STATE_DTD_EXTERNAL_DECLSSCANNER_STATE_DTD_INTERNAL_DECLSSCANNER_STATE_PROLOGSCANNER_STATE_TRAILING_MISCSCANNER_STATE_XML_DECLVALIDATION_MANAGER

Constructor Summary

AccessConstructor and Description
public
XML11DocumentScannerImpl()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
protected String
protected boolean
protected boolean
protected int

Returns:

-1 if the value would be unchanged by normalization, otherwise the index of the first whitespace character which would be transformed.
isUnchangedByNormalization
(XMLString value)

Overrides org.apache.xerces.impl.XMLScanner.isUnchangedByNormalization.

Checks whether this string would be unchanged by normalization.
protected boolean
protected boolean
protected boolean
protected boolean
protected void
normalizeWhitespace(XMLString value)

Overrides org.apache.xerces.impl.XMLScanner.normalizeWhitespace.

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

Overrides org.apache.xerces.impl.XMLScanner.normalizeWhitespace.

Normalize whitespace in an XMLString converting all whitespace characters to space characters.
protected boolean

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.

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

Overrides org.apache.xerces.impl.XMLScanner.scanAttributeValue.

Scans an attribute value and normalizes whitespace converting all whitespace characters to space characters.
protected int

Returns:

Returns the next character on the stream.
scanContent
()

Overrides org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent.

Scans element content.
protected boolean

Returns:

True on success

Note

This method uses fStringBuffer, anything in it at the time of calling is lost.

scanPubidLiteral
(XMLString
The string to fill in with the public ID literal.
literal
)

Overrides org.apache.xerces.impl.XMLScanner.scanPubidLiteral.

Scans public ID literal.
protected boolean
Inherited from org.apache.xerces.impl.XMLDocumentScannerImpl:
createContentDispatcherendEntitygetFeatureDefaultgetPropertyDefaultgetRecognizedFeaturesgetRecognizedPropertiesgetScannerStateNameresetscanDoctypeDeclsetFeaturesetInputSourcesetPropertystartEntity

Field Detail

fStringback to summary
private final XMLString fString

Hides org.apache.xerces.impl.XMLDocumentScannerImpl.fString.

String.

fStringBufferback to summary
private final XMLStringBuffer fStringBuffer

Hides org.apache.xerces.impl.XMLDocumentScannerImpl.fStringBuffer.

String buffer.

fStringBuffer2back to summary
private final XMLStringBuffer fStringBuffer2

Hides org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.fStringBuffer2.

fStringBuffer3back to summary
private final XMLStringBuffer fStringBuffer3

Hides org.apache.xerces.impl.XMLScanner.fStringBuffer3.

Constructor Detail

XML11DocumentScannerImplback to summary
public XML11DocumentScannerImpl()

Default constructor.

Method Detail

getVersionNotSupportedKeyback to summary
protected String getVersionNotSupportedKey()

Overrides org.apache.xerces.impl.XMLScanner.getVersionNotSupportedKey.

isInvalidback to summary
protected boolean isInvalid(int value)

Overrides org.apache.xerces.impl.XMLScanner.isInvalid.

isInvalidLiteralback to summary
protected boolean isInvalidLiteral(int value)

Overrides org.apache.xerces.impl.XMLScanner.isInvalidLiteral.

isUnchangedByNormalizationback to summary
protected int isUnchangedByNormalization(XMLString value)

Overrides org.apache.xerces.impl.XMLScanner.isUnchangedByNormalization.

Checks whether this string would be unchanged by normalization.

Returns:int

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

isValidNameCharback to summary
protected boolean isValidNameChar(int value)

Overrides org.apache.xerces.impl.XMLScanner.isValidNameChar.

isValidNameStartCharback to summary
protected boolean isValidNameStartChar(int value)

Overrides org.apache.xerces.impl.XMLScanner.isValidNameStartChar.

isValidNameStartHighSurrogateback to summary
protected boolean isValidNameStartHighSurrogate(int value)

Overrides org.apache.xerces.impl.XMLScanner.isValidNameStartHighSurrogate.

isValidNCNameback to summary
protected boolean isValidNCName(int value)

Overrides org.apache.xerces.impl.XMLScanner.isValidNCName.

normalizeWhitespaceback to summary
protected void normalizeWhitespace(XMLString value)

Overrides org.apache.xerces.impl.XMLScanner.normalizeWhitespace.

Normalize whitespace in an XMLString converting all whitespace characters to space characters.

normalizeWhitespaceback to summary
protected void normalizeWhitespace(XMLString value, int fromIndex)

Overrides org.apache.xerces.impl.XMLScanner.normalizeWhitespace.

Normalize whitespace in an XMLString converting all whitespace characters to space characters.

scanAttributeValueback to summary
protected boolean scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, boolean checkEntities, String eleName) throws IOException, XNIException

Overrides org.apache.xerces.impl.XMLScanner.scanAttributeValue.

Scans an attribute value and normalizes whitespace converting all whitespace characters to space characters. [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"

Parameters
value:XMLString

The XMLString to fill in with the value.

nonNormalizedValue:XMLString

The XMLString to fill in with the non-normalized value.

atName:String

The name of the attribute being parsed (for error msgs).

checkEntities:boolean

true if undeclared entities should be reported as VC violation, false if undeclared entities should be reported as WFC violation.

eleName:String

The name of element to which this attribute belongs.

Returns:boolean

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.

scanContentback to summary
protected int scanContent() throws IOException, XNIException

Overrides org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent.

Scans element content.

Returns:int

Returns the next character on the stream.

scanPubidLiteralback to summary
protected boolean scanPubidLiteral(XMLString literal) throws IOException, XNIException

Overrides org.apache.xerces.impl.XMLScanner.scanPubidLiteral.

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:XMLString

The string to fill in with the public ID literal.

Returns:boolean

True on success

Note

This method uses fStringBuffer, anything in it at the time of calling is lost.

versionSupportedback to summary
protected boolean versionSupported(String version)

Overrides org.apache.xerces.impl.XMLScanner.versionSupported.