ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craeg K Strong <cstr...@arielpartners.com>
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!

--Craeg

 >-------- Original Message --------
 >From: dion@multitask.com.au
 >To: Craeg K Strong <cstrong@arielpartners.com>
 >
 >
 >I think the discussion would be better on ant-dev. I'm sure Conor 
would >be
 >interested as well.....

 

   From: Craeg K Strong 
                                    <cstrong@arielpartners.com>
 

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
calculations
are made, which by default is the directory in which the catalog file
lives.
Therefore, by having multiple catalog files in different directories, it
could
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
another
in my "special characters" directory, etc. etc.

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

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"/>
    ...
</xmlcatalog>

(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?

--Craeg

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
anyway.
 >
 >You're typically not going to be using too many XML catalog files, are
you?
 >
 >I definitely would not extend AbstractFileSet - use nested filesets if you
 >must.
 >
 >    Erik
 >
 >----- Original Message -----
 >From: "Craeg K Strong" <cstrong@arielpartners.com>
 >To: <jakarta-ant@ehatchersolutions.com>; <dion@multitask.com.au>
 >Cc: <cstrong@arielpartners.com>
 >Sent: Thursday, May 02, 2002 2:08 PM
 >Subject: <xmlcatalog> semantics question
 >
 >
 >
 >
 >>Hello:
 >>
 >>(Yes, I am still working on this silly thing :-)
 >>
 >>Which do you like better, giving <xmlcatalog> a file attribute --
example:
 >>
 >>   <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
 >>fileset.
 >>
 >>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?
 >>
 >>--Craeg
 >>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message