cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <gian...@rabellino.it>
Subject Re: Resolution/validation woes
Date Thu, 03 Jan 2002 09:00:02 GMT
David Crossley wrote:

>>I always try to avoid validation, but this time I have to:
> 
> I am amazed that you do without XML validation. It is all too
> easy to get a broken XML instance which could wreak havoc
> for your application. Also the user will end up with some
> competely unintelligible exception messages. XML instances
> are supposed to be reliable, so that any downstream application
> can depend on them.


You're right David. The problem is that DTDs are just not enough to 
obtain proper validation in many environments (exp. B2B): long ago I 
decided to give up and wait for XML Schema to show up and become a 
stable technology (and yes, now it's time to change :)). I must confess, 
then, that I've never been into serious XML exchange between 3rd 
parties, so I always worked in a sort of controlled environment, where 
it was safe enough to assume that the XML was valid.

>>Now... I tried to turn validation off in cocoon.xconf. No luck. I tried 
>>then to resort to the entity resolver by adding the line
>>SYSTEM "sdocbook.dtd" "sdocbook.dtd"
>>to the end of resources/entities/catalog. No way: the little boy still 
>>insists to have its private copy of sdocbook.dtd in the same directory.
> 
> That is because the alternative system identifier that you
> have mapped here is to exactly the same URI.
> This catalog entry should suffice:
> SYSTEM "sdocbook.dtd" "/usr/local/sgml/docbook/simple/sdocbook.dtd"


That did the trick, and everything is working perfectly. Yet I think 
that this part should be documented: I saw the previous SYSTEM line stating

SYSTEM "urn:x-arbortext:test-system-identifier"
        "catalog-demo/testsys.xml"

so I thought that copying my "sdocbook.dtd" in resources/entities and
declaring it as

SYSTEM "sdocbook.dtd" "sdocbook.dtd"

would have the resolver look for it in the current catalog directory, 
which was not the case. It was enough to mkdir docbook, move the dtd 
there and change the line to

SYSTEM "sdocbook.dtd" "docbook/sdocbook.dtd"

to see the problem disappear. Now I'm happy again (well... actually a 
bit ashamed about my DTD ignorance, please bear with me ;)

Thanks for your help,

-- 
Gianugo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message