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...@apache.org> on 2004/10/22 07:45:35 UTC
Re: DocBook and numeric entity declaration
Clay Leeds wrote:
> Juan Jose Pablos wrote:
> > I am downloading the fop cvs and I am getting a diferent error:
> >
> > validate-xdocs:
> > /home/cheche/xml/xml-fop/src/documentation/content/xdocs/DnI/
> > properties.xml:2245:39: The entity "rarr" was referenced, but not
> > declared.
> >
> > Do you know much about this?
>
> I've found out a little more about this problem. Apparently Forrest (or
> Cocoon?) is not properly validating DocBook character entities. There
> may be a couple of reasons for this
>
> Here's the most recent msg[1] I sent to fop-dev on the subject:
>
> On Oct 20, 2004, at 11:32 AM, Simon Pepping wrote:
> > Clay,
> >
> > I am a bit surprised. The docbook dtd clearly defines the entity
> > → in iso-num.ent:
> > <!ENTITY rarr "→"> <!-- RIGHTWARDS DOUBLE ARROW -->
> > Why does not the forrest build see this? Does it not read the DTD?
> >
> > I do not like character entities in decimal numbers. I can never
> > figure out what they refer to. IMO character codes should be given in
> > hexadecimal notation; all Unicode documentation uses this. Then it
> > becomes → as shown above.
> >
> > Regards, Simon
>
> Changing → to → is an acceptable solution. The xml-fop
> /forrest/ build does not error out when it tries to validate
> 'properties.xml'. I made the change and checked it in.
>
> I'd also like to resolve the error in Forrest if possible, so the rest
> of this POST deals with that.
I do not see any such problem. I have a test seed site
that includes a couple of Full DocBook examples using the
DocBook XSL and also processes them via Forrest's default
docbook2document XSL. I can add an example character entity
to them → and everything works perfectly:
'forrest validate' is fine
and with 'forrest run' i see the entity rendered as "->"
as expected.
This is my document type declaration.
<!DOCTYPE article
PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
Forrest resolves all the DTDs and *.ent properly.
More below ...
> I suspect the problem is related to the fact that properties.xml
> references a dtd like this:
>
> <!--
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> "docbookx.dtd">
> -->
>
> A couple of things I note here:
> 1. It's commented out
I don't understand. How can it ever work if it is commented out?
Remember, if you suspect issues with the catalog entity resolver
then raise the verbosity level in src/core/context/WEB-INF/cocoon.xconf
for the <entity-resolver> component. Then watch the messages
when Cocoon starts and during 'forrest run'. You should see stacks
of messages and then "Resolved public: ..." when the forrest catalog
finds each DTD and *.ent file.
--David
> 2. this is a relative/local link, but the 'docbookx.dtd' is not local
> (I also tried
> 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'
> and 'http://www.oasis-open.org/docbook/xml/4.2/' and as expected
> neither
> works.)
> 3. fwiw, iso-num.ent is at
> http://www.oasis-open.org/docbook/xml/4.2/ent/iso-num.ent
>
> I'm not very 'up' on DocBook, so this may be how it's 'supposed' to
> work. Nevertheless, → is the only thing in 'properties.xml' that
> doesn't validate during the /forrest/ run (unless I replace → with
> → or →).
>
> Web Maestro Clay
>
> [1]
> http://marc.theaimsgroup.com/?l=fop-dev&m=109839392707948&w=2
Re: DocBook and numeric entity declaration
Posted by David Crossley <cr...@apache.org>.
Clay Leeds wrote:
> David Crossley wrote:
> > Clay Leeds wrote:
> >> Changing → to → is an acceptable solution. The xml-fop
> >> /forrest/ build does not error out when it tries to validate
> >> 'properties.xml'. I made the change and checked it in.
> >>
> >> I'd also like to resolve the error in Forrest if possible, so the rest
> >> of this POST deals with that.
> >
> > I do not see any such problem. I have a test seed site
> > that includes a couple of Full DocBook examples using the
> > DocBook XSL and also processes them via Forrest's default
> > docbook2document XSL. I can add an example character entity
> > to them → and everything works perfectly:
> > 'forrest validate' is fine
> > and with 'forrest run' i see the entity rendered as "->"
> > as expected.
>
> Is it:
> - just /forrest/ which doesn't render it?
Everything is fine. Sorry, i should have said so above.
It is important to test all situations.
> - did you render xml-fop/ yesterday (after I changed it to its numeric
> entity: →)?
I am not using xml-fop xdocs. This is my own stuff.
> - is this your own example which you added an example character entity?
That is correct.
> > This is my document type declaration.
> > <!DOCTYPE article
> > PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> > "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
> >
> > Forrest resolves all the DTDs and *.ent properly.
> >
> > More below ...
> >
> >> I suspect the problem is related to the fact that properties.xml
> >> references a dtd like this:
> >>
> >> <!--
> >> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> >> "docbookx.dtd">
> >> -->
> >>
> >> A couple of things I note here:
> >> 1. It's commented out
> >
> > I don't understand. How can it ever work if it is commented out?
>
> I suspected this may be the problem, but wasn't sure.
Definitely the problem. The whole system depends on
the Public Identifier, i.e. Forrest's validation,
the entity resolver, and the sitemaps for Cocoon to decide
which pipeline to apply to each different document type.
> However, even if
> it's not commented out, the docbookx.dtd file doesn't exist in that
> directory, so I'm thinking it would still fail.
That is why we have the Catalog Entity Resolver. Please try
the suggestion below. If the resolver is failing, then you will
get the wrong messages and if you are using full URLs as the
System Identifier then you would see network traffic going
to get the DTD on every parse. http://ngrep.sf.net/
'ngrep dtd'.
> > Remember, if you suspect issues with the catalog entity resolver
> > then raise the verbosity level in src/core/context/WEB-INF/cocoon.xconf
> > for the <entity-resolver> component. Then watch the messages
> > when Cocoon starts and during 'forrest run'. You should see stacks
> > of messages and then "Resolved public: ..." when the forrest catalog
> > finds each DTD and *.ent file.
> > --David
>
> Actually, I didn't remember. Glad you brought that up.
I am going to enhance/create FAQs for this.
> BTW, perhaps
> forrest could be improved with a note in the output/BUILD FAILED
> indicating this tip.
If we can, yes.
--
David Crossley
Re: DocBook and numeric entity declaration
Posted by Clay Leeds <cl...@medata.com>.
On Oct 21, 2004, at 10:45 PM, David Crossley wrote:
> Clay Leeds wrote:
>> Changing → to → is an acceptable solution. The xml-fop
>> /forrest/ build does not error out when it tries to validate
>> 'properties.xml'. I made the change and checked it in.
>>
>> I'd also like to resolve the error in Forrest if possible, so the rest
>> of this POST deals with that.
>
> I do not see any such problem. I have a test seed site
> that includes a couple of Full DocBook examples using the
> DocBook XSL and also processes them via Forrest's default
> docbook2document XSL. I can add an example character entity
> to them → and everything works perfectly:
> 'forrest validate' is fine
> and with 'forrest run' i see the entity rendered as "->"
> as expected.
Is it:
- just /forrest/ which doesn't render it?
- did you render xml-fop/ yesterday (after I changed it to its numeric
entity: →)?
- is this your own example which you added an example character entity?
> This is my document type declaration.
> <!DOCTYPE article
> PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
>
> Forrest resolves all the DTDs and *.ent properly.
>
> More below ...
>
>> I suspect the problem is related to the fact that properties.xml
>> references a dtd like this:
>>
>> <!--
>> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
>> "docbookx.dtd">
>> -->
>>
>> A couple of things I note here:
>> 1. It's commented out
>
> I don't understand. How can it ever work if it is commented out?
I suspected this may be the problem, but wasn't sure. However, even if
it's not commented out, the docbookx.dtd file doesn't exist in that
directory, so I'm thinking it would still fail.
> Remember, if you suspect issues with the catalog entity resolver
> then raise the verbosity level in src/core/context/WEB-INF/cocoon.xconf
> for the <entity-resolver> component. Then watch the messages
> when Cocoon starts and during 'forrest run'. You should see stacks
> of messages and then "Resolved public: ..." when the forrest catalog
> finds each DTD and *.ent file.
> --David
Actually, I didn't remember. Glad you brought that up. BTW, perhaps
forrest could be improved with a note in the output/BUILD FAILED
indicating this tip.
Web Maestro Clay
--
Clay Leeds - <cl...@medata.com>
Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>