You can use the entity catalog to map public DTD entities to file system
files.
http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html
En/na Mark Lundquist ha escrit:
Hi,
I have this in some XSLT stylesheets:
<!DOCTYPE html
[
<!ENTITY % HTMLlat1 PUBLIC
"-//W3C//ENTITIES Latin 1 for XHTML//EN"
"w3c/xhtml-lat1.ent">
%HTMLlat1;
<!ENTITY % HTMLspecial PUBLIC
"-//W3C//ENTITIES Special for XHTML//EN"
"w3c/xhtml-special.ent">
%HTMLspecial;
]>
...and this works fine for stylesheets where the TraxTransformer
source is hardcoded in the sitemap. But I have one case where the
stylesheet is served by a Cocoon pipeline like this:
<map:generate
src="context:/config/fido/pub_templates/{flow-attribute:templatePath}"/>
<map:serialize type="xml" />
In this case Saxon throws a java.io.FileNotFoundException; it's
looking for the referenced entities in the filesystem, relative to the
parent directory of the stylesheet. I tried saying this in the DTD:
context://WEB-INF/entities/catalog/w3c/xhtml-lat1.ent
...but Saxon didn't like that, it says "unknown protocol".
Any ideas how I can fix this?
I actually had this app working for a long time, but I either never
noticed or had forgotten that I had been locating the entity like this:
http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
...and this was only exposed when a network problem cropped up on our
server. I don't really want to be traipsing all over the net to get
entities every time this stylesheet is parsed! :-/
Any help appreciated :-)
—ml—
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Josep A. Frau <[EMAIL PROTECTED]>
Centre de Tecnologies de la Informació
Universitat de les Illes Balears
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]