[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: RE: Compelling use case for XML Catalogs?

  • From: "Costello, Roger L." <costello@mitre.org>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Mon, 13 Jun 2011 15:46:18 -0400

RE:  RE: Compelling use case for XML Catalogs?
Excellent feedback from Tony Lavinio:

- They [the URLs specified in an XML Catalog] don't have to be local. They can just be alternate.

- Often they are used to increase performance, by bringing a remote resource local.

- They are also used when the remote resource throttles, as W3C has to. They were receiving 100 million DTD requests/day. See http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/

- A catalog resolver is just a specific type of URI resolver.

- Norm Walsh wrote a good article on them called "If You Can Name It You Can Claim it!" at http://www.arbortext.com/html/issue_three.html. I think that link is gone; there is a cached copy at http://www.stylusstudio.com/cached/catalogs/issue_three.html.

-- 
Tony Lavinio

-----Original Message-----
From: Costello, Roger L. 
Sent: Monday, June 13, 2011 2:28 PM
To: xml-dev@lists.xml.org
Subject: RE:  RE: Compelling use case for XML Catalogs?

Hi Folks,

Thank you for the excellent feedback. Below is a summary of what I learned. Please let me know of any errors.  /Roger


SUMMARY

An XML Catalog is a file that describes the mapping from URLs to local resources. An XML Catalog tool does the conversion of the URLs in XML documents.

Consider this scenario: 

1. Your system has just received an XML document (either because someone sent it to you, or because you fetched it).

2. The XML document contains URLs.

3. The system sends the XML document into an XML Catalog tool.

If the XML document contains a URL that is specified in the XML Catalog then the URL will be mapped to a different resource, as specified by the XML Catalog.

If the XML document contains a URL that is not specified in the XML Catalog then the URL will be unchanged.

The most common usage of XML Catalog is to map the URL specified in an XHTML DOCTYPE declaration to a local DTD.

XML Catalog cannot be used to test that the XML document contains expected or allowed URLs, i.e., an XML Catalog tool is not a URL validator. 

If it is necessary to validate the URLs then XML Catalog must be supplemented  with something else.

In a disconnected environment (i.e., no network access) the system designer will typically have already configured XML documents to use local resources. Thus, XML Catalog will not be useful in that environment.

XML Catalog can assist with portability: if the XML document has URLs to resources on one network, then when the document is shipped to another network an XML Catalog can map the URLs to that networks' resources.

The kinds of URLs that may be mapped in an XML Catalog include:
     - URLs in DOCTYPEs
     - URLS in XML external entities
     - URLs in namespaces

Recap: If an incoming XML document has a known set of URLs that need to be converted/mapped to another set of URLs then XML Catalog can do that. 

"Hello World" example: an XML Catalog is used to map the URL specified in an XHTML DOCTYPE declaration to a local DTD. Here is a sample XHTML document:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
	<title>An XHTML 1.0 Strict standard template</title>
	<meta http-equiv="content-type" 
		content="text/html;charset=utf-8" />
    </head>

    <body>

         <p>... Your HTML content here ...</p>

    </body>
</html>

Below is an XML Catalog that maps this URL:

     http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd

to a local DTD:

    local-strict.dtd

Here is the XML Catalog that does this mapping:

<?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

    <uri name="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" 
           uri=" local-strict.dtd"/>

</catalog>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.