Class PrefixDeclarationParser
java.lang.Object
com.adobe.epubcheck.vocab.PrefixDeclarationParser
Utility to parse a prefix declaration attribute into a map of prefixes to URI
strings.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconsume(Reader reader, int c, PrefixDeclarationParser.State state) parsePrefixMappings(String value, Report report, EPUBLocation location) Parses a prefix declaration attribute into a map of prefixes to URI strings.private static intskip(Reader reader, int c, com.google.common.base.CharMatcher skipped, com.google.common.base.CharMatcher stopping)
-
Field Details
-
FINAL_STATES
-
-
Constructor Details
-
PrefixDeclarationParser
public PrefixDeclarationParser()
-
-
Method Details
-
parsePrefixMappings
public static Map<String,String> parsePrefixMappings(String value, Report report, EPUBLocation location) Parses a prefix declaration attribute into a map of prefixes to URI strings.- Parameters:
value- the string to parse (typically from aprefixattribute.report- to report errors on the fly.location- the location of attribute in the validated file.- Returns:
- a map of prefixes to URI strings.
-
consume
private static List<String> consume(Reader reader, int c, PrefixDeclarationParser.State state) throws IOException - Throws:
IOException
-
skip
private static int skip(Reader reader, int c, com.google.common.base.CharMatcher skipped, com.google.common.base.CharMatcher stopping) throws IOException - Throws:
IOException
-