[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Query about xmlNewReference
- From: Ashwin <ashwins huawei com>
- To: veillard redhat com
- Cc: xml gnome org, ranjit huawei com, nageshs huawei com
- Subject: Re: [xml] Query about xmlNewReference
- Date: Mon, 23 Jun 2008 11:51:59 +0800
-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces gnome org] On Behalf Of
Daniel Veillard
Sent: 2008年3月26日 2:01
To: Ashwin
Cc: xml gnome org; ranjit huawei com; nageshs huawei com
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>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]