@Test public void shouldParseNCName() { assertThat(parser.parseNCName(tokenize("ABCDEFGHIJKLMNOPQRSTUVWXYZ")), is("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); assertThat(parser.parseNCName(tokenize("abcdefghijklmnopqrstuvwxyz")), is("abcdefghijklmnopqrstuvwxyz")); assertThat(parser.parseNCName(tokenize("a0123456789")), is("a0123456789")); assertThat(parser.parseNCName(tokenize("a_-3b")), is("a_-3b")); assertThat(parser.parseNCName(tokenize("abc:def")), is("abc")); }
protected String parseNCName( TokenStream tokens ) { String name = tokens.consume(); if (!XmlCharacters.isValidNcName(name)) { throw new ParsingException(tokens.previousPosition(), "Expected valid NCName but found " + name); } return name; }
XPathParser { protected String parseNCName( TokenStream tokens ) { String name = tokens.consume(); if (!XmlCharacters.isValidNcName(name)) { throw new ParsingException(tokens.previousPosition(), "Expected valid NCName but found " + name); } return name; } }
XPathParser { protected String parseNCName( TokenStream tokens ) { String name = tokens.consume(); if (!XmlCharacters.isValidNcName(name)) { throw new ParsingException(tokens.previousPosition(), "Expected valid NCName but found " + name); } return name; } XPathParser( TypeSystem context ); }
XPathParser { protected String parseNCName( TokenStream tokens ) { String name = tokens.consume(); if (!XmlCharacters.isValidNcName(name)) { throw new ParsingException(tokens.previousPosition(), "Expected valid NCName but found " + name); } return name; } XPathParser( TypeSystem context ); Component parseXPath( String xpath ); }
XPathParser { protected String parseNCName( TokenStream tokens ) { String name = tokens.consume(); if (!XmlCharacters.isValidNcName(name)) { throw new ParsingException(tokens.previousPosition(), "Expected valid NCName but found " + name); } return name; } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }