ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craeg K Strong <>
Subject [Fwd: Re: <xmlcatalog> semantics question]
Date Fri, 03 May 2002 04:36:12 GMT
In response to dIon's suggestion, here is a copy of some recent 
(private) traffic on <xmlcatalog>.    Any and all comments are welcome!


 >-------- Original Message --------
 >To: Craeg K Strong <>
 >I think the discussion would be better on ant-dev. I'm sure Conor 
would >be
 >interested as well.....


   From: Craeg K Strong 

I guess I am thinking about the usecase where you have a directory tree
with files called "catalog."   The reasons could be simple convenience.
Recall that a catalog file has a base directory from which all path
are made, which by default is the directory in which the catalog file
Therefore, by having multiple catalog files in different directories, it
make the internal paths much shorter and simpler.     For example, I
could have a catalog
file in my "images" directory, another one in my "DTDs" directory, and
in my "special characters" directory, etc. etc.

<xmlcatalog id="allmycatalogs"
    <!-- get all the catalogs in the tree -->
        dir = "/nfsdir/catalogs"
        includes = "**/catalog"/>
     <!-- and add a few special for this project --->
       publicId = "-//ArielPartners//DTD XML Article V1.0//EN"
       location = "com/arielpartners/knowledgebase/dtd/article.dtd"/>
       publicId = "ArielLogo"
       location = "com/arielpartners/images/ariel.gif"/>

The alternative could get pretty ugly:

<xmlcatalog id="allmycatalogs"
    <xmlcatalog file="/mynfsdir/catalogs/one/catalog"/>
    <xmlcatalog file="/mynfsdir/catalogs/one/two/catalog"/>
    <xmlcatalog file="/mynfsdir/catalogs/one/two/three/catalog"/>

(you get the idea)

Anyway, I agree with you about not extending AbstractFileSet.   Upon
looking at it,
I do think it is cleaner and nicer to have a nested fileset.   I kind of
like the name
"catalogfiles"   what do you think?


PS Sorry about not making the 1.5 deadline.    I will get this done in a
day or
two, I promise.   I guess I can live with 1.6alpha if I must :-)

Erik Hatcher wrote:

 >I like the file attribute better, with possible nested filesets if you
 >really feel they are needed, but since an <xmlcatalog> can contain nested
 ><xmlcatalog>'s it seems overkill to worry about supporting filesets
 >You're typically not going to be using too many XML catalog files, are
 >I definitely would not extend AbstractFileSet - use nested filesets if you
 >    Erik
 >----- Original Message -----
 >From: "Craeg K Strong" <>
 >To: <>; <>
 >Cc: <>
 >Sent: Thursday, May 02, 2002 2:08 PM
 >Subject: <xmlcatalog> semantics question
 >>(Yes, I am still working on this silly thing :-)
 >>Which do you like better, giving <xmlcatalog> a file attribute --
 >>   <xmlcatalog id="catalog.inline" file="config/mycatalog">
 >>     <dtd
 >>       publicId = "-//ArielPartners//DTD XML Article V1.0//EN"
 >>       location = "com/arielpartners/knowledgebase/dtd/article.dtd"/>
 >>   </xmlcatalog>
 >>or making <xmlcatalog> extend AbstractFileSet, so it has an embedded
 >>I only use a single external catalog today, but I could see the need
 >>in the future to factor it out into multiple files.
 >>If you have an embedded fileset, you have the ultimate flexibility
 >>for including catalog files, at the price of some extra complexity.
 >>I guess I am leaning towards a fileset, even though the coding is
 >>a little more difficult :-)
 >>What do you guys think?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message