List Info

Thread: DTD Handlers




DTD Handlers
user name
2006-07-28 10:35:45
I am trying to use libxml DTD handlers.
I have the following below example
 
 
<!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
This call back xmlSAX2ElementDecl , takes xmlElementContentPtr
Whose data Structure is
struct _xmlElementContent {
 &nbsp;  xmlElementContentType &nbsp; &nbsp; type; /* PCDATA, ELEMENT, SEQ or OR */
 &nbsp;  xmlElementContentOccur &nbsp;  ocur; /* ONCE, OPT, MULT or PLUS */
 &nbsp;  const xmlChar &nbsp; &nbsp; &nbsp; &nbsp;   *name; &nbsp;  /* Element name */
 &nbsp;  struct _xmlElementContent *c1;  /* first child */
 &nbsp;  struct _xmlElementContent *c2;  /* second child */
 &nbsp;  struct _xmlElementContent *parent;  /* parent */
 &nbsp;  const xmlChar &nbsp; &nbsp; &nbsp; &nbsp;   *prefix;  /* Namespace prefix */
};
 
What are these first child and second child ptrs .
Can anyone explain with the above example .

2;


Here’s a new way to find what you're looking for - Yahoo! Answers
DTD Handlers
user name
2006-07-28 11:03:50
On Fri, Jul 28, 2006 at 11:35:45AM +0100, srivatsan s wrote:
> I am trying to use libxml DTD handlers.
>   I have the following below example 
>    
>    
>   <!ELEMENT p (#PCDATA | %font; | %phrase; |
%special; | %form;)* >
>   This call back xmlSAX2ElementDecl , takes
xmlElementContentPtr
>   Whose data Structure is 
>   struct _xmlElementContent {
>       xmlElementContentType     type; /* PCDATA,
ELEMENT, SEQ or OR */
>       xmlElementContentOccur    ocur; /* ONCE, OPT,
MULT or PLUS */
>       const xmlChar             *name;    /* Element
name */
>       struct _xmlElementContent *c1;  /* first child */
>       struct _xmlElementContent *c2;  /* second child
*/
>       struct _xmlElementContent *parent;  /* parent */
>       const xmlChar             *prefix;  /* Namespace
prefix */
>   };
>    
>   What are these first child and second child ptrs . 
>   Can anyone explain with the above example .

 impossible because your example uses parameter entity
references which 
are not described in your post. Anyway it's a matter of
reading and 
understanding the spec as the internal model is a direct
mapping:

  htt
p://www.w3.org/TR/REC-xml/#sec-element-content

 it reflects the choice and seq constructions it's a binary
tree obviously
once entities are expanded.
 You won't be able to make sense of the libxml2 internals
until you understand
the spec, sorry ...

Daniel


-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )