Syntax, shall we?

Neven Has haski at sezampro.yu
Mon Jan 28 12:08:51 PST 2002


On Mon, Jan 28, 2002 at 09:59:27AM -0800, Jesse Tie-Ten-Quee wrote:
> > I was going to start off by posting a few new ideas i had with the
> > syntax, but i want to hear from a few people first that have mentioned
> > they have a few ace's up there sleeves. (*waves at Neven*)
> 
> Hey Neven, could you do me a favour (considering you are the resident
> expat expert, right? :) and try this out;
> 
> <!ENTITY wget.pgk "wget-&wget.ver;.tar.gz">
> <!ENTITY wget.dir "wget-&wget.ver;">
> <!ENTITY wget.ver "1.8.1">
> 
> But the DOCTYPE/DTD is always read from bottom up, so wget.ver is first
> processed, then wget.dir, then wget.pgk.

Works fine in all 6 orders. :)

> However, by default the
> substituation doesn't happen untill parsing time, which is one reason i
> think i have to enable the default entities substitution..

And one reason why I was thinking about using libxml2 instead of expat. :)
The feature that I want to add in nALFS is saving the profiles back to a
file. For this to work properly, entities will have to be kept so that they
could be saved back too. This is not possible in expat since it always
substitutes them (and escaping them before parsing is just too ugly).

If I ever start using libxml2, along with the entity definitions like you
used above, I would probably leave xmlSubstituteEntitiesDefault() to 0 and
then manually substitute those entities in DTD. A bit more work, but I don't
see another solution (with my limited knowledge of libxml2) if entities are
to be kept.


Neven

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list