On Feb 23, 2006, at 12:30 AM, Josep A. Frau wrote:

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

Well, that's just the thing... I know how to use the entity catalog, and in fact it works fine — as long as the stylesheet source is hardcoded in the sitemap. But when (see below) the stylesheet is streamed through a Cocoon pipeline, then I get the error.

—ml—

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]


Reply via email to