public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { this.unit.pushTag(new Tag(this.createLocation(), uri, localName, qName, this.createAttributes(attributes))); }
String n = tag.getLocalName(); if ("a".equals(n)) { return new Tag(tag.getLocation(), HtmlLibrary.Namespace, "commandLink", tag.getQName(), tag.getAttributes()); return new Tag(tag.getLocation(), HtmlLibrary.Namespace, "form", tag.getQName(), tag.getAttributes()); TagAttributes na = removeType(tag.getAttributes()); if ("text".equals(t)) { return new Tag(tag.getLocation(), HtmlLibrary.Namespace, "inputText", tag .getQName(), na); return new Tag(tag.getLocation(), HtmlLibrary.Namespace, "inputSecret", tag .getQName(), na); return new Tag(tag.getLocation(), HtmlLibrary.Namespace, "inputHidden", tag .getQName(), na); return new Tag(tag.getLocation(), HtmlLibrary.Namespace, "commandButton", tag .getQName(), na);
return new Tag(tag.getLocation(), tag.getNamespace(), tag .getLocalName(), tag.getQName(), new TagAttributes(attr));
private Tag trimJSFCAttribute(Tag tag) { TagAttribute attr = tag.getAttributes().get("jsfc"); if (attr != null) { TagAttribute[] oa = tag.getAttributes().getAll(); TagAttribute[] na = new TagAttribute[oa.length - 1]; int p = 0; for (int i = 0; i < oa.length; i++) { if (!"jsfc".equals(oa[i].getLocalName())) { na[p++] = oa[i]; } } return new Tag(tag, new TagAttributes(na)); } return tag; }