forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EMMEL Thomas <>
Subject Re: problem using own DTD
Date Wed, 26 Nov 2008 08:09:58 GMT

just as notice, I sended that to the user-list too to end that thread
there as it is indeed a dev-issue.
The further discussion can be done on the dev-list now.

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.
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
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/ to try to
see what happens.
For 'forrest run' I can see the following messages:

public: -//Acme//DTD Hello Document V1.0//EN
PUBLIC: -//Acme//DTD Hello Document V1.0//EN
public: -//Apache Forrest//ENTITIES Symbols Project v1.0//EN
PUBLIC: -//Apache Forrest//ENTITIES Symbols Project v1.0//EN
public: -//Abaqus Deutschland//SIMULPAC Project DTD v2.1//EN
PUBLIC: -//Abaqus Deutschland//SIMULPAC Project DTD v2.1//EN

(However forrest run still fails, see other thread)
but none of the lines are shown for forrest -v validate.
Just the error (after tons of messages):
Could not validate document
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(
Caused by:
(No such file or directory)

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

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 @@
     <xmlvalidate failonerror="${}"
lenient="no" warn="yes">
name=""  value="true"/>
-      <xmlcatalog id="fcatalog" >
-        <catalogpath>
-          <pathelement
-          <pathelement
-            location="${forrest.plugins-dir}/catalog.xcat"/>
-          <pathelement location="${catalog}"/>
-        </catalogpath>
-      </xmlcatalog>
+      <xmlcatalog refid="fcatalog" />
       <fileset dir="${}"

If this is still a documentation issue then please, please give that
documentation more structure!

Thank you


David Crossley schrieb:
> EMMEL Thomas wrote:
> >
> > I should say: 'Never touch a running system...'
> > I decided this morning to update my current svn copy of 0.9dev to test
> > whether there are fixes
> > within the pdf generation. Now, nothing works anymore :-/
> As Ross said in the other thread, the dev@ list is for
> issues with the development version.
> This next thing is version-independent, so i will
> answer here ...
> > One problem is that my own DTD cannot be found anymore, although it is
> > proper registered in the
> > catalog.xcat-file. It seems that forrest cannot find it since it
> doesn't
> > look at the correct location...
> > You can verify this by doing the following steps:
> >
> > mkdir tmp; cd tmp
> > forrest seed
> > cd src/documentation/resources/schema/
> > cp hello-v10.dtd helloxxx-v10.dtd
> >
> > now change the file catalog.xcat by replacing hello by helloxxx like
> this:
> >  <public publicId="-//Acme//DTD Hello Document V1.0//EN"
> >         uri="helloxxx-v10.dtd"/>
> Correct.
> > next change back to the root of your forrest-dir and change
> > src/documentation/content/xdocs/samples-b/custom.xml
> > to reference this new dtd
> This step would only be needed if the "Public Identifier" was
> changed. Our xml catalogs generally respond on that PublicId,
> so the value of the System Identifier in the XML instance documents
> has no bearing.
> > finally run
> > forrest -v validate-xdocs
> >
> > you should get an error that helloxxx-v10.dtd cannot be found.
> That is the expected behavior. Your xml catalog told
> the catalog entity resolver where the new DTD was located.
> > If not, I am missing something serious.
> It seems so. Read up on how our xml catalog system works.
> As said above, it responds on the public identifiers
> and finds the DTDs relative to the various catalog.xcat files.
> There is one in your project at src/documentation/resources/schema/
> and others in the Forrest core at main/webapp/resources/schema/
> Now that said, there is something that might be confusing you.
> There is a "dummy" copy of the "hello" DTD next to the document
> that references that DTD. Note that that copy is *not used*.
> Instead, it uses the ones found by the catalog resolver as
> explained above.
> We need to investigate why that copy is there. The svn log
> says "... to pass the test". That copy should still
> not be needed and should be removed to avoid confusion.
> -David

View raw message