Package org.jboss.util.xml.catalog

Examples of org.jboss.util.xml.catalog.CatalogEntry


  baseURIStack.push(baseURI);

  debug.message(4, "xml:base", baseURI);

  try {
    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
    catalog.addEntry(ce);
  } catch (CatalogException cex) {
    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
      debug.message(1, "Invalid catalog entry type", localName);
    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
      debug.message(1, "Invalid catalog entry (base)", localName);
    }
  }

  entryType = -1;
  entryArgs = new Vector();

      } else {
  baseURIStack.push(baseURIStack.peek());
      }

      if ((localName.equals("catalog") || localName.equals("group"))
    && atts.getValue("prefer") != null) {
  String override = atts.getValue("prefer");

  if (override.equals("public")) {
    override = "yes";
  } else if (override.equals("system")) {
    override = "no";
  } else {
    debug.message(1,
      "Invalid prefer: must be 'system' or 'public'",
      localName);
    override = catalog.getDefaultOverride();
  }

  entryType = Catalog.OVERRIDE;
  entryArgs.add(override);
  overrideStack.push(override);

  debug.message(4, "override", override);

  try {
    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
    catalog.addEntry(ce);
  } catch (CatalogException cex) {
    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
      debug.message(1, "Invalid catalog entry type", localName);
    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
      debug.message(1, "Invalid catalog entry (override)", localName);
    }
  }

  entryType = -1;
  entryArgs = new Vector();

      } else {
  overrideStack.push(overrideStack.peek());
      }

      if (localName.equals("delegatePublic")) {
  if (checkAttributes(atts, "publicIdStartString", "catalog")) {
    entryType = Catalog.DELEGATE_PUBLIC;
    entryArgs.add(atts.getValue("publicIdStartString"));
    entryArgs.add(atts.getValue("catalog"));

    debug.message(4, "delegatePublic",
      PublicId.normalize(atts.getValue("publicIdStartString")),
      atts.getValue("catalog"));
  }
      } else if (localName.equals("delegateSystem")) {
  if (checkAttributes(atts, "systemIdStartString", "catalog")) {
    entryType = Catalog.DELEGATE_SYSTEM;
    entryArgs.add(atts.getValue("systemIdStartString"));
    entryArgs.add(atts.getValue("catalog"));

    debug.message(4, "delegateSystem",
      atts.getValue("systemIdStartString"),
      atts.getValue("catalog"));
  }
      } else if (localName.equals("delegateURI")) {
  if (checkAttributes(atts, "uriStartString", "catalog")) {
    entryType = Catalog.DELEGATE_URI;
    entryArgs.add(atts.getValue("uriStartString"));
    entryArgs.add(atts.getValue("catalog"));

    debug.message(4, "delegateURI",
      atts.getValue("uriStartString"),
      atts.getValue("catalog"));
  }
      } else if (localName.equals("rewriteSystem")) {
  if (checkAttributes(atts, "systemIdStartString", "rewritePrefix")) {
    entryType = Catalog.REWRITE_SYSTEM;
    entryArgs.add(atts.getValue("systemIdStartString"));
    entryArgs.add(atts.getValue("rewritePrefix"));

    debug.message(4, "rewriteSystem",
      atts.getValue("systemIdStartString"),
      atts.getValue("rewritePrefix"));
  }
      } else if (localName.equals("rewriteURI")) {
  if (checkAttributes(atts, "uriStartString", "rewritePrefix")) {
    entryType = Catalog.REWRITE_URI;
    entryArgs.add(atts.getValue("uriStartString"));
    entryArgs.add(atts.getValue("rewritePrefix"));

    debug.message(4, "rewriteURI",
      atts.getValue("uriStartString"),
      atts.getValue("rewritePrefix"));
  }
      } else if (localName.equals("nextCatalog")) {
  if (checkAttributes(atts, "catalog")) {
    entryType = Catalog.CATALOG;
    entryArgs.add(atts.getValue("catalog"));

    debug.message(4, "nextCatalog", atts.getValue("catalog"));
  }
      } else if (localName.equals("public")) {
  if (checkAttributes(atts, "publicId", "uri")) {
    entryType = Catalog.PUBLIC;
    entryArgs.add(atts.getValue("publicId"));
    entryArgs.add(atts.getValue("uri"));

    debug.message(4, "public",
      PublicId.normalize(atts.getValue("publicId")),
      atts.getValue("uri"));
  }
      } else if (localName.equals("system")) {
  if (checkAttributes(atts, "systemId", "uri")) {
    entryType = Catalog.SYSTEM;
    entryArgs.add(atts.getValue("systemId"));
    entryArgs.add(atts.getValue("uri"));

    debug.message(4, "system",
      atts.getValue("systemId"),
      atts.getValue("uri"));
  }
      } else if (localName.equals("uri")) {
  if (checkAttributes(atts, "name", "uri")) {
    entryType = Catalog.URI;
    entryArgs.add(atts.getValue("name"));
    entryArgs.add(atts.getValue("uri"));

    debug.message(4, "uri",
      atts.getValue("name"),
      atts.getValue("uri"));
  }
      } else if (localName.equals("catalog")) {
  // nop, start of catalog
      } else if (localName.equals("group")) {
  // nop, a group
      } else {
  // This is equivalent to an invalid catalog entry type
  debug.message(1, "Invalid catalog entry type", localName);
      }

      if (entryType >= 0) {
  try {
    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
    catalog.addEntry(ce);
  } catch (CatalogException cex) {
    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
      debug.message(1, "Invalid catalog entry type", localName);
    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
      debug.message(1, "Invalid catalog entry", localName);
    }
  }
      }
    }

    if (namespaceURI != null && tr9401NamespaceName.equals(namespaceURI)
  && !inExtension) {
      // This is a TR9401 Catalog entry

      if (atts.getValue("xml:base") != null) {
  String baseURI = atts.getValue("xml:base");
  entryType = Catalog.BASE;
  entryArgs.add(baseURI);
  baseURIStack.push(baseURI);

  debug.message(4, "xml:base", baseURI);

  try {
    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
    catalog.addEntry(ce);
  } catch (CatalogException cex) {
    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
      debug.message(1, "Invalid catalog entry type", localName);
    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
      debug.message(1, "Invalid catalog entry (base)", localName);
    }
  }

  entryType = -1;
  entryArgs = new Vector();

      } else {
  baseURIStack.push(baseURIStack.peek());
      }

      if (localName.equals("doctype")) {
  entryType = catalog.DOCTYPE;
  entryArgs.add(atts.getValue("name"));
  entryArgs.add(atts.getValue("uri"));
      } else if (localName.equals("document")) {
  entryType = catalog.DOCUMENT;
  entryArgs.add(atts.getValue("uri"));
      } else if (localName.equals("dtddecl")) {
  entryType = catalog.DTDDECL;
  entryArgs.add(atts.getValue("publicId"));
  entryArgs.add(atts.getValue("uri"));
      } else if (localName.equals("entity")) {
  entryType = Catalog.ENTITY;
  entryArgs.add(atts.getValue("name"));
  entryArgs.add(atts.getValue("uri"));
      } else if (localName.equals("linktype")) {
  entryType = Catalog.LINKTYPE;
  entryArgs.add(atts.getValue("name"));
  entryArgs.add(atts.getValue("uri"));
      } else if (localName.equals("notation")) {
  entryType = Catalog.NOTATION;
  entryArgs.add(atts.getValue("name"));
  entryArgs.add(atts.getValue("uri"));
      } else if (localName.equals("sgmldecl")) {
  entryType = Catalog.SGMLDECL;
  entryArgs.add(atts.getValue("uri"));
      } else {
  // This is equivalent to an invalid catalog entry type
  debug.message(1, "Invalid catalog entry type", localName);
      }

      if (entryType >= 0) {
  try {
    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
    catalog.addEntry(ce);
  } catch (CatalogException cex) {
    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
      debug.message(1, "Invalid catalog entry type", localName);
    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
View Full Code Here


  entryArgs.add(baseURI);

  debug.message(4, "(reset) xml:base", baseURI);

  try {
    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
    catalog.addEntry(ce);
  } catch (CatalogException cex) {
    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
      debug.message(1, "Invalid catalog entry type", localName);
    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
      debug.message(1, "Invalid catalog entry (rbase)", localName);
    }
  }
      }
    }

    if (namespaceURI != null && namespaceName.equals(namespaceURI)
  && !inExtension) {
      if (localName.equals("catalog") || localName.equals("group")) {
  String popOverride = (String) overrideStack.pop();
  String override = (String) overrideStack.peek();

  if (!override.equals(popOverride)) {
    entryType = catalog.OVERRIDE;
    entryArgs.add(override);
    overrideStack.push(override);

    debug.message(4, "(reset) override", override);

    try {
      CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
      catalog.addEntry(ce);
    } catch (CatalogException cex) {
      if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
        debug.message(1, "Invalid catalog entry type", localName);
      } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
View Full Code Here

  for (int count = 0; count < numArgs; count++) {
    args.addElement(nextToken());
  }

  catalog.addEntry(new CatalogEntry(entryToken, args));
      } catch (CatalogException cex) {
  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
    if (unknownEntry == null) {
      unknownEntry = new Vector();
    }
View Full Code Here

      catalog.getCatalogManager().debug.message(1, "Invalid catalog entry type", localName);
    }

    if (entryType >= 0) {
      try {
  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
  catalog.addEntry(ce);
      } catch (CatalogException cex) {
  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
    catalog.getCatalogManager().debug.message(1, "Invalid catalog entry type", localName);
  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
View Full Code Here

/* 186 */         this.baseURIStack.push(baseURI);
/*     */
/* 188 */         this.debug.message(4, "xml:base", baseURI);
/*     */         try
/*     */         {
/* 191 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 192 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 194 */           if (cex.getExceptionType() == 3)
/* 195 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 196 */           else if (cex.getExceptionType() == 2) {
/* 197 */             this.debug.message(1, "Invalid catalog entry (base)", localName);
/*     */           }
/*     */         }
/*     */
/* 201 */         entryType = -1;
/* 202 */         entryArgs = new Vector();
/*     */       }
/*     */       else {
/* 205 */         this.baseURIStack.push(this.baseURIStack.peek());
/*     */       }
/*     */
/* 208 */       if (((localName.equals("catalog")) || (localName.equals("group"))) && (atts.getValue("prefer") != null))
/*     */       {
/* 210 */         String override = atts.getValue("prefer");
/*     */
/* 212 */         if (override.equals("public")) {
/* 213 */           override = "yes";
/* 214 */         } else if (override.equals("system")) {
/* 215 */           override = "no";
/*     */         } else {
/* 217 */           this.debug.message(1, "Invalid prefer: must be 'system' or 'public'", localName);
/*     */
/* 220 */           override = this.catalog.getDefaultOverride();
/*     */         }
/*     */
/* 223 */         entryType = Catalog.OVERRIDE;
/* 224 */         entryArgs.add(override);
/* 225 */         this.overrideStack.push(override);
/*     */
/* 227 */         this.debug.message(4, "override", override);
/*     */         try
/*     */         {
/* 230 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 231 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 233 */           if (cex.getExceptionType() == 3)
/* 234 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 235 */           else if (cex.getExceptionType() == 2) {
/* 236 */             this.debug.message(1, "Invalid catalog entry (override)", localName);
/*     */           }
/*     */         }
/*     */
/* 240 */         entryType = -1;
/* 241 */         entryArgs = new Vector();
/*     */       }
/*     */       else {
/* 244 */         this.overrideStack.push(this.overrideStack.peek());
/*     */       }
/*     */
/* 247 */       if (localName.equals("delegatePublic")) {
/* 248 */         if (checkAttributes(atts, "publicIdStartString", "catalog")) {
/* 249 */           entryType = Catalog.DELEGATE_PUBLIC;
/* 250 */           entryArgs.add(atts.getValue("publicIdStartString"));
/* 251 */           entryArgs.add(atts.getValue("catalog"));
/*     */
/* 253 */           this.debug.message(4, "delegatePublic", PublicId.normalize(atts.getValue("publicIdStartString")), atts.getValue("catalog"));
/*     */         }
/*     */
/*     */       }
/* 257 */       else if (localName.equals("delegateSystem")) {
/* 258 */         if (checkAttributes(atts, "systemIdStartString", "catalog")) {
/* 259 */           entryType = Catalog.DELEGATE_SYSTEM;
/* 260 */           entryArgs.add(atts.getValue("systemIdStartString"));
/* 261 */           entryArgs.add(atts.getValue("catalog"));
/*     */
/* 263 */           this.debug.message(4, "delegateSystem", atts.getValue("systemIdStartString"), atts.getValue("catalog"));
/*     */         }
/*     */
/*     */       }
/* 267 */       else if (localName.equals("delegateURI")) {
/* 268 */         if (checkAttributes(atts, "uriStartString", "catalog")) {
/* 269 */           entryType = Catalog.DELEGATE_URI;
/* 270 */           entryArgs.add(atts.getValue("uriStartString"));
/* 271 */           entryArgs.add(atts.getValue("catalog"));
/*     */
/* 273 */           this.debug.message(4, "delegateURI", atts.getValue("uriStartString"), atts.getValue("catalog"));
/*     */         }
/*     */
/*     */       }
/* 277 */       else if (localName.equals("rewriteSystem")) {
/* 278 */         if (checkAttributes(atts, "systemIdStartString", "rewritePrefix")) {
/* 279 */           entryType = Catalog.REWRITE_SYSTEM;
/* 280 */           entryArgs.add(atts.getValue("systemIdStartString"));
/* 281 */           entryArgs.add(atts.getValue("rewritePrefix"));
/*     */
/* 283 */           this.debug.message(4, "rewriteSystem", atts.getValue("systemIdStartString"), atts.getValue("rewritePrefix"));
/*     */         }
/*     */
/*     */       }
/* 287 */       else if (localName.equals("rewriteURI")) {
/* 288 */         if (checkAttributes(atts, "uriStartString", "rewritePrefix")) {
/* 289 */           entryType = Catalog.REWRITE_URI;
/* 290 */           entryArgs.add(atts.getValue("uriStartString"));
/* 291 */           entryArgs.add(atts.getValue("rewritePrefix"));
/*     */
/* 293 */           this.debug.message(4, "rewriteURI", atts.getValue("uriStartString"), atts.getValue("rewritePrefix"));
/*     */         }
/*     */
/*     */       }
/* 297 */       else if (localName.equals("nextCatalog")) {
/* 298 */         if (checkAttributes(atts, "catalog")) {
/* 299 */           entryType = Catalog.CATALOG;
/* 300 */           entryArgs.add(atts.getValue("catalog"));
/*     */
/* 302 */           this.debug.message(4, "nextCatalog", atts.getValue("catalog"));
/*     */         }
/* 304 */       } else if (localName.equals("public")) {
/* 305 */         if (checkAttributes(atts, "publicId", "uri")) {
/* 306 */           entryType = Catalog.PUBLIC;
/* 307 */           entryArgs.add(atts.getValue("publicId"));
/* 308 */           entryArgs.add(atts.getValue("uri"));
/*     */
/* 310 */           this.debug.message(4, "public", PublicId.normalize(atts.getValue("publicId")), atts.getValue("uri"));
/*     */         }
/*     */
/*     */       }
/* 314 */       else if (localName.equals("system")) {
/* 315 */         if (checkAttributes(atts, "systemId", "uri")) {
/* 316 */           entryType = Catalog.SYSTEM;
/* 317 */           entryArgs.add(atts.getValue("systemId"));
/* 318 */           entryArgs.add(atts.getValue("uri"));
/*     */
/* 320 */           this.debug.message(4, "system", atts.getValue("systemId"), atts.getValue("uri"));
/*     */         }
/*     */
/*     */       }
/* 324 */       else if (localName.equals("uri")) {
/* 325 */         if (checkAttributes(atts, "name", "uri")) {
/* 326 */           entryType = Catalog.URI;
/* 327 */           entryArgs.add(atts.getValue("name"));
/* 328 */           entryArgs.add(atts.getValue("uri"));
/*     */
/* 330 */           this.debug.message(4, "uri", atts.getValue("name"), atts.getValue("uri"));
/*     */         }
/*     */
/*     */       }
/* 334 */       else if (!localName.equals("catalog"))
/*     */       {
/* 336 */         if (!localName.equals("group"))
/*     */         {
/* 340 */           this.debug.message(1, "Invalid catalog entry type", localName);
/*     */         }
/*     */       }
/* 343 */       if (entryType >= 0) {
/*     */         try {
/* 345 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 346 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 348 */           if (cex.getExceptionType() == 3)
/* 349 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 350 */           else if (cex.getExceptionType() == 2) {
/* 351 */             this.debug.message(1, "Invalid catalog entry", localName);
/*     */           }
/*     */         }
/*     */       }
/*     */     }
/*     */
/* 357 */     if ((namespaceURI != null) && ("urn:oasis:names:tc:entity:xmlns:tr9401:catalog".equals(namespaceURI)) && (!inExtension))
/*     */     {
/* 361 */       if (atts.getValue("xml:base") != null) {
/* 362 */         String baseURI = atts.getValue("xml:base");
/* 363 */         entryType = Catalog.BASE;
/* 364 */         entryArgs.add(baseURI);
/* 365 */         this.baseURIStack.push(baseURI);
/*     */
/* 367 */         this.debug.message(4, "xml:base", baseURI);
/*     */         try
/*     */         {
/* 370 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 371 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 373 */           if (cex.getExceptionType() == 3)
/* 374 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 375 */           else if (cex.getExceptionType() == 2) {
/* 376 */             this.debug.message(1, "Invalid catalog entry (base)", localName);
/*     */           }
/*     */         }
/*     */
/* 380 */         entryType = -1;
/* 381 */         entryArgs = new Vector();
/*     */       }
/*     */       else {
/* 384 */         this.baseURIStack.push(this.baseURIStack.peek());
/*     */       }
/*     */
/* 387 */       if (localName.equals("doctype")) {
/* 388 */         entryType = Catalog.DOCTYPE;
/* 389 */         entryArgs.add(atts.getValue("name"));
/* 390 */         entryArgs.add(atts.getValue("uri"));
/* 391 */       } else if (localName.equals("document")) {
/* 392 */         entryType = Catalog.DOCUMENT;
/* 393 */         entryArgs.add(atts.getValue("uri"));
/* 394 */       } else if (localName.equals("dtddecl")) {
/* 395 */         entryType = Catalog.DTDDECL;
/* 396 */         entryArgs.add(atts.getValue("publicId"));
/* 397 */         entryArgs.add(atts.getValue("uri"));
/* 398 */       } else if (localName.equals("entity")) {
/* 399 */         entryType = Catalog.ENTITY;
/* 400 */         entryArgs.add(atts.getValue("name"));
/* 401 */         entryArgs.add(atts.getValue("uri"));
/* 402 */       } else if (localName.equals("linktype")) {
/* 403 */         entryType = Catalog.LINKTYPE;
/* 404 */         entryArgs.add(atts.getValue("name"));
/* 405 */         entryArgs.add(atts.getValue("uri"));
/* 406 */       } else if (localName.equals("notation")) {
/* 407 */         entryType = Catalog.NOTATION;
/* 408 */         entryArgs.add(atts.getValue("name"));
/* 409 */         entryArgs.add(atts.getValue("uri"));
/* 410 */       } else if (localName.equals("sgmldecl")) {
/* 411 */         entryType = Catalog.SGMLDECL;
/* 412 */         entryArgs.add(atts.getValue("uri"));
/*     */       }
/*     */       else {
/* 415 */         this.debug.message(1, "Invalid catalog entry type", localName);
/*     */       }
/*     */
/* 418 */       if (entryType >= 0)
/*     */         try {
/* 420 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 421 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 423 */           if (cex.getExceptionType() == 3)
/* 424 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 425 */           else if (cex.getExceptionType() == 2)
View Full Code Here

/* 470 */         entryArgs.add(baseURI);
/*     */
/* 472 */         this.debug.message(4, "(reset) xml:base", baseURI);
/*     */         try
/*     */         {
/* 475 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 476 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 478 */           if (cex.getExceptionType() == 3)
/* 479 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 480 */           else if (cex.getExceptionType() == 2) {
/* 481 */             this.debug.message(1, "Invalid catalog entry (rbase)", localName);
/*     */           }
/*     */         }
/*     */       }
/*     */     }
/*     */
/* 487 */     if ((namespaceURI != null) && ("urn:oasis:names:tc:entity:xmlns:xml:catalog".equals(namespaceURI)) && (!inExtension))
/*     */     {
/* 489 */       if ((localName.equals("catalog")) || (localName.equals("group"))) {
/* 490 */         String popOverride = (String)this.overrideStack.pop();
/* 491 */         String override = (String)this.overrideStack.peek();
/*     */
/* 493 */         if (!override.equals(popOverride)) {
/* 494 */           entryType = Catalog.OVERRIDE;
/* 495 */           entryArgs.add(override);
/* 496 */           this.overrideStack.push(override);
/*     */
/* 498 */           this.debug.message(4, "(reset) override", override);
/*     */           try
/*     */           {
/* 501 */             CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 502 */             this.catalog.addEntry(ce);
/*     */           } catch (CatalogException cex) {
/* 504 */             if (cex.getExceptionType() == 3)
/* 505 */               this.debug.message(1, "Invalid catalog entry type", localName);
/* 506 */             else if (cex.getExceptionType() == 2) {
View Full Code Here

        for (int count = 0; count < numArgs; count++) {
          args.addElement(nextToken());
        }

        catalog.addEntry(new CatalogEntry(entryToken, args));
      } catch (CatalogException cex) {
        if (cex.getExceptionType() == 3) {
          if (unknownEntry == null) {
            unknownEntry = new Vector();
          }
View Full Code Here

/* 120 */         this.baseURIStack.push(baseURI);
/*     */
/* 122 */         this.debug.message(4, "xml:base", baseURI);
/*     */         try
/*     */         {
/* 125 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 126 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 128 */           if (cex.getExceptionType() == 3)
/* 129 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 130 */           else if (cex.getExceptionType() == 2) {
/* 131 */             this.debug.message(1, "Invalid catalog entry (base)", localName);
/*     */           }
/*     */         }
/*     */
/* 135 */         entryType = -1;
/* 136 */         entryArgs = new Vector();
/*     */       } else {
/* 138 */         this.baseURIStack.push(this.baseURIStack.peek());
/*     */       }
/*     */
/* 141 */       if (localName.equals("uriSuffix")) {
/* 142 */         if (checkAttributes(atts, "suffix", "uri")) {
/* 143 */           entryType = Resolver.URISUFFIX;
/* 144 */           entryArgs.add(atts.getValue("suffix"));
/* 145 */           entryArgs.add(atts.getValue("uri"));
/*     */
/* 147 */           this.debug.message(4, "uriSuffix", atts.getValue("suffix"), atts.getValue("uri"));
/*     */         }
/*     */
/*     */       }
/* 151 */       else if (localName.equals("systemSuffix")) {
/* 152 */         if (checkAttributes(atts, "suffix", "uri")) {
/* 153 */           entryType = Resolver.SYSTEMSUFFIX;
/* 154 */           entryArgs.add(atts.getValue("suffix"));
/* 155 */           entryArgs.add(atts.getValue("uri"));
/*     */
/* 157 */           this.debug.message(4, "systemSuffix", atts.getValue("suffix"), atts.getValue("uri"));
/*     */         }
/*     */
/*     */       }
/*     */       else
/*     */       {
/* 163 */         this.debug.message(1, "Invalid catalog entry type", localName);
/*     */       }
/*     */
/* 166 */       if (entryType >= 0)
/*     */         try {
/* 168 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 169 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 171 */           if (cex.getExceptionType() == 3)
/* 172 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 173 */           else if (cex.getExceptionType() == 2)
View Full Code Here

/* 205 */         entryArgs.add(baseURI);
/*     */
/* 207 */         this.debug.message(4, "(reset) xml:base", baseURI);
/*     */         try
/*     */         {
/* 210 */           CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
/* 211 */           this.catalog.addEntry(ce);
/*     */         } catch (CatalogException cex) {
/* 213 */           if (cex.getExceptionType() == 3)
/* 214 */             this.debug.message(1, "Invalid catalog entry type", localName);
/* 215 */           else if (cex.getExceptionType() == 2)
View Full Code Here

/*     */
/* 189 */         for (int count = 0; count < numArgs; count++) {
/* 190 */           args.addElement(nextToken());
/*     */         }
/*     */
/* 193 */         catalog.addEntry(new CatalogEntry(entryToken, args));
/*     */       } catch (CatalogException cex) {
/* 195 */         if (cex.getExceptionType() == 3) {
/* 196 */           if (unknownEntry == null) {
/* 197 */             unknownEntry = new Vector();
/*     */           }
View Full Code Here

TOP

Related Classes of org.jboss.util.xml.catalog.CatalogEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.