int loc = instruction.getConstructType(); if (loc == StandardNames.XSL_FUNCTION || loc == StandardNames.XSL_TEMPLATE) { String tag = "<"; tag += (loc==StandardNames.XSL_FUNCTION ? "function" : "template"); String name = null; if (instruction.getObjectName() != null) { name = instruction.getObjectName().getDisplayName(); } else if (instruction.getProperty("name") != null) { name = instruction.getProperty("name").toString(); if (instruction.getProperty("match") != null) { tag += " match=\"" + instruction.getProperty("match") + "\""; String file = instruction.getSystemId(); if (file != null) { if (file.length()>15) { tag += " line=\"" + instruction.getLineNumber() + "\""; tag += " time=\"" + System.currentTimeMillis() + "\""; tag += ">";
int infotype = info.getConstructType(); StructuredQName qName = info.getObjectName(); String tag = tag(infotype); if (tag==null) { String file = ExpressionLocation.truncateURI(info.getSystemId()); String msg = AbstractTraceListener.spaces(indent) + '<' + tag; String name = (String)info.getProperty("name"); if (name!=null) { msg += " name=\"" + escape(name) + '"'; msg += " name=\"" + escape(qName.getDisplayName()) + '"'; Iterator props = info.getProperties(); while (props.hasNext()) { String prop = (String)props.next(); Object val = info.getProperty(prop); if (prop.startsWith("{")) { msg += " line=\"" + info.getLineNumber() + '"'; int col = info.getColumnNumber(); if (col >= 0) { msg += " column=\"" + info.getColumnNumber() + '"';
protected int level(InstructionInfo info) { int construct = info.getConstructType(); if (construct == StandardNames.XSL_FUNCTION ||construct == StandardNames.XSL_TEMPLATE) { return 1; } if (info instanceof Instruction) { return 2; } else { return 3; } }
try { InstructionInfo info = inst.getInstructionInfo(); int construct = info.getConstructType(); if (construct < 1024 && construct != StandardNames.XSL_FUNCTION && StructuredQName qName = info.getObjectName(pool); String name = "element constructor"; if (context != null) { StructuredQName qName = info.getObjectName(pool); String name = "attribute constructor"; if (context != null) { StructuredQName qName = info.getObjectName(pool); String name = "function"; if (context != null) { StructuredQName qName = info.getObjectName(pool); String name = "template"; if (context != null && qName != null) {
/** * Called when an instruction in the stylesheet gets processed */ public void enter(/*@NotNull*/ InstructionInfo info, XPathContext context) { if (info instanceof TemplateRule) { String tag = "rule"; String file = StandardErrorListener.abbreviatePath(info.getSystemId()); String msg = AbstractTraceListener.spaces(indent) + "<rule match=\"" + escape(((TemplateRule) info).getMatchPattern().toString()) + '"' + " line=\"" + info.getLineNumber() + '"' + " module=\"" + escape(file) + '"' + '>'; out.info(msg); indent++; } }
lineNumber = loc.getLineNumber(); nodeMessage = "at " + kind + " " + ((InstructionInfo)loc).getObjectName();
int infotype = info.getConstructType(); StructuredQName qName = info.getObjectName(pool); String tag = tag(infotype); if (tag==null) { String file = ExpressionLocation.truncateURI(info.getSystemId()); String msg = AbstractTraceListener.spaces(indent) + '<' + tag; String name = (String)info.getProperty("name"); if (name!=null) { msg += " name=\"" + escape(name) + '"'; msg += " name=\"" + escape(qName.getDisplayName()) + '"'; Iterator props = info.getProperties(); while (props.hasNext()) { String prop = (String)props.next(); Object val = info.getProperty(prop); if (prop.startsWith("{")) { msg += " line=\"" + info.getLineNumber() + '"'; int col = info.getColumnNumber(); if (col >= 0) { msg += " column=\"" + info.getColumnNumber() + '"';
protected int level(InstructionInfo info) { int construct = info.getConstructType(); if (construct == StandardNames.XSL_FUNCTION ||construct == StandardNames.XSL_TEMPLATE) { return 1; } if (info instanceof Instruction) { return 2; } else { return 3; } }
locmessage += "at " + instructionName + ' '; systemId = ((InstructionInfoProvider)loc).getInstructionInfo().getSystemId(); lineNumber = ((InstructionInfoProvider)loc).getInstructionInfo().getLineNumber();
lineNumber = loc.getLineNumber(); nodeMessage = "at " + kind + " "; StructuredQName name = ((InstructionInfo) loc).getObjectName(); if (name != null) { nodeMessage += name.toString();
int infotype = info.getConstructType(); StructuredQName qName = info.getObjectName(); String tag = tag(infotype); if (level(info) > detail || tag == null) { String file = StandardErrorListener.abbreviatePath(info.getSystemId()); String msg = AbstractTraceListener.spaces(indent) + '<' + tag; String name = (String) info.getProperty("name"); if (name != null) { msg += " name=\"" + escape(name) + '"'; msg += " name=\"" + escape(qName.getDisplayName()) + '"'; Iterator props = info.getProperties(); while (props.hasNext()) { String prop = (String) props.next(); Object val = info.getProperty(prop); if (prop.startsWith("{")) { msg += " line=\"" + info.getLineNumber() + '"'; int col = info.getColumnNumber(); if (col >= 0) { msg += " column=\"" + info.getColumnNumber() + '"';
int loc = instruction.getConstructType(); if (loc == StandardNames.XSL_FUNCTION || loc == StandardNames.XSL_TEMPLATE) { String tag = "<"; tag += (loc==StandardNames.XSL_FUNCTION ? "function" : "template"); String name = null; if (instruction.getObjectName(pool) != null) { name = instruction.getObjectName(pool).getDisplayName(); } else if (instruction.getProperty("name") != null) { name = instruction.getProperty("name").toString(); if (instruction.getProperty("match") != null) { tag += " match=\"" + instruction.getProperty("match") + "\""; String file = instruction.getSystemId(); if (file != null) { if (file.length()>15) { tag += " line=\"" + instruction.getLineNumber() + "\""; tag += " time=\"" + System.currentTimeMillis() + "\""; tag += ">";
/** * Called after an instruction of the stylesheet got processed */ public void leave(InstructionInfo instruction) { int loc = instruction.getConstructType(); if (loc == StandardNames.XSL_FUNCTION || loc == StandardNames.XSL_TEMPLATE) { String tag = "<end time=\"" + System.currentTimeMillis() + "\"/></"; tag += (loc==StandardNames.XSL_FUNCTION ? "function>" : "template>"); System.err.println(tag); } }
lineNumber = loc.getLineNumber(); nodeMessage = "at " + kind + " "; StructuredQName name = ((InstructionInfo) loc).getObjectName(); if (name != null) { nodeMessage += name.toString();
int infotype = info.getConstructType(); StructuredQName qName = info.getObjectName(); String tag = tag(infotype); if (level(info) > detail || tag == null) { String file = StandardErrorListener.abbreviatePath(info.getSystemId()); String msg = AbstractTraceListener.spaces(indent) + '<' + tag; String name = (String) info.getProperty("name"); if (name != null) { msg += " name=\"" + escape(name) + '"'; msg += " name=\"" + escape(qName.getDisplayName()) + '"'; Iterator props = info.getProperties(); while (props.hasNext()) { String prop = (String) props.next(); Object val = info.getProperty(prop); if (prop.startsWith("{")) { msg += " line=\"" + info.getLineNumber() + '"'; int col = info.getColumnNumber(); if (col >= 0) { msg += " column=\"" + info.getColumnNumber() + '"';
writer.writeStartElement("fn"); String name = "UNKNOWN"; if (ins.instruct.getObjectName() != null) { name = ins.instruct.getObjectName().getDisplayName(); writer.writeAttribute("name", name); } else { if (ins.instruct.getProperty("name") != null) { name = ins.instruct.getProperty("name").toString(); writer.writeAttribute("name", name); if (ins.instruct.getProperty("match") != null) { name = ins.instruct.getProperty("match").toString(); writer.writeAttribute("match", name); if (ins.instruct.getProperty("mode") != null) { name = ins.instruct.getProperty("mode").toString(); writer.writeAttribute("mode", name); writer.writeAttribute("construct", ins.instruct.getConstructType() == StandardNames.XSL_FUNCTION ? "function" : ins.instruct.getConstructType() == StandardNames.XSL_VARIABLE ? "variable" : "template"); String file = ins.instruct.getSystemId(); if (file != null) { writer.writeAttribute("file", file); writer.writeAttribute("t-sum", Double.toString((double) ins.gross / repeat/ 1000000)); writer.writeAttribute("t-avg", Double.toString(ins.gross / (double) ins.count / 1000000)); writer.writeAttribute("line", Long.toString(ins.instruct.getLineNumber())); writer.writeEndElement();
/** * Called after an instruction of the stylesheet got processed */ public void leave(InstructionInfo instruction) { int loc = instruction.getConstructType(); if (loc == StandardNames.XSL_FUNCTION || loc == StandardNames.XSL_TEMPLATE) { String tag = "<end time=\"" + System.currentTimeMillis() + "\"/></"; tag += (loc==StandardNames.XSL_FUNCTION ? "function>" : "template>"); System.err.println(tag); } }
lineNumber = loc.getLineNumber(); nodeMessage = "at " + kind + " "; StructuredQName name = ((InstructionInfo) loc).getObjectName(); if (name != null) { nodeMessage += name.toString();
writer.writeStartElement("fn"); String name = "UNKNOWN"; if (ins.instruct.getObjectName() != null) { name = ins.instruct.getObjectName().getDisplayName(); writer.writeAttribute("name", name); } else { if (ins.instruct.getProperty("name") != null) { name = ins.instruct.getProperty("name").toString(); writer.writeAttribute("name", name); if (ins.instruct.getProperty("match") != null) { name = ins.instruct.getProperty("match").toString(); writer.writeAttribute("match", name); if (ins.instruct.getProperty("mode") != null) { name = ins.instruct.getProperty("mode").toString(); writer.writeAttribute("mode", name); writer.writeAttribute("construct", ins.instruct.getConstructType() == StandardNames.XSL_FUNCTION ? "function" : ins.instruct.getConstructType() == StandardNames.XSL_VARIABLE ? "variable" : "template"); String file = ins.instruct.getSystemId(); if (file != null) { writer.writeAttribute("file", file); writer.writeAttribute("t-sum", Double.toString((double) ins.gross / repeat/ 1000000)); writer.writeAttribute("t-avg", Double.toString(ins.gross / (double) ins.count / 1000000)); writer.writeAttribute("line", Long.toString(ins.instruct.getLineNumber())); writer.writeEndElement();
/** * Called when an instruction in the stylesheet gets processed */ public void enter(/*@NotNull*/ InstructionInfo instruction, XPathContext context) { int loc = instruction.getConstructType(); if (loc == StandardNames.XSL_FUNCTION || loc == StandardNames.XSL_TEMPLATE || loc == StandardNames.XSL_VARIABLE) { long start = System.nanoTime(); InstructionDetails instructDetails = new InstructionDetails(); instructDetails.instruct = instruction; instructDetails.gross = start; instructs.add(instructDetails); instructStack[stackDepth++] = instruction; } }