TokenTests

scala.xml.parsing.TokenTests
trait TokenTests

Helper functions for parsing XML fragments

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ExternalID
object NoExternalID.type
class PublicID
class SystemID
trait MarkupParser
class XhtmlParser
object Utility.type
Show all

Members list

Value members

Concrete methods

def isAlpha(c: Char): Boolean

These are 99% sure to be redundant but refactoring on the safe side.

These are 99% sure to be redundant but refactoring on the safe side.

Attributes

def isName(s: String): Boolean

See [5] of XML 1.0 specification.

Name ::= ( Letter | '_' ) (NameChar)*

See [5] of XML 1.0 specification.

Attributes

def isNameChar(ch: Char): Boolean

See [4] and [4a] of Appendix B of XML 1.0 specification.

NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | #xB7
           | CombiningChar | Extender

See [4] and [4a] of Appendix B of XML 1.0 specification.

Attributes

where Letter means in one of the Unicode general categories { Ll, Lu, Lo, Lt, Nl }.

NameStart ::= ( Letter | '_' | ':' )

where Letter means in one of the Unicode general categories { Ll, Lu, Lo, Lt, Nl }.

We do not allow a name to start with :. See [4] and Appendix B of XML 1.0 specification

Attributes

final def isSpace(ch: Char): Boolean
(#x20 | #x9 | #xD | #xA)

Attributes

final def isSpace(cs: Seq[Char]): Boolean
(#x20 | #x9 | #xD | #xA)+

Attributes

def isValidIANAEncoding(ianaEncoding: Seq[Char]): Boolean

Returns true if the encoding name is a valid IANA encoding. This method does not verify that there is a decoder available for this encoding, only that the characters are valid for an IANA encoding name.

Returns true if the encoding name is a valid IANA encoding. This method does not verify that there is a decoder available for this encoding, only that the characters are valid for an IANA encoding name.

Value parameters

ianaEncoding

The IANA encoding name.

Attributes