forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: problem using own DTD
Date Thu, 27 Nov 2008 01:41:37 GMT
EMMEL Thomas wrote:
> 
> OK, I think I don't understand all details of resolving the lookup for
> the DTD but my problem is
> that I have used my DTD successfully without problems for a long time
> but it fails now, just after the upgrade.

Yeah, since answering you on the user list (which was
correct for forrest-0.8 version) i have been testing the
situation and i do see a new problem, as you describe.
More below.

This shows why it is important not to discuss "dev"
versions on the "user" list.

> My DTD included 'xi:include' for a longer time to be able to use this
> functionality in the earlier days of 0.9dev. Now it adds only some small things.
> 
> However, the point is:
> It was found previously and cannot be found now, so I did the test with
> helloxxx-v10.dtd
> since exactly this test works previously. So if you make all changes
> below for example in
> revision 680000 you will succeed. If you do that in the current version
> you will fail.
> This isn't a problem that I have put the files to the wrong place, it is
> a problem that forrest
> will not look to the correct places for the current version.
> 
> I increased the verbosity in classes/CatalogManager.properties to try to
> see what happens.
> For 'forrest run' I can see the following messages:
> 
> public: -//Acme//DTD Hello Document V1.0//EN
>         hello-v10.dtd
> PUBLIC: -//Acme//DTD Hello Document V1.0//EN
>        
> file:/home/emmel/Project/simulpac/SIMULPAC/Doc/src/resources/schema/hello-v10.dtd
> public: -//Apache Forrest//ENTITIES Symbols Project v1.0//EN
>         symbols-project-v10.ent
> PUBLIC: -//Apache Forrest//ENTITIES Symbols Project v1.0//EN
>        
> file:/home/emmel/Project/simulpac/SIMULPAC/Doc/src/resources/schema/symbols-project-v10.ent
> public: -//Abaqus Deutschland//SIMULPAC Project DTD v2.1//EN
>         simulpac-v21.dtd
> PUBLIC: -//Abaqus Deutschland//SIMULPAC Project DTD v2.1//EN
>        
> file:/home/emmel/Project/simulpac/SIMULPAC/Doc/src/resources/schema/simulpac-v21.dtd
> 
> (However forrest run still fails, see other thread)
> but none of the lines are shown for forrest -v validate.

Yes that is a known issue. The Ant "xmlvalidate" task is not
finding the project's CatalogManager.properties file.
I have been trying to fix that one for ages, and will try
some more today.

The reason that your verbosity setting works in 'forrest run'
is that that is Cocoon doing the processing, not Ant.

> Just the error (after tons of messages):
> BUILD FAILED
> /local/data/opt/apache-forrest-0.9dev-new/main/targets/validate.xml:128:
> Could not validate document
> /home/emmel/Project/simulpac/SIMULPAC/Doc/src/content/xdocs/fe-reference/ac-ref.xml
>         at
> org.apache.tools.ant.taskdefs.optional.XMLValidateTask.doValidate(XMLValidateTask.java:549)
 [snip]
> Caused by: java.io.FileNotFoundException:
> /home/emmel/Project/simulpac/SIMULPAC/Doc/src/content/xdocs/fe-reference/simulpac-v21.dtd
> (No such file or directory)

Yes, that is the standard error when the "catalog entity resolver"
could not find the local copy of the DTD, so the xml parser tries
the last resort: using the System Identifier, in your case that
is relative to the source xml instance document.

> Here it what the revisions told me:
> 680000 works
> 700786 find the DTD but complain about my xi:include definitions which
> are not needed anymore now, but which I can fix
> 700787 fails with the error above due to changes in
> main/targets/validate.xml:

This hint about r700787 change helps, thanks.

I have already spent some time to investigate this
and will try again today.

-David

> svn diff -r 700786:700787 main/targets/validate.xml
> Index: main/targets/validate.xml
> ===================================================================
> --- main/targets/validate.xml   (revision 700786)
> +++ main/targets/validate.xml   (revision 700787)
> @@ -112,15 +112,7 @@
>      </fail>
>      <xmlvalidate failonerror="${forrest.validate.site.failonerror}"
> lenient="no" warn="yes">
>        <attribute
> name="http://apache.org/xml/features/validation/dynamic"  value="true"/>
> -      <xmlcatalog id="fcatalog" >
> -        <catalogpath>
> -          <pathelement
> -           
> location="${forrest.core.webapp}/resources/schema/catalog.xcat"/>
> -          <pathelement
> -            location="${forrest.plugins-dir}/catalog.xcat"/>
> -          <pathelement location="${catalog}"/>
> -        </catalogpath>
> -      </xmlcatalog>
> +      <xmlcatalog refid="fcatalog" />
>        <fileset dir="${project.site-dir}"
>          includes="${forrest.validate.xdocs.includes}"
>          excludes="${forrest.validate.xdocs.excludes}"/>


Mime
View raw message