@Override public void begin(String namespace, String name, Attributes attributes) { TaglibXml taglibXml = (TaglibXml) digester.peek(); taglibXml.setJspVersion(attributes.getValue("version")); } });
private void parseTld(TldResourcePath path) throws IOException, SAXException { if (tldResourcePathTaglibXmlMap.containsKey(path)) { // TLD has already been parsed as a result of processing web.xml return; } TaglibXml tld = tldParser.parse(path); String uri = tld.getUri(); if (uri != null) { if (!uriTldResourcePathMap.containsKey(uri)) { uriTldResourcePathMap.put(uri, path); } } tldResourcePathTaglibXmlMap.put(path, tld); if (tld.getListeners() != null) { listeners.addAll(tld.getListeners()); } }
final TaglibXml taglibXml = new TaglibXml(); taglibXml.setTlibVersion("1.2"); taglibXml.setJspVersion("2.1"); taglibXml.setShortName("h"); taglibXml.setUri("http://java.sun.com/jsf/html"); taglibXml.setInfo("This tag library implements the standard JSF HTML tags."); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag); taglibXml.addTag(tag);
this.jspversion = taglibXml.getJspVersion(); this.tlibversion = taglibXml.getTlibVersion(); this.shortname = taglibXml.getShortName(); this.urn = taglibXml.getUri(); this.info = taglibXml.getInfo(); this.tagLibraryValidator = createValidator(taglibXml.getValidator()); for (TagXml tagXml : taglibXml.getTags()) { tagInfos.add(createTagInfo(tagXml)); for (TagFileXml tagFileXml : taglibXml.getTagFiles()) { tagFileInfos.add(createTagFileInfo(tagFileXml, jar)); List<FunctionInfo> functionInfos = taglibXml.getFunctions();
this.tlibversion = taglibXml.getTlibVersion(); this.jspversion = taglibXml.getJspVersion(); try { double version = Double.parseDouble(this.jspversion);
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { TaglibXml taglibXml = (TaglibXml) digester.peek(digester.getCount() - 1); digester.push(new Attribute("1.2".equals(taglibXml.getJspVersion()))); }
digester.setErrorHandler(handler); TaglibXml taglibXml = new TaglibXml(); digester.push(taglibXml);
uriTldResourcePathMap.put(taglibURI, tldResourcePath); tldResourcePathTaglibXmlMap.put(tldResourcePath, tld); if (tld.getListeners() != null) { listeners.addAll(tld.getListeners());
String v = taglibXml.getJspVersion(); this.jspversion = v; this.tlibversion = taglibXml.getTlibVersion(); this.shortname = taglibXml.getShortName(); this.urn = taglibXml.getUri(); this.info = taglibXml.getInfo(); this.tagLibraryValidator = createValidator(taglibXml.getValidator()); for (TagXml tagXml : taglibXml.getTags()) { tagInfos.add(createTagInfo(tagXml)); for (TagFileXml tagFileXml : taglibXml.getTagFiles()) { tagFileInfos.add(createTagFileInfo(tagFileXml, jar)); List<FunctionInfo> functionInfos = taglibXml.getFunctions();
this.tlibversion = taglibXml.getTlibVersion(); this.jspversion = taglibXml.getJspVersion(); try { double version = Double.parseDouble(this.jspversion);
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { TaglibXml taglibXml = (TaglibXml) digester.peek(digester.getCount() - 1); digester.push(new Attribute("1.2".equals(taglibXml.getJspVersion()))); }
public TaglibXml parse(TldResourcePath path) throws IOException, SAXException { try (InputStream is = path.openStream()) { XmlErrorHandler handler = new XmlErrorHandler(); digester.setErrorHandler(handler); TaglibXml taglibXml = new TaglibXml(); digester.push(taglibXml); InputSource source = new InputSource(path.toExternalForm()); source.setByteStream(is); digester.parse(source); if (!handler.getWarnings().isEmpty() || !handler.getErrors().isEmpty()) { handler.logFindings(log, source.getSystemId()); if (!handler.getErrors().isEmpty()) { // throw the first to indicate there was a error during processing throw handler.getErrors().iterator().next(); } } return taglibXml; } finally { digester.reset(); } }
uriTldResourcePathMap.put(taglibURI, tldResourcePath); tldResourcePathTaglibXmlMap.put(tldResourcePath, tld); if (tld.getListeners() != null) { listeners.addAll(tld.getListeners());
@Override public void begin(String namespace, String name, Attributes attributes) { TaglibXml taglibXml = (TaglibXml) digester.peek(); taglibXml.setJspVersion(attributes.getValue("version")); } });
protected void parseTld(TldResourcePath path) throws IOException, SAXException { if (tldResourcePathTaglibXmlMap.containsKey(path)) { // TLD has already been parsed as a result of processing web.xml return; } TaglibXml tld = tldParser.parse(path); String uri = tld.getUri(); if (uri != null) { if (!uriTldResourcePathMap.containsKey(uri)) { uriTldResourcePathMap.put(uri, path); } } tldResourcePathTaglibXmlMap.put(path, tld); if (tld.getListeners() != null) { listeners.addAll(tld.getListeners()); } }
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { TaglibXml taglibXml = (TaglibXml) digester.peek(digester.getCount() - 1); digester.push(new Attribute("1.2".equals(taglibXml.getJspVersion()))); }
digester.setErrorHandler(handler); TaglibXml taglibXml = new TaglibXml(); digester.push(taglibXml);
@Override public void begin(String namespace, String name, Attributes attributes) { TaglibXml taglibXml = (TaglibXml) digester.peek(); taglibXml.setJspVersion(attributes.getValue("version")); } });
@Override public void begin(String namespace, String name, Attributes attributes) { TaglibXml taglibXml = (TaglibXml) digester.peek(); taglibXml.setJspVersion(attributes.getValue("version")); } });
@Override public void begin(String namespace, String name, Attributes attributes) { TaglibXml taglibXml = (TaglibXml) digester.peek(); taglibXml.setJspVersion(attributes.getValue("version")); } });