blob: c3b05344652f7bd9563200e7920f2ca07ab1e305 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE catalog-demo PUBLIC "-//Indexgeo//DTD Catalog Demo v1.0//EN"
"http://www.indexgeo.com.au/dtd/catalog-demo-v10.dtd"
[
<!ENTITY testpub PUBLIC "-//Arbortext//TEXT Test Public Identifier//EN"
"bogus-system-identifier.xml">
<!ENTITY testsys SYSTEM "urn:x-arbortext:test-system-identifier">
<!ENTITY testovr PUBLIC "-//Arbortext//TEXT Test Override//EN"
"testovr.txt">
<!ENTITY % ISOnum PUBLIC
"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
"ISOnum.pen">
%ISOnum;
<!ENTITY note "Note:">
]>
<catalog-demo>
<section>
<para>This sample application demonstrates the use of catalogs for
entity resolution. &note; see the Apache Cocoon documentation
<link href="http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html">Entity resolution with
catalogs</link> for the full background and explanation, and the XML
source of this document (src/webapp/samples/catalog/catalog-demo.xml).
</para>
<para>This top-level XML instance document is catalog-demo.xml - it declares
three other XML sub-documents as external entities and then includes
them in the sections below. The real system identifiers will be looked
up in the catalog, to resolve the actual location of the resource.
</para>
<para>The Document Type Definition (DTD) is declared using both a public
identifier and a system identifier. The system identifier for the DTD is
a network-based resource (which is deliberately non-existent). However,
the catalog overrides that remote DTD to instead use a copy from the
local filesystem at the location defined by the catalog entry. Note that
it is via the use of a public identifier that we gain this power.
</para>
<para>The internal DTD subset of the top-level document instance goes on
to declare the three external sub-document entities using various means.
It also declares and includes the ISOnum set of character entities,
so that we can use entities like "&amp;frac12;" (to represent &frac12;).
Finally the internal DTD subset declares an internal general entity
for &quot;&amp;note;&quot;.
</para>
</section>
<section>
<para>testpub ... this entity is declared with a PUBLIC identifier and a
bogus system identifier (which will be overridden by the catalog)
</para>
<para>&note; &testpub;</para>
</section>
<section>
<para>testsys ... this entity is declared with a SYSTEM identifier
(which will be resolved by the catalog)
</para>
<para>&note; &testsys;</para>
</section>
<section>
<para>testovr ... is declared with a PUBLIC identifier and a system
identifier (the catalog is set to not override this one, so the
declared system identifier is used)
</para>
<para>&note; &testovr;</para>
</section>
</catalog-demo>