You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Ross Gardler <rg...@apache.org> on 2005/02/28 03:05:36 UTC

Adding DTD's to the catalog

I need to add some documents that use a custom DTD to my project. As per 
the instructions at 
http://forrest.apache.org/docs/validation.html#catalog I have placed my 
DTD's in src/documentation/resources/schema and have a new project.xcat 
file (in the same directory).

If I run "forrest validate" all my docs are validated, however if I run 
"forrest site" the files with the new DTD's fail because Forrest is 
trying to download the schema from the web (and they are not there, only 
local).

Any ideas?

Ross


Re: Adding DTD's to the catalog

Posted by Arik Kfir <ar...@users.sourceforge.net>.
Hi David,

The documentation clearly stated that the CatalogManager.properties's 
"catalogs" property expected absolute paths, so I assumed it would not 
work, but tried it anyway - it just didn't pick my catalog up. I haven't 
tried using the additional property noted by Ross yet (but I assume it 
/will/ work).

I did try increasing the verbosity - both in the 
CatalogManager.properties and in the cocoon.xconf files, but it just 
didn't show up in the logs.

I'm not going to be in my office until Thursday, but I'll try it then 
and post whether it works or not. I would have suggested fixing the docs 
- but Ross beat me to it ;-)


David Crossley wrote:

>Ross Gardler wrote:
>  
>
>>Arik Kfir wrote:
>>    
>>
>>>I tried using relative paths, but it didn't work - I would never have 
>>>guessed another property is involed ;-)
>>>      
>>>
>>No need to guess, it is in a freshly seeded site, whenever in doubt it 
>>can be a good idea to see a site and see what has changed. (of course, I 
>>didn't do this myself when hit by the same problem, it's easy in 
>>retrospect ;-)
>>    
>>
>
>Arik, please explain what you mean by "it didn't work".
>
>Have you tried increasing the verbosity on the catalog entity resolver
>to see why your DTDs are not being resolved?
>
>--David
>
>
>  
>


Re: Adding DTD's to the catalog

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Ross Gardler wrote:
> 
>>Arik Kfir wrote:
>>
>>>I tried using relative paths, but it didn't work - I would never have 
>>>guessed another property is involed ;-)
>>
>>No need to guess, it is in a freshly seeded site, whenever in doubt it 
>>can be a good idea to see a site and see what has changed. (of course, I 
>>didn't do this myself when hit by the same problem, it's easy in 
>>retrospect ;-)
> 
> 
> Arik, please explain what you mean by "it didn't work".
> 
> Have you tried increasing the verbosity on the catalog entity resolver
> to see why your DTDs are not being resolved?

I'm guessing that Arik means "it didn't work until I read your message 
and put the extra property in". The extra property was discussed in the 
previous message of this thread. Relative paths only work (meaning they 
can only be found by the catalog resolver) if you set the 
"relative-catalogs" value to yes in the  catalog.xcat file.

I read the above message to mean that Arik has this working now that he 
has set the discussed "relative-catalogs" value.

Ross

Re: Adding DTD's to the catalog

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> Arik Kfir wrote:
> >
> >I tried using relative paths, but it didn't work - I would never have 
> >guessed another property is involed ;-)
> 
> No need to guess, it is in a freshly seeded site, whenever in doubt it 
> can be a good idea to see a site and see what has changed. (of course, I 
> didn't do this myself when hit by the same problem, it's easy in 
> retrospect ;-)

Arik, please explain what you mean by "it didn't work".

Have you tried increasing the verbosity on the catalog entity resolver
to see why your DTDs are not being resolved?

--David

Re: Adding DTD's to the catalog

Posted by Ross Gardler <rg...@apache.org>.
Arik Kfir wrote:
> Wow, 10x
> 
> I tried using relative paths, but it didn't work - I would never have 
> guessed another property is involed ;-)

No need to guess, it is in a freshly seeded site, whenever in doubt it 
can be a good idea to see a site and see what has changed. (of course, I 
didn't do this myself when hit by the same problem, it's easy in 
retrospect ;-)

Ross

Re: Adding DTD's to the catalog

Posted by Arik Kfir <ar...@users.sourceforge.net>.
Wow, 10x

I tried using relative paths, but it didn't work - I would never have 
guessed another property is involed ;-)

Cheers.

Ross Gardler wrote:

> Arik Kfir wrote:
>
>> Hi,
>>
>> As far as the documentation states, the CatalogManager.properties 
>> file only accepts absolute paths for the project (local) catalog. Is 
>> this true?
>
>
> No, I was tripped up by this in the thread you quoted. However, it was 
> pointed out to me the documents were incorrect. I have updated the 
> docs, they now say:
>
> "specify either the path (full or relative) to your
> <code>catalog.xcat</code> in the <code>CatalogManager.properties</cod=
> e> file. If you provide a relative path you must set the property 
> <code>relative-catalogs</code> to "yes"."
>
> Ross
>
>


