Hy;

i have recently checked out cocoon-2.1.x in order to replace
the rather old cocoon-2.04 which we are using for a couple of years now.
Great stuff, much improvements, wow, i'd like to do the replacement now!

Only one problem remains:
During my tests i stumbled over a problem with entity resolution within
xsl files. BTW we had a similar problem in cocoon-2.04 too, which we solved
partially by using saxon instead of xalan, see:

http://article.gmane.org/gmane.text.xml.cocoon.user/14775/match=entityresolver
http://www.saxess.com/JSPWiki/Wiki.jsp?page=EntityResolver

In short i found that the following construct does NOT trigger the
cocoon entityResolver, but apparently the xsl parser's default resolver:

====
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE page [
  <!ENTITY % ISOlat1 PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//XML"
             "ISOlat1.pen"> %ISOlat1;
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version='1.1'>
...
</xsl:stylesheet>
====

I found that i can simply solve the problem by defining the SYSTEM
identifier as an absolute path into the file system:

====
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE page [
  <!ENTITY % ISOlat1 PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//XML"
             "c:/cocoon/WEB-INF/entities/ISOlat1.pen"> %ISOlat1;
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version='1.1'>
...
</xsl:stylesheet>
====
I don't like this solution very much, because we are running our development
system on windows, but our production system on linux, so we get an apparent
problem here when releasing a new version of our software.

After tracking down the problem and doing some reading i was able to write
a cocoon-patch for cocoon-2.1.x which solved the underlaying problem. The patch
is available at

http://article.gmane.org/gmane.text.xml.cocoon.devel/66380/match=entityresolver

This patch works for me and fully solves our problem (probably for any 
TRAX-Transformer).

I posted this patch a couple of days ago. Now i am wondering whether
possibly my "problem" can be solved more elegantly or is simply irrelevant
because we use xsl in an unconventional way?
Thank you very much in advance for any hint.

regards,
Hussayn


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to