1 package net.sf.saxon.trace; 2 3 import net.sf.saxon.style.StandardNames; 4 5 8 9 public class XQueryTraceListener extends AbstractTraceListener { 10 11 14 15 protected String getOpeningAttributes() { 16 return ""; 17 } 18 19 23 24 protected String tag(int construct) { 25 switch (construct) { 26 case StandardNames.XSL_FUNCTION: 27 return "function"; 28 case StandardNames.XSL_VARIABLE: 29 return "variable"; 30 case StandardNames.XSL_ELEMENT: 31 return "element"; 32 case StandardNames.XSL_ATTRIBUTE: 33 return "attribute"; 34 case StandardNames.XSL_COMMENT: 35 return "comment"; 36 case StandardNames.XSL_DOCUMENT: 37 return "document"; 38 case StandardNames.XSL_PROCESSING_INSTRUCTION: 39 return "processing-instruction"; 40 case StandardNames.XSL_TEXT: 41 return "text"; 42 case StandardNames.XSL_NAMESPACE: 43 return "namespace"; 44 case Location.LITERAL_RESULT_ELEMENT: 45 return "element"; 46 case Location.LITERAL_RESULT_ATTRIBUTE: 47 return "attribute"; 48 case Location.FUNCTION_CALL: 49 return null; 51 case Location.FOR_EXPRESSION: 52 return "for"; 53 case Location.LET_EXPRESSION: 54 return "let"; 55 case Location.WHERE_CLAUSE: 56 return "where"; 57 case Location.ORDER_BY_CLAUSE: 58 return "sort"; 59 case Location.RETURN_EXPRESSION: 60 return "return"; 61 case Location.TYPESWITCH_EXPRESSION: 62 return "typeswitch"; 63 case Location.VALIDATE_EXPRESSION: 64 return "validate"; 65 case Location.IF_EXPRESSION: 66 return "if"; 67 case Location.THEN_EXPRESSION: 68 return "then"; 69 case Location.ELSE_EXPRESSION: 70 return "else"; 71 case Location.CASE_EXPRESSION: 72 return "case"; 73 case Location.DEFAULT_EXPRESSION: 74 return "default"; 75 case Location.TRACE_CALL: 76 return "user-trace"; 77 default: 78 return null; 80 } 81 } 82 83 } 84 85 86 | Popular Tags |