You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by David Crossley <cr...@indexgeo.com.au> on 2002/11/20 11:36:42 UTC

Re: using a project local-catalog

Jeff Turner wrote:
> David Crossley wrote:
> > Jeff Turner wrote:
> > > David Crossley wrote:
> > > > I think that i have found a little glitch in the build.
> > > > 
> > > > The target "copy-conf" copies the cocoon.xconf from the
> > > > project src/documentation/conf directory. However it does
> > > > this too late in the build process.
> > > > 
> > > > The validation targets need it to be in place before they
> > > > are called. The project can define their local OASIS catalog
> > > > in their cocoon.xconf (see validation.xml, search for
> > > > "local-catalog" and see the Warning notes).
> > > 
> > > It doesn't look like local catalog files are used at all.  If a file
> > > 'catalog' is defined, it overwrites the default 'catalog', but
> > > overwriting is not the same as augmenting..
> > 
> > I think that i have not been clear enough, and i got
> > something wrong above (hence change of email Subject).
> > For now, forget the "copy-conf too early" stuff.
> > It *may* be a furphy.
> > 
> > However, there are still issues.
> > 
> > I already do have my project's additional catalog being
> > used as well as the default Forrest catalog. I modified
> > Jeff's warnings in validation.xml because they were not
> > true. I have shown a workaround in validation.xml
> > to add my local-catalog and followed the instructions
> > in your-project.xml to add your example Download DTD.
> > Everything works for me and i see the HTML page
> > rendered properly by Cocoon.
> 
> Good stuff.. I didn't know about 'local-files' when I tried it.

For everyone's info, i made a link from forrest/validation.html
to the document in Cocoon which fully describe how to use the
Catalog Entity Resolver. There are also hints in cocoon.xconf

> > However, validate-xdocs does not work and i do need to set
> > forrest.validate.xdocs=false
> > 
> > I know what the issue is. We have two separate concerns
> > which are identified by the two separate warnings in
> > validation.xml document.
> > 
> > ----
> > 1) Get Cocoon to use our "local-catalog" during the "docs"
> > target, for which we need our local cocoon.xconf instead
> > of using the one supplied by default from 'forrest'.
> 
> Yes, the possibility of providing one's own cocoon.xconf is
> (and always should be) present.
> 
> However there's no need to *require* a user to define their
> own cocoon.xconf just to use a local catalog.

That is right, overkill. We should provide a number of ways.
The file CatalogManager.properties is yet another way.

> We could just have a token in the standard cocoon.xconf:
> 
> <parameter name="local-catalog" value="@project.catalog@"/>
> 
> Just like we currently have a token in cocoon.xconf to determine the
> skin:
> 
> <skin>@skin@</skin>
> 
> The token value would be set from a 'project.catalog' property,
> which would be
> also used in Ant validation (see below).
> 
> > We also need to be able to set the <entity-resolver>
> > verbosity parameter in our cocoon.xconf to be able to
> > debug entity resolution. (Also tweak other components.)
> 
> Then in the default cocoon.xconf we could have:
> 
> <parameter name="verbosity" value="@forrest.catalog-verbosity@"/>

Great, then let us do it. I will have a go at tweaking the
build to add this.

> And of course, if more flexibility is required, users can always
> define their own cocoon.xconf.
>
> > ----
> > 2) Ant cannot yet utilise the local catalog during the
> > "validate-*" targets.
> 
> Yes it can...

Oh good. Sorry i missed it somehow - will try again.
--David

> > I wonder if the new work happening on xml-commons-dev will help.
> > Norm is making the new release of resolver-1.1, and Craeg and
> > Stefan are adding that to Ant.
> > http://marc.theaimsgroup.com/?l=xml-commons-dev&r=1&b=200211
> 
> The Ant 1.6 currently used in Forrest has non-standard support for
> multiple external catalogs, so is technically capable of using both
> Forrest's and the project's catalogs.  Craeg wrote the Ant patch, and
> (thanks Stefan!) it seems it has now been applied to Ant's CVS.
>
> Specifically, here is the relevant part of forrest.build.xml:
> 
>   <xmlvalidate failonerror="${forrest.validate.xdocs.failonerror}" lenient="no" warn="yes">
>     <xmlcatalog>
>       <catalogfiles dir="${project.schema-dir}">
>         <include name="catalog*"/>
>       </catalogfiles>
>       <catalogfiles dir="${forrest.home}/context/resources/schema">
>         <include name="catalog" />
>       </catalogfiles>
>     </xmlcatalog>
> 
> If we define a 'project.catalog' property, then it could be used in a
> <catalogfiles> block, so the project catalog is used in validation.
> 
> 
> --Jeff



Re: using a project local-catalog

