/* 161 */ this.baseURIStack.push(baseURI);
/* */
/* 163 */ this.debug.message(4, "xml:base", baseURI);
/* */ try
/* */ {
/* 166 */ CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 167 */ this.catalog.addEntry(ce);
/* */ } catch (CatalogException cex) {
/* 169 */ if (cex.getExceptionType() == 3)
/* 170 */ this.debug.message(1, "Invalid catalog entry type", localName);
/* 171 */ else if (cex.getExceptionType() == 2) {
/* 172 */ this.debug.message(1, "Invalid catalog entry (base)", localName);
/* */ }
/* */ }
/* */
/* 176 */ entryType = -1;
/* 177 */ entryArgs = new Vector();
/* */ }
/* */ else {
/* 180 */ this.baseURIStack.push(this.baseURIStack.peek());
/* */ }
/* */
/* 183 */ if (((localName.equals("catalog")) || (localName.equals("group"))) && (atts.getValue("prefer") != null))
/* */ {
/* 185 */ String override = atts.getValue("prefer");
/* */
/* 187 */ if (override.equals("public")) {
/* 188 */ override = "yes";
/* 189 */ } else if (override.equals("system")) {
/* 190 */ override = "no";
/* */ } else {
/* 192 */ this.debug.message(1, "Invalid prefer: must be 'system' or 'public'", localName);
/* */
/* 195 */ override = this.catalog.getDefaultOverride();
/* */ }
/* */
/* 198 */ entryType = Catalog.OVERRIDE;
/* 199 */ entryArgs.add(override);
/* 200 */ this.overrideStack.push(override);
/* */
/* 202 */ this.debug.message(4, "override", override);
/* */ try
/* */ {
/* 205 */ CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 206 */ this.catalog.addEntry(ce);
/* */ } catch (CatalogException cex) {
/* 208 */ if (cex.getExceptionType() == 3)
/* 209 */ this.debug.message(1, "Invalid catalog entry type", localName);
/* 210 */ else if (cex.getExceptionType() == 2) {
/* 211 */ this.debug.message(1, "Invalid catalog entry (override)", localName);
/* */ }
/* */ }
/* */
/* 215 */ entryType = -1;
/* 216 */ entryArgs = new Vector();
/* */ }
/* */ else {
/* 219 */ this.overrideStack.push(this.overrideStack.peek());
/* */ }
/* */
/* 222 */ if (localName.equals("delegatePublic")) {
/* 223 */ if (checkAttributes(atts, "publicIdStartString", "catalog")) {
/* 224 */ entryType = Catalog.DELEGATE_PUBLIC;
/* 225 */ entryArgs.add(atts.getValue("publicIdStartString"));
/* 226 */ entryArgs.add(atts.getValue("catalog"));
/* */
/* 228 */ this.debug.message(4, "delegatePublic", PublicId.normalize(atts.getValue("publicIdStartString")), atts.getValue("catalog"));
/* */ }
/* */
/* */ }
/* 232 */ else if (localName.equals("delegateSystem")) {
/* 233 */ if (checkAttributes(atts, "systemIdStartString", "catalog")) {
/* 234 */ entryType = Catalog.DELEGATE_SYSTEM;
/* 235 */ entryArgs.add(atts.getValue("systemIdStartString"));
/* 236 */ entryArgs.add(atts.getValue("catalog"));
/* */
/* 238 */ this.debug.message(4, "delegateSystem", atts.getValue("systemIdStartString"), atts.getValue("catalog"));
/* */ }
/* */
/* */ }
/* 242 */ else if (localName.equals("delegateURI")) {
/* 243 */ if (checkAttributes(atts, "uriStartString", "catalog")) {
/* 244 */ entryType = Catalog.DELEGATE_URI;
/* 245 */ entryArgs.add(atts.getValue("uriStartString"));
/* 246 */ entryArgs.add(atts.getValue("catalog"));
/* */
/* 248 */ this.debug.message(4, "delegateURI", atts.getValue("uriStartString"), atts.getValue("catalog"));
/* */ }
/* */
/* */ }
/* 252 */ else if (localName.equals("rewriteSystem")) {
/* 253 */ if (checkAttributes(atts, "systemIdStartString", "rewritePrefix")) {
/* 254 */ entryType = Catalog.REWRITE_SYSTEM;
/* 255 */ entryArgs.add(atts.getValue("systemIdStartString"));
/* 256 */ entryArgs.add(atts.getValue("rewritePrefix"));
/* */
/* 258 */ this.debug.message(4, "rewriteSystem", atts.getValue("systemIdStartString"), atts.getValue("rewritePrefix"));
/* */ }
/* */
/* */ }
/* 262 */ else if (localName.equals("systemSuffix")) {
/* 263 */ if (checkAttributes(atts, "systemIdSuffix", "uri")) {
/* 264 */ entryType = Catalog.SYSTEM_SUFFIX;
/* 265 */ entryArgs.add(atts.getValue("systemIdSuffix"));
/* 266 */ entryArgs.add(atts.getValue("uri"));
/* */
/* 268 */ this.debug.message(4, "systemSuffix", atts.getValue("systemIdSuffix"), atts.getValue("uri"));
/* */ }
/* */
/* */ }
/* 272 */ else if (localName.equals("rewriteURI")) {
/* 273 */ if (checkAttributes(atts, "uriStartString", "rewritePrefix")) {
/* 274 */ entryType = Catalog.REWRITE_URI;
/* 275 */ entryArgs.add(atts.getValue("uriStartString"));
/* 276 */ entryArgs.add(atts.getValue("rewritePrefix"));
/* */
/* 278 */ this.debug.message(4, "rewriteURI", atts.getValue("uriStartString"), atts.getValue("rewritePrefix"));
/* */ }
/* */
/* */ }
/* 282 */ else if (localName.equals("uriSuffix")) {
/* 283 */ if (checkAttributes(atts, "uriSuffix", "uri")) {
/* 284 */ entryType = Catalog.URI_SUFFIX;
/* 285 */ entryArgs.add(atts.getValue("uriSuffix"));
/* 286 */ entryArgs.add(atts.getValue("uri"));
/* */
/* 288 */ this.debug.message(4, "uriSuffix", atts.getValue("uriSuffix"), atts.getValue("uri"));
/* */ }
/* */
/* */ }
/* 292 */ else if (localName.equals("nextCatalog")) {
/* 293 */ if (checkAttributes(atts, "catalog")) {
/* 294 */ entryType = Catalog.CATALOG;
/* 295 */ entryArgs.add(atts.getValue("catalog"));
/* */
/* 297 */ this.debug.message(4, "nextCatalog", atts.getValue("catalog"));
/* */ }
/* 299 */ } else if (localName.equals("public")) {
/* 300 */ if (checkAttributes(atts, "publicId", "uri")) {
/* 301 */ entryType = Catalog.PUBLIC;
/* 302 */ entryArgs.add(atts.getValue("publicId"));
/* 303 */ entryArgs.add(atts.getValue("uri"));
/* */
/* 305 */ this.debug.message(4, "public", PublicId.normalize(atts.getValue("publicId")), atts.getValue("uri"));
/* */ }
/* */
/* */ }
/* 309 */ else if (localName.equals("system")) {
/* 310 */ if (checkAttributes(atts, "systemId", "uri")) {
/* 311 */ entryType = Catalog.SYSTEM;
/* 312 */ entryArgs.add(atts.getValue("systemId"));
/* 313 */ entryArgs.add(atts.getValue("uri"));
/* */
/* 315 */ this.debug.message(4, "system", atts.getValue("systemId"), atts.getValue("uri"));
/* */ }
/* */
/* */ }
/* 319 */ else if (localName.equals("uri")) {
/* 320 */ if (checkAttributes(atts, "name", "uri")) {
/* 321 */ entryType = Catalog.URI;
/* 322 */ entryArgs.add(atts.getValue("name"));
/* 323 */ entryArgs.add(atts.getValue("uri"));
/* */
/* 325 */ this.debug.message(4, "uri", atts.getValue("name"), atts.getValue("uri"));
/* */ }
/* */
/* */ }
/* 329 */ else if (!localName.equals("catalog"))
/* */ {
/* 331 */ if (!localName.equals("group"))
/* */ {
/* 335 */ this.debug.message(1, "Invalid catalog entry type", localName);
/* */ }
/* */ }
/* 338 */ if (entryType >= 0) {
/* */ try {
/* 340 */ CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 341 */ this.catalog.addEntry(ce);
/* */ } catch (CatalogException cex) {
/* 343 */ if (cex.getExceptionType() == 3)
/* 344 */ this.debug.message(1, "Invalid catalog entry type", localName);
/* 345 */ else if (cex.getExceptionType() == 2) {
/* 346 */ this.debug.message(1, "Invalid catalog entry", localName);
/* */ }
/* */ }
/* */ }
/* */ }
/* */
/* 352 */ if ((namespaceURI != null) && ("urn:oasis:names:tc:entity:xmlns:tr9401:catalog".equals(namespaceURI)) && (!inExtension))
/* */ {
/* 356 */ if (atts.getValue("xml:base") != null) {
/* 357 */ String baseURI = atts.getValue("xml:base");
/* 358 */ entryType = Catalog.BASE;
/* 359 */ entryArgs.add(baseURI);
/* 360 */ this.baseURIStack.push(baseURI);
/* */
/* 362 */ this.debug.message(4, "xml:base", baseURI);
/* */ try
/* */ {
/* 365 */ CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 366 */ this.catalog.addEntry(ce);
/* */ } catch (CatalogException cex) {
/* 368 */ if (cex.getExceptionType() == 3)
/* 369 */ this.debug.message(1, "Invalid catalog entry type", localName);
/* 370 */ else if (cex.getExceptionType() == 2) {
/* 371 */ this.debug.message(1, "Invalid catalog entry (base)", localName);
/* */ }
/* */ }
/* */
/* 375 */ entryType = -1;
/* 376 */ entryArgs = new Vector();
/* */ }
/* */ else {
/* 379 */ this.baseURIStack.push(this.baseURIStack.peek());
/* */ }
/* */
/* 382 */ if (localName.equals("doctype")) {
/* 383 */ entryType = Catalog.DOCTYPE;
/* 384 */ entryArgs.add(atts.getValue("name"));
/* 385 */ entryArgs.add(atts.getValue("uri"));
/* 386 */ } else if (localName.equals("document")) {
/* 387 */ entryType = Catalog.DOCUMENT;
/* 388 */ entryArgs.add(atts.getValue("uri"));
/* 389 */ } else if (localName.equals("dtddecl")) {
/* 390 */ entryType = Catalog.DTDDECL;
/* 391 */ entryArgs.add(atts.getValue("publicId"));
/* 392 */ entryArgs.add(atts.getValue("uri"));
/* 393 */ } else if (localName.equals("entity")) {
/* 394 */ entryType = Catalog.ENTITY;
/* 395 */ entryArgs.add(atts.getValue("name"));
/* 396 */ entryArgs.add(atts.getValue("uri"));
/* 397 */ } else if (localName.equals("linktype")) {
/* 398 */ entryType = Catalog.LINKTYPE;
/* 399 */ entryArgs.add(atts.getValue("name"));
/* 400 */ entryArgs.add(atts.getValue("uri"));
/* 401 */ } else if (localName.equals("notation")) {
/* 402 */ entryType = Catalog.NOTATION;
/* 403 */ entryArgs.add(atts.getValue("name"));
/* 404 */ entryArgs.add(atts.getValue("uri"));
/* 405 */ } else if (localName.equals("sgmldecl")) {
/* 406 */ entryType = Catalog.SGMLDECL;
/* 407 */ entryArgs.add(atts.getValue("uri"));
/* */ }
/* */ else {
/* 410 */ this.debug.message(1, "Invalid catalog entry type", localName);
/* */ }
/* */
/* 413 */ if (entryType >= 0)
/* */ try {
/* 415 */ CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 416 */ this.catalog.addEntry(ce);
/* */ } catch (CatalogException cex) {
/* 418 */ if (cex.getExceptionType() == 3)
/* 419 */ this.debug.message(1, "Invalid catalog entry type", localName);
/* 420 */ else if (cex.getExceptionType() == 2)