Re: Adding DTD's to the catalog

Posted by Ross Gardler <rg...@apache.org>.
Arik Kfir wrote:
> Hi,
> 
> As far as the documentation states, the CatalogManager.properties file 
> only accepts absolute paths for the project (local) catalog. Is this true?

No, I was tripped up by this in the thread you quoted. However, it was 
pointed out to me the documents were incorrect. I have updated the docs, 
they now say:

"specify either the path (full or relative) to your
<code>catalog.xcat</code> in the <code>CatalogManager.properties</cod=
e> file. If you provide a relative path you must set the property 
<code>relative-catalogs</code> to "yes"."

Ross

Re: Adding DTD's to the catalog

Posted by Arik Kfir <ar...@users.sourceforge.net>.
Hi,

As far as the documentation states, the CatalogManager.properties file 
only accepts absolute paths for the project (local) catalog. Is this true?

Ross Gardler wrote:

> David Crossley wrote:
>
>> Ross Gardler wrote:
>>
>>> I need to add some documents that use a custom DTD to my project. As 
>>> per the instructions at 
>>> http://forrest.apache.org/docs/validation.html#catalog I have placed 
>>> my DTD's in src/documentation/resources/schema and have a new 
>>> project.xcat file (in the same directory).
>>>
>>> If I run "forrest validate" all my docs are validated, however if I 
>>> run "forrest site" the files with the new DTD's fail because Forrest 
>>> is trying to download the schema from the web (and they are not 
>>> there, only local).
>>>
>>> Any ideas?
>>
>>
>>
>> That document continues to say that you also need to declare your 
>> project.xcat
>> in a CatalogManager.properties file so that Cocoon can use the resolver.
>
>
> So it does, thanks.
>
> (eating humble pie after having told so many other people on the users 
> list to RTFM)
>
> Ross
>
>


Re: Adding DTD's to the catalog

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Ross Gardler wrote:
> 
>>I need to add some documents that use a custom DTD to my project. As per 
>>the instructions at 
>>http://forrest.apache.org/docs/validation.html#catalog I have placed my 
>>DTD's in src/documentation/resources/schema and have a new project.xcat 
>>file (in the same directory).
>>
>>If I run "forrest validate" all my docs are validated, however if I run 
>>"forrest site" the files with the new DTD's fail because Forrest is 
>>trying to download the schema from the web (and they are not there, only 
>>local).
>>
>>Any ideas?
> 
> 
> That document continues to say that you also need to declare your project.xcat
> in a CatalogManager.properties file so that Cocoon can use the resolver.

So it does, thanks.

(eating humble pie after having told so many other people on the users 
list to RTFM)

Ross

Re: Adding DTD's to the catalog

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> I need to add some documents that use a custom DTD to my project. As per 
> the instructions at 
> http://forrest.apache.org/docs/validation.html#catalog I have placed my 
> DTD's in src/documentation/resources/schema and have a new project.xcat 
> file (in the same directory).
> 
> If I run "forrest validate" all my docs are validated, however if I run 
> "forrest site" the files with the new DTD's fail because Forrest is 
> trying to download the schema from the web (and they are not there, only 
> local).
> 
> Any ideas?

That document continues to say that you also need to declare your project.xcat
in a CatalogManager.properties file so that Cocoon can use the resolver.

--David

Re: Adding DTD's to the catalog

Posted by Ross Gardler <rg...@apache.org>.
Ross Gardler wrote:
> I need to add some documents that use a custom DTD to my project. As per 
> the instructions at 
> http://forrest.apache.org/docs/validation.html#catalog I have placed my 
> DTD's in src/documentation/resources/schema and have a new project.xcat 
> file (in the same directory).
> 
> If I run "forrest validate" all my docs are validated, however if I run 
> "forrest site" the files with the new DTD's fail because Forrest is 
> trying to download the schema from the web (and they are not there, only 
> local).
> 
> Any ideas?

A little more info, I think this shows that the project.xcat file is not 
working in a "forrest run|site" but is working for "forrest validate".

If I change my doctype from ...

<!DOCTYPE mailingListIndex PUBLIC "-//SAAFE//DTD MailngListIndex 
V1.0//EN" "http://schema.saafe.org/dtd/mailingListIndex-v10.dtd">

... to ...

<!DOCTYPE mailingListIndex PUBLIC "-//SAAFE//DTD MailngListIndex 
V1.0//EN" "../../../resources/schema/dtd/mailingListIndex-v10.dtd">

... then everything works fine.

Can someone who knows more about catalog resolution confirm this is a 
bug, or am I missing something?

Ross