Lines 1262-1283
xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
Link Here
|
1262 |
case XML_ELEMENT_CONTENT_PCDATA: |
1262 |
case XML_ELEMENT_CONTENT_PCDATA: |
1263 |
strcat(buf, "#PCDATA"); |
1263 |
strcat(buf, "#PCDATA"); |
1264 |
break; |
1264 |
break; |
1265 |
case XML_ELEMENT_CONTENT_ELEMENT: |
1265 |
case XML_ELEMENT_CONTENT_ELEMENT: { |
|
|
1266 |
int qnameLen = xmlStrlen(content->name); |
1267 |
|
1268 |
if (content->prefix != NULL) |
1269 |
qnameLen += xmlStrlen(content->prefix) + 1; |
1270 |
if (size - len < qnameLen + 10) { |
1271 |
strcat(buf, " ..."); |
1272 |
return; |
1273 |
} |
1266 |
if (content->prefix != NULL) { |
1274 |
if (content->prefix != NULL) { |
1267 |
if (size - len < xmlStrlen(content->prefix) + 10) { |
|
|
1268 |
strcat(buf, " ..."); |
1269 |
return; |
1270 |
} |
1271 |
strcat(buf, (char *) content->prefix); |
1275 |
strcat(buf, (char *) content->prefix); |
1272 |
strcat(buf, ":"); |
1276 |
strcat(buf, ":"); |
1273 |
} |
1277 |
} |
1274 |
if (size - len < xmlStrlen(content->name) + 10) { |
|
|
1275 |
strcat(buf, " ..."); |
1276 |
return; |
1277 |
} |
1278 |
if (content->name != NULL) |
1278 |
if (content->name != NULL) |
1279 |
strcat(buf, (char *) content->name); |
1279 |
strcat(buf, (char *) content->name); |
1280 |
break; |
1280 |
break; |
|
|
1281 |
} |
1281 |
case XML_ELEMENT_CONTENT_SEQ: |
1282 |
case XML_ELEMENT_CONTENT_SEQ: |
1282 |
if ((content->c1->type == XML_ELEMENT_CONTENT_OR) || |
1283 |
if ((content->c1->type == XML_ELEMENT_CONTENT_OR) || |
1283 |
(content->c1->type == XML_ELEMENT_CONTENT_SEQ)) |
1284 |
(content->c1->type == XML_ELEMENT_CONTENT_SEQ)) |
Lines 1319-1324
xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
Link Here
|
1319 |
xmlSnprintfElementContent(buf, size, content->c2, 0); |
1320 |
xmlSnprintfElementContent(buf, size, content->c2, 0); |
1320 |
break; |
1321 |
break; |
1321 |
} |
1322 |
} |
|
|
1323 |
if (size - strlen(buf) <= 2) return; |
1322 |
if (englob) |
1324 |
if (englob) |
1323 |
strcat(buf, ")"); |
1325 |
strcat(buf, ")"); |
1324 |
switch (content->ocur) { |
1326 |
switch (content->ocur) { |