cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <Alfred.Nathan...@swx.com>
Subject RE: patch for an entityResolver problem in xsl stylesheets ...
Date Fri, 01 Sep 2006 07:24:53 GMT
Hi Hussayn,

thanks for sharing your patch.
I'll have a look at it.

Cheers, Alfred.

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Hussayn dabbous
Sent: Mittwoch, 30. August 2006 22:48
To: dev@cocoon.apache.org
Subject: patch for an entityResolver problem in xsl stylesheets ...

Hi;

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"> %ISOlat1;
]><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 TraxProcessor.java 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,
Hussayn
 
 
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

Mime
View raw message