Eclipse Web Tools Platform: Developing Java Web Applications by Naci Dai, Lawrence Mandel, Arthur Ryman
Purchase From
more options...
  • Barnes & Noble
  • Chapters/Indigo
  • Safari Books Online

Chapter 15 - Customizing Resource Resolution

-David Wheeler

Any problem in computer science can be solved with another layer of indirection.

When a WTP tool processes an XML document, it often encounters references to other documents. For example, the grammar of the document might be specified by a DTD or XML Schema (XSD). This is the case with J2EE deployment descriptors, such as web.xml (see Example 15.1). Another common case is when one document refers to the contents of other documents. For example, Web Service Description Language (WSDL) documents refer to components defined in other WSDL and XSD documents.

Web documents are generally referred to as resources, and the process of locating them as resource resolution. A resource resolution strategy is the way in which a resource is located. Resource resolution is the act of locating some resource using one or more resource resolution strategies. This means that in any given scenario there may be many resource resolution strategies all employed for the same resource resolution action.

Let's briefly examine how resource resolution works in WTP for web.xml. We'll discuss resource resolution in much more detail below. Here the XSD grammar is specified by the namespace URI

WTP processes any Web deployment descriptor and tries to locate the XSD document that defines the grammar for its namespace. In this example, the document itself provides a hint as to where the XSD can be found. The hint is provided in the xsi:schemaLocation attribute, which tells any processor that a copy of the XSD is located at


This is only a preview.
Read more sample content | Purchase Eclipse Web Tools Platform

Other Sections in This Chapter

  • Creating the Resource Resolution Extension Plug-in
  • Contributing Resources to the XML Catalog
    • The XML Catalog
    • Adding a Single Resource to the XML Catalog
    • Adding a Catalog of Resources to the XML Catalog
  • Implementing a Custom Resource Resolution Strategy
    • The URI Resolution Framework
    • Creating the Folder URI Resolver
  • Summary