Top Description Fields Constructors Methods
com.sun.msv.reader.trex.ng

public Class ValueState

extends ExpressionWithoutChildState
Class Inheritance
Imports
org.relaxng.datatype.Datatype, .DatatypeException, com.sun.msv.grammar.Expression, com.sun.msv.reader.ExpressionWithoutChildState, com.sun.msv.util.StringPair

parses <value> pattern.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
protected final StringBuffer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
characters(char[]
the characters from the XML document
buf
,
int
the start position in the array
from
,
int
the number of characters to read from the array
len
)

Overrides com.sun.msv.reader.State.characters.

Implements org.xml.sax.ContentHandler.characters.

Receive notification of character data.
public void
ignorableWhitespace(char[]
the characters from the XML document
buf
,
int
the start position in the array
from
,
int
the number of characters to read from the array
len
)

Overrides com.sun.msv.reader.State.ignorableWhitespace.

Implements org.xml.sax.ContentHandler.ignorableWhitespace.

Receive notification of ignorable whitespace in element content.
protected Expression
makeExpression()

Implements abstract com.sun.msv.reader.ExpressionState.makeExpression.

This method is called from endElement method.
Inherited from com.sun.msv.reader.ExpressionWithoutChildState:
createChildState

Field Detail

textback to summary
protected final StringBuffer text

Constructor Detail

ValueStateback to summary
public ValueState()

Method Detail

charactersback to summary
public void characters(char[] buf, int from, int len)

Overrides com.sun.msv.reader.State.characters.

Implements org.xml.sax.ContentHandler.characters.

Doc from org.xml.sax.ContentHandler.characters.

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Individual characters may consist of more than one Java char value. There are two important cases where this happens, because characters can't be represented in just sixteen bits. In one case, characters are represented in a Surrogate Pair, using two special Unicode values. Such characters are in the so-called "Astral Planes", with a code point above U+FFFF. A second case involves composite characters, such as a base character combining with one or more accent characters.

Your code should not assume that algorithms using char-at-a-time idioms will be working in character units; in some cases they will split characters. This is relevant wherever XML permits arbitrary characters, such as attribute values, processing instruction data, and comments as well as in data reported from this method. It's also generally relevant whenever Java code manipulates internationalized text; the issue isn't unique to XML.

Note that some parsers will report whitespace in element content using the ignorableWhitespace method rather than this one (validating parsers must do so).

Parameters
buf:char[]

the characters from the XML document

from:int

the start position in the array

len:int

the number of characters to read from the array

ignorableWhitespaceback to summary
public void ignorableWhitespace(char[] buf, int from, int len)

Overrides com.sun.msv.reader.State.ignorableWhitespace.

Implements org.xml.sax.ContentHandler.ignorableWhitespace.

Doc from org.xml.sax.ContentHandler.ignorableWhitespace.

Receive notification of ignorable whitespace in element content.

Validating Parsers must use this method to report each chunk of whitespace in element content (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.

SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Parameters
buf:char[]

the characters from the XML document

from:int

the start position in the array

len:int

the number of characters to read from the array

makeExpressionback to summary
protected Expression makeExpression()

Implements abstract com.sun.msv.reader.ExpressionState.makeExpression.

Doc from com.sun.msv.reader.ExpressionState.makeExpression.

This method is called from endElement method. Implementation has to provide Expression object that represents the content of this element.