コード例 #1
0
 public final void testBadCall() throws Exception {
   runTest(
       "" + "<ihtml:template formals=\"\" name=\"hi\">\n" + "  \n" + "</ihtml:template>",
       ""
           + "<ihtml:template name='hi' formals=''>\n"
           + "  <ihtml:call foo='bar' baz:boo='far'/>\n"
           + "</ihtml:template>",
       new Message(
           IhtmlMessageType.MISSING_ATTRIB,
           FilePosition.instance(is, 2, 41, 3, 37),
           elKey("ihtml:call"),
           attrKey("ihtml:call", "ihtml:template")),
       new Message(
           IhtmlMessageType.BAD_ATTRIB,
           FilePosition.instance(is, 2, 63, 25, 13),
           elKey("ihtml:call"),
           AttribKey.forAttribute(
               new Namespaces(Namespaces.XML_SPECIAL, "baz", "unknown:///baz"),
               elKey("ihtml:call"),
               "baz:boo"),
           MessagePart.Factory.valueOf("far")),
       new Message(
           MessageType.NO_SUCH_NAMESPACE,
           FilePosition.fromLinePositions(is, 2, 25, 2, 32),
           MessagePart.Factory.valueOf("baz"),
           MessagePart.Factory.valueOf("baz:boo")));
 }
コード例 #2
0
 static AttribKey attrKey(String elQName, String aQName) {
   return AttribKey.forAttribute(
       Namespaces.HTML_DEFAULT, ElKey.forElement(Namespaces.HTML_DEFAULT, elQName), aQName);
 }