You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Kathryn Andersen <ka...@katspace.homelinux.org> on 2005/12/22 07:29:46 UTC

XSLT Entity substitutions

Greetings.

I am trying to process my pages through an XSLT stylesheet.
(Apache 2, mod_perl 2, Embperl 2.10, libxml 20616, libxslt 10111)
The source file is XHTML, the output is also XHTML (but with all
the extra stuff like layout and navbars added by the XSLT stylesheet).

I've managed to get the recipes right, and all that, but...
I'm losing my entities.

For example, the source file has a &nbsp; entity.
The result output has that already substituted as a space character.
This kind of is a problem, because the page isn't proper XHTML
any more, since it has these actual characters there, which might
not be rendered correctly in someone else's browser -- that's what
having those entities is for, so that they can be rendered portably.

I think the reason is this, that in
./driver/eplibxslt.c

you have, in multiple places:

xmlSubstituteEntitiesDefault(1);

Which turns on entity substitution.  Which is a good default thing
to do, for people who want their entities substituted (like, if they
are using entities to read in external files, for example).

However, there doesn't seem to be any way of turning this behaviour off,
if, like me, you want your entities to be passed through untouched.

Is there a way of turning this off?  Or could it be added?

Kathryn Andersen
-=-=-=-=-=-=-=-=-
"If it gets too bad I'll just gnaw it off at the ankle."
        -- Ivanova, "The Geometry of Shadows" (Babylon 5)
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: XSLT Entity substitutions

Posted by 'Kathryn Andersen' <ka...@katspace.homelinux.org>.
On Thu, Dec 22, 2005 at 09:22:23AM +0100, Gerald Richter wrote:
> > 
> > xmlSubstituteEntitiesDefault(1);
> > 
> > Which turns on entity substitution.  Which is a good default 
> > thing to do, for people who want their entities substituted 
> > (like, if they are using entities to read in external files, 
> > for example).
> > 
> > However, there doesn't seem to be any way of turning this 
> > behaviour off, if, like me, you want your entities to be 
> > passed through untouched.
> 
> At the moment you can't turn it off (only by recompiling Embperl), but I
> think you are right it's a good idea to make the configurable.
> 
> I put it on the TODO list

Thanks.

Probably a good idea to make xmlLoadExtDtdDefaultValue configurable
at the same time, since it's set in the same place...

Kathryn Andersen
-=-=-=-=-=-=-=-=-
Vila:  You could have got us killed!  Why didn't you tell me?
Avon:  Well, I didn't want to make you nervous, Vila.  I was nervous 
       enough for the both of us.		(Blake's 7: Orbit [D11])
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: XSLT Entity substitutions

Posted by Gerald Richter <ri...@ecos.de>.
Hi,

> 
> you have, in multiple places:
> 
> xmlSubstituteEntitiesDefault(1);
> 
> Which turns on entity substitution.  Which is a good default 
> thing to do, for people who want their entities substituted 
> (like, if they are using entities to read in external files, 
> for example).
> 
> However, there doesn't seem to be any way of turning this 
> behaviour off, if, like me, you want your entities to be 
> passed through untouched.
> 
> Is there a way of turning this off?  Or could it be added?
> 

At the moment you can't turn it off (only by recompiling Embperl), but I
think you are right it's a good idea to make the configurable.

I put it on the TODO list

Gerald


 
** Virus checked by BB-5000 Mailfilter ** 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org