Posted by Jeff Turner <je...@apache.org>.
On Fri, Nov 22, 2002 at 03:22:31PM +1100, David Crossley wrote:
...
> > > I also disabled the "copy-schema" build target, because
> > > it was just copying the project catalog and over-writing
> > > the default catalog, which meant that none of the main
> > > DTDs or entity sets were available.
> > 
> > Yes, it is no longer necessary.
> 
> Shall i completely remove the copy-schema target?
> So far, i have only disabled it.

+1.. there, done.

--Jeff

Re: using a project local-catalog

Posted by David Crossley <cr...@indexgeo.com.au>.
Jeff Turner wrote:
> David Crossley wrote:
> > With trepidation i modified the build to add the ability
> > to configure a local OASIS catalog to use with the entity
> > resolver. This supplements the default catalog that is
> > provided by Forrest. There are two new properties in
> > the "forrest.properties" file ...
> >  project.catalog
> >  forrest.catalog.verbosity
> 
> Excellent :)  I just went through the tutorial, creating a custom DTD
> type, and an extension of docv11 with xinclude support, and everything
> seems to work as advertised.  The test project is attached.  I also
> updated my Anteater project docs, and everything works.

That is great news.

> > I also disabled the "copy-schema" build target, because
> > it was just copying the project catalog and over-writing
> > the default catalog, which meant that none of the main
> > DTDs or entity sets were available.
> 
> Yes, it is no longer necessary.

Shall i completely remove the copy-schema target?
So far, i have only disabled it.

> --Jeff
> 
> > Everything now seems OK to follow the tutorials at
> > your-project.html and validation.html
> > 
> > --David





Sample project demonstrating XInclude, custom DTDs (Re: using a project local-catalog)

Posted by Jeff Turner <je...@apache.org>.
Me and attachments.. anyway, a chance to change subject line.

Attached is a 'seed' project modified to support:
 - A custom 'download' DTD type
 - A custom version of document-v11 that allows for XInclude <xi:incude>
   elements.  The sitemap is also modified to to xinclude xforms.

--Jeff

On Thu, Nov 21, 2002 at 07:44:05PM +1100, Jeff Turner wrote:
> On Thu, Nov 21, 2002 at 03:30:02PM +1100, David Crossley wrote:
> > With trepidation i modified the build to add the ability
> > to configure a local OASIS catalog to use with the entity
> > resolver. This supplements the default catalog that is
> > provided by Forrest. There are two new properties in
> > the "forrest.properties" file ...
> >  project.catalog
> >  forrest.catalog.verbosity
> 
> Excellent :)  I just went through the tutorial, creating a custom DTD
> type, and an extension of docv11 with xinclude support, and everything
> seems to work as advertised.  The test project is attached.  I also
> updated my Anteater project docs, and everything works.
> 
> > I also disabled the "copy-schema" build target, because
> > it was just copying the project catalog and over-writing
> > the default catalog, which meant that none of the main
> > DTDs or entity sets were available.
> 
> Yes, it is no longer necessary.
> 
> 
> --Jeff
> 
> > Everything now seems OK to follow the tutorials at
> > your-project.html and validation.html
> > 
> > --David
> > 
> > 
> > 

Re: using a project local-catalog

Posted by Jeff Turner <je...@apache.org>.
On Thu, Nov 21, 2002 at 03:30:02PM +1100, David Crossley wrote:
> With trepidation i modified the build to add the ability
> to configure a local OASIS catalog to use with the entity
> resolver. This supplements the default catalog that is
> provided by Forrest. There are two new properties in
> the "forrest.properties" file ...
>  project.catalog
>  forrest.catalog.verbosity

Excellent :)  I just went through the tutorial, creating a custom DTD
type, and an extension of docv11 with xinclude support, and everything
seems to work as advertised.  The test project is attached.  I also
updated my Anteater project docs, and everything works.

> I also disabled the "copy-schema" build target, because
> it was just copying the project catalog and over-writing
> the default catalog, which meant that none of the main
> DTDs or entity sets were available.

Yes, it is no longer necessary.


--Jeff

> Everything now seems OK to follow the tutorials at
> your-project.html and validation.html
> 
> --David
> 
> 
> 

Re: using a project local-catalog

Posted by David Crossley <cr...@indexgeo.com.au>.
With trepidation i modified the build to add the ability
to configure a local OASIS catalog to use with the entity
resolver. This supplements the default catalog that is
provided by Forrest. There are two new properties in
the "forrest.properties" file ...
 project.catalog
 forrest.catalog.verbosity

I also disabled the "copy-schema" build target, because
it was just copying the project catalog and over-writing
the default catalog, which meant that none of the main
DTDs or entity sets were available.

Everything now seems OK to follow the tutorials at
your-project.html and validation.html

--David