1 package net.sf.saxon.om; 2 3 14 15 public class NamespaceConstant { 16 17 20 21 public static final String NULL = ""; 22 25 public static final short NULL_CODE = 0; 26 29 public static final int NULL_NAMESPACE_CODE = 0; 30 31 34 public static final String XML = "http://www.w3.org/XML/1998/namespace"; 35 38 public static final short XML_CODE = 1; 39 42 public static final int XML_NAMESPACE_CODE = 0x00010001; 43 44 45 48 public static final String XSLT = "http://www.w3.org/1999/XSL/Transform"; 49 52 public static final short XSLT_CODE = 2; 53 54 57 public static final String SAXON = "http://saxon.sf.net/"; 58 61 public static final short SAXON_CODE = 3; 62 63 66 public static final String SCHEMA = "http://www.w3.org/2001/XMLSchema"; 67 70 public static final short SCHEMA_CODE = 4; 71 72 76 public static final String XDT = "http://www.w3.org/2005/04/xpath-datatypes"; 77 78 81 82 public static final String XDT200502 = "http://www.w3.org/2005/02/xpath-datatypes"; 83 public static final String XDT200410 = "http://www.w3.org/2004/10/xpath-datatypes"; 84 public static final String XDT200407 = "http://www.w3.org/2004/07/xpath-datatypes"; 85 86 89 90 public static final boolean isXDTNamespace(String uri) { 91 return uri.equals(XDT) || uri.equals(XDT200502) || uri.equals(XDT200410) || uri.equals(XDT200407); 92 } 93 94 97 public static final short XDT_CODE = 5; 98 99 102 public static final String SCHEMA_INSTANCE = "http://www.w3.org/2001/XMLSchema-instance"; 103 104 public static final short XSI_CODE = 6; 105 106 109 public static final String EXSLT_COMMON = "http://exslt.org/common"; 110 111 114 public static final String EXSLT_MATH = "http://exslt.org/math"; 115 116 119 public static final String EXSLT_SETS = "http://exslt.org/sets"; 120 121 124 public static final String EXSLT_DATES_AND_TIMES = "http://exslt.org/dates-and-times"; 125 126 129 public static final String EXSLT_RANDOM = "http://exslt.org/random"; 130 131 134 public static final String FN = "http://www.w3.org/2005/04/xpath-functions"; 135 136 139 public static final String ERR = "http://www.w3.org/2004/07/xqt-errors"; 140 141 142 145 public static final String LOCAL = "http://www.w3.org/2005/04/xquery-local-functions"; 146 149 150 public static final String MICROSOFT_XSL = "http://www.w3.org/TR/WD-xsl"; 151 152 155 156 public static final String XHTML = "http://www.w3.org/1999/xhtml"; 157 158 161 162 public static final String JAVA_TYPE = "http://saxon.sf.net/java-type"; 163 164 168 169 public static final String ANONYMOUS = "http://ns.saxonica.com/anonymous-type"; 170 171 174 175 public static final String OBJECT_MODEL_SAXON = "http://saxon.sf.net/jaxp/xpath/om"; 176 177 178 181 182 public static final String OBJECT_MODEL_XOM = "http://www.xom.nu/jaxp/xpath/xom"; 183 184 187 188 public static final String OBJECT_MODEL_JDOM = "http://jdom.org/jaxp/xpath/jdom"; 189 190 193 194 public static final String CODEPOINT_COLLATION_URI = "http://www.w3.org/2005/04/xpath-functions/collation/codepoint"; 195 196 199 200 private NamespaceConstant() { 201 } 202 203 206 207 public static final boolean isReserved(String uri) { 208 return uri.equals(XSLT) || 209 uri.equals(FN) || 210 uri.equals(XML) || 211 uri.equals(SCHEMA)|| 212 uri.equals(XDT) || 213 uri.equals(SCHEMA_INSTANCE); 214 } 215 216 219 220 public static final boolean isReservedInQuery(String uri) { 221 return uri.equals(FN) || 222 uri.equals(XML) || 223 uri.equals(SCHEMA) || 224 uri.equals(XDT) || 225 uri.equals(SCHEMA_INSTANCE); 226 } 227 } 228 229 | Popular Tags |