📄 _default__xsl.java
字号:
out.setLocation("caucho/newstyle.xsl", 444);
out.pushElement("div");
String _xsl_str0 = "side";
out.setAttribute("class", _xsl_str0);
out.setLocation("caucho/newstyle.xsl", 444);
out.pushElement("table");
String _xsl_str1 = "100%";
out.setAttribute("width", _xsl_str1);
String _xsl_str2 = "0";
out.setAttribute("border", _xsl_str2);
String _xsl_str3 = "0";
out.setAttribute("cellspacing", _xsl_str3);
if (_exprs[2].evalBoolean(node, env)) {
out.setLocation("caucho/newstyle.xsl", 447);
out.pushElement("tr");
out.setLocation("caucho/newstyle.xsl", 447);
out.pushElement("th");
String _xsl_str4 = "sidetitle";
out.setAttribute("class", _xsl_str4);
if (node instanceof Element)
out.print(((Element) node).getAttribute("title"));
out.popElement();
out.popElement();
}
out.setLocation("caucho/newstyle.xsl", 448);
out.pushElement("tr");
out.setLocation("caucho/newstyle.xsl", 448);
out.pushElement("td");
String _xsl_str5 = "sidebody";
out.setAttribute("class", _xsl_str5);
{
Env _xsl_arg1 = XPath.createCall(env);
_xsl_arg1.setSelect(node, null);
for (Node _xsl_node = node.getFirstChild();
_xsl_node != null;
_xsl_node = _xsl_node.getNextSibling()) {
_xsl_arg1.setCurrentNode(_xsl_node);
applyNode(out, _xsl_node, _xsl_arg1, 0, 2147483647);
}
}
out.popElement();
out.popElement();
out.popElement();
out.popElement();
out.disableEscaping(oldEscaping);
}
// 'br'
private void _xsl_template_34(XslWriter out, Node inputNode, Env env)
throws Exception
{
Object _xsl_tmp;
Node node = inputNode;
boolean oldEscaping = out.disableEscaping(true);
env.setStylesheetEnv(stylesheets[1]);
out.pushCopy(node);
{
Env _xsl_arg1 = XPath.createCall(env);
_xsl_arg1.setSelect(node, null);
for (Node _xsl_node = node.getFirstChild();
_xsl_node != null;
_xsl_node = _xsl_node.getNextSibling()) {
_xsl_arg1.setCurrentNode(_xsl_node);
applyNode(out, _xsl_node, _xsl_arg1, 0, 2147483647);
}
}
out.popCopy(node);
out.disableEscaping(oldEscaping);
}
// 'var'
private void _xsl_template_35(XslWriter out, Node inputNode, Env env)
throws Exception
{
Object _xsl_tmp;
Node node = inputNode;
boolean oldEscaping = out.disableEscaping(true);
env.setStylesheetEnv(stylesheets[1]);
out.setLocation("caucho/newstyle.xsl", 469);
out.pushElement("span");
String _xsl_str0 = "meta";
out.setAttribute("class", _xsl_str0);
{
Env _xsl_arg1 = XPath.createCall(env);
_xsl_arg1.setSelect(node, null);
for (Node _xsl_node = node.getFirstChild();
_xsl_node != null;
_xsl_node = _xsl_node.getNextSibling()) {
_xsl_arg1.setCurrentNode(_xsl_node);
applyNode(out, _xsl_node, _xsl_arg1, 0, 2147483647);
}
}
out.popElement();
out.disableEscaping(oldEscaping);
}
// 'ct:img'
private void _xsl_template_36(XslWriter out, Node inputNode, Env env)
throws Exception
{
Object _xsl_tmp;
Node node = inputNode;
boolean oldEscaping = out.disableEscaping(true);
env.setStylesheetEnv(stylesheets[1]);
String name = ((Element) node).getAttribute("src"); PageContext page = (PageContext) out.getProperty("caucho.page.context"); ServletContext cxt = page.getServletContext(); String realPath = cxt.getRealPath("/images/" + name); com.caucho.graphics.Images img = null; // img = com.caucho.graphics.Images.getImage(realPath); out.pushElement("img"); out.setAttribute("src", top + "images/" + name); if (img != null) { out.setAttribute("width", String.valueOf(img.getWidth())); out.setAttribute("height", String.valueOf(img.getHeight())); } out.popElement();
out.disableEscaping(oldEscaping);
}
// 'code'
private void _xsl_template_37(XslWriter out, Node inputNode, Env env)
throws Exception
{
Object _xsl_tmp;
Node node = inputNode;
boolean oldEscaping = out.disableEscaping(true);
env.setStylesheetEnv(stylesheets[1]);
out.setLocation("caucho/newstyle.xsl", 497);
out.pushElement("tt");
{
Env _xsl_arg1 = XPath.createCall(env);
_xsl_arg1.setSelect(node, null);
for (Node _xsl_node = node.getFirstChild();
_xsl_node != null;
_xsl_node = _xsl_node.getNextSibling()) {
_xsl_arg1.setCurrentNode(_xsl_node);
applyNode(out, _xsl_node, _xsl_arg1, 0, 2147483647);
}
}
out.popElement();
out.disableEscaping(oldEscaping);
}
// 'sup|font|small|em|b|jsp:expression|h3'
private void _xsl_template_38(XslWriter out, Node inputNode, Env env)
throws Exception
{
Object _xsl_tmp;
Node node = inputNode;
boolean oldEscaping = out.disableEscaping(true);
env.setStylesheetEnv(stylesheets[1]);
out.pushCopy(node);
{
Env _xsl_arg1 = XPath.createCall(env);
_xsl_arg1.setSelect(node, _select_patterns[3]);
Iterator _xsl_iter0 = _select_patterns[3].select(node, env);
while (_xsl_iter0.hasNext()) {
Node _xsl_ptr1 = (Node) _xsl_iter0.next();
_xsl_arg1.setCurrentNode(_xsl_ptr1);
applyNode(out, _xsl_ptr1, _xsl_arg1, 0, 2147483647);
}
}
out.popCopy(node);
out.disableEscaping(oldEscaping);
}
// 'a[@href]'
private void _xsl_template_39(XslWriter out, Node inputNode, Env env)
throws Exception
{
Object _xsl_tmp;
Node node = inputNode;
boolean oldEscaping = out.disableEscaping(true);
env.setStylesheetEnv(stylesheets[1]);
out.setLocation("caucho/newstyle.xsl", 513);
out.pushElement("a");
String _xsl_str0 = "";
if (node instanceof Element)
_xsl_str0 = ((Element) node).getAttribute("href");
out.setAttribute("href", _xsl_str0);
{
Env _xsl_arg1 = XPath.createCall(env);
_xsl_arg1.setSelect(node, _select_patterns[2]);
for (Node _xsl_ptr1 = node.getFirstChild();
_xsl_ptr1 != null;
_xsl_ptr1 = _xsl_ptr1.getNextSibling()) {
_xsl_arg1.setCurrentNode(_xsl_ptr1);
applyNode(out, _xsl_ptr1, _xsl_arg1, 0, 2147483647);
}
}
out.popElement();
out.disableEscaping(oldEscaping);
}
String top = "/"; String title = null; Navigation nav = null; String topnav(Object a, Object b, Object c) { return ""; } void initNavigation(XslWriter out) throws IOException { PageContext page = (PageContext) out.getProperty("caucho.page.context"); ServletContext app = page.getServletContext(); HttpServletRequest req = (HttpServletRequest) page.getRequest(); String url = req.getRequestURI(); int p = url.lastIndexOf('/'); String base = url.substring(0, p); ArrayList paths = new ArrayList(); while (p >= 0) { String prefix = url.substring(0, p + 1); CauchoApplication subapp = (CauchoApplication) app.getContext(prefix); String rel = prefix.substring(subapp.getContextPath().length()); String realPath = subapp.getRealPath(rel); Path path = ((Path) out.getProperty("caucho.pwd")).lookupNative(realPath); paths.add(path); if (path.lookup("toc.xml").exists()) out.addCacheDepend(path.lookup("toc.xml")); p = url.lastIndexOf('/', p - 1); } nav = Navigation.createNested(paths, base); if (nav == null) nav = new Navigation(); top = req.getContextPath(); if (! top.endsWith("/")) top = top + "/"; } void writeThreaded(XslWriter out, boolean allowComments) throws IOException, SAXException { PageContext page = out.getPage(); HttpServletRequest req = (HttpServletRequest) page.getRequest(); NavItem item = nav.findURL(req.getRequestURI()); if (item == null) return; out.pushElement("table"); out.setAttribute("border", "0"); out.setAttribute("cellspacing", "0"); out.setAttribute("width", "100%"); out.pushElement("tr"); out.pushElement("td"); NavItem prev = item.getPreviousPreorder(); if (prev == null) out.print(" "); else { out.pushElement("a"); out.setAttribute("href", prev.getLink()); out.print(prev.getTitle()); out.popElement(); } out.popElement(); if (item.getParent() != null) { NavItem parent = item.getParent(); out.pushElement("td"); out.setAttribute("width", "100%"); out.pushElement("center"); out.pushElement("a"); out.setAttribute("href", parent.getLink()); out.print(parent.getTitle()); out.popElement(); out.popElement(); out.popElement(); } else { out.pushElement("td"); out.setAttribute("width", "100%"); out.print(" "); out.popElement(); } out.pushElement("td"); out.setAttribute("align", "right"); NavItem next = item.getNextPreorder(); if (next == null) out.print(" "); else { out.pushElement("a"); out.setAttribute("href", next.getLink()); out.print(next.getTitle()); out.popElement(); } out.popElement(); out.popElement(); out.popElement(); } void writeFamilyNavigation(XslWriter out) throws IOException, SAXException { PageContext page = (PageContext) out.getProperty("caucho.page.context"); HttpServletRequest req = (HttpServletRequest) page.getRequest(); NavItem item = nav.findURL(req.getRequestURI()); ArrayList list = null; if (item != null) list = item.familyNavigation(); if (list == null || list.size() == 0) return; for (int i = 0; i < list.size(); i++) { NavItem child = (NavItem) list.get(i); if (child == null) { out.pushElement("tr"); out.pushElement("td"); out.pushElement("hr"); out.popElement(); out.popElement(); out.popElement(); } else { out.pushElement("tr"); out.pushElement("td"); String link = child.getLink(); out.pushElement("a"); out.setAttribute("class", "leftnav"); out.setAttribute("href", link); out.println(child.getTitle()); out.popElement(); out.popElement(); out.popElement(); } } } void topnav(XslWriter out, String name, String href) throws IOException, SAXException { out.pushElement("img"); out.setAttribute("name", name); out.setAttribute("src", "/images/pixel.gif"); out.setAttribute("alt", ""); out.setAttribute("width", "8"); out.setAttribute("height", "8"); out.popElement(); out.println(" "); out.pushElement("a"); out.setAttribute("class", "topnav"); out.setAttribute("href", top + href); out.println(name); out.popElement(); } void printDescription(XslWriter out, Node node, int count) throws IOException, SAXException, XPathException { CharBuffer cb = CharBuffer.allocate(); Iterator iter = XPath.select(".//text()|.//resin|.//resintm", node); while (iter.hasNext()) { Node subnode = (Node) iter.next(); if (subnode.getNodeName().equals("#text")) { String str = subnode.getNodeValue(); for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); if (ch == '<') cb.append("&"); else if (ch != '"' && ch != '\'') cb.append(ch); } } else if (subnode.getNodeName().equals("resin")) cb.append("Resin"); else if (subnode.getNodeName().equals("resintm")) cb.append("Resin(tm)"); if (cb.length() >= count) break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -