Re: [xml] DTD Handlers
- From: Daniel Veillard <veillard redhat com>
- To: srivatsan s <srivatsan17 yahoo co in>
- Cc: xml gnome org
- Subject: Re: [xml] DTD Handlers
- Date: Fri, 28 Jul 2006 07:03:50 -0400
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:
  http://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/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]