feature or useful bug?

Izzy l at nowhere.no
Mon Jun 23 17:06:37 PDT 2003

Vassili Dzuba wrote:

> Hi,
> On Sun, 22 Jun 2003 07:39:45 +0000 (UTC)
> izzyb at ecn.ab.ca (Izzy Blacklock) wrote:
>> I've been experimenting with building some new profiles and discovered an
>> unexpected behavior.  I accidently created an entity with the same name
>> as
>> another.  This didn't produce an error or warning as I would have
>> expected. Instead it silently chose the first occurrence of the entity
>> and ignored the
>> future occurrence.  Somehow I don't think this is a _feature_ (at least I
>> don't recall seeing it documented anywhere), but it occurred to me that
>> it could be very useful behavior.
> It's not a bug.
> From the XML spec (http://www.w3.org/TR/REC-xml), section : 4.2
> The Name identifies the entity in an entity reference or, in the case of
> an unparsed entity, in the value of an ENTITY or ENTITIES attribute. If
> the same entity is declared more than once, the first declaration
> encountered is binding; at user option, an XML processor may issue a
> warning if entities are declared multiple times.

Oh! So it's a _feature_ of the XML spec.  I have to admit, my knowledge of
XML is limited.  Playing with ALFS profiles is the closest I've come to
doing anything XML.  It is good to hear that I should be able to depend on
this feature in the future.  I was worried some one would report it as a
bug and render my profiles broken! :(

I'm guessing the XML processor described above is part of nALFS.  Perhaps
having it issue workings, at the users option, would be useful.

On a related note, while experimenting with this feature, I HAVE found a
bug!  Creating a circular reference causes nALFS to segfault and dump core. 
I know, it was a stupid mistake on my part, but it should cause nALFS to
insult me for being so stupid, not dump core for no obvious reason!
Although this could be considered an insult :)

To illustrate, here's a simple example that will cause the coredump I've

<!-- start.xml -->
<!DOCTYPE alfs [

<!ENTITY segfault SYSTEM "segfault.xml">


<alfs version="3.0">



----------------- 8< -----------------------

<!-- segfault.xml -->

-------------------- 8< --------------------


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