cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hussayn dabbous <>
Subject patch for an entityResolver problem in xsl stylesheets ...
Date Wed, 30 Aug 2006 20:48:00 GMT

I tried to use external entities like &uuml; etc. in xsl stylesheets.
For this purpose in first place i added a DOCTYPE definition on top of
my stylesheet, i.e.:

<?xml version="1.0"?>
<!DOCTYPE mydoc [
   <!ENTITY % ISOlat1 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" "ISOlat1.pen">
]><xsl:stylesheet version="1.0">

I assumed, the default entity resolver would resolve the ISOlat1.pen, but it did not!
I tracked this down and found, that entity resolution only works correctly when i
set the SYSTEM identifier to the absolute location of the external entity file. I did
not like this "hack", hence i tracked the problem further down and eventually found
one location in which apparently needs a modification in order to inject
the correct EntityResolver to work as expected.

I finally created a patch, which adds Entity resolving within XSLT processing wherever
a document(), import or include is performed. i did not check whether this patch works
recursively (follows an import within an imported xsl), but it looks like it would do ...

The patch has been created against cocoon/branches/BRANCH_2_1_X
It works for me. Hopefully it is usefull for others and does not break code at other
places. If anyone would like to review the patch and give some feedback,
That would be great ;-)

best regards,

View raw message