cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject Re: Need help w/ entity resolution
Date Mon, 06 Mar 2006 19:16:31 GMT

The problem doesn't have to do with what I thought it did... it's  
something else (see below), but how to fix it?

On Mar 3, 2006, at 3:07 PM, Mark Lundquist wrote:

>
> 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.

As it turns out, that's not the characteristic difference between  
stylesheets that are working and ones that aren't.

The problem is that I have a stylesheet that does an <xsl:import> of  
another stylesheet.  The imported stylesheet needs some entities in  
order to parse, and the entity catalog is not being used to resolve  
entities in the imported stylesheet — instead, the parser is just  
looking for the entity at a filesystem path relative to where the  
stylesheet lives.

I cannot possibly be the first person to ever have this problem!  How  
do I fix this?

Thx,
—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: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>
>> -- 
>> Josep A. Frau <peptoni@uib.es>
>> Centre de Tecnologies de la Informació
>> Universitat de les Illes Balears
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>

Mime
View raw message