[xml] libxml2



I think there is something missing in fuction xmlDumElementContent in
module valid.c (modified lines follow)

static void
xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content,
int glob) {
  if (content == NULL) return;

  if (glob ||  content->ocur > 1 && content->type>2)  /* code added
after || */
    xmlBufferWriteChar(buf, "(");

   ..... unchanged code here


 if (glob || content->ocur > 1 && content->type>2) /* code added after
|| */
        xmlBufferWriteChar(buf, ")");

  ... unchanged code follows

} 

The reason: a model group like ( x, (y, z)*)
needs a parenthesis grouping (y,z) even if this is a sequence inside a
sequence.
However when dumped I got (x, y, z*)

Rafael C. Carrasco  (carrasco dlsi ua es)

Dep. de Llenguatges i Sistemes Informatics  | tel:   +34-96-590-3978   
Universitat d'Alacant                       | FAX:   +34-96-590-9326 
E-03071 Alacant (Spain)                     |
-------------------------------------------------------------------------
URL:   http://www.dlsi.ua.es/~carrasco



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]