-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Daniel Veillard
Sent: 2008年3月26日 2:01
To: Ashwin
Cc: [email protected]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [xml] Query about xmlNewReference

On Mon, Mar 24, 2008 at 08:18:55PM +0530, Ashwin wrote:
> Hi,
> 
> In the function xmlNewReference for the following bit of code
[...]
> Or should the the line be
> 
> cur->children = ent->children? 

>  No that's fine you want to a pointer to the entity
> (see xmllint --debug test/ent1)

Hi,
  I still have a lingering doubt about the above, consider the example of
the attached file. The subtree of the entity reference node for &Fname;
consists of seven children.

This is because the child node of ent ref node &Fname; points to the Entity
Decl node Fname, hence effectively if try to get the child nodes of ent ref
node &Fname; we get 7 children.

Should not the child node of ent-ref node be a text node containing the
replacement text of the entity rather than the entire tree associated with
the corresponding entity declaration?

Thanks !!

Regards
Ashwin

<? xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE Name [
<!ENTITY Fname "Rabi">
<!ENTITY Mname "Narayan;">
<!ENTITY Lname "Sahoo">
<!ENTITY % Cname "IGIT">
<!ELEMENT Name (#PCDATA)>
<!ELEMENT Qualification (#PCDATA)>
<!NOTATION Picture SYSTEM "flower.jpg">
<!ENTITY % State "Orissa">
]>
<Name>&Fname;</Name>
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to