diff options
91 files changed, 9978 insertions, 5547 deletions
@@ -1,3 +1,11 @@ +Tue Mar 14 19:11:29 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org> + + * all: tagged LIB_XML_1_X + * *.c *.h : updated from W3C CVS tree + * configure.in : 2.0.0-beta + * libxml.spec.in : libxml2 package nam + * result/* : new version of the tests output + Mon Mar 6 09:34:52 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org> * doc/xml.html, doc/update.html: updated docs, 1.8.7 diff --git a/HTMLparser.c b/HTMLparser.c index 080b9ed3..aafaec6d 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -121,36 +121,81 @@ PUSH_AND_POP(extern, xmlChar*, name) * COPY(to) copy one char to *to, increment CUR_PTR and to accordingly */ -#define CUR (*ctxt->input->cur) +#define CUR ((int) (*ctxt->input->cur)) + #define UPPER (toupper(*ctxt->input->cur)) + #define SKIP(val) ctxt->nbChars += (val),ctxt->input->cur += (val) + #define NXT(val) ctxt->input->cur[(val)] + #define UPP(val) (toupper(ctxt->input->cur[(val)])) + #define CUR_PTR ctxt->input->cur + #define SHRINK xmlParserInputShrink(ctxt->input) + #define GROW xmlParserInputGrow(ctxt->input, INPUT_CHUNK) -#define SKIP_BLANKS \ - while (IS_BLANK(*(ctxt->input->cur))) NEXT - -#ifndef USE_UTF_8 -#define CURRENT (*ctxt->input->cur) -#define NEXT { \ - if ((*ctxt->input->cur == 0) && \ - (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) { \ - xmlPopInput(ctxt); \ - } else { \ - if (*(ctxt->input->cur) == '\n') { \ - ctxt->input->line++; ctxt->input->col = 1; \ - } else ctxt->input->col++; \ - ctxt->input->cur++; \ - ctxt->nbChars++; \ - if (*ctxt->input->cur == 0) \ - xmlParserInputGrow(ctxt->input, INPUT_CHUNK); \ - }} +#define CURRENT ((int) (*ctxt->input->cur)) -#else -#endif +#define NEXT htmlNextChar(ctxt); + +#define SKIP_BLANKS htmlSkipBlankChars(ctxt); + +/** + * htmlNextChar: + * @ctxt: the HTML parser context + * + * Skip to the next char input char. + */ + +void +htmlNextChar(htmlParserCtxtPtr ctxt) { + if ((*ctxt->input->cur == 0) && + (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) { + xmlPopInput(ctxt); + } else { + if (*(ctxt->input->cur) == '\n') { + ctxt->input->line++; ctxt->input->col = 1; + } else ctxt->input->col++; + ctxt->input->cur++; + ctxt->nbChars++; + if (*ctxt->input->cur == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + } +} + +/** + * htmlSkipBlankChars: + * @ctxt: the HTML parser context + * + * skip all blanks character found at that point in the input streams. + * + * Returns the number of space chars skipped + */ + +int +htmlSkipBlankChars(xmlParserCtxtPtr ctxt) { + int res = 0; + + while (IS_BLANK(*(ctxt->input->cur))) { + if ((*ctxt->input->cur == 0) && + (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) { + xmlPopInput(ctxt); + } else { + if (*(ctxt->input->cur) == '\n') { + ctxt->input->line++; ctxt->input->col = 1; + } else ctxt->input->col++; + ctxt->input->cur++; + ctxt->nbChars++; + if (*ctxt->input->cur == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + } + res++; + } + return(res); +} @@ -475,7 +520,7 @@ htmlAutoCloseTag(htmlDocPtr doc, const xmlChar *name, htmlNodePtr elem) { if (elem == NULL) return(1); if (!xmlStrcmp(name, elem->name)) return(0); if (htmlCheckAutoClose(elem->name, name)) return(1); - child = elem->childs; + child = elem->children; while (child != NULL) { if (htmlAutoCloseTag(doc, name, child)) return(1); child = child->next; @@ -499,7 +544,7 @@ htmlIsAutoClosed(htmlDocPtr doc, htmlNodePtr elem) { htmlNodePtr child; if (elem == NULL) return(1); - child = elem->childs; + child = elem->children; while (child != NULL) { if (htmlAutoCloseTag(doc, elem->name, child)) return(1); child = child->next; @@ -1275,7 +1320,7 @@ htmlNewDoc(const xmlChar *URI, const xmlChar *ExternalID) { else xmlCreateIntSubset(cur, BAD_CAST "HTML", ExternalID, URI); cur->name = NULL; - cur->root = NULL; + cur->children = NULL; cur->extSubset = NULL; cur->oldNs = NULL; cur->encoding = NULL; @@ -1285,7 +1330,6 @@ htmlNewDoc(const xmlChar *URI, const xmlChar *ExternalID) { cur->refs = NULL; #ifndef XML_WITHOUT_CORBA cur->_private = NULL; - cur->vepv = NULL; #endif return(cur); } @@ -1667,7 +1711,8 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) { } } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->error(ctxt->userData, "SystemLiteral \" or ' expected\n"); + ctxt->sax->error(ctxt->userData, + "SystemLiteral \" or ' expected\n"); ctxt->wellFormed = 0; } @@ -80,7 +80,7 @@ htmlAttrDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { } xmlBufferWriteChar(buf, " "); xmlBufferWriteCHAR(buf, cur->name); - value = xmlNodeListGetString(doc, cur->val, 0); + value = xmlNodeListGetString(doc, cur->children, 0); if (value) { xmlBufferWriteChar(buf, "="); xmlBufferWriteQuotedString(buf, value); @@ -212,7 +212,7 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) { } return; } - if ((cur->content == NULL) && (cur->childs == NULL)) { + if ((cur->content == NULL) && (cur->children == NULL)) { if ((info != NULL) && (info->endTag != 0)) xmlBufferWriteChar(buf, ">"); else { @@ -242,15 +242,15 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) { xmlFree(buffer); } } - if (cur->childs != NULL) { - if ((cur->childs->type != HTML_TEXT_NODE) && - (cur->childs->type != HTML_ENTITY_REF_NODE) && - (cur->childs != cur->last)) + if (cur->children != NULL) { + if ((cur->children->type != HTML_TEXT_NODE) && + (cur->children->type != HTML_ENTITY_REF_NODE) && + (cur->children != cur->last)) xmlBufferWriteChar(buf, "\n"); - htmlNodeListDump(buf, doc, cur->childs); + htmlNodeListDump(buf, doc, cur->children); if ((cur->last->type != HTML_TEXT_NODE) && (cur->last->type != HTML_ENTITY_REF_NODE) && - (cur->childs != cur->last)) + (cur->children != cur->last)) xmlBufferWriteChar(buf, "\n"); } if (!htmlIsAutoClosed(doc, cur)) { @@ -307,8 +307,8 @@ htmlDocContentDump(xmlBufferPtr buf, xmlDocPtr cur) { xmlBufferWriteChar(buf, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">"); } - if (cur->root != NULL) { - htmlNodeListDump(buf, cur, cur->root); + if (cur->children != NULL) { + htmlNodeListDump(buf, cur, cur->children); } xmlBufferWriteChar(buf, "\n"); cur->type = type; @@ -158,66 +158,112 @@ internalSubset(void *ctx, const xmlChar *name, name, ExternalID, SystemID); #endif xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID); +} + +/** + * externalSubset: + * @ctx: the user data (XML parser context) + * + * Callback on external subset declaration. + */ +void +externalSubset(void *ctx, const xmlChar *name, + const xmlChar *ExternalID, const xmlChar *SystemID) +{ + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; +#ifdef DEBUG_SAX + fprintf(stderr, "SAX.externalSubset(%s, %s, %s)\n", + name, ExternalID, SystemID); +#endif if (((ExternalID != NULL) || (SystemID != NULL)) && (ctxt->validate && ctxt->wellFormed && ctxt->myDoc)) { /* * Try to fetch and parse the external subset. */ - xmlDtdPtr ret = NULL; - xmlParserCtxtPtr dtdCtxt; + xmlParserInputPtr oldinput; + int oldinputNr; + int oldinputMax; + xmlParserInputPtr *oldinputTab; + int oldwellFormed; xmlParserInputPtr input = NULL; xmlCharEncoding enc; - dtdCtxt = xmlNewParserCtxt(); - if (dtdCtxt == NULL) return; - /* * Ask the Entity resolver to load the damn thing */ - if ((ctxt->directory != NULL) && (dtdCtxt->directory == NULL)) - dtdCtxt->directory = (char *) xmlStrdup(BAD_CAST ctxt->directory); - - if ((dtdCtxt->sax != NULL) && (dtdCtxt->sax->resolveEntity != NULL)) - input = dtdCtxt->sax->resolveEntity(dtdCtxt->userData, ExternalID, + if ((ctxt->sax != NULL) && (ctxt->sax->resolveEntity != NULL)) + input = ctxt->sax->resolveEntity(ctxt->userData, ExternalID, SystemID); if (input == NULL) { - xmlFreeParserCtxt(dtdCtxt); return; } + xmlNewDtd(ctxt->myDoc, name, ExternalID, SystemID); + /* - * plug some encoding conversion routines here. !!! + * make sure we won't destroy the main document context */ - xmlPushInput(dtdCtxt, input); - enc = xmlDetectCharEncoding(dtdCtxt->input->cur); - xmlSwitchEncoding(dtdCtxt, enc); + oldinput = ctxt->input; + oldinputNr = ctxt->inputNr; + oldinputMax = ctxt->inputMax; + oldinputTab = ctxt->inputTab; + oldwellFormed = ctxt->wellFormed; + + ctxt->inputTab = (xmlParserInputPtr *) + xmlMalloc(5 * sizeof(xmlParserInputPtr)); + if (ctxt->inputTab == NULL) { + ctxt->errNo = XML_ERR_NO_MEMORY; + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "externalSubset: out of memory\n"); + ctxt->errNo = XML_ERR_NO_MEMORY; + ctxt->input = oldinput; + ctxt->inputNr = oldinputNr; + ctxt->inputMax = oldinputMax; + ctxt->inputTab = oldinputTab; + return; + } + ctxt->inputNr = 0; + ctxt->inputMax = 5; + ctxt->input = NULL; + xmlPushInput(ctxt, input); + + /* + * On the fly encoding conversion if needed + */ + enc = xmlDetectCharEncoding(ctxt->input->cur, 4); + xmlSwitchEncoding(ctxt, enc); if (input->filename == NULL) input->filename = (char *) xmlStrdup(SystemID); input->line = 1; input->col = 1; - input->base = dtdCtxt->input->cur; - input->cur = dtdCtxt->input->cur; + input->base = ctxt->input->cur; + input->cur = ctxt->input->cur; input->free = NULL; /* * let's parse that entity knowing it's an external subset. */ - xmlParseExternalSubset(dtdCtxt, ExternalID, SystemID); - - if (dtdCtxt->myDoc != NULL) { - if (dtdCtxt->wellFormed) { - ret = dtdCtxt->myDoc->intSubset; - dtdCtxt->myDoc->intSubset = NULL; - } else { - ret = NULL; - } - xmlFreeDoc(dtdCtxt->myDoc); - dtdCtxt->myDoc = NULL; - } - xmlFreeParserCtxt(dtdCtxt); - - ctxt->myDoc->extSubset = ret; + xmlParseExternalSubset(ctxt, ExternalID, SystemID); + + /* + * Free up the external entities + */ + + while (ctxt->inputNr > 1) + xmlPopInput(ctxt); + xmlFreeInputStream(ctxt->input); + xmlFree(ctxt->inputTab); + + /* + * Restore the parsing context of the main entity + */ + ctxt->input = oldinput; + ctxt->inputNr = oldinputNr; + ctxt->inputMax = oldinputMax; + ctxt->inputTab = oldinputTab; + /* ctxt->wellFormed = oldwellFormed; */ } } @@ -316,13 +362,23 @@ entityDecl(void *ctx, const xmlChar *name, int type, fprintf(stderr, "SAX.entityDecl(%s, %d, %s, %s, %s)\n", name, type, publicId, systemId, content); #endif - xmlAddDocEntity(ctxt->myDoc, name, type, publicId, systemId, content); + if (ctxt->inSubset == 1) + xmlAddDocEntity(ctxt->myDoc, name, type, publicId, + systemId, content); + else if (ctxt->inSubset == 2) + xmlAddDtdEntity(ctxt->myDoc, name, type, publicId, + systemId, content); + else { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt, + "SAX.entityDecl(%s) called while not in subset\n", name); + } } /** * attributeDecl: * @ctx: the user data (XML parser context) - * @name: the attribute name + * @fullname: the attribute name * @type: the attribute type * @publicId: The public ID of the attribute * @systemId: The system ID of the attribute @@ -331,24 +387,40 @@ entityDecl(void *ctx, const xmlChar *name, int type, * An attribute definition has been parsed */ void -attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *name, +attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlAttributePtr attr; + xmlChar *name = NULL, *prefix = NULL; #ifdef DEBUG_SAX fprintf(stderr, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n", - elem, name, type, def, defaultValue); + elem, fullname, type, def, defaultValue); #endif - attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, elem, - name, type, def, defaultValue, tree); + name = xmlSplitQName(ctxt, fullname, &prefix); + if (ctxt->inSubset == 1) + attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, elem, + name, prefix, type, def, defaultValue, tree); + else if (ctxt->inSubset == 2) + attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem, + name, prefix, type, def, defaultValue, tree); + else { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt, + "SAX.attributeDecl(%s) called while not in subset\n", name); + return; + } if (attr == 0) ctxt->valid = 0; if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateAttributeDecl(&ctxt->vctxt, ctxt->myDoc, attr); + if (prefix != NULL) + xmlFree(prefix); + if (name != NULL) + xmlFree(name); } /** @@ -367,16 +439,26 @@ elementDecl(void *ctx, const xmlChar *name, int type, xmlElementContentPtr content) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; - xmlElementPtr elem; + xmlElementPtr elem = NULL; #ifdef DEBUG_SAX fprintf(stderr, "SAX.elementDecl(%s, %d, ...)\n", - name, type); + fullname, type); #endif - elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, + if (ctxt->inSubset == 1) + elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, + name, type, content); + else if (ctxt->inSubset == 2) + elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name, type, content); - if (elem == 0) ctxt->valid = 0; + else { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt, + "SAX.elementDecl(%s) called while not in subset\n", name); + return; + } + if (elem == NULL) ctxt->valid = 0; if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem); @@ -396,15 +478,25 @@ notationDecl(void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; - xmlNotationPtr nota; + xmlNotationPtr nota = NULL; #ifdef DEBUG_SAX fprintf(stderr, "SAX.notationDecl(%s, %s, %s)\n", name, publicId, systemId); #endif - nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, + if (ctxt->inSubset == 1) + nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, publicId, systemId); - if (nota == 0) ctxt->valid = 0; + else if (ctxt->inSubset == 2) + nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, + publicId, systemId); + else { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt, + "SAX.notationDecl(%s) called while not in subset\n", name); + return; + } + if (nota == NULL) ctxt->valid = 0; if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateNotationDecl(&ctxt->vctxt, ctxt->myDoc, @@ -518,6 +610,7 @@ attribute(void *ctx, const xmlChar *fullname, const xmlChar *value) xmlAttrPtr ret; xmlChar *name; xmlChar *ns; + xmlChar *nval; xmlNsPtr namespace; /**************** @@ -528,7 +621,15 @@ attribute(void *ctx, const xmlChar *fullname, const xmlChar *value) /* * Split the full name into a namespace prefix and the tag name */ - name = xmlSplitQName(fullname, &ns); + name = xmlSplitQName(ctxt, fullname, &ns); + + /* + * Do the last stave of the attribute normalization + */ + nval = xmlValidNormalizeAttributeValue(ctxt->myDoc, + ctxt->node, fullname, value); + if (nval != NULL) + value = nval; /* * Check whether it's a namespace definition @@ -540,15 +641,28 @@ attribute(void *ctx, const xmlChar *fullname, const xmlChar *value) xmlNewNs(ctxt->node, value, NULL); if (name != NULL) xmlFree(name); + if (nval != NULL) + xmlFree(nval); return; } if ((ns != NULL) && (ns[0] == 'x') && (ns[1] == 'm') && (ns[2] == 'l') && (ns[3] == 'n') && (ns[4] == 's') && (ns[5] == 0)) { + /* + * Validate also for namespace decls, they are attributes from + * an XML-1.0 perspective + TODO ... doesn't map well with current API + if (ctxt->validate && ctxt->wellFormed && + ctxt->myDoc && ctxt->myDoc->intSubset) + ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, + ctxt->node, ret, value); + */ /* a standard namespace definition */ xmlNewNs(ctxt->node, value, name); xmlFree(ns); if (name != NULL) xmlFree(name); + if (nval != NULL) + xmlFree(nval); return; } @@ -562,17 +676,52 @@ attribute(void *ctx, const xmlChar *fullname, const xmlChar *value) ret = xmlNewNsProp(ctxt->node, namespace, name, NULL); if (ret != NULL) { - if ((ctxt->replaceEntities == 0) && (!ctxt->html)) - ret->val = xmlStringGetNodeList(ctxt->myDoc, value); - else - ret->val = xmlNewDocText(ctxt->myDoc, value); + if ((ctxt->replaceEntities == 0) && (!ctxt->html)) { + xmlNodePtr tmp; + + ret->children = xmlStringGetNodeList(ctxt->myDoc, value); + tmp = ret->children; + while (tmp != NULL) { + tmp->parent = (xmlNodePtr) ret; + if (tmp->next == NULL) + ret->last = tmp; + tmp = tmp->next; + } + } else { + ret->children = xmlNewDocText(ctxt->myDoc, value); + ret->last = ret->children; + if (ret->children != NULL) + ret->children->parent = (xmlNodePtr) ret; + } } if (ctxt->validate && ctxt->wellFormed && - ctxt->myDoc && ctxt->myDoc->intSubset) - ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, + ctxt->myDoc && ctxt->myDoc->intSubset) { + + /* + * If we don't substitute entities, the validation should be + * done on a value with replaced entities anyway. + */ + if (!ctxt->replaceEntities) { + xmlChar *val; + + ctxt->depth++; + val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF, + 0,0,0); + ctxt->depth--; + if (val == NULL) + ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, + ctxt->myDoc, ctxt->node, ret, value); + else { + ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, + ctxt->myDoc, ctxt->node, ret, val); + xmlFree(val); + } + } else { + ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc, ctxt->node, ret, value); - else { + } + } else { /* * when validating, the ID registration is done at the attribute * validation level. Otherwise we have to do specific handling here. @@ -583,6 +732,8 @@ attribute(void *ctx, const xmlChar *fullname, const xmlChar *value) xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret); } + if (nval != NULL) + xmlFree(nval); if (name != NULL) xmlFree(name); if (ns != NULL) @@ -634,7 +785,7 @@ startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) /* * Split the full name into a namespace prefix and the tag name */ - name = xmlSplitQName(fullname, &prefix); + name = xmlSplitQName(ctxt, fullname, &prefix); /* @@ -644,13 +795,13 @@ startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) */ ret = xmlNewDocNode(ctxt->myDoc, NULL, name, NULL); if (ret == NULL) return; - if (ctxt->myDoc->root == NULL) { + if (ctxt->myDoc->children == NULL) { #ifdef DEBUG_SAX_TREE fprintf(stderr, "Setting %s as root\n", name); #endif - ctxt->myDoc->root = ret; + xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); } else if (parent == NULL) { - parent = ctxt->myDoc->root; + parent = ctxt->myDoc->children; } /* @@ -680,6 +831,15 @@ startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) } /* + * If it's the Document root, finish the Dtd validation and + * check the document root element for validity + */ + if ((ctxt->validate) && (ctxt->vctxt.finishDtd == 0)) { + ctxt->valid &= xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc); + ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); + ctxt->vctxt.finishDtd = 1; + } + /* * process all the attributes whose name start with "xml" */ if (atts != NULL) { @@ -790,7 +950,10 @@ reference(void *ctx, const xmlChar *name) #ifdef DEBUG_SAX fprintf(stderr, "SAX.reference(%s)\n", name); #endif - ret = xmlNewReference(ctxt->myDoc, name); + if (name[0] == '#') + ret = xmlNewCharRef(ctxt->myDoc, name); + else + ret = xmlNewReference(ctxt->myDoc, name); #ifdef DEBUG_SAX_TREE fprintf(stderr, "add reference %s to %s \n", name, ctxt->node->name); #endif @@ -884,30 +1047,34 @@ processingInstruction(void *ctx, const xmlChar *target, ret = xmlNewPI(target, data); if (ret == NULL) return; - ret->doc = ctxt->myDoc; - if (ctxt->myDoc->root == NULL) { + parent = ctxt->node; + + if (ctxt->inSubset == 1) { + xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret); + return; + } else if (ctxt->inSubset == 2) { + xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); + return; + } + if ((ctxt->myDoc->children == NULL) || (parent == NULL)) { #ifdef DEBUG_SAX_TREE fprintf(stderr, "Setting PI %s as root\n", target); #endif - ctxt->myDoc->root = ret; - } else if (parent == NULL) { - parent = ctxt->myDoc->root; + xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); + return; } - if (parent != NULL) { - if (parent->type == XML_ELEMENT_NODE) { + if (parent->type == XML_ELEMENT_NODE) { #ifdef DEBUG_SAX_TREE - fprintf(stderr, "adding PI child %s to %s\n", target, parent->name); + fprintf(stderr, "adding PI %s child to %s\n", target, parent->name); #endif - xmlAddChild(parent, ret); - } else { + xmlAddChild(parent, ret); + } else { #ifdef DEBUG_SAX_TREE - fprintf(stderr, "adding PI sibling %s to ", target); - xmlDebugDumpOneNode(stderr, parent, 0); + fprintf(stderr, "adding PI %s sibling to ", target); + xmlDebugDumpOneNode(stderr, parent, 0); #endif - xmlAddSibling(parent, ret); - } + xmlAddSibling(parent, ret); } - } /** @@ -1064,27 +1231,31 @@ comment(void *ctx, const xmlChar *value) ret = xmlNewDocComment(ctxt->myDoc, value); if (ret == NULL) return; - if (ctxt->myDoc->root == NULL) { + if (ctxt->inSubset == 1) { + xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret); + return; + } else if (ctxt->inSubset == 2) { + xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret); + return; + } + if ((ctxt->myDoc->children == NULL) || (parent == NULL)) { #ifdef DEBUG_SAX_TREE fprintf(stderr, "Setting comment as root\n"); #endif - ctxt->myDoc->root = ret; - } else if (parent == NULL) { - parent = ctxt->myDoc->root; + xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret); + return; } - if (parent != NULL) { - if (parent->type == XML_ELEMENT_NODE) { + if (parent->type == XML_ELEMENT_NODE) { #ifdef DEBUG_SAX_TREE - fprintf(stderr, "adding comment child to %s\n", parent->name); + fprintf(stderr, "adding comment child to %s\n", parent->name); #endif - xmlAddChild(parent, ret); - } else { + xmlAddChild(parent, ret); + } else { #ifdef DEBUG_SAX_TREE - fprintf(stderr, "adding comment sibling to "); - xmlDebugDumpOneNode(stderr, parent, 0); + fprintf(stderr, "adding comment sibling to "); + xmlDebugDumpOneNode(stderr, parent, 0); #endif - xmlAddSibling(parent, ret); - } + xmlAddSibling(parent, ret); } } @@ -1148,6 +1319,7 @@ xmlSAXHandler xmlDefaultSAXHandler = { xmlParserError, getParameterEntity, cdataBlock, + externalSubset, }; /** @@ -1159,6 +1331,7 @@ void xmlDefaultSAXHandlerInit(void) { xmlDefaultSAXHandler.internalSubset = internalSubset; + xmlDefaultSAXHandler.externalSubset = externalSubset; xmlDefaultSAXHandler.isStandalone = isStandalone; xmlDefaultSAXHandler.hasInternalSubset = hasInternalSubset; xmlDefaultSAXHandler.hasExternalSubset = hasExternalSubset; @@ -1181,7 +1354,10 @@ xmlDefaultSAXHandlerInit(void) xmlDefaultSAXHandler.ignorableWhitespace = ignorableWhitespace; xmlDefaultSAXHandler.processingInstruction = processingInstruction; xmlDefaultSAXHandler.comment = comment; - xmlDefaultSAXHandler.warning = xmlParserWarning; + if (xmlGetWarningsDefaultValue == 0) + xmlDefaultSAXHandler.warning = NULL; + else + xmlDefaultSAXHandler.warning = xmlParserWarning; xmlDefaultSAXHandler.error = xmlParserError; xmlDefaultSAXHandler.fatalError = xmlParserError; } @@ -1216,6 +1392,7 @@ xmlSAXHandler htmlDefaultSAXHandler = { xmlParserError, getParameterEntity, NULL, + NULL, }; /** @@ -1227,6 +1404,7 @@ void htmlDefaultSAXHandlerInit(void) { htmlDefaultSAXHandler.internalSubset = NULL; + htmlDefaultSAXHandler.externalSubset = NULL; htmlDefaultSAXHandler.isStandalone = NULL; htmlDefaultSAXHandler.hasInternalSubset = NULL; htmlDefaultSAXHandler.hasExternalSubset = NULL; diff --git a/configure.in b/configure.in index d0555070..55d67a9d 100644 --- a/configure.in +++ b/configure.in @@ -3,9 +3,9 @@ AC_PREREQ(2.2) AC_INIT(entities.h) AM_CONFIG_HEADER(config.h) -LIBXML_MAJOR_VERSION=1 -LIBXML_MINOR_VERSION=8 -LIBXML_MICRO_VERSION=7 +LIBXML_MAJOR_VERSION=2 +LIBXML_MINOR_VERSION=0 +LIBXML_MICRO_VERSION=0 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -15,7 +15,7 @@ AC_SUBST(LIBXML_MICRO_VERSION) AC_SUBST(LIBXML_VERSION) AC_SUBST(LIBXML_VERSION_INFO) -VERSION=$LIBXML_VERSION +VERSION=$LIBXML_VERSION-beta AM_INIT_AUTOMAKE(libxml, $VERSION) @@ -22,6 +22,7 @@ #include "xmlmemory.h" #include "tree.h" #include "parser.h" +#include "valid.h" #include "debugXML.h" #include "HTMLtree.h" #include "HTMLparser.h" @@ -38,6 +39,315 @@ void xmlDebugDumpString(FILE *output, const xmlChar *str) { fprintf(output, "..."); } +void xmlDebugDumpDtd(FILE *output, xmlDtdPtr dtd, int depth) { + int i; + char shift[100]; + + for (i = 0;((i < depth) && (i < 25));i++) + shift[2 * i] = shift[2 * i + 1] = ' '; + shift[2 * i] = shift[2 * i + 1] = 0; + + fprintf(output, shift); + + if (dtd->type != XML_DTD_NODE) { + fprintf(output, "PBM: not a DTD\n"); + return; + } + if (dtd->name != NULL) + fprintf(output, "DTD(%s)", dtd->name); + else + fprintf(output, "DTD"); + if (dtd->ExternalID != NULL) + fprintf(output, ", PUBLIC %s", dtd->ExternalID); + if (dtd->SystemID != NULL) + fprintf(output, ", SYSTEM %s", dtd->SystemID); + fprintf(output, "\n"); + /* + * Do a bit of checking + */ + if (dtd->parent == NULL) + fprintf(output, "PBM: Dtd has no parent\n"); + if (dtd->doc == NULL) + fprintf(output, "PBM: Dtd has no doc\n"); + if ((dtd->parent != NULL) && (dtd->doc != dtd->parent->doc)) + fprintf(output, "PBM: Dtd doc differs from parent's one\n"); + if (dtd->prev == NULL) { + if ((dtd->parent != NULL) && (dtd->parent->children != (xmlNodePtr)dtd)) + fprintf(output, "PBM: Dtd has no prev and not first of list\n"); + } else { + if (dtd->prev->next != (xmlNodePtr) dtd) + fprintf(output, "PBM: Dtd prev->next : back link wrong\n"); + } + if (dtd->next == NULL) { + if ((dtd->parent != NULL) && (dtd->parent->last != (xmlNodePtr) dtd)) + fprintf(output, "PBM: Dtd has no next and not last of list\n"); + } else { + if (dtd->next->prev != (xmlNodePtr) dtd) + fprintf(output, "PBM: Dtd next->prev : forward link wrong\n"); + } +} + +void xmlDebugDumpAttrDecl(FILE *output, xmlAttributePtr attr, int depth) { + int i; + char shift[100]; + + for (i = 0;((i < depth) && (i < 25));i++) + shift[2 * i] = shift[2 * i + 1] = ' '; + shift[2 * i] = shift[2 * i + 1] = 0; + + fprintf(output, shift); + + if (attr->type != XML_ATTRIBUTE_DECL) { + fprintf(output, "PBM: not a Attr\n"); + return; + } + if (attr->name != NULL) + fprintf(output, "ATTRDECL(%s)", attr->name); + else + fprintf(output, "PBM ATTRDECL noname!!!"); + if (attr->elem != NULL) + fprintf(output, " for %s", attr->elem); + else + fprintf(output, " PBM noelem!!!"); + switch (attr->atype) { + case XML_ATTRIBUTE_CDATA: + fprintf(output, " CDATA"); + break; + case XML_ATTRIBUTE_ID: + fprintf(output, " ID"); + break; + case XML_ATTRIBUTE_IDREF: + fprintf(output, " IDREF"); + break; + case XML_ATTRIBUTE_IDREFS: + fprintf(output, " IDREFS"); + break; + case XML_ATTRIBUTE_ENTITY: + fprintf(output, " ENTITY"); + break; + case XML_ATTRIBUTE_ENTITIES: + fprintf(output, " ENTITIES"); + break; + case XML_ATTRIBUTE_NMTOKEN: + fprintf(output, " NMTOKEN"); + break; + case XML_ATTRIBUTE_NMTOKENS: + fprintf(output, " NMTOKENS"); + break; + case XML_ATTRIBUTE_ENUMERATION: + fprintf(output, " ENUMERATION"); + break; + case XML_ATTRIBUTE_NOTATION: + fprintf(output, " NOTATION "); + break; + } + if (attr->tree != NULL) { + int i; + xmlEnumerationPtr cur = attr->tree; + + for (i = 0;i < 5; i++) { + if (i != 0) + fprintf(output, "|%s", cur->name); + else + fprintf(output, " (%s", cur->name); + cur = cur->next; + if (cur == NULL) break; + } + if (cur == NULL) + fprintf(output, ")"); + else + fprintf(output, "...)"); + } + switch (attr->def) { + case XML_ATTRIBUTE_NONE: + break; + case XML_ATTRIBUTE_REQUIRED: + fprintf(output, " REQUIRED"); + break; + case XML_ATTRIBUTE_IMPLIED: + fprintf(output, " IMPLIED"); + break; + case XML_ATTRIBUTE_FIXED: + fprintf(output, " FIXED"); + break; + } + if (attr->defaultValue != NULL) { + fprintf(output, "\""); + xmlDebugDumpString(output, attr->defaultValue); + fprintf(output, "\""); + } + printf("\n"); + + /* + * Do a bit of checking + */ + if (attr->parent == NULL) + fprintf(output, "PBM: Attr has no parent\n"); + if (attr->doc == NULL) + fprintf(output, "PBM: Attr has no doc\n"); + if ((attr->parent != NULL) && (attr->doc != attr->parent->doc)) + fprintf(output, "PBM: Attr doc differs from parent's one\n"); + if (attr->prev == NULL) { + if ((attr->parent != NULL) && (attr->parent->children != (xmlNodePtr)attr)) + fprintf(output, "PBM: Attr has no prev and not first of list\n"); + } else { + if (attr->prev->next != (xmlNodePtr) attr) + fprintf(output, "PBM: Attr prev->next : back link wrong\n"); + } + if (attr->next == NULL) { + if ((attr->parent != NULL) && (attr->parent->last != (xmlNodePtr) attr)) + fprintf(output, "PBM: Attr has no next and not last of list\n"); + } else { + if (attr->next->prev != (xmlNodePtr) attr) + fprintf(output, "PBM: Attr next->prev : forward link wrong\n"); + } +} + +void xmlDebugDumpElemDecl(FILE *output, xmlElementPtr elem, int depth) { + int i; + char shift[100]; + + for (i = 0;((i < depth) && (i < 25));i++) + shift[2 * i] = shift[2 * i + 1] = ' '; + shift[2 * i] = shift[2 * i + 1] = 0; + + fprintf(output, shift); + + if (elem->type != XML_ELEMENT_DECL) { + fprintf(output, "PBM: not a Elem\n"); + return; + } + if (elem->name != NULL) + fprintf(output, "ELEMDECL(%s)", elem->name); + else + fprintf(output, "PBM ELEMDECL noname!!!"); + switch (elem->etype) { + case XML_ELEMENT_TYPE_EMPTY: + fprintf(output, ", EMPTY"); + break; + case XML_ELEMENT_TYPE_ANY: + fprintf(output, ", ANY"); + break; + case XML_ELEMENT_TYPE_MIXED: + fprintf(output, ", MIXED "); + break; + case XML_ELEMENT_TYPE_ELEMENT: + fprintf(output, ", MIXED "); + break; + } + if (elem->content != NULL) { + char buf[1001]; + + buf[0] = 0; + xmlSprintfElementContent(buf, elem->content, 1); + buf[1000] = 0; + fprintf(output, "%s", buf); + } + printf("\n"); + + /* + * Do a bit of checking + */ + if (elem->parent == NULL) + fprintf(output, "PBM: Elem has no parent\n"); + if (elem->doc == NULL) + fprintf(output, "PBM: Elem has no doc\n"); + if ((elem->parent != NULL) && (elem->doc != elem->parent->doc)) + fprintf(output, "PBM: Elem doc differs from parent's one\n"); + if (elem->prev == NULL) { + if ((elem->parent != NULL) && (elem->parent->children != (xmlNodePtr)elem)) + fprintf(output, "PBM: Elem has no prev and not first of list\n"); + } else { + if (elem->prev->next != (xmlNodePtr) elem) + fprintf(output, "PBM: Elem prev->next : back link wrong\n"); + } + if (elem->next == NULL) { + if ((elem->parent != NULL) && (elem->parent->last != (xmlNodePtr) elem)) + fprintf(output, "PBM: Elem has no next and not last of list\n"); + } else { + if (elem->next->prev != (xmlNodePtr) elem) + fprintf(output, "PBM: Elem next->prev : forward link wrong\n"); + } +} + +void xmlDebugDumpEntityDecl(FILE *output, xmlEntityPtr ent, int depth) { + int i; + char shift[100]; + + for (i = 0;((i < depth) && (i < 25));i++) + shift[2 * i] = shift[2 * i + 1] = ' '; + shift[2 * i] = shift[2 * i + 1] = 0; + + fprintf(output, shift); + + if (ent->type != XML_ENTITY_DECL) { + fprintf(output, "PBM: not a Entity decl\n"); + return; + } + if (ent->name != NULL) + fprintf(output, "ENTITYDECL(%s)", ent->name); + else + fprintf(output, "PBM ENTITYDECL noname!!!"); + switch (ent->etype) { + case XML_INTERNAL_GENERAL_ENTITY: + fprintf(output, ", internal\n"); + break; + case XML_EXTERNAL_GENERAL_PARSED_ENTITY: + fprintf(output, ", external parsed\n"); + break; + case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: + fprintf(output, ", unparsed\n"); + break; + case XML_INTERNAL_PARAMETER_ENTITY: + fprintf(output, ", parameter\n"); + break; + case XML_EXTERNAL_PARAMETER_ENTITY: + fprintf(output, ", external parameter\n"); + break; + case XML_INTERNAL_PREDEFINED_ENTITY: + fprintf(output, ", predefined\n"); + break; + } + if (ent->ExternalID) { + fprintf(output, shift); + fprintf(output, "ExternalID=%s\n", ent->ExternalID); + } + if (ent->SystemID) { + fprintf(output, shift); + fprintf(output, "SystemID=%s\n", ent->SystemID); + } + if (ent->content) { + fprintf(output, shift); + fprintf(output, "content="); + xmlDebugDumpString(output, ent->content); + fprintf(output, "\n"); + } + + /* + * Do a bit of checking + */ + if (ent->parent == NULL) + fprintf(output, "PBM: Ent has no parent\n"); + if (ent->doc == NULL) + fprintf(output, "PBM: Ent has no doc\n"); + if ((ent->parent != NULL) && (ent->doc != ent->parent->doc)) + fprintf(output, "PBM: Ent doc differs from parent's one\n"); + if (ent->prev == NULL) { + if ((ent->parent != NULL) && (ent->parent->children != (xmlNodePtr)ent)) + fprintf(output, "PBM: Ent has no prev and not first of list\n"); + } else { + if (ent->prev->next != (xmlNodePtr) ent) + fprintf(output, "PBM: Ent prev->next : back link wrong\n"); + } + if (ent->next == NULL) { + if ((ent->parent != NULL) && (ent->parent->last != (xmlNodePtr) ent)) + fprintf(output, "PBM: Ent has no next and not last of list\n"); + } else { + if (ent->next->prev != (xmlNodePtr) ent) + fprintf(output, "PBM: Ent next->prev : forward link wrong\n"); + } +} + void xmlDebugDumpNamespace(FILE *output, xmlNsPtr ns, int depth) { int i; char shift[100]; @@ -74,7 +384,7 @@ void xmlDebugDumpEntity(FILE *output, xmlEntityPtr ent, int depth) { shift[2 * i] = shift[2 * i + 1] = 0; fprintf(output, shift); - switch (ent->type) { + switch (ent->etype) { case XML_INTERNAL_GENERAL_ENTITY: fprintf(output, "INTERNAL_GENERAL_ENTITY "); break; @@ -91,7 +401,7 @@ void xmlDebugDumpEntity(FILE *output, xmlEntityPtr ent, int depth) { fprintf(output, "EXTERNAL_PARAMETER_ENTITY "); break; default: - fprintf(output, "ENTITY_%d ! ", ent->type); + fprintf(output, "ENTITY_%d ! ", ent->etype); } fprintf(output, "%s\n", ent->name); if (ent->ExternalID) { @@ -119,9 +429,31 @@ void xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth) { shift[2 * i] = shift[2 * i + 1] = 0; fprintf(output, shift); + fprintf(output, "ATTRIBUTE %s\n", attr->name); - if (attr->val != NULL) - xmlDebugDumpNodeList(output, attr->val, depth + 1); + if (attr->children != NULL) + xmlDebugDumpNodeList(output, attr->children, depth + 1); + + /* + * Do a bit of checking + */ + if (attr->parent == NULL) + fprintf(output, "PBM: Attr has no parent\n"); + if (attr->doc == NULL) + fprintf(output, "PBM: Attr has no doc\n"); + if ((attr->parent != NULL) && (attr->doc != attr->parent->doc)) + fprintf(output, "PBM: Attr doc differs from parent's one\n"); + if (attr->prev == NULL) { + if ((attr->parent != NULL) && (attr->parent->properties != attr)) + fprintf(output, "PBM: Attr has no prev and not first of list\n"); + } else { + if (attr->prev->next != attr) + fprintf(output, "PBM: Attr prev->next : back link wrong\n"); + } + if (attr->next != NULL) { + if (attr->next->prev != attr) + fprintf(output, "PBM: Attr next->prev : forward link wrong\n"); + } } void xmlDebugDumpAttrList(FILE *output, xmlAttrPtr attr, int depth) { @@ -139,9 +471,9 @@ void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth) { shift[2 * i] = shift[2 * i + 1] = ' '; shift[2 * i] = shift[2 * i + 1] = 0; - fprintf(output, shift); switch (node->type) { case XML_ELEMENT_NODE: + fprintf(output, shift); fprintf(output, "ELEMENT "); if (node->ns != NULL) fprintf(output, "%s:%s\n", node->ns->prefix, node->name); @@ -149,40 +481,63 @@ void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth) { fprintf(output, "%s\n", node->name); break; case XML_ATTRIBUTE_NODE: + fprintf(output, shift); fprintf(output, "Error, ATTRIBUTE found here\n"); break; case XML_TEXT_NODE: + fprintf(output, shift); fprintf(output, "TEXT\n"); break; case XML_CDATA_SECTION_NODE: + fprintf(output, shift); fprintf(output, "CDATA_SECTION\n"); break; case XML_ENTITY_REF_NODE: - fprintf(output, "ENTITY_REF\n"); + fprintf(output, shift); + fprintf(output, "ENTITY_REF(%s)\n", node->name); break; case XML_ENTITY_NODE: + fprintf(output, shift); fprintf(output, "ENTITY\n"); break; case XML_PI_NODE: + fprintf(output, shift); fprintf(output, "PI %s\n", node->name); break; case XML_COMMENT_NODE: + fprintf(output, shift); fprintf(output, "COMMENT\n"); break; case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: + fprintf(output, shift); fprintf(output, "Error, DOCUMENT found here\n"); break; case XML_DOCUMENT_TYPE_NODE: + fprintf(output, shift); fprintf(output, "DOCUMENT_TYPE\n"); break; case XML_DOCUMENT_FRAG_NODE: + fprintf(output, shift); fprintf(output, "DOCUMENT_FRAG\n"); break; case XML_NOTATION_NODE: fprintf(output, "NOTATION\n"); break; + case XML_DTD_NODE: + xmlDebugDumpDtd(output, (xmlDtdPtr) node, depth); + return; + case XML_ELEMENT_DECL: + xmlDebugDumpElemDecl(output, (xmlElementPtr) node, depth); + return; + case XML_ATTRIBUTE_DECL: + xmlDebugDumpAttrDecl(output, (xmlAttributePtr) node, depth); + return; + case XML_ENTITY_DECL: + xmlDebugDumpEntityDecl(output, (xmlEntityPtr) node, depth); + return; default: + fprintf(output, shift); fprintf(output, "NODE_%d\n", node->type); } if (node->doc == NULL) { @@ -210,12 +565,35 @@ void xmlDebugDumpOneNode(FILE *output, xmlNodePtr node, int depth) { if (ent != NULL) xmlDebugDumpEntity(output, ent, depth + 1); } + /* + * Do a bit of checking + */ + if (node->parent == NULL) + fprintf(output, "PBM: Node has no parent\n"); + if (node->doc == NULL) + fprintf(output, "PBM: Node has no doc\n"); + if ((node->parent != NULL) && (node->doc != node->parent->doc)) + fprintf(output, "PBM: Node doc differs from parent's one\n"); + if (node->prev == NULL) { + if ((node->parent != NULL) && (node->parent->children != node)) + fprintf(output, "PBM: Node has no prev and not first of list\n"); + } else { + if (node->prev->next != node) + fprintf(output, "PBM: Node prev->next : back link wrong\n"); + } + if (node->next == NULL) { + if ((node->parent != NULL) && (node->parent->last != node)) + fprintf(output, "PBM: Node has no next and not last of list\n"); + } else { + if (node->next->prev != node) + fprintf(output, "PBM: Node next->prev : forward link wrong\n"); + } } void xmlDebugDumpNode(FILE *output, xmlNodePtr node, int depth) { xmlDebugDumpOneNode(output, node, depth); - if (node->childs != NULL) - xmlDebugDumpNodeList(output, node->childs, depth + 1); + if (node->children != NULL) + xmlDebugDumpNodeList(output, node->children, depth + 1); } void xmlDebugDumpNodeList(FILE *output, xmlNodePtr node, int depth) { @@ -306,8 +684,8 @@ void xmlDebugDumpDocument(FILE *output, xmlDocPtr doc) { xmlDebugDumpDocumentHead(output, doc); if (((doc->type == XML_DOCUMENT_NODE) || (doc->type == XML_HTML_DOCUMENT_NODE)) && - (doc->root != NULL)) - xmlDebugDumpNodeList(output, doc->root, 1); + (doc->children != NULL)) + xmlDebugDumpNodeList(output, doc->children, 1); } void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) { @@ -368,27 +746,27 @@ void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) { doc->intSubset->entities; fprintf(output, "Entities in internal subset\n"); for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; + cur = table->table[i]; fprintf(output, "%d : %s : ", i, cur->name); - switch (cur->type) { + switch (cur->etype) { case XML_INTERNAL_GENERAL_ENTITY: - fprintf(output, "INTERNAL GENERAL"); + fprintf(output, "INTERNAL GENERAL, "); break; case XML_EXTERNAL_GENERAL_PARSED_ENTITY: - fprintf(output, "EXTERNAL PARSED"); + fprintf(output, "EXTERNAL PARSED, "); break; case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: - fprintf(output, "EXTERNAL UNPARSED"); + fprintf(output, "EXTERNAL UNPARSED, "); break; case XML_INTERNAL_PARAMETER_ENTITY: - fprintf(output, "INTERNAL PARAMETER"); + fprintf(output, "INTERNAL PARAMETER, "); break; case XML_EXTERNAL_PARAMETER_ENTITY: - fprintf(output, "EXTERNAL PARAMETER"); + fprintf(output, "EXTERNAL PARAMETER, "); break; default: fprintf(output, "UNKNOWN TYPE %d", - cur->type); + cur->etype); } if (cur->ExternalID != NULL) fprintf(output, "ID \"%s\"", cur->ExternalID); @@ -407,27 +785,27 @@ void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) { doc->extSubset->entities; fprintf(output, "Entities in external subset\n"); for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; + cur = table->table[i]; fprintf(output, "%d : %s : ", i, cur->name); - switch (cur->type) { + switch (cur->etype) { case XML_INTERNAL_GENERAL_ENTITY: - fprintf(output, "INTERNAL GENERAL"); + fprintf(output, "INTERNAL GENERAL, "); break; case XML_EXTERNAL_GENERAL_PARSED_ENTITY: - fprintf(output, "EXTERNAL PARSED"); + fprintf(output, "EXTERNAL PARSED, "); break; case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: - fprintf(output, "EXTERNAL UNPARSED"); + fprintf(output, "EXTERNAL UNPARSED, "); break; case XML_INTERNAL_PARAMETER_ENTITY: - fprintf(output, "INTERNAL PARAMETER"); + fprintf(output, "INTERNAL PARAMETER, "); break; case XML_EXTERNAL_PARAMETER_ENTITY: - fprintf(output, "EXTERNAL PARAMETER"); + fprintf(output, "EXTERNAL PARAMETER, "); break; default: fprintf(output, "UNKNOWN TYPE %d", - cur->type); + cur->etype); } if (cur->ExternalID != NULL) fprintf(output, "ID \"%s\"", cur->ExternalID); @@ -449,14 +827,14 @@ static int xmlLsCountNode(xmlNodePtr node) { switch (node->type) { case XML_ELEMENT_NODE: - list = node->childs; + list = node->children; break; case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: - list = ((xmlDocPtr) node)->root; + list = ((xmlDocPtr) node)->children; break; case XML_ATTRIBUTE_NODE: - list = ((xmlAttrPtr) node)->val; + list = ((xmlAttrPtr) node)->children; break; case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: @@ -475,6 +853,10 @@ static int xmlLsCountNode(xmlNodePtr node) { case XML_ENTITY_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_NOTATION_NODE: + case XML_DTD_NODE: + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: ret = 1; break; } @@ -621,9 +1003,9 @@ xmlShellList(xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node, if ((node->type == XML_DOCUMENT_NODE) || (node->type == XML_HTML_DOCUMENT_NODE)) { - cur = ((xmlDocPtr) node)->root; - } else if (node->childs != NULL) { - cur = node->childs; + cur = ((xmlDocPtr) node)->children; + } else if (node->children != NULL) { + cur = node->children; } else { xmlLsOneNode(stdout, node); return(0); @@ -910,10 +1292,10 @@ xmlShellDu(xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr tree, if ((node->type == XML_DOCUMENT_NODE) || (node->type == XML_HTML_DOCUMENT_NODE)) { - node = ((xmlDocPtr) node)->root; - } else if (node->childs != NULL) { + node = ((xmlDocPtr) node)->children; + } else if (node->children != NULL) { /* deep first */ - node = node->childs; + node = node->children; indent++; } else if ((node != tree) && (node->next != NULL)) { /* then siblings */ @@ -1008,7 +1390,7 @@ xmlShellPwd(xmlShellCtxtPtr ctxt, char *buffer, xmlNodePtr node, } else if (cur->type == XML_ATTRIBUTE_NODE) { sep = '@'; name = (const char *) (((xmlAttrPtr) cur)->name); - next = ((xmlAttrPtr) cur)->node; + next = ((xmlAttrPtr) cur)->parent; } else { next = cur->parent; } @@ -35,14 +35,11 @@ #include <stdlib.h> #endif #include "encoding.h" -#ifdef HAVE_UNICODE_H -#include <unicode.h> -#endif #include "xmlmemory.h" -#ifdef HAVE_UNICODE_H +xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL; +xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL; -#else /* ! HAVE_UNICODE_H */ /* * From rfc2044: encoding of the Unicode values on UTF-8: * @@ -55,6 +52,50 @@ */ /** + * xmlCheckUTF8: Check utf-8 string for legality. + * @utf: Pointer to putative utf-8 encoded string. + * + * Checks @utf for being valid utf-8. @utf is assumed to be + * null-terminated. This function is not super-strict, as it will + * allow longer utf-8 sequences than necessary. Note that Java is + * capable of producing these sequences if provoked. Also note, this + * routine checks for the 4-byte maxiumum size, but does not check for + * 0x10ffff maximum value. + * + * Return value: true if @utf is valid. + **/ +int +xmlCheckUTF8(const unsigned char *utf) +{ + int ix; + unsigned char c; + + for (ix = 0; (c = utf[ix]);) { + if (c & 0x80) { + if ((utf[ix + 1] & 0xc0) != 0x80) + return(0); + if ((c & 0xe0) == 0xe0) { + if ((utf[ix + 2] & 0xc0) != 0x80) + return(0); + if ((c & 0xf0) == 0xf0) { + if ((c & 0xf8) != 0xf0 || (utf[ix + 3] & 0xc0) != 0x80) + return(0); + ix += 4; + /* 4-byte code */ + } else + /* 3-byte code */ + ix += 3; + } else + /* 2-byte code */ + ix += 2; + } else + /* 1-byte code */ + ix++; + } + return(1); +} + +/** * isolat1ToUTF8: * @out: a pointer to an array of bytes to store the result * @outlen: the length of @out @@ -66,27 +107,27 @@ * Returns the number of byte written, or -1 by lack of space. */ int -isolat1ToUTF8(unsigned char* out, int outlen, unsigned char* in, int inlen) -{ +isolat1ToUTF8(unsigned char* out, int outlen, + const unsigned char* in, int *inlen) { unsigned char* outstart= out; unsigned char* outend= out+outlen; - unsigned char* inend= in+inlen; + const unsigned char* inend= in+*inlen; unsigned char c; while (in < inend) { c= *in++; if (c < 0x80) { - if (out >= outend) return -1; + if (out >= outend) return(-1); *out++ = c; } else { - if (out >= outend) return -1; + if (out >= outend) return(-1); *out++ = 0xC0 | (c >> 6); - if (out >= outend) return -1; + if (out >= outend) return(-1); *out++ = 0x80 | (0x3F & c); } } - return out-outstart; + return(out-outstart); } /** @@ -101,138 +142,398 @@ isolat1ToUTF8(unsigned char* out, int outlen, unsigned char* in, int inlen) * TODO: UTF8Toisolat1 need a fallback mechanism ... * * Returns the number of byte written, or -1 by lack of space, or -2 - * if the transcoding failed. + * if the transcoding fails (for *in is not valid utf8 string or + * the result of transformation can't fit into the encoding we want) + * The value of @inlen after return is the number of octets consumed + * as the return value is positive, else unpredictiable. */ int -UTF8Toisolat1(unsigned char* out, int outlen, unsigned char* in, int inlen) -{ +UTF8Toisolat1(unsigned char* out, int outlen, + const unsigned char* in, int *inlen) { unsigned char* outstart= out; unsigned char* outend= out+outlen; - unsigned char* inend= in+inlen; + const unsigned char* inend= in+*inlen; unsigned char c; while (in < inend) { c= *in++; if (c < 0x80) { - if (out >= outend) return -1; + if (out >= outend) return(-1); *out++= c; } - else if (((c & 0xFE) == 0xC2) && in<inend) { - if (out >= outend) return -1; + else if (in == inend) { + *inlen -= 1; + break; + } + else if (((c & 0xFC) == 0xC0) && ((*in & 0xC0) == 0x80)) { + /* a two byte utf-8 and can be encoding as isolate1 */ *out++= ((c & 0x03) << 6) | (*in++ & 0x3F); - } - else return -2; + } + else + return(-2); + /* TODO : some should be represent as "&#x____;" */ } - return out-outstart; + return(out-outstart); } /** - * UTF16ToUTF8: + * UTF16LEToUTF8: * @out: a pointer to an array of bytes to store the result * @outlen: the length of @out - * @in: a pointer to an array of UTF-16 chars (array of unsigned shorts) - * @inlen: the length of @in + * @inb: a pointer to an array of UTF-16LE passwd as a byte array + * @inlenb: the length of @in in UTF-16LE chars * - * Take a block of UTF-16 ushorts in and try to convert it to an UTF-8 - * block of chars out. - * Returns the number of byte written, or -1 by lack of space. + * Take a block of UTF-16LE ushorts in and try to convert it to an UTF-8 + * block of chars out. This function assume the endian properity + * is the same between the native type of this machine and the + * inputed one. + * + * Returns the number of byte written, or -1 by lack of space, or -2 + * if the transcoding fails (for *in is not valid utf16 string) + * The value of *inlen after return is the number of octets consumed + * as the return value is positive, else unpredictiable. */ int -UTF16ToUTF8(unsigned char* out, int outlen, unsigned short* in, int inlen) +UTF16LEToUTF8(unsigned char* out, int outlen, + const unsigned char* inb, int *inlenb) { unsigned char* outstart= out; unsigned char* outend= out+outlen; - unsigned short* inend= in+inlen; - unsigned int c, d; + unsigned short* in = (unsigned short*) inb; + unsigned short* inend; + unsigned int c, d, inlen; + unsigned char *tmp; int bits; + if ((*inlenb % 2) == 1) + (*inlenb)--; + inlen = *inlenb / 2; + inend= in + inlen; while (in < inend) { +#ifdef BIG_ENDIAN + tmp = (unsigned char *) in; + c = *tmp++; + c = c | (((unsigned int)*tmp) << 8); + in++; +#else /* BIG_ENDIAN */ c= *in++; +#endif /* BIG_ENDIAN */ if ((c & 0xFC00) == 0xD800) { /* surrogates */ - if ((in<inend) && (((d=*in++) & 0xFC00) == 0xDC00)) { + if (in >= inend) { /* (in > inend) shouldn't happens */ + (*inlenb) -= 2; + break; + } +#ifdef BIG_ENDIAN + tmp = (unsigned char *) in; + d = *tmp++; + d = d | (((unsigned int)*tmp) << 8); + in++; +#else /* BIG_ENDIAN */ + d = *in++; +#endif /* BIG_ENDIAN */ + if ((d & 0xFC00) == 0xDC00) { c &= 0x03FF; c <<= 10; c |= d & 0x03FF; c += 0x10000; } - else return -1; + else + return(-2); + } + + /* assertion: c is a single UTF-4 value */ + if (out >= outend) + return(-1); + if (c < 0x80) { *out++= c; bits= -6; } + else if (c < 0x800) { *out++= ((c >> 6) & 0x1F) | 0xC0; bits= 0; } + else if (c < 0x10000) { *out++= ((c >> 12) & 0x0F) | 0xE0; bits= 6; } + else { *out++= ((c >> 18) & 0x07) | 0xF0; bits= 12; } + + for ( ; bits >= 0; bits-= 6) { + if (out >= outend) + return(-1); + *out++= ((c >> bits) & 0x3F) | 0x80; } + } + return(out-outstart); +} + +/** + * UTF8ToUTF16LE: + * @outb: a pointer to an array of bytes to store the result + * @outlen: the length of @outb + * @in: a pointer to an array of UTF-8 chars + * @inlen: the length of @in + * + * Take a block of UTF-8 chars in and try to convert it to an UTF-16LE + * block of chars out. + * TODO: UTF8ToUTF16LE need a fallback mechanism ... + * + * Returns the number of byte written, or -1 by lack of space, or -2 + * if the transcoding failed. + */ +int +UTF8ToUTF16LE(unsigned char* outb, int outlen, + const unsigned char* in, int *inlen) +{ + unsigned short* out = (unsigned short*) outb; + unsigned short* outstart= out; + unsigned short* outend; + const unsigned char* inend= in+*inlen; + unsigned int c, d, trailing; +#ifdef BIG_ENDIAN + unsigned char *tmp; + unsigned short tmp1, tmp2; +#endif /* BIG_ENDIAN */ + + outlen /= 2; /* convert in short length */ + outend = out + outlen; + while (in < inend) { + d= *in++; + if (d < 0x80) { c= d; trailing= 0; } + else if (d < 0xC0) + return(-2); /* trailing byte in leading position */ + else if (d < 0xE0) { c= d & 0x1F; trailing= 1; } + else if (d < 0xF0) { c= d & 0x0F; trailing= 2; } + else if (d < 0xF8) { c= d & 0x07; trailing= 3; } + else + return(-2); /* no chance for this in UTF-16 */ + + if (inend - in < trailing) { + *inlen -= (inend - in); + break; + } + + for ( ; trailing; trailing--) { + if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) + return(-1); + c <<= 6; + c |= d & 0x3F; + } /* assertion: c is a single UTF-4 value */ + if (c < 0x10000) { + if (out >= outend) + return(-1); +#ifdef BIG_ENDIAN + tmp = (unsigned char *) out; + *tmp = c ; + *(tmp + 1) = c >> 8 ; + out++; +#else /* BIG_ENDIAN */ + *out++ = c; +#endif /* BIG_ENDIAN */ + } + else if (c < 0x110000) { + if (out+1 >= outend) + return(-1); + c -= 0x10000; +#ifdef BIG_ENDIAN + tmp1 = 0xD800 | (c >> 10); + tmp = (unsigned char *) out; + *tmp = tmp1; + *(tmp + 1) = tmp1 >> 8; + out++; + + tmp2 = 0xDC00 | (c & 0x03FF); + tmp = (unsigned char *) out; + *tmp = tmp2; + *(tmp + 1) = tmp2 >> 8; + out++; +#else /* BIG_ENDIAN */ + *out++ = 0xD800 | (c >> 10); + *out++ = 0xDC00 | (c & 0x03FF); +#endif /* BIG_ENDIAN */ + } + else + return(-1); + } + return(out-outstart); +} - if (out >= outend) return -1; +/** + * UTF16BEToUTF8: + * @out: a pointer to an array of bytes to store the result + * @outlen: the length of @out + * @inb: a pointer to an array of UTF-16 passwd as a byte array + * @inlenb: the length of @in in UTF-16 chars + * + * Take a block of UTF-16 ushorts in and try to convert it to an UTF-8 + * block of chars out. This function assume the endian properity + * is the same between the native type of this machine and the + * inputed one. + * + * Returns the number of byte written, or -1 by lack of space, or -2 + * if the transcoding fails (for *in is not valid utf16 string) + * The value of *inlen after return is the number of octets consumed + * as the return value is positive, else unpredictiable. + */ +int +UTF16BEToUTF8(unsigned char* out, int outlen, + const unsigned char* inb, int *inlenb) +{ + unsigned char* outstart= out; + unsigned char* outend= out+outlen; + unsigned short* in = (unsigned short*) inb; + unsigned short* inend; + unsigned int c, d, inlen; +#ifdef BIG_ENDIAN +#else /* BIG_ENDIAN */ + unsigned char *tmp; +#endif /* BIG_ENDIAN */ + int bits; + + if ((*inlenb % 2) == 1) + (*inlenb)--; + inlen = *inlenb / 2; + inend= in + inlen; + while (in < inend) { +#ifdef BIG_ENDIAN + c= *in++; +#else + tmp = (unsigned char *) in; + c = *tmp++; + c = c << 8; + c = c | (unsigned int) *tmp; + in++; +#endif + if ((c & 0xFC00) == 0xD800) { /* surrogates */ + if (in >= inend) { /* (in > inend) shouldn't happens */ + (*inlenb) -= 2; + break; + } + +#ifdef BIG_ENDIAN + d= *in++; +#else + tmp = (unsigned char *) in; + d = *tmp++; + d = d << 8; + d = d | (unsigned int) *tmp; + in++; +#endif + if ((d & 0xFC00) == 0xDC00) { + c &= 0x03FF; + c <<= 10; + c |= d & 0x03FF; + c += 0x10000; + } + else + return(-2); + } + + /* assertion: c is a single UTF-4 value */ + if (out >= outend) + return(-1); if (c < 0x80) { *out++= c; bits= -6; } - else if (c < 0x800) { *out++= (c >> 6) | 0xC0; bits= 0; } - else if (c < 0x10000) { *out++= (c >> 12) | 0xE0; bits= 6; } - else { *out++= (c >> 18) | 0xF0; bits= 12; } + else if (c < 0x800) { *out++= ((c >> 6) & 0x1F) | 0xC0; bits= 0; } + else if (c < 0x10000) { *out++= ((c >> 12) & 0x0F) | 0xE0; bits= 6; } + else { *out++= ((c >> 18) & 0x07) | 0xF0; bits= 12; } - for ( ; bits > 0; bits-= 6) { - if (out >= outend) return -1; - *out++= (c >> bits) & 0x3F; + for ( ; bits >= 0; bits-= 6) { + if (out >= outend) + return(-1); + *out++= ((c >> bits) & 0x3F) | 0x80; } } - return out-outstart; + return(out-outstart); } /** - * UTF8ToUTF16: - * @out: a pointer to an array of shorts to store the result - * @outlen: the length of @out (number of shorts) + * UTF8ToUTF16BE: + * @outb: a pointer to an array of bytes to store the result + * @outlen: the length of @outb * @in: a pointer to an array of UTF-8 chars * @inlen: the length of @in * - * Take a block of UTF-8 chars in and try to convert it to an UTF-16 + * Take a block of UTF-8 chars in and try to convert it to an UTF-16BE * block of chars out. - * TODO: UTF8ToUTF16 need a fallback mechanism ... + * TODO: UTF8ToUTF16BE need a fallback mechanism ... * * Returns the number of byte written, or -1 by lack of space, or -2 - * if the transcoding failed. + * if the transcoding failed. */ int -UTF8ToUTF16(unsigned short* out, int outlen, unsigned char* in, int inlen) +UTF8ToUTF16BE(unsigned char* outb, int outlen, + const unsigned char* in, int *inlen) { + unsigned short* out = (unsigned short*) outb; unsigned short* outstart= out; - unsigned short* outend= out+outlen; - unsigned char* inend= in+inlen; + unsigned short* outend; + const unsigned char* inend= in+*inlen; unsigned int c, d, trailing; +#ifdef BIG_ENDIAN +#else + unsigned char *tmp; + unsigned short tmp1, tmp2; +#endif /* BIG_ENDIAN */ + outlen /= 2; /* convert in short length */ + outend = out + outlen; while (in < inend) { d= *in++; if (d < 0x80) { c= d; trailing= 0; } - else if (d < 0xC0) return -2; /* trailing byte in leading position */ + else if (d < 0xC0) + return(-2); /* trailing byte in leading position */ else if (d < 0xE0) { c= d & 0x1F; trailing= 1; } else if (d < 0xF0) { c= d & 0x0F; trailing= 2; } else if (d < 0xF8) { c= d & 0x07; trailing= 3; } - else return -2; /* no chance for this in UTF-16 */ + else + return(-2); /* no chance for this in UTF-16 */ + + if (inend - in < trailing) { + *inlen -= (inend - in); + break; + } for ( ; trailing; trailing--) { - if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) return -1; + if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) return(-1); c <<= 6; c |= d & 0x3F; } /* assertion: c is a single UTF-4 value */ if (c < 0x10000) { - if (out >= outend) return -1; + if (out >= outend) return(-1); +#ifdef BIG_ENDIAN *out++ = c; +#else + tmp = (unsigned char *) out; + *tmp = c >> 8; + *(tmp + 1) = c; + out++; +#endif /* BIG_ENDIAN */ } else if (c < 0x110000) { - if (out+1 >= outend) return -1; + if (out+1 >= outend) return(-1); c -= 0x10000; +#ifdef BIG_ENDIAN *out++ = 0xD800 | (c >> 10); *out++ = 0xDC00 | (c & 0x03FF); +#else + tmp1 = 0xD800 | (c >> 10); + tmp = (unsigned char *) out; + *tmp = tmp1 >> 8; + *(tmp + 1) = tmp1; + out++; + + tmp2 = 0xDC00 | (c & 0x03FF); + tmp = (unsigned char *) out; + *tmp = tmp2 >> 8; + *(tmp + 1) = tmp2; + out++; +#endif } - else return -1; + else return(-1); } - return out-outstart; + return(out-outstart); } -#endif /* ! HAVE_UNICODE_H */ - /** * xmlDetectCharEncoding: * @in: a pointer to the first bytes of the XML entity, must be at least * 4 bytes long. + * @len: pointer to the length of the buffer * * Guess the encoding of the entity using the first bytes of the entity content * accordingly of the non-normative appendix F of the XML-1.0 recommendation. @@ -240,30 +541,34 @@ UTF8ToUTF16(unsigned short* out, int outlen, unsigned char* in, int inlen) * Returns one of the XML_CHAR_ENCODING_... values. */ xmlCharEncoding -xmlDetectCharEncoding(const unsigned char* in) +xmlDetectCharEncoding(const unsigned char* in, int len) { - if ((in[0] == 0x00) && (in[1] == 0x00) && - (in[2] == 0x00) && (in[3] == 0x3C)) - return(XML_CHAR_ENCODING_UCS4BE); - if ((in[0] == 0x3C) && (in[1] == 0x00) && - (in[2] == 0x00) && (in[3] == 0x00)) - return(XML_CHAR_ENCODING_UCS4LE); - if ((in[0] == 0x00) && (in[1] == 0x00) && - (in[2] == 0x3C) && (in[3] == 0x00)) - return(XML_CHAR_ENCODING_UCS4_2143); - if ((in[0] == 0x00) && (in[1] == 0x3C) && - (in[2] == 0x00) && (in[3] == 0x00)) - return(XML_CHAR_ENCODING_UCS4_3412); - if ((in[0] == 0xFE) && (in[1] == 0xFF)) - return(XML_CHAR_ENCODING_UTF16BE); - if ((in[0] == 0xFF) && (in[1] == 0xFE)) - return(XML_CHAR_ENCODING_UTF16LE); - if ((in[0] == 0x4C) && (in[1] == 0x6F) && - (in[2] == 0xA7) && (in[3] == 0x94)) - return(XML_CHAR_ENCODING_EBCDIC); - if ((in[0] == 0x3C) && (in[1] == 0x3F) && - (in[2] == 0x78) && (in[3] == 0x6D)) - return(XML_CHAR_ENCODING_UTF8); + if (len >= 4) { + if ((in[0] == 0x00) && (in[1] == 0x00) && + (in[2] == 0x00) && (in[3] == 0x3C)) + return(XML_CHAR_ENCODING_UCS4BE); + if ((in[0] == 0x3C) && (in[1] == 0x00) && + (in[2] == 0x00) && (in[3] == 0x00)) + return(XML_CHAR_ENCODING_UCS4LE); + if ((in[0] == 0x00) && (in[1] == 0x00) && + (in[2] == 0x3C) && (in[3] == 0x00)) + return(XML_CHAR_ENCODING_UCS4_2143); + if ((in[0] == 0x00) && (in[1] == 0x3C) && + (in[2] == 0x00) && (in[3] == 0x00)) + return(XML_CHAR_ENCODING_UCS4_3412); + if ((in[0] == 0x4C) && (in[1] == 0x6F) && + (in[2] == 0xA7) && (in[3] == 0x94)) + return(XML_CHAR_ENCODING_EBCDIC); + if ((in[0] == 0x3C) && (in[1] == 0x3F) && + (in[2] == 0x78) && (in[3] == 0x6D)) + return(XML_CHAR_ENCODING_UTF8); + } + if (len >= 2) { + if ((in[0] == 0xFE) && (in[1] == 0xFF)) + return(XML_CHAR_ENCODING_UTF16BE); + if ((in[0] == 0xFF) && (in[1] == 0xFE)) + return(XML_CHAR_ENCODING_UTF16LE); + } return(XML_CHAR_ENCODING_NONE); } @@ -364,7 +669,8 @@ static xmlCharEncodingHandlerPtr xmlDefaultCharEncodingHandler = NULL; * Returns the xmlCharEncodingHandlerPtr created (or NULL in case of error). */ xmlCharEncodingHandlerPtr -xmlNewCharEncodingHandler(const char *name, xmlCharEncodingInputFunc input, +xmlNewCharEncodingHandler(const char *name, + xmlCharEncodingInputFunc input, xmlCharEncodingOutputFunc output) { xmlCharEncodingHandlerPtr handler; char upper[500]; @@ -429,11 +735,11 @@ xmlInitCharEncodingHandlers(void) { return; } xmlNewCharEncodingHandler("UTF-8", NULL, NULL); -#ifdef HAVE_UNICODE_H -#else - /* xmlNewCharEncodingHandler("UTF-16", UTF16ToUTF8, UTF8ToUTF16); */ + xmlUTF16LEHandler = + xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, UTF8ToUTF16LE); + xmlUTF16BEHandler = + xmlNewCharEncodingHandler("UTF-16BE", UTF16BEToUTF8, UTF8ToUTF16BE); xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, UTF8Toisolat1); -#endif } /** @@ -493,7 +799,52 @@ xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) { xmlCharEncodingHandlerPtr xmlGetCharEncodingHandler(xmlCharEncoding enc) { if (handlers == NULL) xmlInitCharEncodingHandlers(); - /* TODO xmlGetCharEncodingHandler !!!!!!! */ + switch (enc) { + case XML_CHAR_ENCODING_ERROR: + return(NULL); + case XML_CHAR_ENCODING_NONE: + return(NULL); + case XML_CHAR_ENCODING_UTF8: + return(NULL); + case XML_CHAR_ENCODING_UTF16LE: + return(xmlUTF16LEHandler); + case XML_CHAR_ENCODING_UTF16BE: + return(xmlUTF16BEHandler); + case XML_CHAR_ENCODING_EBCDIC: + return(NULL); + case XML_CHAR_ENCODING_UCS4LE: + return(NULL); + case XML_CHAR_ENCODING_UCS4BE: + return(NULL); + case XML_CHAR_ENCODING_UCS4_2143: + return(NULL); + case XML_CHAR_ENCODING_UCS4_3412: + return(NULL); + case XML_CHAR_ENCODING_UCS2: + return(NULL); + case XML_CHAR_ENCODING_8859_1: + return(NULL); + case XML_CHAR_ENCODING_8859_2: + return(NULL); + case XML_CHAR_ENCODING_8859_3: + return(NULL); + case XML_CHAR_ENCODING_8859_4: + return(NULL); + case XML_CHAR_ENCODING_8859_5: + return(NULL); + case XML_CHAR_ENCODING_8859_6: + return(NULL); + case XML_CHAR_ENCODING_8859_7: + return(NULL); + case XML_CHAR_ENCODING_8859_8: + return(NULL); + case XML_CHAR_ENCODING_8859_9: + return(NULL); + case XML_CHAR_ENCODING_2022_JP: + case XML_CHAR_ENCODING_SHIFT_JIS: + case XML_CHAR_ENCODING_EUC_JP: + return(NULL); + } return(NULL); } @@ -67,11 +67,11 @@ typedef enum { * Returns the number of byte written, or -1 by lack of space. */ typedef int (* xmlCharEncodingInputFunc)(unsigned char* out, int outlen, - unsigned char* in, int inlen); + const unsigned char* in, int *inlen); /** - * xmlCharEncodingInputFunc: + * xmlCharEncodingOutputFunc: * @out: a pointer ot an array of bytes to store the result * @outlen: the lenght of @out * @in: a pointer ot an array of UTF-8 chars @@ -84,7 +84,7 @@ typedef int (* xmlCharEncodingInputFunc)(unsigned char* out, int outlen, * if the transcoding failed. */ typedef int (* xmlCharEncodingOutputFunc)(unsigned char* out, int outlen, - unsigned char* in, int inlen); + const unsigned char* in, int *inlen); /* * Block defining the handlers for non UTF-8 encodings. @@ -101,10 +101,12 @@ struct _xmlCharEncodingHandler { void xmlInitCharEncodingHandlers (void); void xmlCleanupCharEncodingHandlers (void); void xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); -xmlCharEncoding xmlDetectCharEncoding (const unsigned char* in); +xmlCharEncoding xmlDetectCharEncoding (const unsigned char* in, + int len); xmlCharEncoding xmlParseCharEncoding (const char* name); xmlCharEncodingHandlerPtr xmlGetCharEncodingHandler(xmlCharEncoding enc); xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler(const char *name); +int xmlCheckUTF8 (const unsigned char *utf); #ifdef __cplusplus @@ -21,6 +21,8 @@ #include "entities.h" #include "parser.h" +#define DEBUG_ENT_REF /* debugging of cross entities dependancies */ + /* * The XML predefined entities. */ @@ -45,6 +47,8 @@ xmlEntitiesTablePtr xmlPredefinedEntities = NULL; void xmlFreeEntity(xmlEntityPtr entity) { if (entity == NULL) return; + if (entity->children) + xmlFreeNodeList(entity->children); if (entity->name != NULL) xmlFree((char *) entity->name); if (entity->ExternalID != NULL) @@ -55,22 +59,31 @@ void xmlFreeEntity(xmlEntityPtr entity) { xmlFree((char *) entity->content); if (entity->orig != NULL) xmlFree((char *) entity->orig); +#ifdef WITH_EXTRA_ENT_DETECT + if (entity->entTab != NULL) { + int i; + + for (i = 0; i < entity->entNr; i++) + xmlFree(entity->entTab[i]); + xmlFree(entity->entTab); + } +#endif memset(entity, -1, sizeof(xmlEntity)); + xmlFree(entity); } /* * xmlAddEntity : register a new entity for an entities table. */ -static void +static xmlEntityPtr xmlAddEntity(xmlEntitiesTablePtr table, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) { int i; - xmlEntityPtr cur; - int len; + xmlEntityPtr ret; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - if (!xmlStrcmp(cur->name, name)) { + ret = table->table[i]; + if (!xmlStrcmp(ret->name, name)) { /* * The entity is already defined in this Dtd, the spec says to NOT * override it ... Is it worth a Warning ??? !!! @@ -78,15 +91,15 @@ xmlAddEntity(xmlEntitiesTablePtr table, const xmlChar *name, int type, */ if (((type == XML_INTERNAL_PARAMETER_ENTITY) || (type == XML_EXTERNAL_PARAMETER_ENTITY)) && - ((cur->type == XML_INTERNAL_PARAMETER_ENTITY) || - (cur->type == XML_EXTERNAL_PARAMETER_ENTITY))) - return; + ((ret->etype == XML_INTERNAL_PARAMETER_ENTITY) || + (ret->etype == XML_EXTERNAL_PARAMETER_ENTITY))) + return(NULL); else if (((type != XML_INTERNAL_PARAMETER_ENTITY) && (type != XML_EXTERNAL_PARAMETER_ENTITY)) && - ((cur->type != XML_INTERNAL_PARAMETER_ENTITY) && - (cur->type != XML_EXTERNAL_PARAMETER_ENTITY))) - return; + ((ret->etype != XML_INTERNAL_PARAMETER_ENTITY) && + (ret->etype != XML_EXTERNAL_PARAMETER_ENTITY))) + return(NULL); } } if (table->nb_entities >= table->max_entities) { @@ -94,35 +107,43 @@ xmlAddEntity(xmlEntitiesTablePtr table, const xmlChar *name, int type, * need more elements. */ table->max_entities *= 2; - table->table = (xmlEntityPtr) - xmlRealloc(table->table, table->max_entities * sizeof(xmlEntity)); + table->table = (xmlEntityPtr *) + xmlRealloc(table->table, + table->max_entities * sizeof(xmlEntityPtr)); if (table->table == NULL) { perror("realloc failed"); - return; + return(NULL); } } - cur = &table->table[table->nb_entities]; - cur->name = xmlStrdup(name); - for (len = 0;name[0] != 0;name++)len++; - cur->len = len; - cur->type = type; + ret = (xmlEntityPtr) xmlMalloc(sizeof(xmlEntity)); + if (ret == NULL) { + fprintf(stderr, "xmlAddEntity: out of memory\n"); + return(NULL); + } + memset(ret, 0, sizeof(xmlEntity)); + ret->type = XML_ENTITY_DECL; + table->table[table->nb_entities] = ret; + + /* + * fill the structure. + */ + ret->name = xmlStrdup(name); + ret->etype = type; if (ExternalID != NULL) - cur->ExternalID = xmlStrdup(ExternalID); - else - cur->ExternalID = NULL; + ret->ExternalID = xmlStrdup(ExternalID); if (SystemID != NULL) - cur->SystemID = xmlStrdup(SystemID); - else - cur->SystemID = NULL; + ret->SystemID = xmlStrdup(SystemID); if (content != NULL) { - cur->length = xmlStrlen(content); - cur->content = xmlStrndup(content, cur->length); + ret->length = xmlStrlen(content); + ret->content = xmlStrndup(content, ret->length); } else { - cur->length = 0; - cur->content = NULL; + ret->length = 0; + ret->content = NULL; } - cur->orig = NULL; + ret->orig = NULL; table->nb_entities++; + + return(ret); } /** @@ -182,7 +203,7 @@ xmlGetPredefinedEntity(const xmlChar *name) { if (xmlPredefinedEntities == NULL) xmlInitializePredefinedEntities(); for (i = 0;i < xmlPredefinedEntities->nb_entities;i++) { - cur = &xmlPredefinedEntities->table[i]; + cur = xmlPredefinedEntities->table[i]; if (!xmlStrcmp(cur->name, name)) return(cur); } return(NULL); @@ -197,24 +218,50 @@ xmlGetPredefinedEntity(const xmlChar *name) { * @SystemID: the entity system ID if available * @content: the entity content * - * Register a new entity for this document DTD. + * Register a new entity for this document DTD external subset. + * + * Returns a pointer to the entity or NULL in case of error */ -void +xmlEntityPtr xmlAddDtdEntity(xmlDocPtr doc, const xmlChar *name, int type, - const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) { + const xmlChar *ExternalID, const xmlChar *SystemID, + const xmlChar *content) { xmlEntitiesTablePtr table; + xmlEntityPtr ret; + xmlDtdPtr dtd; + if (doc == NULL) { + fprintf(stderr, + "xmlAddDtdEntity: doc == NULL !\n"); + return(NULL); + } if (doc->extSubset == NULL) { fprintf(stderr, "xmlAddDtdEntity: document without external subset !\n"); - return; + return(NULL); } - table = (xmlEntitiesTablePtr) doc->extSubset->entities; + dtd = doc->extSubset; + table = (xmlEntitiesTablePtr) dtd->entities; if (table == NULL) { table = xmlCreateEntitiesTable(); - doc->extSubset->entities = table; + dtd->entities = table; + } + ret = xmlAddEntity(table, name, type, ExternalID, SystemID, content); + if (ret == NULL) return(NULL); + + /* + * Link it to the Dtd + */ + ret->parent = dtd; + ret->doc = dtd->doc; + if (dtd->last == NULL) { + dtd->children = dtd->last = (xmlNodePtr) ret; + } else { + dtd->last->next = (xmlNodePtr) ret; + ret->prev = dtd->last; + dtd->last = (xmlNodePtr) ret; } - xmlAddEntity(table, name, type, ExternalID, SystemID, content); + return(ret); } /** @@ -227,31 +274,188 @@ xmlAddDtdEntity(xmlDocPtr doc, const xmlChar *name, int type, * @content: the entity content * * Register a new entity for this document. + * + * Returns a pointer to the entity or NULL in case of error */ -void +xmlEntityPtr xmlAddDocEntity(xmlDocPtr doc, const xmlChar *name, int type, - const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content) { + const xmlChar *ExternalID, const xmlChar *SystemID, + const xmlChar *content) { xmlEntitiesTablePtr table; + xmlEntityPtr ret; + xmlDtdPtr dtd; if (doc == NULL) { fprintf(stderr, "xmlAddDocEntity: document is NULL !\n"); - return; + return(NULL); } if (doc->intSubset == NULL) { fprintf(stderr, "xmlAddDtdEntity: document without internal subset !\n"); - return; + return(NULL); } + dtd = doc->intSubset; table = (xmlEntitiesTablePtr) doc->intSubset->entities; if (table == NULL) { table = xmlCreateEntitiesTable(); doc->intSubset->entities = table; } - xmlAddEntity(table, name, type, ExternalID, SystemID, content); + ret = xmlAddEntity(table, name, type, ExternalID, SystemID, content); + if (ret == NULL) return(NULL); + + /* + * Link it to the Dtd + */ + ret->parent = dtd; + ret->doc = dtd->doc; + if (dtd->last == NULL) { + dtd->children = dtd->last = (xmlNodePtr) ret; + } else { + dtd->last->next = (xmlNodePtr) ret; + ret->prev = dtd->last; + dtd->last = (xmlNodePtr) ret; + } + return(ret); +} + +#ifdef WITH_EXTRA_ENT_DETECT +/** + * xmlEntityCheckReference: + * @ent: an existing entity + * @to: the entity name it's referencing + * + * Function to keep track of references and detect cycles (well formedness + * errors !). + * + * Returns: 0 if Okay, -1 in case of general error, 1 in case of loop + * detection. + */ +int +xmlEntityCheckReference(xmlEntityPtr ent, const xmlChar *to) { + int i; + xmlDocPtr doc; + + if (ent == NULL) return(-1); + if (to == NULL) return(-1); + + doc = ent->doc; + if (doc == NULL) return(-1); + +#ifdef DEBUG_ENT_REF + printf("xmlEntityCheckReference(%s to %s)\n", ent->name, to); +#endif + + + /* + * Do a recursive checking + */ + for (i = 0;i < ent->entNr;i++) { + xmlEntityPtr indir = NULL; + + if (!xmlStrcmp(to, ent->entTab[i])) + return(1); + + switch (ent->etype) { + case XML_INTERNAL_GENERAL_ENTITY: + case XML_EXTERNAL_GENERAL_PARSED_ENTITY: + indir = xmlGetDocEntity(doc, ent->entTab[i]); + break; + case XML_INTERNAL_PARAMETER_ENTITY: + case XML_EXTERNAL_PARAMETER_ENTITY: + indir = xmlGetDtdEntity(doc, ent->entTab[i]); + break; + case XML_INTERNAL_PREDEFINED_ENTITY: + case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: + break; + } + if (xmlEntityCheckReference(indir, to) == 1) + return(1); + } + return(0); } /** + * xmlEntityAddReference: + * @ent: an existing entity + * @to: the entity name it's referencing + * + * Function to register reuse of an existing entity from a (new) one + * Used to keep track of references and detect cycles (well formedness + * errors !). + * + * Returns: 0 if Okay, -1 in case of general error, 1 in case of loop + * detection. + */ +int +xmlEntityAddReference(xmlEntityPtr ent, const xmlChar *to) { + int i; + xmlDocPtr doc; + xmlEntityPtr indir = NULL; + + if (ent == NULL) return(-1); + if (to == NULL) return(-1); + + doc = ent->doc; + if (doc == NULL) return(-1); + +#ifdef DEBUG_ENT_REF + printf("xmlEntityAddReference(%s to %s)\n", ent->name, to); +#endif + if (ent->entTab == NULL) { + ent->entNr = 0; + ent->entMax = 5; + ent->entTab = (xmlChar **) xmlMalloc(ent->entMax * sizeof(xmlChar *)); + if (ent->entTab == NULL) { + fprintf(stderr, "xmlEntityAddReference: out of memory !\n"); + return(-1); + } + } + + for (i = 0;i < ent->entNr;i++) { + if (!xmlStrcmp(to, ent->entTab[i])) + return(0); + } + + /* + * Do a recursive checking + */ + + switch (ent->etype) { + case XML_INTERNAL_GENERAL_ENTITY: + case XML_EXTERNAL_GENERAL_PARSED_ENTITY: + indir = xmlGetDocEntity(doc, to); + break; + case XML_INTERNAL_PARAMETER_ENTITY: + case XML_EXTERNAL_PARAMETER_ENTITY: + indir = xmlGetDtdEntity(doc, to); + break; + case XML_INTERNAL_PREDEFINED_ENTITY: + case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: + break; + } + if ((indir != NULL) && + (xmlEntityCheckReference(indir, ent->name) == 1)) + return(1); + + /* + * Add this to the list + */ + if (ent->entMax <= ent->entNr) { + ent->entMax *= 2; + ent->entTab = (xmlChar **) xmlRealloc(ent->entTab, + ent->entMax * sizeof(xmlChar *)); + if (ent->entTab == NULL) { + fprintf(stderr, "xmlEntityAddReference: out of memory !\n"); + return(-1); + } + } + ent->entTab[ent->entNr++] = xmlStrdup(to); + return(0); +} +#endif + +/** * xmlGetParameterEntity: * @doc: the document referencing the entity * @name: the entity name @@ -270,27 +474,27 @@ xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) { if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) { table = (xmlEntitiesTablePtr) doc->intSubset->entities; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - if (((cur->type == XML_INTERNAL_PARAMETER_ENTITY) || - (cur->type == XML_EXTERNAL_PARAMETER_ENTITY)) && + cur = table->table[i]; + if (((cur->etype == XML_INTERNAL_PARAMETER_ENTITY) || + (cur->etype == XML_EXTERNAL_PARAMETER_ENTITY)) && (!xmlStrcmp(cur->name, name))) return(cur); } } if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) { table = (xmlEntitiesTablePtr) doc->extSubset->entities; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - if (((cur->type == XML_INTERNAL_PARAMETER_ENTITY) || - (cur->type == XML_EXTERNAL_PARAMETER_ENTITY)) && + cur = table->table[i]; + if (((cur->etype == XML_INTERNAL_PARAMETER_ENTITY) || + (cur->etype == XML_EXTERNAL_PARAMETER_ENTITY)) && (!xmlStrcmp(cur->name, name))) return(cur); } } if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) { table = (xmlEntitiesTablePtr) doc->extSubset->entities; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - if (((cur->type == XML_INTERNAL_PARAMETER_ENTITY) || - (cur->type == XML_EXTERNAL_PARAMETER_ENTITY)) && + cur = table->table[i]; + if (((cur->etype == XML_INTERNAL_PARAMETER_ENTITY) || + (cur->etype == XML_EXTERNAL_PARAMETER_ENTITY)) && (!xmlStrcmp(cur->name, name))) return(cur); } } @@ -316,9 +520,9 @@ xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) { if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) { table = (xmlEntitiesTablePtr) doc->extSubset->entities; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - if ((cur->type != XML_INTERNAL_PARAMETER_ENTITY) && - (cur->type != XML_EXTERNAL_PARAMETER_ENTITY) && + cur = table->table[i]; + if ((cur->etype != XML_INTERNAL_PARAMETER_ENTITY) && + (cur->etype != XML_EXTERNAL_PARAMETER_ENTITY) && (!xmlStrcmp(cur->name, name))) return(cur); } } @@ -345,18 +549,18 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) { if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) { table = (xmlEntitiesTablePtr) doc->intSubset->entities; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - if ((cur->type != XML_INTERNAL_PARAMETER_ENTITY) && - (cur->type != XML_EXTERNAL_PARAMETER_ENTITY) && + cur = table->table[i]; + if ((cur->etype != XML_INTERNAL_PARAMETER_ENTITY) && + (cur->etype != XML_EXTERNAL_PARAMETER_ENTITY) && (!xmlStrcmp(cur->name, name))) return(cur); } } if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) { table = (xmlEntitiesTablePtr) doc->extSubset->entities; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - if ((cur->type != XML_INTERNAL_PARAMETER_ENTITY) && - (cur->type != XML_EXTERNAL_PARAMETER_ENTITY) && + cur = table->table[i]; + if ((cur->etype != XML_INTERNAL_PARAMETER_ENTITY) && + (cur->etype != XML_EXTERNAL_PARAMETER_ENTITY) && (!xmlStrcmp(cur->name, name))) return(cur); } } @@ -364,9 +568,9 @@ xmlGetDocEntity(xmlDocPtr doc, const xmlChar *name) { xmlInitializePredefinedEntities(); table = xmlPredefinedEntities; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - if ((cur->type != XML_INTERNAL_PARAMETER_ENTITY) && - (cur->type != XML_EXTERNAL_PARAMETER_ENTITY) && + cur = table->table[i]; + if ((cur->etype != XML_INTERNAL_PARAMETER_ENTITY) && + (cur->etype != XML_EXTERNAL_PARAMETER_ENTITY) && (!xmlStrcmp(cur->name, name))) return(cur); } @@ -612,6 +816,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) { *out++ = 'o'; *out++ = 't'; *out++ = ';'; +#if 0 } else if ((*cur == '\'') && (!html)) { *out++ = '&'; *out++ = 'a'; @@ -619,23 +824,101 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) { *out++ = 'o'; *out++ = 's'; *out++ = ';'; +#endif } else if (((*cur >= 0x20) && (*cur < 0x80)) || (*cur == '\n') || (*cur == '\r') || (*cur == '\t')) { /* * default case, just copy ! */ *out++ = *cur; -#ifndef USE_UTF_8 - } else if ((sizeof(xmlChar) == 1) && (*cur >= 0x80)) { - char buf[10], *ptr; + } else if (*cur >= 0x80) { + if (html) { + char buf[15], *ptr; + + /* + * TODO: improve by searching in html40EntitiesTable + */ #ifdef HAVE_SNPRINTF - snprintf(buf, 9, "&#%d;", *cur); + snprintf(buf, 9, "&#%d;", *cur); #else - sprintf(buf, "&#%d;", *cur); + sprintf(buf, "&#%d;", *cur); #endif - ptr = buf; - while (*ptr != 0) *out++ = *ptr++; + ptr = buf; + while (*ptr != 0) *out++ = *ptr++; + } else if (doc->encoding != NULL) { + /* + * TODO !!! + */ + *out++ = *cur; + } else { + /* + * We assume we have UTF-8 input. + */ + char buf[10], *ptr; + int val = 0, l = 1; + + if (*cur < 0xC0) { + fprintf(stderr, + "xmlEncodeEntitiesReentrant : input not UTF-8\n"); + doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1"); +#ifdef HAVE_SNPRINTF + snprintf(buf, 9, "&#%d;", *cur); +#else + sprintf(buf, "&#%d;", *cur); +#endif + ptr = buf; + while (*ptr != 0) *out++ = *ptr++; + continue; + } else if (*cur < 0xE0) { + val = (cur[0]) & 0x1F; + val <<= 6; + val |= (cur[1]) & 0x3F; + l = 2; + } else if (*cur < 0xF0) { + val = (cur[0]) & 0x0F; + val <<= 6; + val |= (cur[1]) & 0x3F; + val <<= 6; + val |= (cur[2]) & 0x3F; + l = 3; + } else if (*cur < 0xF8) { + val = (cur[0]) & 0x07; + val <<= 6; + val |= (cur[1]) & 0x3F; + val <<= 6; + val |= (cur[2]) & 0x3F; + val <<= 6; + val |= (cur[3]) & 0x3F; + l = 4; + } + if ((l == 1) || (!IS_CHAR(val))) { + fprintf(stderr, + "xmlEncodeEntitiesReentrant : char out of range\n"); + doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1"); +#ifdef HAVE_SNPRINTF + snprintf(buf, 9, "&#%d;", *cur); +#else + sprintf(buf, "&#%d;", *cur); +#endif + ptr = buf; + while (*ptr != 0) *out++ = *ptr++; + cur++; + continue; + } + /* + * We could do multiple things here. Just save as a char ref + */ +#ifdef HAVE_SNPRINTF + snprintf(buf, 14, "&#x%X;", val); +#else + sprintf(buf, "&#x%X;", val); #endif + buf[14] = 0; + ptr = buf; + while (*ptr != 0) *out++ = *ptr++; + cur += l; + continue; + } } else if (IS_CHAR(*cur)) { char buf[10], *ptr; @@ -682,11 +965,11 @@ xmlCreateEntitiesTable(void) { } ret->max_entities = XML_MIN_ENTITIES_TABLE; ret->nb_entities = 0; - ret->table = (xmlEntityPtr ) - xmlMalloc(ret->max_entities * sizeof(xmlEntity)); + ret->table = (xmlEntityPtr *) + xmlMalloc(ret->max_entities * sizeof(xmlEntityPtr)); if (ret == NULL) { fprintf(stderr, "xmlCreateEntitiesTable : xmlMalloc(%ld) failed\n", - ret->max_entities * (long)sizeof(xmlEntity)); + ret->max_entities * (long)sizeof(xmlEntityPtr)); xmlFree(ret); return(NULL); } @@ -706,7 +989,7 @@ xmlFreeEntitiesTable(xmlEntitiesTablePtr table) { if (table == NULL) return; for (i = 0;i < table->nb_entities;i++) { - xmlFreeEntity(&table->table[i]); + xmlFreeEntity(table->table[i]); } xmlFree(table->table); xmlFree(table); @@ -731,8 +1014,8 @@ xmlCopyEntitiesTable(xmlEntitiesTablePtr table) { fprintf(stderr, "xmlCopyEntitiesTable: out of memory !\n"); return(NULL); } - ret->table = (xmlEntityPtr) xmlMalloc(table->max_entities * - sizeof(xmlEntity)); + ret->table = (xmlEntityPtr *) xmlMalloc(table->max_entities * + sizeof(xmlEntityPtr)); if (ret->table == NULL) { fprintf(stderr, "xmlCopyEntitiesTable: out of memory !\n"); xmlFree(ret); @@ -741,35 +1024,120 @@ xmlCopyEntitiesTable(xmlEntitiesTablePtr table) { ret->max_entities = table->max_entities; ret->nb_entities = table->nb_entities; for (i = 0;i < ret->nb_entities;i++) { - cur = &ret->table[i]; - ent = &table->table[i]; - cur->len = ent->len; - cur->type = ent->type; + cur = (xmlEntityPtr) xmlMalloc(sizeof(xmlEntity)); + if (cur == NULL) { + fprintf(stderr, "xmlCopyEntityTable: out of memory !\n"); + xmlFree(ret); + xmlFree(ret->table); + return(NULL); + } + memset(cur, 0, sizeof(xmlEntity)); + cur->type = XML_ELEMENT_DECL; + ret->table[i] = cur; + ent = table->table[i]; + + cur->etype = ent->etype; if (ent->name != NULL) cur->name = xmlStrdup(ent->name); - else - cur->name = NULL; if (ent->ExternalID != NULL) cur->ExternalID = xmlStrdup(ent->ExternalID); - else - cur->ExternalID = NULL; if (ent->SystemID != NULL) cur->SystemID = xmlStrdup(ent->SystemID); - else - cur->SystemID = NULL; if (ent->content != NULL) cur->content = xmlStrdup(ent->content); - else - cur->content = NULL; if (ent->orig != NULL) cur->orig = xmlStrdup(ent->orig); - else - cur->orig = NULL; } return(ret); } /** + * xmlDumpEntityDecl: + * @buf: An XML buffer. + * @ent: An entity table + * + * This will dump the content of the entity table as an XML DTD definition + */ +void +xmlDumpEntityDecl(xmlBufferPtr buf, xmlEntityPtr ent) { + switch (ent->etype) { + case XML_INTERNAL_GENERAL_ENTITY: + xmlBufferWriteChar(buf, "<!ENTITY "); + xmlBufferWriteCHAR(buf, ent->name); + xmlBufferWriteChar(buf, " "); + if (ent->orig != NULL) + xmlBufferWriteQuotedString(buf, ent->orig); + else + xmlBufferWriteQuotedString(buf, ent->content); + xmlBufferWriteChar(buf, ">\n"); + break; + case XML_EXTERNAL_GENERAL_PARSED_ENTITY: + xmlBufferWriteChar(buf, "<!ENTITY "); + xmlBufferWriteCHAR(buf, ent->name); + if (ent->ExternalID != NULL) { + xmlBufferWriteChar(buf, " PUBLIC "); + xmlBufferWriteQuotedString(buf, ent->ExternalID); + xmlBufferWriteChar(buf, " "); + xmlBufferWriteQuotedString(buf, ent->SystemID); + } else { + xmlBufferWriteChar(buf, " SYSTEM "); + xmlBufferWriteQuotedString(buf, ent->SystemID); + } + xmlBufferWriteChar(buf, ">\n"); + break; + case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: + xmlBufferWriteChar(buf, "<!ENTITY "); + xmlBufferWriteCHAR(buf, ent->name); + if (ent->ExternalID != NULL) { + xmlBufferWriteChar(buf, " PUBLIC "); + xmlBufferWriteQuotedString(buf, ent->ExternalID); + xmlBufferWriteChar(buf, " "); + xmlBufferWriteQuotedString(buf, ent->SystemID); + } else { + xmlBufferWriteChar(buf, " SYSTEM "); + xmlBufferWriteQuotedString(buf, ent->SystemID); + } + if (ent->content != NULL) { /* Should be true ! */ + xmlBufferWriteChar(buf, " NDATA "); + if (ent->orig != NULL) + xmlBufferWriteCHAR(buf, ent->orig); + else + xmlBufferWriteCHAR(buf, ent->content); + } + xmlBufferWriteChar(buf, ">\n"); + break; + case XML_INTERNAL_PARAMETER_ENTITY: + xmlBufferWriteChar(buf, "<!ENTITY % "); + xmlBufferWriteCHAR(buf, ent->name); + xmlBufferWriteChar(buf, " "); + if (ent->orig == NULL) + xmlBufferWriteQuotedString(buf, ent->content); + else + xmlBufferWriteQuotedString(buf, ent->orig); + xmlBufferWriteChar(buf, ">\n"); + break; + case XML_EXTERNAL_PARAMETER_ENTITY: + xmlBufferWriteChar(buf, "<!ENTITY % "); + xmlBufferWriteCHAR(buf, ent->name); + if (ent->ExternalID != NULL) { + xmlBufferWriteChar(buf, " PUBLIC "); + xmlBufferWriteQuotedString(buf, ent->ExternalID); + xmlBufferWriteChar(buf, " "); + xmlBufferWriteQuotedString(buf, ent->SystemID); + } else { + xmlBufferWriteChar(buf, " SYSTEM "); + xmlBufferWriteQuotedString(buf, ent->SystemID); + } + xmlBufferWriteChar(buf, ">\n"); + break; + default: + fprintf(stderr, + "xmlDumpEntitiesTable: internal: unknown type %d\n", + ent->etype); + } +} + +/** * xmlDumpEntitiesTable: * @buf: An XML buffer. * @table: An entity table @@ -784,81 +1152,7 @@ xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table) { if (table == NULL) return; for (i = 0;i < table->nb_entities;i++) { - cur = &table->table[i]; - switch (cur->type) { - case XML_INTERNAL_GENERAL_ENTITY: - xmlBufferWriteChar(buf, "<!ENTITY "); - xmlBufferWriteCHAR(buf, cur->name); - xmlBufferWriteChar(buf, " "); - if (cur->orig != NULL) - xmlBufferWriteQuotedString(buf, cur->orig); - else - xmlBufferWriteQuotedString(buf, cur->content); - xmlBufferWriteChar(buf, ">\n"); - break; - case XML_EXTERNAL_GENERAL_PARSED_ENTITY: - xmlBufferWriteChar(buf, "<!ENTITY "); - xmlBufferWriteCHAR(buf, cur->name); - if (cur->ExternalID != NULL) { - xmlBufferWriteChar(buf, " PUBLIC "); - xmlBufferWriteQuotedString(buf, cur->ExternalID); - xmlBufferWriteChar(buf, " "); - xmlBufferWriteQuotedString(buf, cur->SystemID); - } else { - xmlBufferWriteChar(buf, " SYSTEM "); - xmlBufferWriteQuotedString(buf, cur->SystemID); - } - xmlBufferWriteChar(buf, ">\n"); - break; - case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: - xmlBufferWriteChar(buf, "<!ENTITY "); - xmlBufferWriteCHAR(buf, cur->name); - if (cur->ExternalID != NULL) { - xmlBufferWriteChar(buf, " PUBLIC "); - xmlBufferWriteQuotedString(buf, cur->ExternalID); - xmlBufferWriteChar(buf, " "); - xmlBufferWriteQuotedString(buf, cur->SystemID); - } else { - xmlBufferWriteChar(buf, " SYSTEM "); - xmlBufferWriteQuotedString(buf, cur->SystemID); - } - if (cur->content != NULL) { /* Should be true ! */ - xmlBufferWriteChar(buf, " NDATA "); - if (cur->orig != NULL) - xmlBufferWriteCHAR(buf, cur->orig); - else - xmlBufferWriteCHAR(buf, cur->content); - } - xmlBufferWriteChar(buf, ">\n"); - break; - case XML_INTERNAL_PARAMETER_ENTITY: - xmlBufferWriteChar(buf, "<!ENTITY % "); - xmlBufferWriteCHAR(buf, cur->name); - xmlBufferWriteChar(buf, " "); - if (cur->orig == NULL) - xmlBufferWriteQuotedString(buf, cur->content); - else - xmlBufferWriteQuotedString(buf, cur->orig); - xmlBufferWriteChar(buf, ">\n"); - break; - case XML_EXTERNAL_PARAMETER_ENTITY: - xmlBufferWriteChar(buf, "<!ENTITY % "); - xmlBufferWriteCHAR(buf, cur->name); - if (cur->ExternalID != NULL) { - xmlBufferWriteChar(buf, " PUBLIC "); - xmlBufferWriteQuotedString(buf, cur->ExternalID); - xmlBufferWriteChar(buf, " "); - xmlBufferWriteQuotedString(buf, cur->SystemID); - } else { - xmlBufferWriteChar(buf, " SYSTEM "); - xmlBufferWriteQuotedString(buf, cur->SystemID); - } - xmlBufferWriteChar(buf, ">\n"); - break; - default: - fprintf(stderr, - "xmlDumpEntitiesTable: internal: unknown type %d\n", - cur->type); - } + cur = table->table[i]; + xmlDumpEntityDecl(buf, cur); } } @@ -15,12 +15,17 @@ extern "C" { #endif -#define XML_INTERNAL_GENERAL_ENTITY 1 -#define XML_EXTERNAL_GENERAL_PARSED_ENTITY 2 -#define XML_EXTERNAL_GENERAL_UNPARSED_ENTITY 3 -#define XML_INTERNAL_PARAMETER_ENTITY 4 -#define XML_EXTERNAL_PARAMETER_ENTITY 5 -#define XML_INTERNAL_PREDEFINED_ENTITY 6 +/* + * The different valid entity types + */ +typedef enum { + XML_INTERNAL_GENERAL_ENTITY = 1, + XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, + XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, + XML_INTERNAL_PARAMETER_ENTITY = 4, + XML_EXTERNAL_PARAMETER_ENTITY = 5, + XML_INTERNAL_PREDEFINED_ENTITY = 6 +} xmlEntityType; /* * An unit of storage for an entity, contains the string, the value @@ -30,14 +35,32 @@ extern "C" { typedef struct _xmlEntity xmlEntity; typedef xmlEntity *xmlEntityPtr; struct _xmlEntity { - int type; /* The entity type */ - int len; /* The lenght of the name */ - const xmlChar *name; /* Name of the entity */ - const xmlChar *ExternalID; /* External identifier for PUBLIC Entity */ - const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ - xmlChar *content; /* The entity content or ndata if unparsed */ - int length; /* the content length */ - xmlChar *orig; /* The entity cont without ref substitution */ +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ + const xmlChar *name; /* Attribute name */ + struct _xmlNode *children; /* NULL */ + struct _xmlNode *last; /* NULL */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + xmlChar *orig; /* content without ref substitution */ + xmlChar *content; /* content or ndata if unparsed */ + int length; /* the content length */ + xmlEntityType etype; /* The entity type */ + const xmlChar *ExternalID; /* External identifier for PUBLIC */ + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ + +#ifdef WITH_EXTRA_ENT_DETECT + /* Referenced entities name stack */ + xmlChar *ent; /* Current parsed Node */ + int entNr; /* Depth of the parsing stack */ + int entMax; /* Max depth of the parsing stack */ + xmlChar * *entTab; /* array of nodes */ +#endif }; /* @@ -52,7 +75,7 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr; struct _xmlEntitiesTable { int nb_entities; /* number of elements stored */ int max_entities; /* maximum number of elements */ - xmlEntityPtr table; /* the table of entities */ + xmlEntityPtr *table; /* the table of entities */ }; @@ -60,13 +83,13 @@ struct _xmlEntitiesTable { * External functions : */ -void xmlAddDocEntity (xmlDocPtr doc, +xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content); -void xmlAddDtdEntity (xmlDocPtr doc, +xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, @@ -88,9 +111,16 @@ xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); void xmlDumpEntitiesTable (xmlBufferPtr buf, xmlEntitiesTablePtr table); +void xmlDumpEntityDecl (xmlBufferPtr buf, + xmlEntityPtr ent); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); void xmlCleanupPredefinedEntities(void); +#ifdef WITH_EXTRA_ENT_DETECT +int xmlEntityAddReference (xmlEntityPtr ent, + const xmlChar *to); +#endif + #ifdef __cplusplus } #endif diff --git a/include/libxml/encoding.h b/include/libxml/encoding.h index 5eb1a52f..12a79108 100644 --- a/include/libxml/encoding.h +++ b/include/libxml/encoding.h @@ -67,11 +67,11 @@ typedef enum { * Returns the number of byte written, or -1 by lack of space. */ typedef int (* xmlCharEncodingInputFunc)(unsigned char* out, int outlen, - unsigned char* in, int inlen); + const unsigned char* in, int *inlen); /** - * xmlCharEncodingInputFunc: + * xmlCharEncodingOutputFunc: * @out: a pointer ot an array of bytes to store the result * @outlen: the lenght of @out * @in: a pointer ot an array of UTF-8 chars @@ -84,7 +84,7 @@ typedef int (* xmlCharEncodingInputFunc)(unsigned char* out, int outlen, * if the transcoding failed. */ typedef int (* xmlCharEncodingOutputFunc)(unsigned char* out, int outlen, - unsigned char* in, int inlen); + const unsigned char* in, int *inlen); /* * Block defining the handlers for non UTF-8 encodings. @@ -101,10 +101,12 @@ struct _xmlCharEncodingHandler { void xmlInitCharEncodingHandlers (void); void xmlCleanupCharEncodingHandlers (void); void xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); -xmlCharEncoding xmlDetectCharEncoding (const unsigned char* in); +xmlCharEncoding xmlDetectCharEncoding (const unsigned char* in, + int len); xmlCharEncoding xmlParseCharEncoding (const char* name); xmlCharEncodingHandlerPtr xmlGetCharEncodingHandler(xmlCharEncoding enc); xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler(const char *name); +int xmlCheckUTF8 (const unsigned char *utf); #ifdef __cplusplus diff --git a/include/libxml/entities.h b/include/libxml/entities.h index 0347170e..50e1f51d 100644 --- a/include/libxml/entities.h +++ b/include/libxml/entities.h @@ -15,12 +15,17 @@ extern "C" { #endif -#define XML_INTERNAL_GENERAL_ENTITY 1 -#define XML_EXTERNAL_GENERAL_PARSED_ENTITY 2 -#define XML_EXTERNAL_GENERAL_UNPARSED_ENTITY 3 -#define XML_INTERNAL_PARAMETER_ENTITY 4 -#define XML_EXTERNAL_PARAMETER_ENTITY 5 -#define XML_INTERNAL_PREDEFINED_ENTITY 6 +/* + * The different valid entity types + */ +typedef enum { + XML_INTERNAL_GENERAL_ENTITY = 1, + XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, + XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, + XML_INTERNAL_PARAMETER_ENTITY = 4, + XML_EXTERNAL_PARAMETER_ENTITY = 5, + XML_INTERNAL_PREDEFINED_ENTITY = 6 +} xmlEntityType; /* * An unit of storage for an entity, contains the string, the value @@ -30,14 +35,32 @@ extern "C" { typedef struct _xmlEntity xmlEntity; typedef xmlEntity *xmlEntityPtr; struct _xmlEntity { - int type; /* The entity type */ - int len; /* The lenght of the name */ - const xmlChar *name; /* Name of the entity */ - const xmlChar *ExternalID; /* External identifier for PUBLIC Entity */ - const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ - xmlChar *content; /* The entity content or ndata if unparsed */ - int length; /* the content length */ - xmlChar *orig; /* The entity cont without ref substitution */ +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ + const xmlChar *name; /* Attribute name */ + struct _xmlNode *children; /* NULL */ + struct _xmlNode *last; /* NULL */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + xmlChar *orig; /* content without ref substitution */ + xmlChar *content; /* content or ndata if unparsed */ + int length; /* the content length */ + xmlEntityType etype; /* The entity type */ + const xmlChar *ExternalID; /* External identifier for PUBLIC */ + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ + +#ifdef WITH_EXTRA_ENT_DETECT + /* Referenced entities name stack */ + xmlChar *ent; /* Current parsed Node */ + int entNr; /* Depth of the parsing stack */ + int entMax; /* Max depth of the parsing stack */ + xmlChar * *entTab; /* array of nodes */ +#endif }; /* @@ -52,7 +75,7 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr; struct _xmlEntitiesTable { int nb_entities; /* number of elements stored */ int max_entities; /* maximum number of elements */ - xmlEntityPtr table; /* the table of entities */ + xmlEntityPtr *table; /* the table of entities */ }; @@ -60,13 +83,13 @@ struct _xmlEntitiesTable { * External functions : */ -void xmlAddDocEntity (xmlDocPtr doc, +xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content); -void xmlAddDtdEntity (xmlDocPtr doc, +xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, @@ -88,9 +111,16 @@ xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); void xmlDumpEntitiesTable (xmlBufferPtr buf, xmlEntitiesTablePtr table); +void xmlDumpEntityDecl (xmlBufferPtr buf, + xmlEntityPtr ent); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); void xmlCleanupPredefinedEntities(void); +#ifdef WITH_EXTRA_ENT_DETECT +int xmlEntityAddReference (xmlEntityPtr ent, + const xmlChar *to); +#endif + #ifdef __cplusplus } #endif diff --git a/include/libxml/parser.h b/include/libxml/parser.h index 9e232cac..54f00e65 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -49,6 +49,9 @@ struct _xmlParserInput { int col; /* Current column */ int consumed; /* How many xmlChars already consumed */ xmlParserInputDeallocate free; /* function to deallocate the base */ + const xmlChar *encoding; /* the encoding string for entity */ + const xmlChar *version; /* the version string for entity */ + int standalone; /* Was that entity marked standalone */ }; /** @@ -95,6 +98,7 @@ typedef enum { XML_PARSER_ENTITY_DECL, /* within an entity declaration */ XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */ + XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */ XML_PARSER_EPILOG /* the Misc* after the last end tag */ } xmlParserInputState; @@ -151,7 +155,7 @@ struct _xmlParserCtxt { char *directory; /* the data directory */ - /* Node name stack only used for HTML parsing */ + /* Node name stack */ xmlChar *name; /* Current parsed Node */ int nameNr; /* Depth of the parsing stack */ int nameMax; /* Max depth of the parsing stack */ @@ -160,6 +164,20 @@ struct _xmlParserCtxt { long nbChars; /* number of xmlChar processed */ long checkIndex; /* used by progressive parsing lookup */ int keepBlanks; /* ugly but ... */ + int disableSAX; /* SAX callbacks are disabled */ + int inSubset; /* Parsing is in int 1/ext 2 subset */ + xmlChar * intSubName; /* name of subset */ + xmlChar * extSubURI; /* URI of external subset */ + xmlChar * extSubSystem; /* SYSTEM ID of external subset */ + + /* xml:space values */ + int * space; /* Should the parser preserve spaces */ + int spaceNr; /* Depth of the parsing stack */ + int spaceMax; /* Max depth of the parsing stack */ + int * spaceTab; /* array of space infos */ + + int depth; /* to prevent entity substitution loops */ + xmlParserInputPtr entity; /* used to check entities boundaries */ }; /** @@ -183,6 +201,8 @@ typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, const xmlChar *publicId, const xmlChar *systemId); typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); +typedef void (*externalSubsetSAXFunc) (void *ctx, const xmlChar *name, + const xmlChar *ExternalID, const xmlChar *SystemID); typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, const xmlChar *name); typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, @@ -254,6 +274,7 @@ struct _xmlSAXHandler { fatalErrorSAXFunc fatalError; getParameterEntitySAXFunc getParameterEntity; cdataBlockSAXFunc cdataBlock; + externalSubsetSAXFunc externalSubset; }; /** @@ -278,7 +299,7 @@ extern xmlSAXHandler htmlDefaultSAXHandler; */ extern int xmlSubstituteEntitiesDefaultValue; - +extern int xmlGetWarningsDefaultValue; /** @@ -363,6 +384,20 @@ xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID, xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax, const xmlChar *ExternalID, const xmlChar *SystemID); +int xmlParseBalancedChunkMemory(xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *string, + xmlNodePtr *list); +int xmlParseExternalEntity (xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *URL, + const xmlChar *ID, + xmlNodePtr *list); + /** * SAX initialization routines */ diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h index 5a7b7ffe..db7965a6 100644 --- a/include/libxml/parserInternals.h +++ b/include/libxml/parserInternals.h @@ -17,31 +17,6 @@ extern "C" { #define XML_MAX_NAMELEN 1000 -/** - * A few macros needed to help building the parser. - */ -/* #define UNICODE */ - -#ifdef UNICODE -typedef unsigned long CHARVAL; - -#define NEXTCHARVAL(p) (unsigned long) \ - ((*(p) == 0) ? (unsigned long) 0 : \ - ((*(p) < 0x80) ? (unsigned long) (*(p)++) : \ - (*(p) < 0xC0) ? (unsigned long) 0 : \ - (*(p) < 0xE0) ? ((((unsigned long) *(p)++) << 6) + (*(p)++ & 0x3F)) : \ - (*(p) < 0xF0) ? (((((unsigned long) *(p)++) << 6) + (*(p)++ & 0x3F)) << 6 + \ - (*(p)++ & 0x3F)) : \ - (*(p) < 0xF8) ? ((((((unsigned long) *(p)++) << 6) + (*(p)++ & 0x3F)) << 6 + \ - (*(p)++ & 0x3F)) << 6 + (*(p)++ & 0x3F)) : 0)) -#else -typedef unsigned char CHARVAL; - -#define NEXTCHARVAL(p) (unsigned long) *(p); -#define SKIPCHARVAL(p) (p)++; -#endif - -#ifdef UNICODE /************************************************************************ * * * UNICODE version of the macros. * @@ -404,7 +379,7 @@ typedef unsigned char CHARVAL; #define IS_EXTENDER(c) \ (((c) == 0xb7) || ((c) == 0x2d0) || ((c) == 0x2d1) || \ ((c) == 0x387) || ((c) == 0x640) || ((c) == 0xe46) || \ - ((c) == 0xec6) || ((c) == 0x3005) \ + ((c) == 0xec6) || ((c) == 0x3005) || \ (((c) >= 0x3031) && ((c) <= 0x3035)) || \ (((c) >= 0x309b) && ((c) <= 0x309e)) || \ (((c) >= 0x30fc) && ((c) <= 0x30fe))) @@ -423,65 +398,6 @@ typedef unsigned char CHARVAL; */ #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c)) -#else -/************************************************************************ - * * - * 8bits / ISO-Latin version of the macros. * - * * - ************************************************************************/ -/* - * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] - * | [#x10000-#x10FFFF] - * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. - */ -#define IS_CHAR(c) \ - ((((c) >= 0x20) && ((c) <= 0xD7FF)) || \ - ((c) == 0x09) || ((c) == 0x0a) || ((c) == 0x0d) || \ - (((c) >= 0xE000) && ((c) <= 0xFFFD)) || \ - (((c) >= 0x10000) && ((c) <= 0x10FFFF))) - -/* - * [85] BaseChar ::= ... long list see REC ... - */ -#define IS_BASECHAR(c) \ - ((((c) >= 0x0041) && ((c) <= 0x005A)) || \ - (((c) >= 0x0061) && ((c) <= 0x007A)) || \ - (((c) >= 0x00C0) && ((c) <= 0x00D6)) || \ - (((c) >= 0x00D8) && ((c) <= 0x00F6)) || \ - (((c) >= 0x00F8) && ((c) <= 0x00FF))) - -/* - * [88] Digit ::= ... long list see REC ... - */ -#define IS_DIGIT(c) (((c) >= 0x30) && ((c) <= 0x39)) - -/* - * [84] Letter ::= BaseChar | Ideographic - */ -#define IS_LETTER(c) IS_BASECHAR(c) - - -/* - * [87] CombiningChar ::= ... long list see REC ... - */ -#define IS_COMBINING(c) 0 - -/* - * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | - * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | - * [#x309D-#x309E] | [#x30FC-#x30FE] - */ -#define IS_EXTENDER(c) ((c) == 0xb7) - -#endif /* !UNICODE */ - -/* - * Blank chars. - * - * [3] S ::= (#x20 | #x9 | #xD | #xA)+ - */ -#define IS_BLANK(c) (((c) == 0x20) || ((c) == 0x09) || ((c) == 0xa) || \ - ((c) == 0x0D)) /* * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] @@ -502,10 +418,10 @@ typedef unsigned char CHARVAL; if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; } #define MOVETO_ENDTAG(p) \ - while (IS_CHAR(*p) && (*(p) != '>')) (p)++ + while ((*p) && (*(p) != '>')) (p)++ #define MOVETO_STARTTAG(p) \ - while (IS_CHAR(*p) && (*(p) != '<')) (p)++ + while ((*p) && (*(p) != '<')) (p)++ /** * Parser context @@ -514,10 +430,13 @@ xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur); xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename); xmlParserCtxtPtr xmlCreateMemoryParserCtxt(char *buffer, int size); -void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); xmlParserCtxtPtr xmlNewParserCtxt (void); +xmlParserCtxtPtr xmlCreateEntityParserCtxt(const xmlChar *URL, + const xmlChar *ID, + const xmlChar *base); void xmlSwitchEncoding (xmlParserCtxtPtr ctxt, xmlCharEncoding enc); +void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); /** * Entities @@ -540,33 +459,34 @@ xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt, /** * Namespaces. */ -xmlChar * xmlSplitQName (const xmlChar *name, +xmlChar * xmlSplitQName (xmlParserCtxtPtr ctxt, + const xmlChar *name, xmlChar **prefix); -xmlChar * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); -xmlChar * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, +xmlChar * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); +xmlChar * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, xmlChar **prefix); -xmlChar * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt); +xmlChar * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt); void xmlParseNamespace (xmlParserCtxtPtr ctxt); /** * Generic production rules */ -xmlChar * xmlScanName (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseName (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseNmtoken (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseEntityValue (xmlParserCtxtPtr ctxt, +xmlChar * xmlScanName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseNmtoken (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEntityValue (xmlParserCtxtPtr ctxt, xmlChar **orig); -xmlChar * xmlParseAttValue (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); -xmlChar * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseAttValue (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); +xmlChar * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); void xmlParseCharData (xmlParserCtxtPtr ctxt, int cdata); -xmlChar * xmlParseExternalID (xmlParserCtxtPtr ctxt, +xmlChar * xmlParseExternalID (xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict); void xmlParseComment (xmlParserCtxtPtr ctxt); -xmlChar * xmlParsePITarget (xmlParserCtxtPtr ctxt); +xmlChar * xmlParsePITarget (xmlParserCtxtPtr ctxt); void xmlParsePI (xmlParserCtxtPtr ctxt); void xmlParseNotationDecl (xmlParserCtxtPtr ctxt); void xmlParseEntityDecl (xmlParserCtxtPtr ctxt); @@ -593,19 +513,20 @@ xmlEntityPtr xmlParseEntityRef (xmlParserCtxtPtr ctxt); void xmlParseReference (xmlParserCtxtPtr ctxt); void xmlParsePEReference (xmlParserCtxtPtr ctxt); void xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseAttribute (xmlParserCtxtPtr ctxt, +xmlChar * xmlParseAttribute (xmlParserCtxtPtr ctxt, xmlChar **value); -xmlChar * xmlParseStartTag (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseStartTag (xmlParserCtxtPtr ctxt); void xmlParseEndTag (xmlParserCtxtPtr ctxt); void xmlParseCDSect (xmlParserCtxtPtr ctxt); void xmlParseContent (xmlParserCtxtPtr ctxt); void xmlParseElement (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseVersionNum (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseEncName (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseVersionNum (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEncName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); int xmlParseSDDecl (xmlParserCtxtPtr ctxt); void xmlParseXMLDecl (xmlParserCtxtPtr ctxt); +void xmlParseTextDecl (xmlParserCtxtPtr ctxt); void xmlParseMisc (xmlParserCtxtPtr ctxt); void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, @@ -618,12 +539,18 @@ void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, #define XML_SUBSTITUTE_PEREF 2 #define XML_SUBSTITUTE_BOTH 3 -xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt, +xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt, int len, int what, xmlChar end, xmlChar end2, xmlChar end3); +xmlChar * xmlStringDecodeEntities (xmlParserCtxtPtr ctxt, + const xmlChar *str, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); /* * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP diff --git a/include/libxml/tree.h b/include/libxml/tree.h index ee88d806..c881728b 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -36,24 +36,22 @@ typedef enum { XML_DOCUMENT_TYPE_NODE= 10, XML_DOCUMENT_FRAG_NODE= 11, XML_NOTATION_NODE= 12, - XML_HTML_DOCUMENT_NODE= 13 + XML_HTML_DOCUMENT_NODE= 13, + XML_DTD_NODE= 14, + XML_ELEMENT_DECL= 15, + XML_ATTRIBUTE_DECL= 16, + XML_ENTITY_DECL= 17 } xmlElementType; /* * Size of an internal character representation. * - * Currently we use 8bit chars internal representation for memory efficiency, - * but the parser is not tied to that, just define UNICODE to switch to - * a 16 bits internal representation. Note that with 8 bits wide - * xmlChars one can still use UTF-8 to handle correctly non ISO-Latin - * input. + * We use 8bit chars internal representation for memory efficiency, + * Note that with 8 bits wide xmlChars one can still use UTF-8 to handle + * correctly non ISO-Latin input. */ -#ifdef UNICODE -typedef unsigned short xmlChar; -#else typedef unsigned char xmlChar; -#endif #ifndef WIN32 #ifndef CHAR @@ -109,14 +107,25 @@ struct _xmlEnumeration { typedef struct _xmlAttribute xmlAttribute; typedef xmlAttribute *xmlAttributePtr; struct _xmlAttribute { - const xmlChar *elem; /* Element holding the attribute */ - const xmlChar *name; /* Attribute name */ - struct _xmlAttribute *next; /* list of attributes of an element */ - xmlAttributeType type; /* The type */ - xmlAttributeDefault def; /* the default */ - const xmlChar *defaultValue;/* or the default value */ - xmlEnumerationPtr tree; /* or the enumeration tree if any */ - const xmlChar *prefix; /* the namespace prefix if any */ +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ + const xmlChar *name; /* Attribute name */ + struct _xmlNode *children; /* NULL */ + struct _xmlNode *last; /* NULL */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + struct _xmlAttribute *nexth; /* next in hash table */ + xmlAttributeType atype; /* The attribute type */ + xmlAttributeDefault def; /* the default */ + const xmlChar *defaultValue; /* or the default value */ + xmlEnumerationPtr tree; /* or the enumeration tree if any */ + const xmlChar *prefix; /* the namespace prefix if any */ + const xmlChar *elem; /* Element holding the attribute */ }; /* @@ -156,8 +165,19 @@ typedef enum { typedef struct _xmlElement xmlElement; typedef xmlElement *xmlElementPtr; struct _xmlElement { +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ const xmlChar *name; /* Element name */ - xmlElementTypeVal type; /* The type */ + struct _xmlNode *children; /* NULL */ + struct _xmlNode *last; /* NULL */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + xmlElementTypeVal etype; /* The type */ xmlElementContentPtr content; /* the allowed element content */ xmlAttributePtr attributes; /* List of the declared attributes */ }; @@ -188,14 +208,25 @@ struct _xmlNs { typedef struct _xmlDtd xmlDtd; typedef xmlDtd *xmlDtdPtr; struct _xmlDtd { +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_DTD_NODE, must be second ! */ const xmlChar *name; /* Name of the DTD */ - const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ - const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ + struct _xmlNode *children; /* the value of the property link */ + struct _xmlNode *last; /* last child link */ + struct _xmlDoc *parent; /* child->parent link */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + /* End of common part */ void *notations; /* Hash table for notations if any */ void *elements; /* Hash table for elements if any */ void *attributes; /* Hash table for attributes if any */ void *entities; /* Hash table for entities if any */ - /* struct xmlDtd *next; * next link for this document */ + const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ }; /* @@ -206,14 +237,17 @@ typedef xmlAttr *xmlAttrPtr; struct _xmlAttr { #ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ - void *vepv; /* for Corba, must be next ! */ #endif - xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */ - struct _xmlNode *node; /* attr->node link */ - struct _xmlAttr *next; /* attribute list link */ + xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ const xmlChar *name; /* the name of the property */ - struct _xmlNode *val; /* the value of the property */ + struct _xmlNode *children; /* the value of the property */ + struct _xmlNode *last; /* NULL */ + struct _xmlNode *parent; /* child->parent link */ + struct _xmlAttr *next; /* next sibling link */ + struct _xmlAttr *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ xmlNs *ns; /* pointer to the associated namespace */ + xmlAttributeType atype; /* the attribute type if validating */ }; /* @@ -266,24 +300,25 @@ typedef xmlNode *xmlNodePtr; struct _xmlNode { #ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ - void *vepv; /* for Corba, must be next ! */ #endif - xmlElementType type; /* type number in the DTD, must be third ! */ - struct _xmlDoc *doc; /* the containing document */ + xmlElementType type; /* type number, must be second ! */ + const xmlChar *name; /* the name of the node, or the entity */ + struct _xmlNode *children; /* parent->childs link */ + struct _xmlNode *last; /* last child link */ struct _xmlNode *parent; /* child->parent link */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ - struct _xmlNode *childs; /* parent->childs link */ - struct _xmlNode *last; /* last child link */ - struct _xmlAttr *properties;/* properties list */ - const xmlChar *name; /* the name of the node, or the entity */ - xmlNs *ns; /* pointer to the associated namespace */ - xmlNs *nsDef; /* namespace definitions on this node */ + struct _xmlDoc *doc; /* the containing document */ + xmlNs *ns; /* pointer to the associated namespace */ #ifndef XML_USE_BUFFER_CONTENT - xmlChar *content; /* the content */ + xmlChar *content; /* the content */ #else - xmlBufferPtr content; /* the content in a buffer */ + xmlBufferPtr content; /* the content in a buffer */ #endif + + /* End of common part */ + struct _xmlAttr *properties;/* properties list */ + xmlNs *nsDef; /* namespace definitions on this node */ }; /* @@ -294,20 +329,27 @@ typedef xmlDoc *xmlDocPtr; struct _xmlDoc { #ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ - void *vepv; /* for Corba, must be next ! */ #endif xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ char *name; /* name/filename/URI of the document */ - const xmlChar *version; /* the XML version string */ - const xmlChar *encoding; /* encoding, if any */ + struct _xmlNode *children; /* the document tree */ + struct _xmlNode *last; /* last child link */ + struct _xmlNode *parent; /* child->parent link */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* autoreference to itself */ + + /* End of common part */ int compression;/* level of zlib compression */ int standalone; /* standalone document (no external refs) */ struct _xmlDtd *intSubset; /* the document internal subset */ struct _xmlDtd *extSubset; /* the document external subset */ struct _xmlNs *oldNs; /* Global namespace, the old way */ - struct _xmlNode *root; /* the document tree */ + const xmlChar *version; /* the XML version string */ + const xmlChar *encoding; /* encoding, if any */ void *ids; /* Hash table for ID attributes if any */ void *refs; /* Hash table for IDREFs attributes if any */ + const xmlChar *URL; /* The URI for that document */ }; /* @@ -422,6 +464,8 @@ xmlNodePtr xmlNewComment (const xmlChar *content); xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc, const xmlChar *content, int len); +xmlNodePtr xmlNewCharRef (xmlDocPtr doc, + const xmlChar *name); xmlNodePtr xmlNewReference (xmlDocPtr doc, const xmlChar *name); xmlNodePtr xmlCopyNode (xmlNodePtr node, @@ -513,13 +557,14 @@ xmlChar * xmlNodeGetContent (xmlNodePtr cur); xmlChar * xmlNodeGetLang (xmlNodePtr cur); void xmlNodeSetLang (xmlNodePtr cur, const xmlChar *lang); +int xmlNodeGetSpacePreserve (xmlNodePtr cur); xmlChar * xmlNodeGetBase (xmlDocPtr doc, xmlNodePtr cur); /* * Removing content. */ -int xmlRemoveProp (xmlAttrPtr attr); /* TODO */ +int xmlRemoveProp (xmlAttrPtr attr); int xmlRemoveNode (xmlNodePtr node); /* TODO */ /* @@ -533,6 +578,12 @@ void xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string); /* + * Namespace handling + */ +int xmlReconciliateNs (xmlDocPtr doc, + xmlNodePtr tree); + +/* * Saving */ void xmlDocDumpMemory (xmlDocPtr cur, diff --git a/include/libxml/valid.h b/include/libxml/valid.h index 8c86b17b..d211207e 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -29,6 +29,14 @@ struct _xmlValidCtxt { void *userData; /* user specific data block */ xmlValidityErrorFunc error; /* the callback in case of errors */ xmlValidityWarningFunc warning; /* the callback in case of warning */ + + /* Node analysis stack used when validating within entities */ + xmlNodePtr node; /* Current parsed Node */ + int nodeNr; /* Depth of the parsing stack */ + int nodeMax; /* Max depth of the parsing stack */ + xmlNodePtr *nodeTab; /* array of nodes */ + + int finishDtd; /* finished validating the Dtd ? */ }; /* @@ -114,6 +122,8 @@ xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt, const xmlChar *SystemID); xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table); void xmlFreeNotationTable(xmlNotationTablePtr table); +void xmlDumpNotationDecl (xmlBufferPtr buf, + xmlNotationPtr nota); void xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table); @@ -122,6 +132,9 @@ xmlElementContentPtr xmlNewElementContent (xmlChar *name, xmlElementContentType type); xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content); void xmlFreeElementContent(xmlElementContentPtr cur); +void xmlSprintfElementContent(char *buf, + xmlElementContentPtr content, + int glob); /* Element */ xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt, @@ -133,6 +146,8 @@ xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table); void xmlFreeElementTable (xmlElementTablePtr table); void xmlDumpElementTable (xmlBufferPtr buf, xmlElementTablePtr table); +void xmlDumpElementDecl (xmlBufferPtr buf, + xmlElementPtr elem); /* Enumeration */ xmlEnumerationPtr xmlCreateEnumeration (xmlChar *name); @@ -144,6 +159,7 @@ xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name, + const xmlChar *prefix, xmlAttributeType type, xmlAttributeDefault def, const xmlChar *defaultValue, @@ -152,6 +168,8 @@ xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table); void xmlFreeAttributeTable (xmlAttributeTablePtr table); void xmlDumpAttributeTable (xmlBufferPtr buf, xmlAttributeTablePtr table); +void xmlDumpAttributeDecl (xmlBufferPtr buf, + xmlAttributePtr attr); /* IDs */ xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt, @@ -188,6 +206,10 @@ int xmlValidateRoot (xmlValidCtxtPtr ctxt, int xmlValidateElementDecl (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlElementPtr elem); +xmlChar * xmlValidNormalizeAttributeValue(xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *name, + const xmlChar *value); int xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlAttributePtr attr); @@ -199,6 +221,8 @@ int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, int xmlValidateDtd (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd); +int xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); int xmlValidateDocument (xmlValidCtxtPtr ctxt, xmlDocPtr doc); int xmlValidateElement (xmlValidCtxtPtr ctxt, diff --git a/include/libxml/xmlmemory.h b/include/libxml/xmlmemory.h index 64477a1c..11121fb5 100644 --- a/include/libxml/xmlmemory.h +++ b/include/libxml/xmlmemory.h @@ -8,7 +8,7 @@ #ifndef _DEBUG_MEMORY_ALLOC_ #define _DEBUG_MEMORY_ALLOC_ -#define NO_DEBUG_MEMORY +/* #define NO_DEBUG_MEMORY */ #ifdef NO_DEBUG_MEMORY #ifdef HAVE_MALLOC_H diff --git a/libxml.spec.in b/libxml.spec.in index ec674567..33706b5f 100644 --- a/libxml.spec.in +++ b/libxml.spec.in @@ -3,14 +3,13 @@ %define prefix /usr Summary: libXML library -Name: libxml +Name: libxml2 Version: %ver Release: 1 Copyright: LGPL Group: X11/Libraries Source: ftp://ftp.gnome.org/pub/GNOME/sources/libxml/libxml-%{ver}.tar.gz BuildRoot: /var/tmp/libxml-%{PACKAGE_VERSION}-root -Provides: libxml.so.0 URL: http://rpmfind.net/veillard/XML/ Prereq: /sbin/install-info @@ -869,10 +869,11 @@ xmlNanoFTPConnect(void *ctx) { else #ifndef HAVE_SNPRINTF len = sprintf(buf, "PASS libxml@%s\r\n", + hostname); #else /* HAVE_SNPRINTF */ len = snprintf(buf, sizeof(buf), "PASS libxml@%s\r\n", -#endif /* HAVE_SNPRINTF */ hostname); +#endif /* HAVE_SNPRINTF */ #ifdef DEBUG_FTP printf(buf); #endif @@ -1226,11 +1227,13 @@ xmlNanoFTPGetConnection(void *ctx) { portp = (unsigned char *) &dataAddr.sin_port; #ifndef HAVE_SNPRINTF len = sprintf(buf, "PORT %d,%d,%d,%d,%d,%d\r\n", + adp[0] & 0xff, adp[1] & 0xff, adp[2] & 0xff, adp[3] & 0xff, + portp[0] & 0xff, portp[1] & 0xff); #else /* HAVE_SNPRINTF */ len = snprintf(buf, sizeof(buf), "PORT %d,%d,%d,%d,%d,%d\r\n", + adp[0] & 0xff, adp[1] & 0xff, adp[2] & 0xff, adp[3] & 0xff, + portp[0] & 0xff, portp[1] & 0xff); #endif /* HAVE_SNPRINTF */ - adp[0] & 0xff, adp[1] & 0xff, adp[2] & 0xff, adp[3] & 0xff, - portp[0] & 0xff, portp[1] & 0xff); buf[sizeof(buf) - 1] = 0; #ifdef DEBUG_FTP printf(buf); @@ -1264,13 +1267,34 @@ int xmlNanoFTPCloseConnection(void *ctx) { xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx; int res; + fd_set rfd, efd; + struct timeval tv; close(ctxt->dataFd); ctxt->dataFd = -1; - res = xmlNanoFTPGetResponse(ctxt); - if (res != 2) { + tv.tv_sec = 15; + tv.tv_usec = 0; + FD_ZERO(&rfd); + FD_SET(ctxt->controlFd, &rfd); + FD_ZERO(&efd); + FD_SET(ctxt->controlFd, &efd); + res = select(ctxt->controlFd + 1, &rfd, NULL, &efd, &tv); + if (res < 0) { +#ifdef DEBUG_FTP + perror("select"); +#endif close(ctxt->controlFd); ctxt->controlFd = -1; return(-1); } + if (res == 0) { + fprintf(stderr, "xmlNanoFTPCloseConnection: timeout\n"); + close(ctxt->controlFd); ctxt->controlFd = -1; + } else { + res = xmlNanoFTPGetResponse(ctxt); + if (res != 2) { + close(ctxt->controlFd); ctxt->controlFd = -1; + return(-1); + } + } return(0); } @@ -753,7 +753,7 @@ retry: } ctxt->fd = ret; if (proxy) { -#ifdef have_snprintf +#ifdef HAVE_SNPRINTF if (ctxt->port != 80) snprintf(buf, sizeof(buf), "GET http://%s:%d%s HTTP/1.0\r\nHost: %s\r\n\r\n", @@ -47,6 +47,7 @@ #define XML_PARSER_BUFFER_SIZE 100 const char *xmlParserVersion = LIBXML_VERSION; +int xmlGetWarningsDefaultValue = 1; /* * List of XML prefixed PI allowed by W3C specs @@ -57,6 +58,10 @@ const char *xmlW3CPIs[] = { NULL }; +void xmlParserHandleReference(xmlParserCtxtPtr ctxt); +void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt); +xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt, + const xmlChar **str); /************************************************************************ * * * Input handling functions for progressive parsing * @@ -263,7 +268,7 @@ xmlParserInputShrink(xmlParserInputPtr in) { int xmlSubstituteEntitiesDefaultValue = 0; int xmlDoValidityCheckingDefaultValue = 0; -int xmlKeepBlanksDefaultValue = 0; +int xmlKeepBlanksDefaultValue = 1; xmlEntityPtr xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str); @@ -303,6 +308,34 @@ PUSH_AND_POP(extern, xmlParserInputPtr, input) PUSH_AND_POP(extern, xmlNodePtr, node) PUSH_AND_POP(extern, xmlChar*, name) +int spacePush(xmlParserCtxtPtr ctxt, int val) { + if (ctxt->spaceNr >= ctxt->spaceMax) { + ctxt->spaceMax *= 2; + ctxt->spaceTab = (void *) xmlRealloc(ctxt->spaceTab, + ctxt->spaceMax * sizeof(ctxt->spaceTab[0])); + if (ctxt->spaceTab == NULL) { + fprintf(stderr, "realloc failed !\n"); + return(0); + } + } + ctxt->spaceTab[ctxt->spaceNr] = val; + ctxt->space = &ctxt->spaceTab[ctxt->spaceNr]; + return(ctxt->spaceNr++); +} + +int spacePop(xmlParserCtxtPtr ctxt) { + int ret; + if (ctxt->spaceNr <= 0) return(0); + ctxt->spaceNr--; + if (ctxt->spaceNr > 0) + ctxt->space = &ctxt->spaceTab[ctxt->spaceNr - 1]; + else + ctxt->space = NULL; + ret = ctxt->spaceTab[ctxt->spaceNr]; + ctxt->spaceTab[ctxt->spaceNr] = -1; + return(ret); +} + /* * Macros for accessing the content. Those should be used only by the parser, * and not exported. @@ -310,9 +343,11 @@ PUSH_AND_POP(extern, xmlChar*, name) * Dirty macros, i.e. one need to make assumption on the context to use them * * CUR_PTR return the current pointer to the xmlChar to be parsed. + * To be used with extreme caution since operations consuming + * characters may move the input buffer to a different location ! * CUR returns the current xmlChar value, i.e. a 8 bit value if compiled - * in ISO-Latin or UTF-8, and the current 16 bit value if compiled - * in UNICODE mode. This should be used internally by the parser + * in ISO-Latin or UTF-8. + * This should be used internally by the parser * only to compare to ASCII values otherwise it would break when * running with UTF-8 encoding. * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only @@ -322,17 +357,24 @@ PUSH_AND_POP(extern, xmlChar*, name) * * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding * - * CURRENT Returns the current char value, with the full decoding of - * UTF-8 if we are using this mode. It returns an int. * NEXT Skip to the next character, this does the proper decoding * in UTF-8 mode. It also pop-up unfinished entities on the fly. * COPY(to) copy one char to *to, increment CUR_PTR and to accordingly + * CUR_CHAR Return the current char as an int as well as its lenght. */ +#define RAW (ctxt->token ? -1 : (*ctxt->input->cur)) #define CUR (ctxt->token ? ctxt->token : (*ctxt->input->cur)) -#define SKIP(val) ctxt->nbChars += (val),ctxt->input->cur += (val) #define NXT(val) ctxt->input->cur[(val)] #define CUR_PTR ctxt->input->cur + +#define SKIP(val) ctxt->nbChars += (val),ctxt->input->cur += (val); \ + if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \ + if (*ctxt->input->cur == '&') xmlParserHandleReference(ctxt); \ + if ((*ctxt->input->cur == 0) && \ + (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) \ + xmlPopInput(ctxt) + #define SHRINK xmlParserInputShrink(ctxt->input); \ if ((*ctxt->input->cur == 0) && \ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) \ @@ -343,35 +385,471 @@ PUSH_AND_POP(extern, xmlChar*, name) (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) \ xmlPopInput(ctxt) -#define SKIP_BLANKS \ - do { \ - while (IS_BLANK(CUR)) NEXT; \ - while ((CUR == 0) && (ctxt->inputNr > 1)) \ - xmlPopInput(ctxt); \ - if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \ - if (*ctxt->input->cur == '&') xmlParserHandleReference(ctxt); \ - } while (IS_BLANK(CUR)); - -#define CURRENT (*ctxt->input->cur) -#define NEXT { \ - if (ctxt->token != 0) ctxt->token = 0; \ - else { \ - if ((*ctxt->input->cur == 0) && \ - (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) { \ - xmlPopInput(ctxt); \ - } else { \ - if (*(ctxt->input->cur) == '\n') { \ - ctxt->input->line++; ctxt->input->col = 1; \ - } else ctxt->input->col++; \ - ctxt->input->cur++; \ - ctxt->nbChars++; \ - if (*ctxt->input->cur == 0) \ - xmlParserInputGrow(ctxt->input, INPUT_CHUNK); \ - } \ +#define SKIP_BLANKS xmlSkipBlankChars(ctxt); + +#define NEXT xmlNextChar(ctxt); + +#define NEXTL(l) \ + if (*(ctxt->input->cur) == '\n') { \ + ctxt->input->line++; ctxt->input->col = 1; \ + } else ctxt->input->col++; \ + ctxt->token = 0; ctxt->input->cur += l; \ if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \ - if (*ctxt->input->cur == '&') xmlParserHandleReference(ctxt); \ -}} + if (*ctxt->input->cur == '&') xmlParserHandleReference(ctxt); + +#define CUR_CHAR(l) xmlCurrentChar(ctxt, &l); +#define CUR_SCHAR(s, l) xmlStringCurrentChar(ctxt, s, &l); + +#define COPY_BUF(l,b,i,v) \ + if (l == 1) b[i++] = (xmlChar) v; \ + else i += xmlCopyChar(l,&b[i],v); + +/** + * xmlNextChar: + * @ctxt: the XML parser context + * + * Skip to the next char input char. + */ + +void +xmlNextChar(xmlParserCtxtPtr ctxt) { + /* + * TODO: 2.11 End-of-Line Handling + * the literal two-character sequence "#xD#xA" or a standalone + * literal #xD, an XML processor must pass to the application + * the single character #xA. + */ + if (ctxt->token != 0) ctxt->token = 0; + else { + if ((*ctxt->input->cur == 0) && + (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0) && + (ctxt->instate != XML_PARSER_COMMENT)) { + /* + * If we are at the end of the current entity and + * the context allows it, we pop consumed entities + * automatically. + * TODO: the auto closing should be blocked in other cases + */ + xmlPopInput(ctxt); + } else { + if (*(ctxt->input->cur) == '\n') { + ctxt->input->line++; ctxt->input->col = 1; + } else ctxt->input->col++; + if (ctxt->encoding == NULL) { + /* + * We are supposed to handle UTF8, check it's valid + * From rfc2044: encoding of the Unicode values on UTF-8: + * + * UCS-4 range (hex.) UTF-8 octet sequence (binary) + * 0000 0000-0000 007F 0xxxxxxx + * 0000 0080-0000 07FF 110xxxxx 10xxxxxx + * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx + * + * Check for the 0x110000 limit too + */ + const unsigned char *cur = ctxt->input->cur; + unsigned char c; + + c = *cur; + if (c & 0x80) { + if (cur[1] == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + if ((cur[1] & 0xc0) != 0x80) + goto encoding_error; + if ((c & 0xe0) == 0xe0) { + unsigned int val; + + if (cur[2] == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + if ((cur[2] & 0xc0) != 0x80) + goto encoding_error; + if ((c & 0xf0) == 0xf0) { + if (cur[3] == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + if (((c & 0xf8) != 0xf0) || + ((cur[3] & 0xc0) != 0x80)) + goto encoding_error; + /* 4-byte code */ + ctxt->input->cur += 4; + val = (cur[0] & 0x7) << 18; + val |= (cur[1] & 0x3f) << 12; + val |= (cur[2] & 0x3f) << 6; + val |= cur[3] & 0x3f; + } else { + /* 3-byte code */ + ctxt->input->cur += 3; + val = (cur[0] & 0xf) << 12; + val |= (cur[1] & 0x3f) << 6; + val |= cur[2] & 0x3f; + } + if (((val > 0xd7ff) && (val < 0xe000)) || + ((val > 0xfffd) && (val < 0x10000)) || + (val >= 0x110000)) { + if ((ctxt->sax != NULL) && + (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Char out of allowed range\n"); + ctxt->errNo = XML_ERR_INVALID_ENCODING; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + } else + /* 2-byte code */ + ctxt->input->cur += 2; + } else + /* 1-byte code */ + ctxt->input->cur++; + } else { + /* + * Assume it's a fixed lenght encoding (1) with + * a compatibke encoding for the ASCII set, since + * XML constructs only use < 128 chars + */ + ctxt->input->cur++; + } + ctxt->nbChars++; + if (*ctxt->input->cur == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + } + } + if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); + if (*ctxt->input->cur == '&') xmlParserHandleReference(ctxt); + if ((*ctxt->input->cur == 0) && + (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) + xmlPopInput(ctxt); + return; +encoding_error: + /* + * If we detect an UTF8 error that probably mean that the + * input encoding didn't get properly advertized in the + * declaration header. Report the error and switch the encoding + * to ISO-Latin-1 (if you don't like this policy, just declare the + * encoding !) + */ + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Input is not proper UTF-8, indicate encoding !\n"); + ctxt->errNo = XML_ERR_INVALID_ENCODING; + + ctxt->encoding = xmlStrdup(BAD_CAST "ISO-8859-1"); + ctxt->input->cur++; + return; +} + +/** + * xmlCurrentChar: + * @ctxt: the XML parser context + * @len: pointer to the length of the char read + * + * The current char value, if using UTF-8 this may actaully span multiple + * bytes in the input buffer. Implement the end of line normalization: + * 2.11 End-of-Line Handling + * Wherever an external parsed entity or the literal entity value + * of an internal parsed entity contains either the literal two-character + * sequence "#xD#xA" or a standalone literal #xD, an XML processor + * must pass to the application the single character #xA. + * This behavior can conveniently be produced by normalizing all + * line breaks to #xA on input, before parsing.) + * + * Returns the current char value and its lenght + */ + +int +xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { + if (ctxt->token != 0) { + *len = 0; + return(ctxt->token); + } + if (ctxt->encoding == NULL) { + /* + * We are supposed to handle UTF8, check it's valid + * From rfc2044: encoding of the Unicode values on UTF-8: + * + * UCS-4 range (hex.) UTF-8 octet sequence (binary) + * 0000 0000-0000 007F 0xxxxxxx + * 0000 0080-0000 07FF 110xxxxx 10xxxxxx + * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx + * + * Check for the 0x110000 limit too + */ + const unsigned char *cur = ctxt->input->cur; + unsigned char c; + unsigned int val; + + c = *cur; + if (c & 0x80) { + if (cur[1] == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + if ((cur[1] & 0xc0) != 0x80) + goto encoding_error; + if ((c & 0xe0) == 0xe0) { + + if (cur[2] == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + if ((cur[2] & 0xc0) != 0x80) + goto encoding_error; + if ((c & 0xf0) == 0xf0) { + if (cur[3] == 0) + xmlParserInputGrow(ctxt->input, INPUT_CHUNK); + if (((c & 0xf8) != 0xf0) || + ((cur[3] & 0xc0) != 0x80)) + goto encoding_error; + /* 4-byte code */ + *len = 4; + val = (cur[0] & 0x7) << 18; + val |= (cur[1] & 0x3f) << 12; + val |= (cur[2] & 0x3f) << 6; + val |= cur[3] & 0x3f; + } else { + /* 3-byte code */ + *len = 3; + val = (cur[0] & 0xf) << 12; + val |= (cur[1] & 0x3f) << 6; + val |= cur[2] & 0x3f; + } + } else { + /* 2-byte code */ + *len = 2; + val = (cur[0] & 0x1f) << 6; + val |= cur[1] & 0x3f; + } + if (!IS_CHAR(val)) { + if ((ctxt->sax != NULL) && + (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Char out of allowed range\n"); + ctxt->errNo = XML_ERR_INVALID_ENCODING; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + return(val); + } else { + /* 1-byte code */ + *len = 1; + if (*ctxt->input->cur == 0xD) { + if (ctxt->input->cur[1] == 0xA) { + ctxt->nbChars++; + ctxt->input->cur++; + } + return(0xA); + } + return((int) *ctxt->input->cur); + } + } + /* + * Assume it's a fixed lenght encoding (1) with + * a compatibke encoding for the ASCII set, since + * XML constructs only use < 128 chars + */ + *len = 1; + if (*ctxt->input->cur == 0xD) { + if (ctxt->input->cur[1] == 0xA) { + ctxt->nbChars++; + ctxt->input->cur++; + } + return(0xA); + } + return((int) *ctxt->input->cur); +encoding_error: + /* + * If we detect an UTF8 error that probably mean that the + * input encoding didn't get properly advertized in the + * declaration header. Report the error and switch the encoding + * to ISO-Latin-1 (if you don't like this policy, just declare the + * encoding !) + */ + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Input is not proper UTF-8, indicate encoding !\n"); + ctxt->errNo = XML_ERR_INVALID_ENCODING; + + ctxt->encoding = xmlStrdup(BAD_CAST "ISO-8859-1"); + *len = 1; + return((int) *ctxt->input->cur); +} + +/** + * xmlStringCurrentChar: + * @ctxt: the XML parser context + * @cur: pointer to the beginning of the char + * @len: pointer to the length of the char read + * + * The current char value, if using UTF-8 this may actaully span multiple + * bytes in the input buffer. + * + * Returns the current char value and its lenght + */ + +int +xmlStringCurrentChar(xmlParserCtxtPtr ctxt, const xmlChar *cur, int *len) { + if (ctxt->encoding == NULL) { + /* + * We are supposed to handle UTF8, check it's valid + * From rfc2044: encoding of the Unicode values on UTF-8: + * + * UCS-4 range (hex.) UTF-8 octet sequence (binary) + * 0000 0000-0000 007F 0xxxxxxx + * 0000 0080-0000 07FF 110xxxxx 10xxxxxx + * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx + * + * Check for the 0x110000 limit too + */ + unsigned char c; + unsigned int val; + + c = *cur; + if (c & 0x80) { + if ((cur[1] & 0xc0) != 0x80) + goto encoding_error; + if ((c & 0xe0) == 0xe0) { + + if ((cur[2] & 0xc0) != 0x80) + goto encoding_error; + if ((c & 0xf0) == 0xf0) { + if (((c & 0xf8) != 0xf0) || + ((cur[3] & 0xc0) != 0x80)) + goto encoding_error; + /* 4-byte code */ + *len = 4; + val = (cur[0] & 0x7) << 18; + val |= (cur[1] & 0x3f) << 12; + val |= (cur[2] & 0x3f) << 6; + val |= cur[3] & 0x3f; + } else { + /* 3-byte code */ + *len = 3; + val = (cur[0] & 0xf) << 12; + val |= (cur[1] & 0x3f) << 6; + val |= cur[2] & 0x3f; + } + } else { + /* 2-byte code */ + *len = 2; + val = (cur[0] & 0x1f) << 6; + val |= cur[2] & 0x3f; + } + if (!IS_CHAR(val)) { + if ((ctxt->sax != NULL) && + (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Char out of allowed range\n"); + ctxt->errNo = XML_ERR_INVALID_ENCODING; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + return(val); + } else { + /* 1-byte code */ + *len = 1; + return((int) *cur); + } + } + /* + * Assume it's a fixed lenght encoding (1) with + * a compatibke encoding for the ASCII set, since + * XML constructs only use < 128 chars + */ + *len = 1; + return((int) *cur); +encoding_error: + /* + * If we detect an UTF8 error that probably mean that the + * input encoding didn't get properly advertized in the + * declaration header. Report the error and switch the encoding + * to ISO-Latin-1 (if you don't like this policy, just declare the + * encoding !) + */ + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Input is not proper UTF-8, indicate encoding !\n"); + ctxt->errNo = XML_ERR_INVALID_ENCODING; + + *len = 1; + return((int) *cur); +} + +/** + * xmlCopyChar: + * @len: pointer to the length of the char read (or zero) + * @array: pointer to an arry of xmlChar + * @val: the char value + * + * append the char value in the array + * + * Returns the number of xmlChar written + */ + +int +xmlCopyChar(int len, xmlChar *out, int val) { + /* + * We are supposed to handle UTF8, check it's valid + * From rfc2044: encoding of the Unicode values on UTF-8: + * + * UCS-4 range (hex.) UTF-8 octet sequence (binary) + * 0000 0000-0000 007F 0xxxxxxx + * 0000 0080-0000 07FF 110xxxxx 10xxxxxx + * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx + */ + if (len == 0) { + if (val < 0) len = 0; + else if (val < 0x80) len = 1; + else if (val < 0x800) len = 2; + else if (val < 0x10000) len = 3; + else if (val < 0x110000) len = 4; + if (len == 0) { + fprintf(stderr, "Internal error, xmlCopyChar 0x%X out of bound\n", + val); + return(0); + } + } + if (len > 1) { + int bits; + + if (val < 0x80) { *out++= val; bits= -6; } + else if (val < 0x800) { *out++= (val >> 6) | 0xC0; bits= 0; } + else if (val < 0x10000) { *out++= (val >> 12) | 0xE0; bits= 6; } + else { *out++= (val >> 18) | 0xF0; bits= 12; } + + for ( ; bits >= 0; bits-= 6) + *out++= ((val >> bits) & 0x3F) | 0x80 ; + + return(len); + } + *out = (xmlChar) val; + return(1); +} + +/** + * xmlSkipBlankChars: + * @ctxt: the XML parser context + * + * skip all blanks character found at that point in the input streams. + * It pops up finished entities in the process if allowable at that point. + * + * Returns the number of space chars skipped + */ +int +xmlSkipBlankChars(xmlParserCtxtPtr ctxt) { + int cur, res = 0; + + do { + cur = CUR; + while (IS_BLANK(cur)) { + NEXT; + cur = CUR; + res++; + } + while ((cur == 0) && (ctxt->inputNr > 1) && + (ctxt->instate != XML_PARSER_COMMENT)) { + xmlPopInput(ctxt); + cur = CUR; + } + if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); + if (*ctxt->input->cur == '&') xmlParserHandleReference(ctxt); + } while (IS_BLANK(cur)); + return(res); +} /************************************************************************ * * @@ -410,6 +888,7 @@ void xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) { if (input == NULL) return; inputPush(ctxt, input); + GROW; } /** @@ -424,6 +903,8 @@ xmlFreeInputStream(xmlParserInputPtr input) { if (input->filename != NULL) xmlFree((char *) input->filename); if (input->directory != NULL) xmlFree((char *) input->directory); + if (input->encoding != NULL) xmlFree((char *) input->encoding); + if (input->version != NULL) xmlFree((char *) input->version); if ((input->free != NULL) && (input->base != NULL)) input->free((xmlChar *) input->base); if (input->buf != NULL) @@ -452,17 +933,10 @@ xmlNewInputStream(xmlParserCtxtPtr ctxt) { ctxt->errNo = XML_ERR_NO_MEMORY; return(NULL); } - input->filename = NULL; - input->directory = NULL; - input->base = NULL; - input->cur = NULL; - input->buf = NULL; + memset(input, 0, sizeof(xmlParserInput)); input->line = 1; input->col = 1; - input->buf = NULL; - input->free = NULL; - input->consumed = 0; - input->length = 0; + input->standalone = -1; return(input); } @@ -488,7 +962,7 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { return(NULL); } if (entity->content == NULL) { - switch (entity->type) { + switch (entity->etype) { case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: ctxt->errNo = XML_ERR_UNPARSED_ENTITY; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -523,7 +997,7 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { if (input == NULL) { return(NULL); } - input->filename = (char *) entity->SystemID; /* TODO !!! char <- xmlChar */ + input->filename = (char *) entity->SystemID; input->base = entity->content; input->cur = entity->content; input->length = entity->length; @@ -642,16 +1116,20 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt) { xmlSAXHandler *sax; + xmlDefaultSAXHandlerInit(); + sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler)); if (sax == NULL) { fprintf(stderr, "xmlInitParserCtxt: out of memory\n"); } + memset(sax, 0, sizeof(xmlSAXHandler)); /* Allocate the Input stack */ ctxt->inputTab = (xmlParserInputPtr *) xmlMalloc(5 * sizeof(xmlParserInputPtr)); ctxt->inputNr = 0; ctxt->inputMax = 5; ctxt->input = NULL; + ctxt->version = NULL; ctxt->encoding = NULL; ctxt->standalone = -1; @@ -675,8 +1153,16 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt) ctxt->nameMax = 10; ctxt->name = NULL; - if (sax == NULL) ctxt->sax = &xmlDefaultSAXHandler; - else { + /* Allocate the space stack */ + ctxt->spaceTab = (int *) xmlMalloc(10 * sizeof(int)); + ctxt->spaceNr = 1; + ctxt->spaceMax = 10; + ctxt->spaceTab[0] = -1; + ctxt->space = &ctxt->spaceTab[0]; + + if (sax == NULL) { + ctxt->sax = &xmlDefaultSAXHandler; + } else { ctxt->sax = sax; memcpy(sax, &xmlDefaultSAXHandler, sizeof(xmlSAXHandler)); } @@ -689,7 +1175,15 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt) ctxt->vctxt.userData = ctxt; if (ctxt->validate) { ctxt->vctxt.error = xmlParserValidityError; - ctxt->vctxt.warning = xmlParserValidityWarning; + if (xmlGetWarningsDefaultValue == 0) + ctxt->vctxt.warning = NULL; + else + ctxt->vctxt.warning = xmlParserValidityWarning; + /* Allocate the Node stack */ + ctxt->vctxt.nodeTab = (xmlNodePtr *) xmlMalloc(4 * sizeof(xmlNodePtr)); + ctxt->vctxt.nodeNr = 0; + ctxt->vctxt.nodeMax = 4; + ctxt->vctxt.node = NULL; } else { ctxt->vctxt.error = NULL; ctxt->vctxt.warning = NULL; @@ -698,7 +1192,9 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt) ctxt->record_info = 0; ctxt->nbChars = 0; ctxt->checkIndex = 0; + ctxt->inSubset = 0; ctxt->errNo = XML_ERR_OK; + ctxt->depth = 0; xmlInitNodeInfoSeq(&ctxt->node_seq); } @@ -724,11 +1220,16 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt) while ((oldname = namePop(ctxt)) != NULL) { xmlFree(oldname); } + if (ctxt->spaceTab != NULL) xmlFree(ctxt->spaceTab); if (ctxt->nameTab != NULL) xmlFree(ctxt->nameTab); if (ctxt->nodeTab != NULL) xmlFree(ctxt->nodeTab); if (ctxt->inputTab != NULL) xmlFree(ctxt->inputTab); if (ctxt->version != NULL) xmlFree((char *) ctxt->version); if (ctxt->encoding != NULL) xmlFree((char *) ctxt->encoding); + if (ctxt->intSubName != NULL) xmlFree((char *) ctxt->intSubName); + if (ctxt->extSubURI != NULL) xmlFree((char *) ctxt->extSubURI); + if (ctxt->extSubSystem != NULL) xmlFree((char *) ctxt->extSubSystem); + if (ctxt->vctxt.nodeTab != NULL) xmlFree(ctxt->vctxt.nodeTab); if ((ctxt->sax != NULL) && (ctxt->sax != &xmlDefaultSAXHandler)) xmlFree(ctxt->sax); if (ctxt->directory != NULL) xmlFree((char *) ctxt->directory); @@ -754,6 +1255,7 @@ xmlNewParserCtxt() perror("malloc"); return(NULL); } + memset(ctxt, 0, sizeof(xmlParserCtxt)); xmlInitParserCtxt(ctxt); return(ctxt); } @@ -778,10 +1280,18 @@ xmlClearParserCtxt(xmlParserCtxtPtr ctxt) * * ************************************************************************/ -void xmlParserHandleReference(xmlParserCtxtPtr ctxt); -void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt); -xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt, - const xmlChar **str); +/** + * xmlCheckEntity: + * @ctxt: an XML parser context + * @content: the entity content string + * + * Parse an entity content and checks the WF constraints + * + */ + +void +xmlCheckEntity(xmlParserCtxtPtr ctxt, const xmlChar *content) { +} /** * xmlParseCharRef: @@ -807,15 +1317,15 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { ctxt->token = 0; return(val); } - if ((CUR == '&') && (NXT(1) == '#') && + if ((RAW == '&') && (NXT(1) == '#') && (NXT(2) == 'x')) { SKIP(3); - while (CUR != ';') { - if ((CUR >= '0') && (CUR <= '9')) + while (RAW != ';') { + if ((RAW >= '0') && (RAW <= '9')) val = val * 16 + (CUR - '0'); - else if ((CUR >= 'a') && (CUR <= 'f')) + else if ((RAW >= 'a') && (RAW <= 'f')) val = val * 16 + (CUR - 'a') + 10; - else if ((CUR >= 'A') && (CUR <= 'F')) + else if ((RAW >= 'A') && (RAW <= 'F')) val = val * 16 + (CUR - 'A') + 10; else { ctxt->errNo = XML_ERR_INVALID_HEX_CHARREF; @@ -823,17 +1333,21 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid hexadecimal value\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; val = 0; break; } NEXT; } - if (CUR == ';') - SKIP(1); /* on purpose to avoid reentrancy problems with NEXT */ - } else if ((CUR == '&') && (NXT(1) == '#')) { + if (RAW == ';') { + /* on purpose to avoid reentrancy problems with NEXT and SKIP */ + ctxt->nbChars ++; + ctxt->input->cur++; + } + } else if ((RAW == '&') && (NXT(1) == '#')) { SKIP(2); - while (CUR != ';') { - if ((CUR >= '0') && (CUR <= '9')) + while (RAW != ';') { + if ((RAW >= '0') && (RAW <= '9')) val = val * 10 + (CUR - '0'); else { ctxt->errNo = XML_ERR_INVALID_DEC_CHARREF; @@ -841,19 +1355,24 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid decimal value\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; val = 0; break; } NEXT; } - if (CUR == ';') - SKIP(1); /* on purpose to avoid reentrancy problems with NEXT */ + if (RAW == ';') { + /* on purpose to avoid reentrancy problems with NEXT and SKIP */ + ctxt->nbChars ++; + ctxt->input->cur++; + } } else { ctxt->errNo = XML_ERR_INVALID_CHARREF; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid value\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* @@ -869,6 +1388,7 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "CharRef: invalid xmlChar value %d\n", val); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } return(0); } @@ -916,6 +1436,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) { ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid hexadecimal value\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; val = 0; break; } @@ -936,6 +1457,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) { ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid decimal value\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; val = 0; break; } @@ -950,6 +1472,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) { ctxt->sax->error(ctxt->userData, "xmlParseCharRef: invalid value\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(0); } *str = ptr; @@ -967,6 +1490,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) { ctxt->sax->error(ctxt->userData, "CharRef: invalid xmlChar value %d\n", val); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } return(0); } @@ -1003,14 +1527,15 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { if (ctxt->token != 0) { return; } - if (CUR != '&') return; + if (RAW != '&') return; GROW; - if ((CUR == '&') && (NXT(1) == '#')) { + if ((RAW == '&') && (NXT(1) == '#')) { switch(ctxt->instate) { case XML_PARSER_ENTITY_DECL: case XML_PARSER_PI: case XML_PARSER_CDATA_SECTION: case XML_PARSER_COMMENT: + case XML_PARSER_SYSTEM_LITERAL: /* we just ignore it there */ return; case XML_PARSER_START_TAG: @@ -1022,6 +1547,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CharRef at EOF\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_PROLOG: case XML_PARSER_START: @@ -1030,12 +1556,14 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CharRef in prolog!\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_EPILOG: ctxt->errNo = XML_ERR_CHARREF_IN_EPILOG; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CharRef in epilog!\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_DTD: ctxt->errNo = XML_ERR_CHARREF_IN_DTD; @@ -1043,6 +1571,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "CharRef are forbiden in DTDs!\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_ENTITY_VALUE: /* @@ -1055,7 +1584,6 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { return; case XML_PARSER_CONTENT: case XML_PARSER_ATTRIBUTE_VALUE: - /* !!! this may not be Ok for UTF-8, multibyte sequence */ ctxt->token = xmlParseCharRef(ctxt); return; } @@ -1067,6 +1595,8 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { return; case XML_PARSER_PI: case XML_PARSER_COMMENT: + case XML_PARSER_SYSTEM_LITERAL: + case XML_PARSER_CONTENT: return; case XML_PARSER_START_TAG: return; @@ -1077,6 +1607,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Reference at EOF\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_PROLOG: case XML_PARSER_START: @@ -1085,12 +1616,14 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Reference in prolog!\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_EPILOG: ctxt->errNo = XML_ERR_ENTITYREF_IN_EPILOG; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Reference in epilog!\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_ENTITY_VALUE: /* @@ -1123,8 +1656,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "Entity references are forbiden in DTDs!\n"); ctxt->wellFormed = 0; - return; - case XML_PARSER_CONTENT: + ctxt->disableSAX = 1; return; } @@ -1135,6 +1667,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity reference: no name\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->token = '&'; return; } @@ -1144,6 +1677,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "Entity reference: ';' expected\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->token = '&'; xmlFree(name); return; @@ -1169,6 +1703,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { "Entity reference: entity %s not declared\n", name); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; xmlFree(name); return; } @@ -1177,15 +1712,16 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt) { * [ WFC: Parsed Entity ] * An entity reference must not contain the name of an unparsed entity */ - if (ent->type == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { + if (ent->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { ctxt->errNo = XML_ERR_UNPARSED_ENTITY; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity reference to unparsed entity %s\n", name); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } - if (ent->type == XML_INTERNAL_PREDEFINED_ENTITY) { + if (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY) { ctxt->token = ent->content[0]; xmlFree(name); return; @@ -1237,7 +1773,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { if (ctxt->token != 0) { return; } - if (CUR != '%') return; + if (RAW != '%') return; switch(ctxt->instate) { case XML_PARSER_CDATA_SECTION: return; @@ -1252,6 +1788,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "PEReference at EOF\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_PROLOG: case XML_PARSER_START: @@ -1260,11 +1797,13 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "PEReference in prolog!\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_ENTITY_DECL: case XML_PARSER_CONTENT: case XML_PARSER_ATTRIBUTE_VALUE: case XML_PARSER_PI: + case XML_PARSER_SYSTEM_LITERAL: /* we just ignore it there */ return; case XML_PARSER_EPILOG: @@ -1272,6 +1811,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "PEReference in epilog!\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; case XML_PARSER_ENTITY_VALUE: /* @@ -1301,8 +1841,9 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlHandlePEReference: no name\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { - if (CUR == ';') { + if (RAW == ';') { NEXT; if ((ctxt->sax != NULL) && (ctxt->sax->getParameterEntity != NULL)) entity = ctxt->sax->getParameterEntity(ctxt->userData, name); @@ -1323,6 +1864,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "PEReference: %%%s; not found\n", name); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { /* * [ VC: Entity Declared ] @@ -1337,22 +1879,29 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { ctxt->valid = 0; } } else { - if ((entity->type == XML_INTERNAL_PARAMETER_ENTITY) || - (entity->type == XML_EXTERNAL_PARAMETER_ENTITY)) { + if ((entity->etype == XML_INTERNAL_PARAMETER_ENTITY) || + (entity->etype == XML_EXTERNAL_PARAMETER_ENTITY)) { /* - * TODO !!!! handle the extra spaces added before and after + * TODO !!! handle the extra spaces added before and after * c.f. http://www.w3.org/TR/REC-xml#as-PE - * TODO !!!! Avoid quote processing in parameters value - * c.f. http://www.w3.org/TR/REC-xml#inliteral */ input = xmlNewEntityInputStream(ctxt, entity); xmlPushInput(ctxt, input); + if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) && + (RAW == '<') && (NXT(1) == '?') && + (NXT(2) == 'x') && (NXT(3) == 'm') && + (NXT(4) == 'l') && (IS_BLANK(NXT(5)))) { + xmlParseTextDecl(ctxt); + } + if (ctxt->token == 0) + ctxt->token = ' '; } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlHandlePEReference: %s is not a parameter entity\n", name); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } } } else { @@ -1361,6 +1910,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlHandlePEReference: expecting ';'\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } xmlFree(name); } @@ -1400,13 +1950,22 @@ xmlDecodeEntities(xmlParserCtxtPtr ctxt, int len, int what, xmlChar end, xmlChar end2, xmlChar end3) { xmlChar *buffer = NULL; int buffer_size = 0; - xmlChar *out = NULL; + int nbchars = 0; xmlChar *current = NULL; xmlEntityPtr ent; - int nbchars = 0; unsigned int max = (unsigned int) len; - xmlChar cur; + int c,l; + + if (ctxt->depth > 40) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Detected entity reference loop\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_ENTITY_LOOP; + return(NULL); + } /* * allocate a translation buffer. @@ -1417,52 +1976,44 @@ xmlDecodeEntities(xmlParserCtxtPtr ctxt, int len, int what, perror("xmlDecodeEntities: malloc failed"); return(NULL); } - out = buffer; /* * Ok loop until we reach one of the ending char or a size limit. */ - cur = CUR; - while ((nbchars < max) && (cur != end) && - (cur != end2) && (cur != end3)) { + c = CUR_CHAR(l); + while ((nbchars < max) && (c != end) && + (c != end2) && (c != end3)) { - if (cur == 0) break; - if ((cur == '&') && (NXT(1) == '#')) { + if (c == 0) break; + if (((c == '&') && (ctxt->token != '&')) && (NXT(1) == '#')) { int val = xmlParseCharRef(ctxt); - *out++ = val; - nbchars += 3; - } else if ((cur == '&') && (what & XML_SUBSTITUTE_REF)) { + COPY_BUF(0,buffer,nbchars,val); + NEXTL(l); + } else if ((c == '&') && (ctxt->token != '&') && + (what & XML_SUBSTITUTE_REF)) { ent = xmlParseEntityRef(ctxt); if ((ent != NULL) && (ctxt->replaceEntities != 0)) { current = ent->content; while (*current != 0) { - *out++ = *current++; - if (out - buffer > buffer_size - XML_PARSER_BUFFER_SIZE) { - int index = out - buffer; - + buffer[nbchars++] = *current++; + if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { growBuffer(buffer); - out = &buffer[index]; } } - nbchars += 3 + xmlStrlen(ent->name); } else if (ent != NULL) { - int i = xmlStrlen(ent->name); const xmlChar *cur = ent->name; - nbchars += i + 2; - *out++ = '&'; - if (out - buffer > buffer_size - i - XML_PARSER_BUFFER_SIZE) { - int index = out - buffer; - + buffer[nbchars++] = '&'; + if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { growBuffer(buffer); - out = &buffer[index]; } - for (;i > 0;i--) - *out++ = *cur++; - *out++ = ';'; + while (*cur != 0) { + buffer[nbchars++] = *cur++; + } + buffer[nbchars++] = ';'; } - } else if (cur == '%' && (what & XML_SUBSTITUTE_PEREF)) { + } else if (c == '%' && (what & XML_SUBSTITUTE_PEREF)) { /* * a PEReference induce to switch the entity flow, * we break here to flush the current set of chars @@ -1475,25 +2026,20 @@ xmlDecodeEntities(xmlParserCtxtPtr ctxt, int len, int what, /* * Pop-up of finished entities. */ - while ((CUR == 0) && (ctxt->inputNr > 1)) + while ((RAW == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt); break; } else { - /* invalid for UTF-8 , use COPY(out); !!!!!! */ - *out++ = cur; - nbchars++; - if (out - buffer > buffer_size - XML_PARSER_BUFFER_SIZE) { - int index = out - buffer; - + COPY_BUF(l,buffer,nbchars,c); + NEXTL(l); + if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { growBuffer(buffer); - out = &buffer[index]; } - NEXT; } - cur = CUR; + c = CUR_CHAR(l); } - *out++ = 0; + buffer[nbchars++] = 0; return(buffer); } @@ -1518,11 +2064,21 @@ xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what, xmlChar end, xmlChar end2, xmlChar end3) { xmlChar *buffer = NULL; int buffer_size = 0; - xmlChar *out = NULL; xmlChar *current = NULL; xmlEntityPtr ent; - xmlChar cur; + int c,l; + int nbchars = 0; + + if (ctxt->depth > 40) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Detected entity reference loop\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_ENTITY_LOOP; + return(NULL); + } /* * allocate a translation buffer. @@ -1533,77 +2089,82 @@ xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what, perror("xmlDecodeEntities: malloc failed"); return(NULL); } - out = buffer; /* * Ok loop until we reach one of the ending char or a size limit. */ - cur = *str; - while ((cur != 0) && (cur != end) && - (cur != end2) && (cur != end3)) { + c = CUR_SCHAR(str, l); + while ((c != 0) && (c != end) && (c != end2) && (c != end3)) { - if (cur == 0) break; - if ((cur == '&') && (str[1] == '#')) { + if (c == 0) break; + if ((c == '&') && (str[1] == '#')) { int val = xmlParseStringCharRef(ctxt, &str); - if (val != 0) - *out++ = val; - } else if ((cur == '&') && (what & XML_SUBSTITUTE_REF)) { + if (val != 0) { + COPY_BUF(0,buffer,nbchars,val); + } + } else if ((c == '&') && (what & XML_SUBSTITUTE_REF)) { ent = xmlParseStringEntityRef(ctxt, &str); - if ((ent != NULL) && - (ctxt->replaceEntities != 0)) { - current = ent->content; - while (*current != 0) { - *out++ = *current++; - if (out - buffer > buffer_size - XML_PARSER_BUFFER_SIZE) { - int index = out - buffer; - - growBuffer(buffer); - out = &buffer[index]; + if ((ent != NULL) && (ent->content != NULL)) { + xmlChar *rep; + + ctxt->depth++; + rep = xmlStringDecodeEntities(ctxt, ent->content, what, + 0, 0, 0); + ctxt->depth--; + if (rep != NULL) { + current = rep; + while (*current != 0) { + buffer[nbchars++] = *current++; + if (nbchars > + buffer_size - XML_PARSER_BUFFER_SIZE) { + growBuffer(buffer); + } } + xmlFree(rep); } } else if (ent != NULL) { int i = xmlStrlen(ent->name); const xmlChar *cur = ent->name; - *out++ = '&'; - if (out - buffer > buffer_size - i - XML_PARSER_BUFFER_SIZE) { - int index = out - buffer; - + buffer[nbchars++] = '&'; + if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) { growBuffer(buffer); - out = &buffer[index]; } for (;i > 0;i--) - *out++ = *cur++; - *out++ = ';'; + buffer[nbchars++] = *cur++; + buffer[nbchars++] = ';'; } - } else if (cur == '%' && (what & XML_SUBSTITUTE_PEREF)) { + } else if (c == '%' && (what & XML_SUBSTITUTE_PEREF)) { ent = xmlParseStringPEReference(ctxt, &str); if (ent != NULL) { - current = ent->content; - while (*current != 0) { - *out++ = *current++; - if (out - buffer > buffer_size - XML_PARSER_BUFFER_SIZE) { - int index = out - buffer; - - growBuffer(buffer); - out = &buffer[index]; + xmlChar *rep; + + ctxt->depth++; + rep = xmlStringDecodeEntities(ctxt, ent->content, what, + 0, 0, 0); + ctxt->depth--; + if (rep != NULL) { + current = rep; + while (*current != 0) { + buffer[nbchars++] = *current++; + if (nbchars > + buffer_size - XML_PARSER_BUFFER_SIZE) { + growBuffer(buffer); + } } + xmlFree(rep); } } } else { - /* invalid for UTF-8 , use COPY(out); !!!!!! */ - *out++ = cur; - if (out - buffer > buffer_size - XML_PARSER_BUFFER_SIZE) { - int index = out - buffer; - + COPY_BUF(l,buffer,nbchars,c); + str += l; + if (nbchars > buffer_size - XML_PARSER_BUFFER_SIZE) { growBuffer(buffer); - out = &buffer[index]; } - str++; } - cur = *str; + c = CUR_SCHAR(str, l); } - *out = 0; + buffer[nbchars++] = 0; return(buffer); } @@ -1614,6 +2175,74 @@ xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what, * * ************************************************************************/ +/* + * xmlCheckLanguageID + * @lang: pointer to the string value + * + * Checks that the value conforms to the LanguageID production: + * + * [33] LanguageID ::= Langcode ('-' Subcode)* + * [34] Langcode ::= ISO639Code | IanaCode | UserCode + * [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) + * [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ + * [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ + * [38] Subcode ::= ([a-z] | [A-Z])+ + * + * Returns 1 if correct 0 otherwise + **/ +int +xmlCheckLanguageID(const xmlChar *lang) { + const xmlChar *cur = lang; + + if (cur == NULL) + return(0); + if (((cur[0] == 'i') && (cur[1] == '-')) || + ((cur[0] == 'I') && (cur[1] == '-'))) { + /* + * IANA code + */ + cur += 2; + while (((cur[0] >= 'A') && (cur[0] <= 'Z')) || + ((cur[0] >= 'a') && (cur[0] <= 'z'))) + cur++; + } else if (((cur[0] == 'x') && (cur[1] == '-')) || + ((cur[0] == 'X') && (cur[1] == '-'))) { + /* + * User code + */ + cur += 2; + while (((cur[0] >= 'A') && (cur[0] <= 'Z')) || + ((cur[0] >= 'a') && (cur[0] <= 'z'))) + cur++; + } else if (((cur[0] >= 'A') && (cur[0] <= 'Z')) || + ((cur[0] >= 'a') && (cur[0] <= 'z'))) { + /* + * ISO639 + */ + cur++; + if (((cur[0] >= 'A') && (cur[0] <= 'Z')) || + ((cur[0] >= 'a') && (cur[0] <= 'z'))) + cur++; + else + return(0); + } else + return(0); + while (cur[0] != 0) { + if (cur[0] != '-') + return(0); + cur++; + if (((cur[0] >= 'A') && (cur[0] <= 'Z')) || + ((cur[0] >= 'a') && (cur[0] <= 'z'))) + cur++; + else + return(0); + while (((cur[0] >= 'A') && (cur[0] <= 'Z')) || + ((cur[0] >= 'a') && (cur[0] <= 'z'))) + cur++; + } + return(1); +} + /** * xmlSwitchEncoding: * @ctxt: the parser context @@ -1625,12 +2254,158 @@ xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what, void xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc) { + xmlCharEncodingHandlerPtr handler; + + handler = xmlGetCharEncodingHandler(enc); + if (handler != NULL) { + if (ctxt->input != NULL) { + if (ctxt->input->buf != NULL) { + if (ctxt->input->buf->encoder != NULL) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "xmlSwitchEncoding : encoder already regitered\n"); + return; + } + ctxt->input->buf->encoder = handler; + + /* + * Is there already some content down the pipe to convert + */ + if ((ctxt->input->buf->buffer != NULL) && + (ctxt->input->buf->buffer->use > 0)) { + xmlChar *buf; + int res, len, size; + int processed; + + /* + * Specific handling of the Byte Order Mark for + * UTF-16 + */ + if ((enc == XML_CHAR_ENCODING_UTF16LE) && + (ctxt->input->cur[0] == 0xFF) && + (ctxt->input->cur[1] == 0xFE)) { + SKIP(2); + } + if ((enc == XML_CHAR_ENCODING_UTF16BE) && + (ctxt->input->cur[0] == 0xFE) && + (ctxt->input->cur[1] == 0xFF)) { + SKIP(2); + } + + /* + * convert the non processed part + */ + processed = ctxt->input->cur - ctxt->input->base; + len = ctxt->input->buf->buffer->use - processed; + + if (len <= 0) { + return; + } + size = ctxt->input->buf->buffer->use * 4; + if (size < 4000) + size = 4000; +retry_larger: + buf = (xmlChar *) xmlMalloc(size + 1); + if (buf == NULL) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "xmlSwitchEncoding : out of memory\n"); + return; + } + /* TODO !!! Handling of buf too small */ + res = handler->input(buf, size, ctxt->input->cur, &len); + if (res == -1) { + size *= 2; + xmlFree(buf); + goto retry_larger; + } + if ((res < 0) || + (len != ctxt->input->buf->buffer->use - processed)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "xmlSwitchEncoding : conversion failed\n"); + xmlFree(buf); + return; + } + + /* + * Conversion succeeded, get rid of the old buffer + */ + xmlFree(ctxt->input->buf->buffer->content); + ctxt->input->buf->buffer->content = buf; + ctxt->input->base = buf; + ctxt->input->cur = buf; + ctxt->input->buf->buffer->size = size; + ctxt->input->buf->buffer->use = res; + buf[res] = 0; + } + return; + } else { + if (ctxt->input->length == 0) { + /* + * When parsing a static memory array one must know the + * size to be able to convert the buffer. + */ + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "xmlSwitchEncoding : no input\n"); + return; + } else { + xmlChar *buf; + int res, len; + int processed = ctxt->input->cur - ctxt->input->base; + + /* + * convert the non processed part + */ + len = ctxt->input->length - processed; + if (len <= 0) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "xmlSwitchEncoding : input fully consumed?\n"); + return; + } + buf = (xmlChar *) xmlMalloc(ctxt->input->length * 4); + if (buf == NULL) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "xmlSwitchEncoding : out of memory\n"); + return; + } + res = handler->input(buf, ctxt->input->length * 4, + ctxt->input->cur, &len); + if ((res < 0) || + (len != ctxt->input->length - processed)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "xmlSwitchEncoding : conversion failed\n"); + xmlFree(buf); + return; + } + /* + * Conversion succeeded, get rid of the old buffer + */ + if ((ctxt->input->free != NULL) && + (ctxt->input->base != NULL)) + ctxt->input->free((xmlChar *) ctxt->input->base); + ctxt->input->base = ctxt->input->cur = buf; + ctxt->input->length = res; + } + } + } else { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "xmlSwitchEncoding : no input\n"); + } + } + switch (enc) { case XML_CHAR_ENCODING_ERROR: ctxt->errNo = XML_ERR_UNKNOWN_ENCODING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "encoding unknown\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; break; case XML_CHAR_ENCODING_NONE: /* let's assume it's UTF-8 without the XML decl */ @@ -1796,7 +2571,9 @@ xmlStrndup(const xmlChar *cur, int len) { * xmlStrdup: * @cur: the input xmlChar * * - * a strdup for array of xmlChar's + * a strdup for array of xmlChar's. Since they are supposed to be + * encoded in UTF-8 or an encoding with 8bit based chars, we assume + * a termination mark of '0'. * * Returns a new xmlChar * or NULL */ @@ -1805,7 +2582,7 @@ xmlStrdup(const xmlChar *cur) { const xmlChar *p = cur; if (cur == NULL) return(NULL); - while (IS_CHAR(*p)) p++; + while (*p != 0) p++; return(xmlStrndup(cur, p - cur)); } @@ -2042,7 +2819,9 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, int len) { * @cur: the original xmlChar * array * @add: the xmlChar * array added * - * a strcat for array of xmlChar's + * a strcat for array of xmlChar's. Since they are supposed to be + * encoded in UTF-8 or an encoding with 8bit based chars, we assume + * a termination mark of '0'. * * Returns a new xmlChar * containing the concatenated string. */ @@ -2054,7 +2833,7 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) { if (cur == NULL) return(xmlStrdup(add)); - while (IS_CHAR(*p)) p++; + while (*p != 0) p++; return(xmlStrncat(cur, add, p - add)); } @@ -2080,6 +2859,12 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { xmlNodePtr lastChild; /* + * Check for xml:space value. + */ + if (*(ctxt->space) == 1) + return(0); + + /* * Check that the string is made of blanks */ for (i = 0;i < len;i++) @@ -2095,22 +2880,22 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { } /* - * Do we allow an heuristic on white space + * Otherwise, heuristic :-\ */ if (ctxt->keepBlanks) return(0); - if (CUR != '<') return(0); + if (RAW != '<') return(0); if (ctxt->node == NULL) return(0); - if ((ctxt->node->childs == NULL) && - (CUR == '<') && (NXT(1) == '/')) return(0); + if ((ctxt->node->children == NULL) && + (RAW == '<') && (NXT(1) == '/')) return(0); lastChild = xmlGetLastChild(ctxt->node); if (lastChild == NULL) { if (ctxt->node->content != NULL) return(0); } else if (xmlNodeIsText(lastChild)) return(0); - else if ((ctxt->node->childs != NULL) && - (xmlNodeIsText(ctxt->node->childs))) + else if ((ctxt->node->children != NULL) && + (xmlNodeIsText(ctxt->node->children))) return(0); return(1); } @@ -2137,6 +2922,7 @@ xmlHandleEntity(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { ctxt->sax->error(ctxt->userData, "xmlHandleEntity %s: content == NULL\n", entity->name); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; } len = xmlStrlen(entity->content); @@ -2153,7 +2939,8 @@ handle_as_char: /* * Just handle the content as a set of chars. */ - if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL)) + if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && + (ctxt->sax->characters != NULL)) ctxt->sax->characters(ctxt->userData, entity->content, len); } @@ -2187,27 +2974,32 @@ void xmlParseReference(xmlParserCtxtPtr ctxt); xmlChar * xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt) { - xmlChar buf[XML_MAX_NAMELEN]; - int len = 0; + xmlChar buf[XML_MAX_NAMELEN + 5]; + int len = 0, l; + int cur = CUR_CHAR(l); - if (!IS_LETTER(CUR) && (CUR != '_')) return(NULL); + /* load first the value of the char !!! */ + if (!IS_LETTER(cur) && (cur != '_')) return(NULL); - while ((IS_LETTER(CUR)) || (IS_DIGIT(CUR)) || - (CUR == '.') || (CUR == '-') || - (CUR == '_') || - (IS_COMBINING(CUR)) || - (IS_EXTENDER(CUR))) { - buf[len++] = CUR; - NEXT; + while ((IS_LETTER(cur)) || (IS_DIGIT(cur)) || + (cur == '.') || (cur == '-') || + (cur == '_') || + (IS_COMBINING(cur)) || + (IS_EXTENDER(cur))) { + COPY_BUF(l,buf,len,cur); + NEXTL(l); + cur = CUR_CHAR(l); if (len >= XML_MAX_NAMELEN) { fprintf(stderr, "xmlNamespaceParseNCName: reached XML_MAX_NAMELEN limit\n"); - while ((IS_LETTER(CUR)) || (IS_DIGIT(CUR)) || - (CUR == '.') || (CUR == '-') || - (CUR == '_') || - (IS_COMBINING(CUR)) || - (IS_EXTENDER(CUR))) - NEXT; + while ((IS_LETTER(cur)) || (IS_DIGIT(cur)) || + (cur == '.') || (cur == '-') || + (cur == '_') || + (IS_COMBINING(cur)) || + (IS_EXTENDER(cur))) { + NEXTL(l); + cur = CUR_CHAR(l); + } break; } } @@ -2237,7 +3029,7 @@ xmlNamespaceParseQName(xmlParserCtxtPtr ctxt, xmlChar **prefix) { *prefix = NULL; ret = xmlNamespaceParseNCName(ctxt); - if (CUR == ':') { + if (RAW == ':') { *prefix = ret; NEXT; ret = xmlNamespaceParseNCName(ctxt); @@ -2248,6 +3040,7 @@ xmlNamespaceParseQName(xmlParserCtxtPtr ctxt, xmlChar **prefix) { /** * xmlSplitQName: + * @ctxt: an XML parser context * @name: an XML parser context * @prefix: a xmlChar ** * @@ -2264,10 +3057,12 @@ xmlNamespaceParseQName(xmlParserCtxtPtr ctxt, xmlChar **prefix) { */ xmlChar * -xmlSplitQName(const xmlChar *name, xmlChar **prefix) { +xmlSplitQName(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix) { + xmlChar buf[XML_MAX_NAMELEN + 5]; + int len = 0; xmlChar *ret = NULL; - const xmlChar *q; const xmlChar *cur = name; + int c,l; *prefix = NULL; @@ -2276,33 +3071,43 @@ xmlSplitQName(const xmlChar *name, xmlChar **prefix) { (cur[2] == 'l') && (cur[3] == ':')) return(xmlStrdup(name)); - if (!IS_LETTER(*cur) && (*cur != '_')) return(NULL); - q = cur++; + /* nasty but valid */ + if (cur[0] == ':') + return(xmlStrdup(name)); - while ((IS_LETTER(*cur)) || (IS_DIGIT(*cur)) || - (*cur == '.') || (*cur == '-') || - (*cur == '_') || - (IS_COMBINING(*cur)) || - (IS_EXTENDER(*cur))) - cur++; + c = CUR_SCHAR(cur, l); + if (!IS_LETTER(c) && (c != '_')) return(NULL); + + while ((IS_LETTER(c)) || (IS_DIGIT(c)) || + (c == '.') || (c == '-') || + (c == '_') || + (IS_COMBINING(c)) || + (IS_EXTENDER(c))) { + COPY_BUF(l,buf,len,c); + cur += l; + c = CUR_SCHAR(cur, l); + } - ret = xmlStrndup(q, cur - q); + ret = xmlStrndup(buf, len); - if (*cur == ':') { - cur++; - if (!IS_LETTER(*cur) && (*cur != '_')) return(ret); + if (c == ':') { + cur += l; + c = CUR_SCHAR(cur, l); + if (!IS_LETTER(c) && (c != '_')) return(ret); *prefix = ret; - - q = cur++; - - while ((IS_LETTER(*cur)) || (IS_DIGIT(*cur)) || - (*cur == '.') || (*cur == '-') || - (*cur == '_') || - (IS_COMBINING(*cur)) || - (IS_EXTENDER(*cur))) - cur++; + len = 0; + + while ((IS_LETTER(c)) || (IS_DIGIT(c)) || + (c == '.') || (c == '-') || + (c == '_') || + (IS_COMBINING(c)) || + (IS_EXTENDER(c))) { + COPY_BUF(l,buf,len,c); + cur += l; + c = CUR_SCHAR(cur, l); + } - ret = xmlStrndup(q, cur - q); + ret = xmlStrndup(buf, len); } return(ret); @@ -2324,11 +3129,11 @@ xmlChar * xmlNamespaceParseNSDef(xmlParserCtxtPtr ctxt) { xmlChar *name = NULL; - if ((CUR == 'x') && (NXT(1) == 'm') && + if ((RAW == 'x') && (NXT(1) == 'm') && (NXT(2) == 'l') && (NXT(3) == 'n') && (NXT(4) == 's')) { SKIP(5); - if (CUR == ':') { + if (RAW == ':') { NEXT; name = xmlNamespaceParseNCName(ctxt); } @@ -2348,20 +3153,20 @@ xmlNamespaceParseNSDef(xmlParserCtxtPtr ctxt) { xmlChar * xmlParseQuotedString(xmlParserCtxtPtr ctxt) { xmlChar *buf = NULL; - int len = 0; + int len = 0,l; int size = XML_PARSER_BUFFER_SIZE; - xmlChar c; + int c; buf = (xmlChar *) xmlMalloc(size * sizeof(xmlChar)); if (buf == NULL) { fprintf(stderr, "malloc of %d byte failed\n", size); return(NULL); } - if (CUR == '"') { + if (RAW == '"') { NEXT; - c = CUR; + c = CUR_CHAR(l); while (IS_CHAR(c) && (c != '"')) { - if (len + 1 >= size) { + if (len + 5 >= size) { size *= 2; buf = xmlRealloc(buf, size * sizeof(xmlChar)); if (buf == NULL) { @@ -2369,9 +3174,9 @@ xmlParseQuotedString(xmlParserCtxtPtr ctxt) { return(NULL); } } - buf[len++] = c; - NEXT; - c = CUR; + COPY_BUF(l,buf,len,c); + NEXTL(l); + c = CUR_CHAR(l); } if (c != '"') { ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; @@ -2379,10 +3184,11 @@ xmlParseQuotedString(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "String not closed \"%.50s\"\n", buf); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { NEXT; } - } else if (CUR == '\''){ + } else if (RAW == '\''){ NEXT; c = CUR; while (IS_CHAR(c) && (c != '\'')) { @@ -2398,12 +3204,13 @@ xmlParseQuotedString(xmlParserCtxtPtr ctxt) { NEXT; c = CUR; } - if (CUR != '\'') { + if (RAW != '\'') { ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed \"%.50s\"\n", buf); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { NEXT; } @@ -2435,59 +3242,59 @@ xmlParseNamespace(xmlParserCtxtPtr ctxt) { */ SKIP_BLANKS; - while (IS_CHAR(CUR) && (CUR != '>')) { + while (IS_CHAR(RAW) && (RAW != '>')) { /* * We can have "ns" or "prefix" attributes * Old encoding as 'href' or 'AS' attributes is still supported */ - if ((CUR == 'n') && (NXT(1) == 's')) { + if ((RAW == 'n') && (NXT(1) == 's')) { garbage = 0; SKIP(2); SKIP_BLANKS; - if (CUR != '=') continue; + if (RAW != '=') continue; NEXT; SKIP_BLANKS; href = xmlParseQuotedString(ctxt); SKIP_BLANKS; - } else if ((CUR == 'h') && (NXT(1) == 'r') && + } else if ((RAW == 'h') && (NXT(1) == 'r') && (NXT(2) == 'e') && (NXT(3) == 'f')) { garbage = 0; SKIP(4); SKIP_BLANKS; - if (CUR != '=') continue; + if (RAW != '=') continue; NEXT; SKIP_BLANKS; href = xmlParseQuotedString(ctxt); SKIP_BLANKS; - } else if ((CUR == 'p') && (NXT(1) == 'r') && + } else if ((RAW == 'p') && (NXT(1) == 'r') && (NXT(2) == 'e') && (NXT(3) == 'f') && (NXT(4) == 'i') && (NXT(5) == 'x')) { garbage = 0; SKIP(6); SKIP_BLANKS; - if (CUR != '=') continue; + if (RAW != '=') continue; NEXT; SKIP_BLANKS; prefix = xmlParseQuotedString(ctxt); SKIP_BLANKS; - } else if ((CUR == 'A') && (NXT(1) == 'S')) { + } else if ((RAW == 'A') && (NXT(1) == 'S')) { garbage = 0; SKIP(2); SKIP_BLANKS; - if (CUR != '=') continue; + if (RAW != '=') continue; NEXT; SKIP_BLANKS; prefix = xmlParseQuotedString(ctxt); SKIP_BLANKS; - } else if ((CUR == '?') && (NXT(1) == '>')) { + } else if ((RAW == '?') && (NXT(1) == '>')) { garbage = 0; NEXT; } else { @@ -2501,6 +3308,7 @@ xmlParseNamespace(xmlParserCtxtPtr ctxt) { } ctxt->errNo = XML_ERR_NS_DECL_ERROR; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; NEXT; } } @@ -2549,8 +3357,8 @@ xmlScanName(xmlParserCtxtPtr ctxt) { int len = 0; GROW; - if (!IS_LETTER(CUR) && (CUR != '_') && - (CUR != ':')) { + if (!IS_LETTER(RAW) && (RAW != '_') && + (RAW != ':')) { return(NULL); } @@ -2594,35 +3402,35 @@ xmlScanName(xmlParserCtxtPtr ctxt) { xmlChar * xmlParseName(xmlParserCtxtPtr ctxt) { - xmlChar buf[XML_MAX_NAMELEN]; - int len = 0; - xmlChar cur; + xmlChar buf[XML_MAX_NAMELEN + 5]; + int len = 0, l; + int c; GROW; - cur = CUR; - if (!IS_LETTER(cur) && (cur != '_') && - (cur != ':')) { + c = CUR_CHAR(l); + if (!IS_LETTER(c) && (c != '_') && + (c != ':')) { return(NULL); } - while ((IS_LETTER(cur)) || (IS_DIGIT(cur)) || - (cur == '.') || (cur == '-') || - (cur == '_') || (cur == ':') || - (IS_COMBINING(cur)) || - (IS_EXTENDER(cur))) { - buf[len++] = cur; - NEXT; - cur = CUR; + while ((IS_LETTER(c)) || (IS_DIGIT(c)) || + (c == '.') || (c == '-') || + (c == '_') || (c == ':') || + (IS_COMBINING(c)) || + (IS_EXTENDER(c))) { + COPY_BUF(l,buf,len,c); + NEXTL(l); + c = CUR_CHAR(l); if (len >= XML_MAX_NAMELEN) { fprintf(stderr, "xmlParseName: reached XML_MAX_NAMELEN limit\n"); - while ((IS_LETTER(cur)) || (IS_DIGIT(cur)) || - (cur == '.') || (cur == '-') || - (cur == '_') || (cur == ':') || - (IS_COMBINING(cur)) || - (IS_EXTENDER(cur))) { - NEXT; - cur = CUR; + while ((IS_LETTER(c)) || (IS_DIGIT(c)) || + (c == '.') || (c == '-') || + (c == '_') || (c == ':') || + (IS_COMBINING(c)) || + (IS_EXTENDER(c))) { + NEXTL(l); + c = CUR_CHAR(l); } break; } @@ -2650,29 +3458,41 @@ xmlParseName(xmlParserCtxtPtr ctxt) { xmlChar * xmlParseStringName(xmlParserCtxtPtr ctxt, const xmlChar** str) { - const xmlChar *ptr; - const xmlChar *start; - xmlChar cur; - - if ((str == NULL) || (*str == NULL)) return(NULL); - - start = ptr = *str; - cur = *ptr; - if (!IS_LETTER(cur) && (cur != '_') && - (cur != ':')) { + xmlChar buf[XML_MAX_NAMELEN + 5]; + const xmlChar *cur = *str; + int len = 0, l; + int c; + + c = CUR_SCHAR(cur, l); + if (!IS_LETTER(c) && (c != '_') && + (c != ':')) { return(NULL); } - while ((IS_LETTER(cur)) || (IS_DIGIT(cur)) || - (cur == '.') || (cur == '-') || - (cur == '_') || (cur == ':') || - (IS_COMBINING(cur)) || - (IS_EXTENDER(cur))) { - ptr++; - cur = *ptr; + while ((IS_LETTER(c)) || (IS_DIGIT(c)) || + (c == '.') || (c == '-') || + (c == '_') || (c == ':') || + (IS_COMBINING(c)) || + (IS_EXTENDER(c))) { + COPY_BUF(l,buf,len,c); + cur += l; + c = CUR_SCHAR(cur, l); + if (len >= XML_MAX_NAMELEN) { + fprintf(stderr, + "xmlParseName: reached XML_MAX_NAMELEN limit\n"); + while ((IS_LETTER(c)) || (IS_DIGIT(c)) || + (c == '.') || (c == '-') || + (c == '_') || (c == ':') || + (IS_COMBINING(c)) || + (IS_EXTENDER(c))) { + cur += l; + c = CUR_SCHAR(cur, l); + } + break; + } } - *str = ptr; - return(xmlStrndup(start, ptr - start )); + *str = cur; + return(xmlStrndup(buf, len)); } /** @@ -2692,27 +3512,34 @@ xmlChar * xmlParseNmtoken(xmlParserCtxtPtr ctxt) { xmlChar buf[XML_MAX_NAMELEN]; int len = 0; + int c,l; GROW; - while ((IS_LETTER(CUR)) || (IS_DIGIT(CUR)) || - (CUR == '.') || (CUR == '-') || - (CUR == '_') || (CUR == ':') || - (IS_COMBINING(CUR)) || - (IS_EXTENDER(CUR))) { - buf[len++] = CUR; - NEXT; + c = CUR_CHAR(l); + while ((IS_LETTER(c)) || (IS_DIGIT(c)) || + (c == '.') || (c == '-') || + (c == '_') || (c == ':') || + (IS_COMBINING(c)) || + (IS_EXTENDER(c))) { + COPY_BUF(l,buf,len,c); + NEXTL(l); + c = CUR_CHAR(l); if (len >= XML_MAX_NAMELEN) { fprintf(stderr, "xmlParseNmtoken: reached XML_MAX_NAMELEN limit\n"); - while ((IS_LETTER(CUR)) || (IS_DIGIT(CUR)) || - (CUR == '.') || (CUR == '-') || - (CUR == '_') || (CUR == ':') || - (IS_COMBINING(CUR)) || - (IS_EXTENDER(CUR))) - NEXT; + while ((IS_LETTER(c)) || (IS_DIGIT(c)) || + (c == '.') || (c == '-') || + (c == '_') || (c == ':') || + (IS_COMBINING(c)) || + (IS_EXTENDER(c))) { + NEXTL(l); + c = CUR_CHAR(l); + } break; } } + if (len == 0) + return(NULL); return(xmlStrndup(buf, len)); } @@ -2734,18 +3561,20 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) { xmlChar *buf = NULL; int len = 0; int size = XML_PARSER_BUFFER_SIZE; - xmlChar c; + int c, l; xmlChar stop; xmlChar *ret = NULL; + const xmlChar *cur = NULL; xmlParserInputPtr input; - if (CUR == '"') stop = '"'; - else if (CUR == '\'') stop = '\''; + if (RAW == '"') stop = '"'; + else if (RAW == '\'') stop = '\''; else { ctxt->errNo = XML_ERR_ENTITY_NOT_STARTED; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "EntityValue: \" or ' expected\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(NULL); } buf = (xmlChar *) xmlMalloc(size * sizeof(xmlChar)); @@ -2762,7 +3591,7 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) { input = ctxt->input; GROW; NEXT; - c = CUR; + c = CUR_CHAR(l); /* * NOTE: 4.4.5 Included in Literal * When a parameter entity reference appears in a literal entity @@ -2773,7 +3602,7 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) { * the initial entity and the quote is found */ while (IS_CHAR(c) && ((c != stop) || (ctxt->input != input))) { - if (len + 1 >= size) { + if (len + 5 >= size) { size *= 2; buf = xmlRealloc(buf, size * sizeof(xmlChar)); if (buf == NULL) { @@ -2781,22 +3610,60 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) { return(NULL); } } - buf[len++] = c; - NEXT; + COPY_BUF(l,buf,len,c); + NEXTL(l); /* * Pop-up of finished entities. */ - while ((CUR == 0) && (ctxt->inputNr > 1)) + while ((RAW == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt); - c = CUR; + + c = CUR_CHAR(l); if (c == 0) { GROW; - c = CUR; + c = CUR_CHAR(l); } } buf[len] = 0; /* + * Raise problem w.r.t. '&' and '%' being used in non-entities + * reference constructs. Note Charref will be handled in + * xmlStringDecodeEntities() + */ + cur = buf; + while (*cur != 0) { + if ((*cur == '%') || ((*cur == '&') && (cur[1] != '#'))) { + xmlChar *name; + xmlChar tmp = *cur; + + cur++; + name = xmlParseStringName(ctxt, &cur); + if ((name == NULL) || (*cur != ';')) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "EntityValue: '%c' forbidden except for entities references\n", + tmp); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_ENTITY_CHAR_ERROR; + } + if ((ctxt->inSubset == 1) && (tmp == '%')) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "EntityValue: PEReferences forbidden in internal subset\n", + tmp); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_ENTITY_PE_INTERNAL; + } + if (name != NULL) + xmlFree(name); + } + cur++; + } + + /* * Then PEReference entities are substituted. */ if (c != stop) { @@ -2804,13 +3671,15 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "EntityValue: \" expected\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + xmlFree(buf); } else { NEXT; /* * NOTE: 4.4.7 Bypassed * When a general entity reference appears in the EntityValue in * an entity declaration, it is bypassed and left as is. - * so XML_SUBSTITUTE_REF is not set. + * so XML_SUBSTITUTE_REF is not set here. */ ret = xmlStringDecodeEntities(ctxt, buf, XML_SUBSTITUTE_PEREF, 0, 0, 0); @@ -2869,11 +3738,11 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { SHRINK; - if (CUR == '"') { + if (NXT(0) == '"') { ctxt->instate = XML_PARSER_ATTRIBUTE_VALUE; limit = '"'; NEXT; - } else if (CUR == '\'') { + } else if (NXT(0) == '\'') { limit = '\''; ctxt->instate = XML_PARSER_ATTRIBUTE_VALUE; NEXT; @@ -2882,6 +3751,7 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "AttValue: \" or ' expected\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(NULL); } @@ -2900,7 +3770,7 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { * Ok loop until we reach one of the ending char or a size limit. */ cur = CUR; - while ((cur != limit) && (cur != '<')) { + while (((NXT(0) != limit) && (cur != '<')) || (ctxt->token != 0)) { if (cur == 0) break; if ((cur == '&') && (NXT(1) == '#')) { int val = xmlParseCharRef(ctxt); @@ -2909,20 +3779,47 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { ent = xmlParseEntityRef(ctxt); if ((ent != NULL) && (ctxt->replaceEntities != 0)) { - current = ent->content; - while (*current != 0) { - *out++ = *current++; - if (out - buffer > buffer_size - 10) { - int index = out - buffer; - - growBuffer(buffer); - out = &buffer[index]; + xmlChar *rep; + + if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) { + rep = xmlStringDecodeEntities(ctxt, ent->content, + XML_SUBSTITUTE_REF, 0, 0, 0); + if (rep != NULL) { + current = rep; + while (*current != 0) { + *out++ = *current++; + if (out - buffer > buffer_size - 10) { + int index = out - buffer; + + growBuffer(buffer); + out = &buffer[index]; + } + } + xmlFree(rep); } + } else { + if (ent->content != NULL) + *out++ = ent->content[0]; } } else if (ent != NULL) { int i = xmlStrlen(ent->name); const xmlChar *cur = ent->name; + /* + * This may look absurd but is needed to detect + * entities problems + */ + if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) { + xmlChar *rep; + rep = xmlStringDecodeEntities(ctxt, ent->content, + XML_SUBSTITUTE_REF, 0, 0, 0); + if (rep != NULL) + xmlFree(rep); + } + + /* + * Just output the reference + */ *out++ = '&'; if (out - buffer > buffer_size - i - 10) { int index = out - buffer; @@ -2935,7 +3832,7 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { *out++ = ';'; } } else { - /* invalid for UTF-8 , use COPY(out); !!!!!! */ + /* invalid for UTF-8 , use COPY(out); !!! */ if ((cur == 0x20) || (cur == 0xD) || (cur == 0xA) || (cur == 0x9)) { *out++ = 0x20; if (out - buffer > buffer_size - 10) { @@ -2958,17 +3855,19 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { cur = CUR; } *out++ = 0; - if (CUR == '<') { + if (RAW == '<') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Unescaped '<' not allowed in attributes values\n"); ctxt->errNo = XML_ERR_LT_IN_ATTRIBUTE; ctxt->wellFormed = 0; - } else if (CUR != limit) { + ctxt->disableSAX = 1; + } else if (RAW != limit) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "AttValue: ' expected\n"); ctxt->errNo = XML_ERR_ATTRIBUTE_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else NEXT; return(buffer); @@ -2990,14 +3889,15 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { xmlChar *buf = NULL; int len = 0; int size = XML_PARSER_BUFFER_SIZE; - xmlChar cur; + int cur, l; xmlChar stop; + int state = ctxt->instate; SHRINK; - if (CUR == '"') { + if (RAW == '"') { NEXT; stop = '"'; - } else if (CUR == '\'') { + } else if (RAW == '\'') { NEXT; stop = '\''; } else { @@ -3006,6 +3906,7 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { "SystemLiteral \" or ' expected\n"); ctxt->errNo = XML_ERR_LITERAL_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(NULL); } @@ -3014,31 +3915,35 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { fprintf(stderr, "malloc of %d byte failed\n", size); return(NULL); } - cur = CUR; + ctxt->instate = XML_PARSER_SYSTEM_LITERAL; + cur = CUR_CHAR(l); while ((IS_CHAR(cur)) && (cur != stop)) { - if (len + 1 >= size) { + if (len + 5 >= size) { size *= 2; buf = xmlRealloc(buf, size * sizeof(xmlChar)); if (buf == NULL) { fprintf(stderr, "realloc of %d byte failed\n", size); + ctxt->instate = state; return(NULL); } } - buf[len++] = cur; - NEXT; - cur = CUR; + COPY_BUF(l,buf,len,cur); + NEXTL(l); + cur = CUR_CHAR(l); if (cur == 0) { GROW; SHRINK; - cur = CUR; + cur = CUR_CHAR(l); } } buf[len] = 0; + ctxt->instate = state; if (!IS_CHAR(cur)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n"); ctxt->errNo = XML_ERR_LITERAL_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { NEXT; } @@ -3065,10 +3970,10 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { xmlChar stop; SHRINK; - if (CUR == '"') { + if (RAW == '"') { NEXT; stop = '"'; - } else if (CUR == '\'') { + } else if (RAW == '\'') { NEXT; stop = '\''; } else { @@ -3077,6 +3982,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { "SystemLiteral \" or ' expected\n"); ctxt->errNo = XML_ERR_LITERAL_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(NULL); } buf = (xmlChar *) xmlMalloc(size * sizeof(xmlChar)); @@ -3109,6 +4015,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "Unfinished PubidLiteral\n"); ctxt->errNo = XML_ERR_LITERAL_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { NEXT; } @@ -3123,35 +4030,43 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { * parse a CharData section. * if we are within a CDATA section ']]>' marks an end of section. * + * The right angle bracket (>) may be represented using the string ">", + * and must, for compatibility, be escaped using ">" or a character + * reference when it appears in the string "]]>" in content, when that + * string is not marking the end of a CDATA section. + * * [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) */ void xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { - xmlChar buf[XML_PARSER_BIG_BUFFER_SIZE]; + xmlChar buf[XML_PARSER_BIG_BUFFER_SIZE + 5]; int nbchar = 0; - xmlChar cur; + int cur, l; SHRINK; - cur = CUR; - while ((IS_CHAR(cur)) && (cur != '<') && - (cur != '&')) { + cur = CUR_CHAR(l); + while ((IS_CHAR(cur)) && ((cur != '<') || (ctxt->token == '<')) && + ((cur != '&') || (ctxt->token == '&'))) { if ((cur == ']') && (NXT(1) == ']') && (NXT(2) == '>')) { if (cdata) break; else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->warning(ctxt->userData, + ctxt->sax->error(ctxt->userData, "Sequence ']]>' not allowed in content\n"); ctxt->errNo = XML_ERR_MISPLACED_CDATA_END; + /* Should this be relaxed ??? I see a "must here */ + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } } - buf[nbchar++] = CUR; - if (nbchar == XML_PARSER_BIG_BUFFER_SIZE) { + COPY_BUF(l,buf,nbchar,cur); + if (nbchar >= XML_PARSER_BIG_BUFFER_SIZE) { /* * Ok the segment is to be consumed as chars. */ - if (ctxt->sax != NULL) { + if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (areBlanks(ctxt, buf, nbchar)) { if (ctxt->sax->ignorableWhitespace != NULL) ctxt->sax->ignorableWhitespace(ctxt->userData, @@ -3163,14 +4078,14 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) { } nbchar = 0; } - NEXT; - cur = CUR; + NEXTL(l); + cur = CUR_CHAR(l); } if (nbchar != 0) { /* * Ok the segment is to be consumed as chars. */ - if (ctxt->sax != NULL) { + if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (areBlanks(ctxt, buf, nbchar)) { if (ctxt->sax->ignorableWhitespace != NULL) ctxt->sax->ignorableWhitespace(ctxt->userData, buf, nbchar); @@ -3209,7 +4124,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { xmlChar *URI = NULL; SHRINK; - if ((CUR == 'S') && (NXT(1) == 'Y') && + if ((RAW == 'S') && (NXT(1) == 'Y') && (NXT(2) == 'S') && (NXT(3) == 'T') && (NXT(4) == 'E') && (NXT(5) == 'M')) { SKIP(6); @@ -3219,6 +4134,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { "Space required after 'SYSTEM'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; URI = xmlParseSystemLiteral(ctxt); @@ -3228,8 +4144,9 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { "xmlParseExternalID: SYSTEM, no URI\n"); ctxt->errNo = XML_ERR_URI_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } - } else if ((CUR == 'P') && (NXT(1) == 'U') && + } else if ((RAW == 'P') && (NXT(1) == 'U') && (NXT(2) == 'B') && (NXT(3) == 'L') && (NXT(4) == 'I') && (NXT(5) == 'C')) { SKIP(6); @@ -3239,6 +4156,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { "Space required after 'PUBLIC'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; *publicID = xmlParsePubidLiteral(ctxt); @@ -3248,6 +4166,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { "xmlParseExternalID: PUBLIC, no Public Identifier\n"); ctxt->errNo = XML_ERR_PUBID_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } if (strict) { /* @@ -3259,6 +4178,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { "Space required after the Public Identifier\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } } else { /* @@ -3273,7 +4193,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { if (!IS_BLANK(*ptr)) return(NULL); while (IS_BLANK(*ptr)) ptr++; - if ((*ptr != '\'') || (*ptr != '"')) return(NULL); + if ((*ptr != '\'') && (*ptr != '"')) return(NULL); } SKIP_BLANKS; URI = xmlParseSystemLiteral(ctxt); @@ -3283,6 +4203,7 @@ xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) { "xmlParseExternalID: PUBLIC, no URI\n"); ctxt->errNo = XML_ERR_URI_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } } return(URI); @@ -3303,15 +4224,16 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { xmlChar *buf = NULL; int len = 0; int size = XML_PARSER_BUFFER_SIZE; - xmlChar q; - xmlChar r; - xmlChar cur; + int q, ql; + int r, rl; + int cur, l; xmlParserInputState state; + xmlParserInputPtr input = ctxt->input; /* * Check that there is a comment right here. */ - if ((CUR != '<') || (NXT(1) != '!') || + if ((RAW != '<') || (NXT(1) != '!') || (NXT(2) != '-') || (NXT(3) != '-')) return; state = ctxt->instate; @@ -3324,11 +4246,11 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { ctxt->instate = state; return; } - q = CUR; - NEXT; - r = CUR; - NEXT; - cur = CUR; + q = CUR_CHAR(ql); + NEXTL(ql); + r = CUR_CHAR(rl); + NEXTL(rl); + cur = CUR_CHAR(l); while (IS_CHAR(cur) && ((cur != '>') || (r != '-') || (q != '-'))) { @@ -3338,8 +4260,9 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { "Comment must not contain '--' (double-hyphen)`\n"); ctxt->errNo = XML_ERR_HYPHEN_IN_COMMENT; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } - if (len + 1 >= size) { + if (len + 5 >= size) { size *= 2; buf = xmlRealloc(buf, size * sizeof(xmlChar)); if (buf == NULL) { @@ -3348,15 +4271,17 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { return; } } - buf[len++] = q; + COPY_BUF(ql,buf,len,q); q = r; + ql = rl; r = cur; - NEXT; - cur = CUR; + rl = l; + NEXTL(l); + cur = CUR_CHAR(l); if (cur == 0) { SHRINK; GROW; - cur = CUR; + cur = CUR_CHAR(l); } } buf[len] = 0; @@ -3366,9 +4291,20 @@ xmlParseComment(xmlParserCtxtPtr ctxt) { "Comment not terminated \n<!--%.50s\n", buf); ctxt->errNo = XML_ERR_COMMENT_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + xmlFree(buf); } else { + if (input != ctxt->input) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, +"Comment doesn't start and stop in the same entity\n"); + ctxt->errNo = XML_ERR_ENTITY_BOUNDARY; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } NEXT; - if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL)) + if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) && + (!ctxt->disableSAX)) ctxt->sax->comment(ctxt->userData, buf); xmlFree(buf); } @@ -3396,6 +4332,23 @@ xmlParsePITarget(xmlParserCtxtPtr ctxt) { ((name[1] == 'm') || (name[1] == 'M')) && ((name[2] == 'l') || (name[2] == 'L'))) { int i; + if ((name[0] == 'x') && (name[1] == 'm') && + (name[2] == 'l') && (name[3] == 0)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "XML declaration allowed only at the start of the document\n"); + ctxt->errNo = XML_ERR_RESERVED_XML_NAME; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + return(name); + } else if (name[3] == 0) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, "Invalid PI name\n"); + ctxt->errNo = XML_ERR_RESERVED_XML_NAME; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + return(name); + } for (i = 0;;i++) { if (xmlW3CPIs[i] == NULL) break; if (!xmlStrcmp(name, (const xmlChar *)xmlW3CPIs[i])) @@ -3426,11 +4379,12 @@ xmlParsePI(xmlParserCtxtPtr ctxt) { xmlChar *buf = NULL; int len = 0; int size = XML_PARSER_BUFFER_SIZE; - xmlChar cur; + int cur, l; xmlChar *target; xmlParserInputState state; - if ((CUR == '<') && (NXT(1) == '?')) { + if ((RAW == '<') && (NXT(1) == '?')) { + xmlParserInputPtr input = ctxt->input; state = ctxt->instate; ctxt->instate = XML_PARSER_PI; /* @@ -3445,6 +4399,28 @@ xmlParsePI(xmlParserCtxtPtr ctxt) { */ target = xmlParsePITarget(ctxt); if (target != NULL) { + if ((RAW == '?') && (NXT(1) == '>')) { + if (input != ctxt->input) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "PI declaration doesn't start and stop in the same entity\n"); + ctxt->errNo = XML_ERR_ENTITY_BOUNDARY; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + SKIP(2); + + /* + * SAX: PI detected. + */ + if ((ctxt->sax) && (!ctxt->disableSAX) && + (ctxt->sax->processingInstruction != NULL)) + ctxt->sax->processingInstruction(ctxt->userData, + target, NULL); + ctxt->instate = state; + xmlFree(target); + return; + } buf = (xmlChar *) xmlMalloc(size * sizeof(xmlChar)); if (buf == NULL) { fprintf(stderr, "malloc of %d byte failed\n", size); @@ -3458,12 +4434,13 @@ xmlParsePI(xmlParserCtxtPtr ctxt) { "xmlParsePI: PI %s space expected\n", target); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; - cur = CUR; + cur = CUR_CHAR(l); while (IS_CHAR(cur) && ((cur != '?') || (NXT(1) != '>'))) { - if (len + 1 >= size) { + if (len + 5 >= size) { size *= 2; buf = xmlRealloc(buf, size * sizeof(xmlChar)); if (buf == NULL) { @@ -3472,29 +4449,38 @@ xmlParsePI(xmlParserCtxtPtr ctxt) { return; } } - buf[len++] = cur; - NEXT; - cur = CUR; + COPY_BUF(l,buf,len,cur); + NEXTL(l); + cur = CUR_CHAR(l); if (cur == 0) { SHRINK; GROW; - cur = CUR; + cur = CUR_CHAR(l); } } buf[len] = 0; - if (!IS_CHAR(cur)) { + if (cur != '?') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParsePI: PI %s never end ...\n", target); ctxt->errNo = XML_ERR_PI_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { + if (input != ctxt->input) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "PI declaration doesn't start and stop in the same entity\n"); + ctxt->errNo = XML_ERR_ENTITY_BOUNDARY; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } SKIP(2); /* * SAX: PI detected. */ - if ((ctxt->sax) && + if ((ctxt->sax) && (!ctxt->disableSAX) && (ctxt->sax->processingInstruction != NULL)) ctxt->sax->processingInstruction(ctxt->userData, target, buf); @@ -3507,6 +4493,7 @@ xmlParsePI(xmlParserCtxtPtr ctxt) { "xmlParsePI : no target name\n"); ctxt->errNo = XML_ERR_PI_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } ctxt->instate = state; } @@ -3534,11 +4521,12 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) { xmlChar *Pubid; xmlChar *Systemid; - if ((CUR == '<') && (NXT(1) == '!') && + if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == 'N') && (NXT(3) == 'O') && (NXT(4) == 'T') && (NXT(5) == 'A') && (NXT(6) == 'T') && (NXT(7) == 'I') && (NXT(8) == 'O') && (NXT(9) == 'N')) { + xmlParserInputPtr input = ctxt->input; SHRINK; SKIP(10); if (!IS_BLANK(CUR)) { @@ -3547,6 +4535,7 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) { "Space required after '<!NOTATION'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; } SKIP_BLANKS; @@ -3558,6 +4547,7 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) { "NOTATION: Name expected here\n"); ctxt->errNo = XML_ERR_NOTATION_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; } if (!IS_BLANK(CUR)) { @@ -3566,6 +4556,7 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) { "Space required after the NOTATION name'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; } SKIP_BLANKS; @@ -3573,12 +4564,21 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) { /* * Parse the IDs. */ - Systemid = xmlParseExternalID(ctxt, &Pubid, 1); + Systemid = xmlParseExternalID(ctxt, &Pubid, 0); SKIP_BLANKS; - if (CUR == '>') { + if (RAW == '>') { + if (input != ctxt->input) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, +"Notation declaration doesn't start and stop in the same entity\n"); + ctxt->errNo = XML_ERR_ENTITY_BOUNDARY; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } NEXT; - if ((ctxt->sax != NULL) && (ctxt->sax->notationDecl != NULL)) + if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && + (ctxt->sax->notationDecl != NULL)) ctxt->sax->notationDecl(ctxt->userData, name, Pubid, Systemid); } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -3586,6 +4586,7 @@ xmlParseNotationDecl(xmlParserCtxtPtr ctxt) { "'>' required to close NOTATION declaration\n"); ctxt->errNo = XML_ERR_NOTATION_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } xmlFree(name); if (Systemid != NULL) xmlFree(Systemid); @@ -3625,10 +4626,11 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { xmlChar *orig = NULL; GROW; - if ((CUR == '<') && (NXT(1) == '!') && + if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == 'E') && (NXT(3) == 'N') && (NXT(4) == 'T') && (NXT(5) == 'I') && (NXT(6) == 'T') && (NXT(7) == 'Y')) { + xmlParserInputPtr input = ctxt->input; ctxt->instate = XML_PARSER_ENTITY_DECL; SHRINK; SKIP(8); @@ -3638,10 +4640,11 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { "Space required after '<!ENTITY'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; - if (CUR == '%') { + if (RAW == '%') { NEXT; if (!IS_BLANK(CUR)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -3649,6 +4652,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { "Space required after '%'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; isParameter = 1; @@ -3660,6 +4664,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseEntityDecl: no name\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; } if (!IS_BLANK(CUR)) { @@ -3668,6 +4673,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { "Space required after the entity name\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; @@ -3675,41 +4681,61 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { * handle the various case of definitions... */ if (isParameter) { - if ((CUR == '"') || (CUR == '\'')) + if ((RAW == '"') || (RAW == '\'')) value = xmlParseEntityValue(ctxt, &orig); if (value) { - if ((ctxt->sax != NULL) && (ctxt->sax->entityDecl != NULL)) + if ((ctxt->sax != NULL) && + (!ctxt->disableSAX) && (ctxt->sax->entityDecl != NULL)) ctxt->sax->entityDecl(ctxt->userData, name, XML_INTERNAL_PARAMETER_ENTITY, NULL, NULL, value); } else { URI = xmlParseExternalID(ctxt, &literal, 1); + if ((URI == NULL) && (literal == NULL)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Entity value required\n"); + ctxt->errNo = XML_ERR_VALUE_REQUIRED; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } if (URI) { - if ((ctxt->sax != NULL) && (ctxt->sax->entityDecl != NULL)) + if ((ctxt->sax != NULL) && + (!ctxt->disableSAX) && (ctxt->sax->entityDecl != NULL)) ctxt->sax->entityDecl(ctxt->userData, name, XML_EXTERNAL_PARAMETER_ENTITY, literal, URI, NULL); } } } else { - if ((CUR == '"') || (CUR == '\'')) { + if ((RAW == '"') || (RAW == '\'')) { value = xmlParseEntityValue(ctxt, &orig); - if ((ctxt->sax != NULL) && (ctxt->sax->entityDecl != NULL)) + if ((ctxt->sax != NULL) && + (!ctxt->disableSAX) && (ctxt->sax->entityDecl != NULL)) ctxt->sax->entityDecl(ctxt->userData, name, XML_INTERNAL_GENERAL_ENTITY, NULL, NULL, value); } else { URI = xmlParseExternalID(ctxt, &literal, 1); - if ((CUR != '>') && (!IS_BLANK(CUR))) { + if ((URI == NULL) && (literal == NULL)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Entity value required\n"); + ctxt->errNo = XML_ERR_VALUE_REQUIRED; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + if ((RAW != '>') && (!IS_BLANK(CUR))) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Space required before 'NDATA'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; - if ((CUR == 'N') && (NXT(1) == 'D') && + if ((RAW == 'N') && (NXT(1) == 'D') && (NXT(2) == 'A') && (NXT(3) == 'T') && (NXT(4) == 'A')) { SKIP(5); @@ -3719,15 +4745,17 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { "Space required after 'NDATA'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; ndata = xmlParseName(ctxt); - if ((ctxt->sax != NULL) && + if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && (ctxt->sax->unparsedEntityDecl != NULL)) ctxt->sax->unparsedEntityDecl(ctxt->userData, name, literal, URI, ndata); } else { - if ((ctxt->sax != NULL) && (ctxt->sax->entityDecl != NULL)) + if ((ctxt->sax != NULL) && + (!ctxt->disableSAX) && (ctxt->sax->entityDecl != NULL)) ctxt->sax->entityDecl(ctxt->userData, name, XML_EXTERNAL_GENERAL_PARSED_ENTITY, literal, URI, NULL); @@ -3735,14 +4763,24 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { } } SKIP_BLANKS; - if (CUR != '>') { + if (RAW != '>') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseEntityDecl: entity %s not terminated\n", name); ctxt->errNo = XML_ERR_ENTITY_NOT_FINISHED; ctxt->wellFormed = 0; - } else + ctxt->disableSAX = 1; + } else { + if (input != ctxt->input) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, +"Entity declaration doesn't start and stop in the same entity\n"); + ctxt->errNo = XML_ERR_ENTITY_BOUNDARY; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } NEXT; + } if (orig != NULL) { /* * Ugly mechanism to save the raw entity value. @@ -3809,7 +4847,7 @@ xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) { xmlChar *ret; *value = NULL; - if ((CUR == '#') && (NXT(1) == 'R') && + if ((RAW == '#') && (NXT(1) == 'R') && (NXT(2) == 'E') && (NXT(3) == 'Q') && (NXT(4) == 'U') && (NXT(5) == 'I') && (NXT(6) == 'R') && (NXT(7) == 'E') && @@ -3817,7 +4855,7 @@ xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) { SKIP(9); return(XML_ATTRIBUTE_REQUIRED); } - if ((CUR == '#') && (NXT(1) == 'I') && + if ((RAW == '#') && (NXT(1) == 'I') && (NXT(2) == 'M') && (NXT(3) == 'P') && (NXT(4) == 'L') && (NXT(5) == 'I') && (NXT(6) == 'E') && (NXT(7) == 'D')) { @@ -3825,7 +4863,7 @@ xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) { return(XML_ATTRIBUTE_IMPLIED); } val = XML_ATTRIBUTE_NONE; - if ((CUR == '#') && (NXT(1) == 'F') && + if ((RAW == '#') && (NXT(1) == 'F') && (NXT(2) == 'I') && (NXT(3) == 'X') && (NXT(4) == 'E') && (NXT(5) == 'D')) { SKIP(6); @@ -3836,6 +4874,7 @@ xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) { "Space required after '#FIXED'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; } @@ -3846,6 +4885,7 @@ xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) { ctxt->sax->error(ctxt->userData, "Attribute default value declaration error\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else *value = ret; return(val); @@ -3873,12 +4913,13 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { xmlChar *name; xmlEnumerationPtr ret = NULL, last = NULL, cur; - if (CUR != '(') { + if (RAW != '(') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "'(' required to start 'NOTATION'\n"); ctxt->errNo = XML_ERR_NOTATION_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(NULL); } SHRINK; @@ -3892,6 +4933,7 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { "Name expected in NOTATION declaration\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(ret); } cur = xmlCreateEnumeration(name); @@ -3903,13 +4945,16 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) { last = cur; } SKIP_BLANKS; - } while (CUR == '|'); - if (CUR != ')') { + } while (RAW == '|'); + if (RAW != ')') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "')' required to finish NOTATION declaration\n"); ctxt->errNo = XML_ERR_NOTATION_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + if ((last != NULL) && (last != ret)) + xmlFreeEnumeration(last); return(ret); } NEXT; @@ -3936,12 +4981,13 @@ xmlParseEnumerationType(xmlParserCtxtPtr ctxt) { xmlChar *name; xmlEnumerationPtr ret = NULL, last = NULL, cur; - if (CUR != '(') { + if (RAW != '(') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "'(' required to start ATTLIST enumeration\n"); ctxt->errNo = XML_ERR_ATTLIST_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(NULL); } SHRINK; @@ -3955,6 +5001,7 @@ xmlParseEnumerationType(xmlParserCtxtPtr ctxt) { "NmToken expected in ATTLIST enumeration\n"); ctxt->errNo = XML_ERR_NMTOKEN_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(ret); } cur = xmlCreateEnumeration(name); @@ -3966,13 +5013,14 @@ xmlParseEnumerationType(xmlParserCtxtPtr ctxt) { last = cur; } SKIP_BLANKS; - } while (CUR == '|'); - if (CUR != ')') { + } while (RAW == '|'); + if (RAW != ')') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "')' required to finish ATTLIST enumeration\n"); ctxt->errNo = XML_ERR_ATTLIST_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(ret); } NEXT; @@ -3996,7 +5044,7 @@ xmlParseEnumerationType(xmlParserCtxtPtr ctxt) { int xmlParseEnumeratedType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) { - if ((CUR == 'N') && (NXT(1) == 'O') && + if ((RAW == 'N') && (NXT(1) == 'O') && (NXT(2) == 'T') && (NXT(3) == 'A') && (NXT(4) == 'T') && (NXT(5) == 'I') && (NXT(6) == 'O') && (NXT(7) == 'N')) { @@ -4007,6 +5055,7 @@ xmlParseEnumeratedType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) { "Space required after 'NOTATION'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(0); } SKIP_BLANKS; @@ -4067,42 +5116,42 @@ xmlParseEnumeratedType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) { int xmlParseAttributeType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) { SHRINK; - if ((CUR == 'C') && (NXT(1) == 'D') && + if ((RAW == 'C') && (NXT(1) == 'D') && (NXT(2) == 'A') && (NXT(3) == 'T') && (NXT(4) == 'A')) { SKIP(5); return(XML_ATTRIBUTE_CDATA); - } else if ((CUR == 'I') && (NXT(1) == 'D') && + } else if ((RAW == 'I') && (NXT(1) == 'D') && (NXT(2) == 'R') && (NXT(3) == 'E') && (NXT(4) == 'F') && (NXT(5) == 'S')) { SKIP(6); return(XML_ATTRIBUTE_IDREFS); - } else if ((CUR == 'I') && (NXT(1) == 'D') && + } else if ((RAW == 'I') && (NXT(1) == 'D') && (NXT(2) == 'R') && (NXT(3) == 'E') && (NXT(4) == 'F')) { SKIP(5); return(XML_ATTRIBUTE_IDREF); - } else if ((CUR == 'I') && (NXT(1) == 'D')) { + } else if ((RAW == 'I') && (NXT(1) == 'D')) { SKIP(2); return(XML_ATTRIBUTE_ID); - } else if ((CUR == 'E') && (NXT(1) == 'N') && + } else if ((RAW == 'E') && (NXT(1) == 'N') && (NXT(2) == 'T') && (NXT(3) == 'I') && (NXT(4) == 'T') && (NXT(5) == 'Y')) { SKIP(6); return(XML_ATTRIBUTE_ENTITY); - } else if ((CUR == 'E') && (NXT(1) == 'N') && + } else if ((RAW == 'E') && (NXT(1) == 'N') && (NXT(2) == 'T') && (NXT(3) == 'I') && (NXT(4) == 'T') && (NXT(5) == 'I') && (NXT(6) == 'E') && (NXT(7) == 'S')) { SKIP(8); return(XML_ATTRIBUTE_ENTITIES); - } else if ((CUR == 'N') && (NXT(1) == 'M') && + } else if ((RAW == 'N') && (NXT(1) == 'M') && (NXT(2) == 'T') && (NXT(3) == 'O') && (NXT(4) == 'K') && (NXT(5) == 'E') && (NXT(6) == 'N') && (NXT(7) == 'S')) { SKIP(8); return(XML_ATTRIBUTE_NMTOKENS); - } else if ((CUR == 'N') && (NXT(1) == 'M') && + } else if ((RAW == 'N') && (NXT(1) == 'M') && (NXT(2) == 'T') && (NXT(3) == 'O') && (NXT(4) == 'K') && (NXT(5) == 'E') && (NXT(6) == 'N')) { @@ -4129,11 +5178,13 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { xmlChar *attrName; xmlEnumerationPtr tree; - if ((CUR == '<') && (NXT(1) == '!') && + if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == 'A') && (NXT(3) == 'T') && (NXT(4) == 'T') && (NXT(5) == 'L') && (NXT(6) == 'I') && (NXT(7) == 'S') && (NXT(8) == 'T')) { + xmlParserInputPtr input = ctxt->input; + SKIP(9); if (!IS_BLANK(CUR)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -4141,6 +5192,7 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { "Space required after '<!ATTLIST'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; elemName = xmlParseName(ctxt); @@ -4150,10 +5202,11 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { "ATTLIST: no name for Element\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return; } SKIP_BLANKS; - while (CUR != '>') { + while (RAW != '>') { const xmlChar *check = CUR_PTR; int type; int def; @@ -4167,6 +5220,7 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { "ATTLIST: no name for Attribute\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; break; } GROW; @@ -4176,12 +5230,23 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { "Space required after the attribute name\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + if (attrName != NULL) + xmlFree(attrName); + if (defaultValue != NULL) + xmlFree(defaultValue); break; } SKIP_BLANKS; type = xmlParseAttributeType(ctxt, &tree); - if (type <= 0) break; + if (type <= 0) { + if (attrName != NULL) + xmlFree(attrName); + if (defaultValue != NULL) + xmlFree(defaultValue); + break; + } GROW; if (!IS_BLANK(CUR)) { @@ -4190,21 +5255,43 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { "Space required after the attribute type\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + if (attrName != NULL) + xmlFree(attrName); + if (defaultValue != NULL) + xmlFree(defaultValue); + if (tree != NULL) + xmlFreeEnumeration(tree); break; } SKIP_BLANKS; def = xmlParseDefaultDecl(ctxt, &defaultValue); - if (def <= 0) break; + if (def <= 0) { + if (attrName != NULL) + xmlFree(attrName); + if (defaultValue != NULL) + xmlFree(defaultValue); + if (tree != NULL) + xmlFreeEnumeration(tree); + break; + } GROW; - if (CUR != '>') { + if (RAW != '>') { if (!IS_BLANK(CUR)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Space required after the attribute default value\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + if (attrName != NULL) + xmlFree(attrName); + if (defaultValue != NULL) + xmlFree(defaultValue); + if (tree != NULL) + xmlFreeEnumeration(tree); break; } SKIP_BLANKS; @@ -4214,9 +5301,16 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseAttributeListDecl: detected internal error\n"); ctxt->errNo = XML_ERR_INTERNAL_ERROR; + if (attrName != NULL) + xmlFree(attrName); + if (defaultValue != NULL) + xmlFree(defaultValue); + if (tree != NULL) + xmlFreeEnumeration(tree); break; } - if ((ctxt->sax != NULL) && (ctxt->sax->attributeDecl != NULL)) + if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && + (ctxt->sax->attributeDecl != NULL)) ctxt->sax->attributeDecl(ctxt->userData, elemName, attrName, type, def, defaultValue, tree); if (attrName != NULL) @@ -4225,8 +5319,17 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) { xmlFree(defaultValue); GROW; } - if (CUR == '>') + if (RAW == '>') { + if (input != ctxt->input) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, +"Attribute list declaration doesn't start and stop in the same entity\n"); + ctxt->errNo = XML_ERR_ENTITY_BOUNDARY; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } NEXT; + } xmlFree(elemName); } @@ -4256,27 +5359,28 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt) { xmlChar *elem = NULL; GROW; - if ((CUR == '#') && (NXT(1) == 'P') && + if ((RAW == '#') && (NXT(1) == 'P') && (NXT(2) == 'C') && (NXT(3) == 'D') && (NXT(4) == 'A') && (NXT(5) == 'T') && (NXT(6) == 'A')) { SKIP(7); SKIP_BLANKS; SHRINK; - if (CUR == ')') { + if (RAW == ')') { + ctxt->entity = ctxt->input; NEXT; ret = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_PCDATA); - if (CUR == '*') { + if (RAW == '*') { ret->ocur = XML_ELEMENT_CONTENT_MULT; NEXT; } return(ret); } - if ((CUR == '(') || (CUR == '|')) { + if ((RAW == '(') || (RAW == '|')) { ret = cur = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_PCDATA); if (ret == NULL) return(NULL); } - while (CUR == '|') { + while (RAW == '|') { NEXT; if (elem == NULL) { ret = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_OR); @@ -4299,19 +5403,21 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt) { "xmlParseElementMixedContentDecl : Name expected\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; xmlFreeElementContent(cur); return(NULL); } SKIP_BLANKS; GROW; } - if ((CUR == ')') && (NXT(1) == '*')) { + if ((RAW == ')') && (NXT(1) == '*')) { if (elem != NULL) { cur->c2 = xmlNewElementContent(elem, XML_ELEMENT_CONTENT_ELEMENT); xmlFree(elem); } ret->ocur = XML_ELEMENT_CONTENT_MULT; + ctxt->entity = ctxt->input; SKIP(2); } else { if (elem != NULL) xmlFree(elem); @@ -4320,6 +5426,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt) { "xmlParseElementMixedContentDecl : '|' or ')*' expected\n"); ctxt->errNo = XML_ERR_MIXED_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; xmlFreeElementContent(ret); return(NULL); } @@ -4330,6 +5437,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt) { "xmlParseElementMixedContentDecl : '#PCDATA' expected\n"); ctxt->errNo = XML_ERR_PCDATA_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } return(ret); } @@ -4372,7 +5480,7 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { SKIP_BLANKS; GROW; - if (CUR == '(') { + if (RAW == '(') { /* Recurse on first child */ NEXT; SKIP_BLANKS; @@ -4387,17 +5495,18 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { "xmlParseElementChildrenContentDecl : Name or '(' expected\n"); ctxt->errNo = XML_ERR_ELEMCONTENT_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(NULL); } cur = ret = xmlNewElementContent(elem, XML_ELEMENT_CONTENT_ELEMENT); GROW; - if (CUR == '?') { + if (RAW == '?') { cur->ocur = XML_ELEMENT_CONTENT_OPT; NEXT; - } else if (CUR == '*') { + } else if (RAW == '*') { cur->ocur = XML_ELEMENT_CONTENT_MULT; NEXT; - } else if (CUR == '+') { + } else if (RAW == '+') { cur->ocur = XML_ELEMENT_CONTENT_PLUS; NEXT; } else { @@ -4408,11 +5517,11 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { } SKIP_BLANKS; SHRINK; - while (CUR != ')') { + while (RAW != ')') { /* * Each loop we parse one separator and one element. */ - if (CUR == ',') { + if (RAW == ',') { if (type == 0) type = CUR; /* @@ -4425,7 +5534,13 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { type); ctxt->errNo = XML_ERR_SEPARATOR_REQUIRED; ctxt->wellFormed = 0; - xmlFreeElementContent(ret); + ctxt->disableSAX = 1; + if ((op != NULL) && (op != ret)) + xmlFreeElementContent(op); + if ((last != NULL) && (last != ret)) + xmlFreeElementContent(last); + if (ret != NULL) + xmlFreeElementContent(ret); return(NULL); } NEXT; @@ -4444,7 +5559,7 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { cur =op; last = NULL; } - } else if (CUR == '|') { + } else if (RAW == '|') { if (type == 0) type = CUR; /* @@ -4457,14 +5572,25 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { type); ctxt->errNo = XML_ERR_SEPARATOR_REQUIRED; ctxt->wellFormed = 0; - xmlFreeElementContent(ret); + ctxt->disableSAX = 1; + if ((op != NULL) && (op != ret)) + xmlFreeElementContent(op); + if ((last != NULL) && (last != ret)) + xmlFreeElementContent(last); + if (ret != NULL) + xmlFreeElementContent(ret); return(NULL); } NEXT; op = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_OR); if (op == NULL) { - xmlFreeElementContent(ret); + if ((op != NULL) && (op != ret)) + xmlFreeElementContent(op); + if ((last != NULL) && (last != ret)) + xmlFreeElementContent(last); + if (ret != NULL) + xmlFreeElementContent(ret); return(NULL); } if (last == NULL) { @@ -4481,14 +5607,20 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseElementChildrenContentDecl : ',' '|' or ')' expected\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_ELEMCONTENT_NOT_FINISHED; - xmlFreeElementContent(ret); + if ((op != NULL) && (op != ret)) + xmlFreeElementContent(op); + if ((last != NULL) && (last != ret)) + xmlFreeElementContent(last); + if (ret != NULL) + xmlFreeElementContent(ret); return(NULL); } GROW; SKIP_BLANKS; GROW; - if (CUR == '(') { + if (RAW == '(') { /* Recurse on second child */ NEXT; SKIP_BLANKS; @@ -4502,17 +5634,24 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { "xmlParseElementChildrenContentDecl : Name or '(' expected\n"); ctxt->errNo = XML_ERR_ELEMCONTENT_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + if ((op != NULL) && (op != ret)) + xmlFreeElementContent(op); + if ((last != NULL) && (last != ret)) + xmlFreeElementContent(last); + if (ret != NULL) + xmlFreeElementContent(ret); return(NULL); } last = xmlNewElementContent(elem, XML_ELEMENT_CONTENT_ELEMENT); xmlFree(elem); - if (CUR == '?') { + if (RAW == '?') { last->ocur = XML_ELEMENT_CONTENT_OPT; NEXT; - } else if (CUR == '*') { + } else if (RAW == '*') { last->ocur = XML_ELEMENT_CONTENT_MULT; NEXT; - } else if (CUR == '+') { + } else if (RAW == '+') { last->ocur = XML_ELEMENT_CONTENT_PLUS; NEXT; } else { @@ -4525,14 +5664,15 @@ xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt) { if ((cur != NULL) && (last != NULL)) { cur->c2 = last; } + ctxt->entity = ctxt->input; NEXT; - if (CUR == '?') { + if (RAW == '?') { ret->ocur = XML_ELEMENT_CONTENT_OPT; NEXT; - } else if (CUR == '*') { + } else if (RAW == '*') { ret->ocur = XML_ELEMENT_CONTENT_MULT; NEXT; - } else if (CUR == '+') { + } else if (RAW == '+') { ret->ocur = XML_ELEMENT_CONTENT_PLUS; NEXT; } @@ -4558,22 +5698,24 @@ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, xmlChar *name, xmlElementContentPtr *result) { xmlElementContentPtr tree = NULL; + xmlParserInputPtr input = ctxt->input; int res; *result = NULL; - if (CUR != '(') { + if (RAW != '(') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseElementContentDecl : '(' expected\n"); ctxt->errNo = XML_ERR_ELEMCONTENT_NOT_STARTED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(-1); } NEXT; GROW; SKIP_BLANKS; - if ((CUR == '#') && (NXT(1) == 'P') && + if ((RAW == '#') && (NXT(1) == 'P') && (NXT(2) == 'C') && (NXT(3) == 'D') && (NXT(4) == 'A') && (NXT(5) == 'T') && (NXT(6) == 'A')) { @@ -4583,13 +5725,22 @@ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, xmlChar *name, tree = xmlParseElementChildrenContentDecl(ctxt); res = XML_ELEMENT_TYPE_ELEMENT; } + if ((ctxt->entity != NULL) && (input != ctxt->entity)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, +"Element content declaration doesn't start and stop in the same entity\n"); + ctxt->errNo = XML_ERR_ENTITY_BOUNDARY; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } SKIP_BLANKS; /**************************** - if (CUR != ')') { + if (RAW != ')') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseElementContentDecl : ')' expected\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(-1); } ****************************/ @@ -4617,11 +5768,13 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { xmlElementContentPtr content = NULL; GROW; - if ((CUR == '<') && (NXT(1) == '!') && + if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == 'E') && (NXT(3) == 'L') && (NXT(4) == 'E') && (NXT(5) == 'M') && (NXT(6) == 'E') && (NXT(7) == 'N') && (NXT(8) == 'T')) { + xmlParserInputPtr input = ctxt->input; + SKIP(9); if (!IS_BLANK(CUR)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -4629,6 +5782,7 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { "Space required after 'ELEMENT'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; name = xmlParseName(ctxt); @@ -4638,6 +5792,7 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { "xmlParseElementDecl: no name for Element\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(-1); } if (!IS_BLANK(CUR)) { @@ -4646,9 +5801,10 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { "Space required after the element name\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; - if ((CUR == 'E') && (NXT(1) == 'M') && + if ((RAW == 'E') && (NXT(1) == 'M') && (NXT(2) == 'P') && (NXT(3) == 'T') && (NXT(4) == 'Y')) { SKIP(5); @@ -4656,20 +5812,20 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { * Element must always be empty. */ ret = XML_ELEMENT_TYPE_EMPTY; - } else if ((CUR == 'A') && (NXT(1) == 'N') && + } else if ((RAW == 'A') && (NXT(1) == 'N') && (NXT(2) == 'Y')) { SKIP(3); /* * Element is a generic container. */ ret = XML_ELEMENT_TYPE_ANY; - } else if (CUR == '(') { + } else if (RAW == '(') { ret = xmlParseElementContentDecl(ctxt, name, &content); } else { /* * [ WFC: PEs in Internal Subset ] error handling. */ - if ((CUR == '%') && (ctxt->external == 0) && + if ((RAW == '%') && (ctxt->external == 0) && (ctxt->inputNr == 1)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, @@ -4682,6 +5838,7 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { ctxt->errNo = XML_ERR_ELEMCONTENT_NOT_STARTED; } ctxt->wellFormed = 0; + ctxt->disableSAX = 1; if (name != NULL) xmlFree(name); return(-1); } @@ -4690,19 +5847,30 @@ xmlParseElementDecl(xmlParserCtxtPtr ctxt) { /* * Pop-up of finished entities. */ - while ((CUR == 0) && (ctxt->inputNr > 1)) + while ((RAW == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt); SKIP_BLANKS; - if (CUR != '>') { + if (RAW != '>') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseElementDecl: expected '>' at the end\n"); ctxt->errNo = XML_ERR_GT_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { + if (input != ctxt->input) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, +"Element declaration doesn't start and stop in the same entity\n"); + ctxt->errNo = XML_ERR_ENTITY_BOUNDARY; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + NEXT; - if ((ctxt->sax != NULL) && (ctxt->sax->elementDecl != NULL)) + if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && + (ctxt->sax->elementDecl != NULL)) ctxt->sax->elementDecl(ctxt->userData, name, ret, content); } @@ -4764,13 +5932,12 @@ xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) { * * [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' * - * Returns the only valuable info for an external parsed entity, the encoding + * Question: Seems that EncodingDecl is mandatory ? Is that a typo ? */ -xmlChar * +void xmlParseTextDecl(xmlParserCtxtPtr ctxt) { xmlChar *version; - xmlChar *encoding = NULL; /* * We know that '<?xml' is here. @@ -4783,6 +5950,7 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) { "Space needed after '<?xml'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; @@ -4792,8 +5960,7 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) { version = xmlParseVersionInfo(ctxt); if (version == NULL) version = xmlCharStrdup(XML_DEFAULT_VERSION); - ctxt->version = xmlStrdup(version); - xmlFree(version); + ctxt->input->version = version; /* * We must have the encoding declaration @@ -4803,19 +5970,21 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "Space needed here\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } - encoding = xmlParseEncodingDecl(ctxt); + ctxt->input->encoding = xmlParseEncodingDecl(ctxt); SKIP_BLANKS; - if ((CUR == '?') && (NXT(1) == '>')) { + if ((RAW == '?') && (NXT(1) == '>')) { SKIP(2); - } else if (CUR == '>') { + } else if (RAW == '>') { /* Deprecated old WD ... */ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "XML declaration must end-up with '?>'\n"); ctxt->errNo = XML_ERR_XMLDECL_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; NEXT; } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -4823,10 +5992,10 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) { "parsing XML declaration: '?>' expected\n"); ctxt->errNo = XML_ERR_XMLDECL_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; MOVETO_ENDTAG(CUR_PTR); NEXT; } - return(encoding); } /* @@ -4844,33 +6013,129 @@ xmlParseTextDecl(xmlParserCtxtPtr ctxt) { void xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { - if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) - ctxt->sax->warning(ctxt->userData, - "XML conditional section not supported\n"); - /* - * Skip up to the end of the conditionnal section. - */ - while ((CUR != 0) && ((CUR != ']') || (NXT(1) != ']') || (NXT(2) != '>'))) { - NEXT; + SKIP(3); + SKIP_BLANKS; + if ((RAW == 'I') && (NXT(1) == 'N') && (NXT(2) == 'C') && + (NXT(3) == 'L') && (NXT(4) == 'U') && (NXT(5) == 'D') && + (NXT(6) == 'E')) { + SKIP(7); + SKIP_BLANKS; + if (RAW != '[') { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "XML conditional section '[' expected\n"); + ctxt->errNo = XML_ERR_CONDSEC_INVALID; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } else { + NEXT; + } + while ((RAW != 0) && ((RAW != ']') || (NXT(1) != ']') || + (NXT(2) != '>'))) { + const xmlChar *check = CUR_PTR; + int cons = ctxt->input->consumed; + int tok = ctxt->token; + + if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) { + xmlParseConditionalSections(ctxt); + } else if (IS_BLANK(CUR)) { + NEXT; + } else if (RAW == '%') { + xmlParsePEReference(ctxt); + } else + xmlParseMarkupDecl(ctxt); + + /* + * Pop-up of finished entities. + */ + while ((RAW == 0) && (ctxt->inputNr > 1)) + xmlPopInput(ctxt); + + if ((CUR_PTR == check) && (cons == ctxt->input->consumed) && + (tok == ctxt->token)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Content error in the external subset\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_EXT_SUBSET_NOT_FINISHED; + break; + } + } + } else if ((RAW == 'I') && (NXT(1) == 'G') && (NXT(2) == 'N') && + (NXT(3) == 'O') && (NXT(4) == 'R') && (NXT(5) == 'E')) { + int state; + + SKIP(6); + SKIP_BLANKS; + if (RAW != '[') { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "XML conditional section '[' expected\n"); + ctxt->errNo = XML_ERR_CONDSEC_INVALID; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } else { + NEXT; + } + /* - * Pop-up of finished entities. + * Parse up to the end of the conditionnal section + * But disable SAX event generating DTD building in the meantime */ - while ((CUR == 0) && (ctxt->inputNr > 1)) - xmlPopInput(ctxt); + state = ctxt->disableSAX; + while ((RAW != 0) && ((RAW != ']') || (NXT(1) != ']') || + (NXT(2) != '>'))) { + const xmlChar *check = CUR_PTR; + int cons = ctxt->input->consumed; + int tok = ctxt->token; - if (CUR == 0) - GROW; + if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) { + xmlParseConditionalSections(ctxt); + } else if (IS_BLANK(CUR)) { + NEXT; + } else if (RAW == '%') { + xmlParsePEReference(ctxt); + } else + xmlParseMarkupDecl(ctxt); + + /* + * Pop-up of finished entities. + */ + while ((RAW == 0) && (ctxt->inputNr > 1)) + xmlPopInput(ctxt); + + if ((CUR_PTR == check) && (cons == ctxt->input->consumed) && + (tok == ctxt->token)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Content error in the external subset\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_EXT_SUBSET_NOT_FINISHED; + break; + } + } + ctxt->disableSAX = state; + } else { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "XML conditional section INCLUDE or IGNORE keyword expected\n"); + ctxt->errNo = XML_ERR_CONDSEC_INVALID; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } - if (CUR == 0) + if (RAW == 0) SHRINK; - if (CUR == 0) { + if (RAW == 0) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "XML conditional section not closed\n"); ctxt->errNo = XML_ERR_CONDSEC_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { SKIP(3); } @@ -4892,14 +6157,10 @@ void xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, const xmlChar *SystemID) { GROW; - if ((CUR == '<') && (NXT(1) == '?') && + if ((RAW == '<') && (NXT(1) == '?') && (NXT(2) == 'x') && (NXT(3) == 'm') && (NXT(4) == 'l')) { - xmlChar *decl; - - decl = xmlParseTextDecl(ctxt); - if (decl != NULL) - xmlFree(decl); + xmlParseTextDecl(ctxt); } if (ctxt->myDoc == NULL) { ctxt->myDoc = xmlNewDoc(BAD_CAST "1.0"); @@ -4909,17 +6170,18 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, ctxt->instate = XML_PARSER_DTD; ctxt->external = 1; - while (((CUR == '<') && (NXT(1) == '?')) || - ((CUR == '<') && (NXT(1) == '!')) || + while (((RAW == '<') && (NXT(1) == '?')) || + ((RAW == '<') && (NXT(1) == '!')) || IS_BLANK(CUR)) { const xmlChar *check = CUR_PTR; int cons = ctxt->input->consumed; + int tok = ctxt->token; - if ((CUR == '<') && (NXT(1) == '!') && (NXT(2) == '[')) { + if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) { xmlParseConditionalSections(ctxt); } else if (IS_BLANK(CUR)) { NEXT; - } else if (CUR == '%') { + } else if (RAW == '%') { xmlParsePEReference(ctxt); } else xmlParseMarkupDecl(ctxt); @@ -4927,25 +6189,28 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, /* * Pop-up of finished entities. */ - while ((CUR == 0) && (ctxt->inputNr > 1)) + while ((RAW == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt); - if ((CUR_PTR == check) && (cons == ctxt->input->consumed)) { + if ((CUR_PTR == check) && (cons == ctxt->input->consumed) && + (tok == ctxt->token)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Content error in the external subset\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_EXT_SUBSET_NOT_FINISHED; break; } } - if (CUR != 0) { + if (RAW != 0) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Extra content at the end of the document\n"); ctxt->errNo = XML_ERR_EXT_SUBSET_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } } @@ -4965,12 +6230,13 @@ void xmlParseReference(xmlParserCtxtPtr ctxt) { xmlEntityPtr ent; xmlChar *val; - if (CUR != '&') return; + if (RAW != '&') return; if (ctxt->inputNr > 1) { xmlChar cur[2] = { '&' , 0 } ; - if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL)) + if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL) && + (!ctxt->disableSAX)) ctxt->sax->characters(ctxt->userData, cur, 1); if (ctxt->token == '&') ctxt->token = 0; @@ -4980,20 +6246,155 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { return; } if (NXT(1) == '#') { - xmlChar out[2]; + int i = 0; + xmlChar out[10]; + int hex = NXT(2); int val = xmlParseCharRef(ctxt); - /* invalid for UTF-8 variable encoding !!!!! */ - out[0] = val; - out[1] = 0; - if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL)) - ctxt->sax->characters(ctxt->userData, out, 1); + + if (ctxt->encoding != NULL) { + /* + * So we are using non-UTF-8 buffers + * Check that the char fit on 8bits, if not + * generate a CharRef. + */ + if (val <= 0xFF) { + out[0] = val; + out[1] = 0; + if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL) && + (!ctxt->disableSAX)) + ctxt->sax->characters(ctxt->userData, out, 1); + } else { + if ((hex == 'x') || (hex == 'X')) + sprintf((char *)out, "#x%X", val); + else + sprintf((char *)out, "#%d", val); + if ((ctxt->sax != NULL) && (ctxt->sax->reference != NULL) && + (!ctxt->disableSAX)) + ctxt->sax->reference(ctxt->userData, out); + } + } else { + /* + * Just encode the value in UTF-8 + */ + COPY_BUF(0 ,out, i, val); + out[i] = 0; + if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL) && + (!ctxt->disableSAX)) + ctxt->sax->characters(ctxt->userData, out, i); + } } else { ent = xmlParseEntityRef(ctxt); if (ent == NULL) return; if ((ent->name != NULL) && - (ent->type != XML_INTERNAL_PREDEFINED_ENTITY)) { + (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY)) { + xmlNodePtr list = NULL; + int ret; + + + /* + * The first reference to the entity trigger a parsing phase + * where the ent->children is filled with the result from + * the parsing. + */ + if (ent->children == NULL) { + xmlChar *value; + value = ent->content; + + /* + * Check that this entity is well formed + */ + if ((value != NULL) && + (value[1] == 0) && (value[0] == '<') && + (!xmlStrcmp(ent->name, BAD_CAST "lt"))) { + /* + * TODO: get definite answer on this !!! + * Lots of entity decls are used to declare a single + * char + * <!ENTITY lt "<"> + * Which seems to be valid since + * 2.4: The ampersand character (&) and the left angle + * bracket (<) may appear in their literal form only + * when used ... They are also legal within the literal + * entity value of an internal entity declaration;i + * see "4.3.2 Well-Formed Parsed Entities". + * IMHO 2.4 and 4.3.2 are directly in contradiction. + * Looking at the OASIS test suite and James Clark + * tests, this is broken. However the XML REC uses + * it. Is the XML REC not well-formed ???? + * This is a hack to avoid this problem + */ + list = xmlNewDocText(ctxt->myDoc, value); + if (list != NULL) { + if ((ent->etype == XML_INTERNAL_GENERAL_ENTITY) && + (ent->children == NULL)) { + ent->children = list; + ent->last = list; + list->parent = (xmlNodePtr) ent; + } else { + xmlFreeNodeList(list); + } + } else if (list != NULL) { + xmlFreeNodeList(list); + } + } else { + /* + * 4.3.2: An internal general parsed entity is well-formed + * if its replacement text matches the production labeled + * content. + */ + if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) { + ctxt->depth++; + ret = xmlParseBalancedChunkMemory(ctxt->myDoc, + ctxt->sax, NULL, ctxt->depth, + value, &list); + ctxt->depth--; + } else if (ent->etype == + XML_EXTERNAL_GENERAL_PARSED_ENTITY) { + ctxt->depth++; + ret = xmlParseExternalEntity(ctxt->myDoc, + ctxt->sax, NULL, ctxt->depth, + ent->SystemID, ent->ExternalID, &list); + ctxt->depth--; + } else { + ret = -1; + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Internal: invalid entity type\n"); + } + if (ret == XML_ERR_ENTITY_LOOP) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Detected entity reference loop\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_ENTITY_LOOP; + } else if ((ret == 0) && (list != NULL)) { + if ((ent->etype == XML_INTERNAL_GENERAL_ENTITY) && + (ent->children == NULL)) { + ent->children = list; + while (list != NULL) { + list->parent = (xmlNodePtr) ent; + if (list->next == NULL) + ent->last = list; + list = list->next; + } + } else { + xmlFreeNodeList(list); + } + } else if (ret > 0) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Entity value required\n"); + ctxt->errNo = ret; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } else if (list != NULL) { + xmlFreeNodeList(list); + } + } + } if ((ctxt->sax != NULL) && (ctxt->sax->reference != NULL) && - (ctxt->replaceEntities == 0)) { + (ctxt->replaceEntities == 0) && (!ctxt->disableSAX)) { /* * Create a node. */ @@ -5004,6 +6405,24 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { input = xmlNewEntityInputStream(ctxt, ent); xmlPushInput(ctxt, input); + if ((ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY) && + (RAW == '<') && (NXT(1) == '?') && + (NXT(2) == 'x') && (NXT(3) == 'm') && + (NXT(4) == 'l') && (IS_BLANK(NXT(5)))) { + xmlParseTextDecl(ctxt); + if (input->standalone) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "external parsed entities cannot be standalone\n"); + ctxt->errNo = XML_ERR_EXT_ENTITY_STANDALONE; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + } + /* + * !!! TODO: build the tree under the entity first + * 1234 + */ return; } } @@ -5012,7 +6431,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { /* * inline the entity. */ - if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL)) + if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL) && + (!ctxt->disableSAX)) ctxt->sax->characters(ctxt->userData, val, xmlStrlen(val)); } } @@ -5052,7 +6472,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { GROW; - if (CUR == '&') { + if (RAW == '&') { NEXT; name = xmlParseName(ctxt); if (name == NULL) { @@ -5061,8 +6481,9 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { "xmlParseEntityRef: no name\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { - if (CUR == ';') { + if (RAW == ';') { NEXT; /* * Ask first SAX for entity resolution, otherwise try the @@ -5104,6 +6525,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { "Entity '%s' not defined\n", name); ctxt->errNo = XML_ERR_UNDECLARED_ENTITY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, @@ -5117,12 +6539,13 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { * An entity reference must not contain the name of an * unparsed entity */ - else if (ent->type == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { + else if (ent->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity reference to unparsed entity %s\n", name); ctxt->errNo = XML_ERR_UNPARSED_ENTITY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* @@ -5131,12 +6554,13 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { * entity references to external entities. */ else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) && - (ent->type == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) { + (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Attribute references external entity '%s'\n", name); ctxt->errNo = XML_ERR_ENTITY_IS_EXTERNAL; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* * [ WFC: No < in Attribute Values ] @@ -5154,13 +6578,14 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { "'<' in entity '%s' is not allowed in attributes values\n", name); ctxt->errNo = XML_ERR_LT_IN_ATTRIBUTE; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* * Internal check, no parameter entities here ... */ else { - switch (ent->type) { + switch (ent->etype) { case XML_INTERNAL_PARAMETER_ENTITY: case XML_EXTERNAL_PARAMETER_ENTITY: if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -5168,6 +6593,9 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { "Attempt to reference the parameter entity '%s'\n", name); ctxt->errNo = XML_ERR_ENTITY_IS_PARAMETER; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + break; + default: break; } } @@ -5184,6 +6612,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { "xmlParseEntityRef: expecting ';'\n"); ctxt->errNo = XML_ERR_ENTITYREF_SEMICOL_MISSING; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } xmlFree(name); } @@ -5228,9 +6657,8 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { xmlChar cur; xmlEntityPtr ent = NULL; - GROW; - - if ((str == NULL) || (*str == NULL)) return(NULL); /* !!! */ + if ((str == NULL) || (*str == NULL)) + return(NULL); ptr = *str; cur = *ptr; if (cur == '&') { @@ -5243,9 +6671,10 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { "xmlParseEntityRef: no name\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { - if (CUR == ';') { - NEXT; + if (*ptr == ';') { + ptr++; /* * Ask first SAX for entity resolution, otherwise try the * predefined set. @@ -5286,6 +6715,7 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { "Entity '%s' not defined\n", name); ctxt->errNo = XML_ERR_UNDECLARED_ENTITY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, @@ -5299,12 +6729,13 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { * An entity reference must not contain the name of an * unparsed entity */ - else if (ent->type == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { + else if (ent->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Entity reference to unparsed entity %s\n", name); ctxt->errNo = XML_ERR_UNPARSED_ENTITY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* @@ -5313,12 +6744,13 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { * entity references to external entities. */ else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) && - (ent->type == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) { + (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Attribute references external entity '%s'\n", name); ctxt->errNo = XML_ERR_ENTITY_IS_EXTERNAL; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* * [ WFC: No < in Attribute Values ] @@ -5336,13 +6768,14 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { "'<' in entity '%s' is not allowed in attributes values\n", name); ctxt->errNo = XML_ERR_LT_IN_ATTRIBUTE; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* * Internal check, no parameter entities here ... */ else { - switch (ent->type) { + switch (ent->etype) { case XML_INTERNAL_PARAMETER_ENTITY: case XML_EXTERNAL_PARAMETER_ENTITY: if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -5350,6 +6783,9 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { "Attempt to reference the parameter entity '%s'\n", name); ctxt->errNo = XML_ERR_ENTITY_IS_PARAMETER; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + break; + default: break; } } @@ -5366,10 +6802,12 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { "xmlParseEntityRef: expecting ';'\n"); ctxt->errNo = XML_ERR_ENTITYREF_SEMICOL_MISSING; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } xmlFree(name); } } + *str = ptr; return(ent); } @@ -5408,7 +6846,7 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt) { xmlEntityPtr entity = NULL; xmlParserInputPtr input; - if (CUR == '%') { + if (RAW == '%') { NEXT; name = xmlParseName(ctxt); if (name == NULL) { @@ -5417,8 +6855,9 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt) { "xmlParsePEReference: no name\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { - if (CUR == ';') { + if (RAW == ';') { NEXT; if ((ctxt->sax != NULL) && (ctxt->sax->getParameterEntity != NULL)) @@ -5441,6 +6880,7 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt) { "PEReference: %%%s; not found\n", name); ctxt->errNo = XML_ERR_UNDECLARED_ENTITY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { /* * [ VC: Entity Declared ] @@ -5458,14 +6898,27 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt) { /* * Internal checking in case the entity quest barfed */ - if ((entity->type != XML_INTERNAL_PARAMETER_ENTITY) && - (entity->type != XML_EXTERNAL_PARAMETER_ENTITY)) { + if ((entity->etype != XML_INTERNAL_PARAMETER_ENTITY) && + (entity->etype != XML_EXTERNAL_PARAMETER_ENTITY)) { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, "Internal: %%%s; is not a parameter entity\n", name); } else { + /* + * TODO !!! + * handle the extra spaces added before and after + * c.f. http://www.w3.org/TR/REC-xml#as-PE + */ input = xmlNewEntityInputStream(ctxt, entity); xmlPushInput(ctxt, input); + if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) && + (RAW == '<') && (NXT(1) == '?') && + (NXT(2) == 'x') && (NXT(3) == 'm') && + (NXT(4) == 'l') && (IS_BLANK(NXT(5)))) { + xmlParseTextDecl(ctxt); + } + if (ctxt->token == 0) + ctxt->token = ' '; } } ctxt->hasPErefs = 1; @@ -5475,6 +6928,7 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt) { "xmlParsePEReference: expecting ';'\n"); ctxt->errNo = XML_ERR_ENTITYREF_SEMICOL_MISSING; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } xmlFree(name); } @@ -5532,6 +6986,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { "xmlParseStringPEReference: no name\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { cur = *ptr; if (cur == ';') { @@ -5558,6 +7013,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { "PEReference: %%%s; not found\n", name); ctxt->errNo = XML_ERR_UNDECLARED_ENTITY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else { /* * [ VC: Entity Declared ] @@ -5575,8 +7031,8 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { /* * Internal checking in case the entity quest barfed */ - if ((entity->type != XML_INTERNAL_PARAMETER_ENTITY) && - (entity->type != XML_EXTERNAL_PARAMETER_ENTITY)) { + if ((entity->etype != XML_INTERNAL_PARAMETER_ENTITY) && + (entity->etype != XML_EXTERNAL_PARAMETER_ENTITY)) { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) ctxt->sax->warning(ctxt->userData, "Internal: %%%s; is not a parameter entity\n", name); @@ -5589,6 +7045,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { "xmlParseStringPEReference: expecting ';'\n"); ctxt->errNo = XML_ERR_ENTITYREF_SEMICOL_MISSING; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } xmlFree(name); } @@ -5598,7 +7055,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { } /** - * xmlParseDocTypeDecl : + * xmlParseDocTypeDecl: * @ctxt: an XML parser context * * parse a DOCTYPE declaration @@ -5613,7 +7070,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { void xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt) { - xmlChar *name; + xmlChar *name = NULL; xmlChar *ExternalID = NULL; xmlChar *URI = NULL; @@ -5633,8 +7090,10 @@ xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseDocTypeDecl : no DOCTYPE name !\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_NAME_REQUIRED; } + ctxt->intSubName = name; SKIP_BLANKS; @@ -5646,44 +7105,40 @@ xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt) { if ((URI != NULL) || (ExternalID != NULL)) { ctxt->hasExternalSubset = 1; } + ctxt->extSubURI = URI; + ctxt->extSubSystem = ExternalID; SKIP_BLANKS; /* - * NOTE: the SAX callback may try to fetch the external subset - * entity and fill it up ! + * Create and update the internal subset. */ - if ((ctxt->sax != NULL) && (ctxt->sax->internalSubset != NULL)) + if ((ctxt->sax != NULL) && (ctxt->sax->internalSubset != NULL) && + (!ctxt->disableSAX)) ctxt->sax->internalSubset(ctxt->userData, name, ExternalID, URI); /* - * Cleanup - */ - if (URI != NULL) xmlFree(URI); - if (ExternalID != NULL) xmlFree(ExternalID); - if (name != NULL) xmlFree(name); - - /* * Is there any internal subset declarations ? * they are handled separately in xmlParseInternalSubset() */ - if (CUR == '[') + if (RAW == '[') return; /* * We should be at the end of the DOCTYPE declaration. */ - if (CUR != '>') { + if (RAW != '>') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "DOCTYPE unproperly terminated\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_DOCTYPE_NOT_FINISHED; } NEXT; } /** - * xmlParseInternalsubset : + * xmlParseInternalsubset: * @ctxt: an XML parser context * * parse the internal subset declaration @@ -5696,7 +7151,7 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) { /* * Is there any DTD definition ? */ - if (CUR == '[') { + if (RAW == '[') { ctxt->instate = XML_PARSER_DTD; NEXT; /* @@ -5704,7 +7159,7 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) { * PEReferences. * Subsequence (markupdecl | PEReference | S)* */ - while (CUR != ']') { + while (RAW != ']') { const xmlChar *check = CUR_PTR; int cons = ctxt->input->consumed; @@ -5715,7 +7170,7 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) { /* * Pop-up of finished entities. */ - while ((CUR == 0) && (ctxt->inputNr > 1)) + while ((RAW == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt); if ((CUR_PTR == check) && (cons == ctxt->input->consumed)) { @@ -5723,20 +7178,22 @@ xmlParseInternalSubset(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseInternalSubset: error detected in Markup declaration\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_INTERNAL_ERROR; break; } } - if (CUR == ']') NEXT; + if (RAW == ']') NEXT; } /* * We should be at the end of the DOCTYPE declaration. */ - if (CUR != '>') { + if (RAW != '>') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "DOCTYPE unproperly terminated\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_DOCTYPE_NOT_FINISHED; } NEXT; @@ -5785,6 +7242,7 @@ xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "error parsing attribute name\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_NAME_REQUIRED; return(NULL); } @@ -5793,7 +7251,7 @@ xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) { * read the value */ SKIP_BLANKS; - if (CUR == '=') { + if (RAW == '=') { NEXT; SKIP_BLANKS; val = xmlParseAttValue(ctxt); @@ -5804,9 +7262,44 @@ xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) { "Specification mandate value for attribute %s\n", name); ctxt->errNo = XML_ERR_ATTRIBUTE_WITHOUT_VALUE; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + xmlFree(name); return(NULL); } + /* + * Check that xml:lang conforms to the specification + */ + if (!xmlStrcmp(name, BAD_CAST "xml:lang")) { + if (!xmlCheckLanguageID(val)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Invalid value for xml:lang : %s\n", val); + ctxt->errNo = XML_ERR_ATTRIBUTE_WITHOUT_VALUE; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + } + + /* + * Check that xml:space conforms to the specification + */ + if (!xmlStrcmp(name, BAD_CAST "xml:space")) { + if (!xmlStrcmp(val, BAD_CAST "default")) + *(ctxt->space) = 0; + else if (!xmlStrcmp(val, BAD_CAST "preserve")) + *(ctxt->space) = 1; + else { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, +"Invalid value for xml:space : \"%s\", \"default\" or \"preserve\" expected\n", + val); + ctxt->errNo = XML_ERR_ATTRIBUTE_WITHOUT_VALUE; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } + } + *value = val; return(name); } @@ -5849,7 +7342,7 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) { int maxatts = 0; int i; - if (CUR != '<') return(NULL); + if (RAW != '<') return(NULL); NEXT; name = xmlParseName(ctxt); @@ -5859,6 +7352,7 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) { "xmlParseStartTag: invalid element name\n"); ctxt->errNo = XML_ERR_NAME_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(NULL); } @@ -5869,9 +7363,10 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) { */ SKIP_BLANKS; GROW; - while ((IS_CHAR(CUR)) && - (CUR != '>') && - ((CUR != '/') || (NXT(1) != '>'))) { + + while ((IS_CHAR(RAW)) && + (RAW != '>') && + ((RAW != '/') || (NXT(1) != '>'))) { const xmlChar *q = CUR_PTR; int cons = ctxt->input->consumed; @@ -5889,6 +7384,7 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) { "Attribute %s redefined\n", attname); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_ATTRIBUTE_REDEFINED; xmlFree(attname); xmlFree(attvalue); @@ -5921,9 +7417,25 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) { atts[nbatts++] = attvalue; atts[nbatts] = NULL; atts[nbatts + 1] = NULL; + } else { + if (attname != NULL) + xmlFree(attname); + if (attvalue != NULL) + xmlFree(attvalue); } failed: + + if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>')))) + break; + if (!IS_BLANK(RAW)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "attributes construct error\n"); + ctxt->errNo = XML_ERR_SPACE_REQUIRED; + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + } SKIP_BLANKS; if ((cons == ctxt->input->consumed) && (q == CUR_PTR)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -5931,6 +7443,7 @@ failed: "xmlParseStartTag: problem parsing attributes\n"); ctxt->errNo = XML_ERR_INTERNAL_ERROR; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; break; } GROW; @@ -5939,7 +7452,8 @@ failed: /* * SAX: Start of Element ! */ - if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL)) + if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL) && + (!ctxt->disableSAX)) ctxt->sax->startElement(ctxt->userData, name, atts); if (atts != NULL) { @@ -5968,10 +7482,11 @@ xmlParseEndTag(xmlParserCtxtPtr ctxt) { xmlChar *oldname; GROW; - if ((CUR != '<') || (NXT(1) != '/')) { + if ((RAW != '<') || (NXT(1) != '/')) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseEndTag: '</' not found\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_LTSLASH_REQUIRED; return; } @@ -5984,11 +7499,12 @@ xmlParseEndTag(xmlParserCtxtPtr ctxt) { */ GROW; SKIP_BLANKS; - if ((!IS_CHAR(CUR)) || (CUR != '>')) { + if ((!IS_CHAR(RAW)) || (RAW != '>')) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "End tag : expected '>'\n"); ctxt->errNo = XML_ERR_GT_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else NEXT; @@ -6016,17 +7532,20 @@ xmlParseEndTag(xmlParserCtxtPtr ctxt) { } ctxt->errNo = XML_ERR_TAG_NAME_MISMATCH; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* * SAX: End of Tag */ - if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) + if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL) && + (!ctxt->disableSAX)) ctxt->sax->endElement(ctxt->userData, name); if (name != NULL) xmlFree(name); oldname = namePop(ctxt); + spacePop(ctxt); if (oldname != NULL) { #ifdef DEBUG_STACK fprintf(stderr,"Close: popped %s\n", oldname); @@ -6055,8 +7574,9 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) { xmlChar *buf = NULL; int len = 0; int size = XML_PARSER_BUFFER_SIZE; - xmlChar r, s; - xmlChar cur; + int r, rl; + int s, sl; + int cur, l; if ((NXT(0) == '<') && (NXT(1) == '!') && (NXT(2) == '[') && (NXT(3) == 'C') && @@ -6068,29 +7588,31 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) { return; ctxt->instate = XML_PARSER_CDATA_SECTION; - if (!IS_CHAR(CUR)) { + r = CUR_CHAR(rl); + if (!IS_CHAR(r)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CData section not finished\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_CDATA_NOT_FINISHED; ctxt->instate = XML_PARSER_CONTENT; return; } - r = CUR; - NEXT; - if (!IS_CHAR(CUR)) { + NEXTL(rl); + s = CUR_CHAR(sl); + if (!IS_CHAR(s)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CData section not finished\n"); ctxt->errNo = XML_ERR_CDATA_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->instate = XML_PARSER_CONTENT; return; } - s = CUR; - NEXT; - cur = CUR; + NEXTL(sl); + cur = CUR_CHAR(l); buf = (xmlChar *) xmlMalloc(size * sizeof(xmlChar)); if (buf == NULL) { fprintf(stderr, "malloc of %d byte failed\n", size); @@ -6098,7 +7620,7 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) { } while (IS_CHAR(cur) && ((r != ']') || (s != ']') || (cur != '>'))) { - if (len + 1 >= size) { + if (len + 5 >= size) { size *= 2; buf = xmlRealloc(buf, size * sizeof(xmlChar)); if (buf == NULL) { @@ -6106,29 +7628,32 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) { return; } } - buf[len++] = r; + COPY_BUF(rl,buf,len,r); r = s; + rl = sl; s = cur; - NEXT; - cur = CUR; + sl = l; + NEXTL(l); + cur = CUR_CHAR(l); } buf[len] = 0; ctxt->instate = XML_PARSER_CONTENT; - if (!IS_CHAR(CUR)) { + if (cur != '>') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "CData section not finished\n%.50s\n", buf); ctxt->errNo = XML_ERR_CDATA_NOT_FINISHED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; xmlFree(buf); return; } - NEXT; + NEXTL(l); /* * Ok the buffer is to be consumed as cdata. */ - if (ctxt->sax != NULL) { + if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (ctxt->sax->cdataBlock != NULL) ctxt->sax->cdataBlock(ctxt->userData, buf, len); } @@ -6147,22 +7672,29 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) { void xmlParseContent(xmlParserCtxtPtr ctxt) { GROW; - while ((CUR != '<') || (NXT(1) != '/')) { + while (((RAW != 0) || (ctxt->token != 0)) && + ((RAW != '<') || (NXT(1) != '/'))) { const xmlChar *test = CUR_PTR; int cons = ctxt->input->consumed; xmlChar tok = ctxt->token; /* + * Handle possible processed charrefs. + */ + if (ctxt->token != 0) { + xmlParseCharData(ctxt, 0); + } + /* * First case : a Processing Instruction. */ - if ((CUR == '<') && (NXT(1) == '?')) { + else if ((RAW == '<') && (NXT(1) == '?')) { xmlParsePI(ctxt); } /* * Second case : a CDSection */ - else if ((CUR == '<') && (NXT(1) == '!') && + else if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[') && (NXT(3) == 'C') && (NXT(4) == 'D') && (NXT(5) == 'A') && (NXT(6) == 'T') && (NXT(7) == 'A') && @@ -6173,7 +7705,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) { /* * Third case : a comment */ - else if ((CUR == '<') && (NXT(1) == '!') && + else if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '-') && (NXT(3) == '-')) { xmlParseComment(ctxt); ctxt->instate = XML_PARSER_CONTENT; @@ -6182,7 +7714,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) { /* * Fourth case : a sub-element. */ - else if (CUR == '<') { + else if (RAW == '<') { xmlParseElement(ctxt); } @@ -6191,7 +7723,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) { * parsing returns it's Name, create the node */ - else if (CUR == '&') { + else if (RAW == '&') { xmlParseReference(ctxt); } @@ -6206,7 +7738,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) { /* * Pop-up of finished entities. */ - while ((CUR == 0) && (ctxt->inputNr > 1)) + while ((RAW == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt); SHRINK; @@ -6217,6 +7749,7 @@ xmlParseContent(xmlParserCtxtPtr ctxt) { "detected an error in element content\n"); ctxt->errNo = XML_ERR_INTERNAL_ERROR; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; break; } } @@ -6263,8 +7796,14 @@ xmlParseElement(xmlParserCtxtPtr ctxt) { node_info.begin_line = ctxt->input->line; } + if (ctxt->spaceNr == 0) + spacePush(ctxt, -1); + else + spacePush(ctxt, *ctxt->space); + name = xmlParseStartTag(ctxt); if (name == NULL) { + spacePop(ctxt); return; } namePush(ctxt, name); @@ -6276,17 +7815,19 @@ xmlParseElement(xmlParserCtxtPtr ctxt) { * type of the root element. */ if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && - ctxt->node && (ctxt->node == ctxt->myDoc->root)) + ctxt->node && (ctxt->node == ctxt->myDoc->children)) ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); /* * Check for an Empty Element. */ - if ((CUR == '/') && (NXT(1) == '>')) { + if ((RAW == '/') && (NXT(1) == '>')) { SKIP(2); - if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) + if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL) && + (!ctxt->disableSAX)) ctxt->sax->endElement(ctxt->userData, name); oldname = namePop(ctxt); + spacePop(ctxt); if (oldname != NULL) { #ifdef DEBUG_STACK fprintf(stderr,"Close: popped %s\n", oldname); @@ -6295,7 +7836,7 @@ xmlParseElement(xmlParserCtxtPtr ctxt) { } return; } - if (CUR == '>') { + if (RAW == '>') { NEXT; } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -6303,6 +7844,7 @@ xmlParseElement(xmlParserCtxtPtr ctxt) { "Couldn't find end of Start Tag\n%.30s\n", openTag); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_GT_REQUIRED; /* @@ -6310,6 +7852,7 @@ xmlParseElement(xmlParserCtxtPtr ctxt) { */ nodePop(ctxt); oldname = namePop(ctxt); + spacePop(ctxt); if (oldname != NULL) { #ifdef DEBUG_STACK fprintf(stderr,"Close: popped %s\n", oldname); @@ -6334,11 +7877,12 @@ xmlParseElement(xmlParserCtxtPtr ctxt) { * Parse the content of the element: */ xmlParseContent(ctxt); - if (!IS_CHAR(CUR)) { + if (!IS_CHAR(RAW)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Premature end of data in tag %.30s\n", openTag); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_TAG_NOT_FINISED; /* @@ -6346,6 +7890,7 @@ xmlParseElement(xmlParserCtxtPtr ctxt) { */ nodePop(ctxt); oldname = namePop(ctxt); + spacePop(ctxt); if (oldname != NULL) { #ifdef DEBUG_STACK fprintf(stderr,"Close: popped %s\n", oldname); @@ -6395,12 +7940,11 @@ xmlParseVersionNum(xmlParserCtxtPtr ctxt) { return(NULL); } cur = CUR; - while (IS_CHAR(cur) && - (((cur >= 'a') && (cur <= 'z')) || - ((cur >= 'A') && (cur <= 'Z')) || - ((cur >= '0') && (cur <= '9')) || - (cur == '_') || (cur == '.') || - (cur == ':') || (cur == '-'))) { + while (((cur >= 'a') && (cur <= 'z')) || + ((cur >= 'A') && (cur <= 'Z')) || + ((cur >= '0') && (cur <= '9')) || + (cur == '_') || (cur == '.') || + (cur == ':') || (cur == '-')) { if (len + 1 >= size) { size *= 2; buf = xmlRealloc(buf, size * sizeof(xmlChar)); @@ -6435,44 +7979,47 @@ xmlParseVersionInfo(xmlParserCtxtPtr ctxt) { xmlChar *version = NULL; const xmlChar *q; - if ((CUR == 'v') && (NXT(1) == 'e') && + if ((RAW == 'v') && (NXT(1) == 'e') && (NXT(2) == 'r') && (NXT(3) == 's') && (NXT(4) == 'i') && (NXT(5) == 'o') && (NXT(6) == 'n')) { SKIP(7); SKIP_BLANKS; - if (CUR != '=') { + if (RAW != '=') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseVersionInfo : expected '='\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_EQUAL_REQUIRED; return(NULL); } NEXT; SKIP_BLANKS; - if (CUR == '"') { + if (RAW == '"') { NEXT; q = CUR_PTR; version = xmlParseVersionNum(ctxt); - if (CUR != '"') { + if (RAW != '"') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed\n%.50s\n", q); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; } else NEXT; - } else if (CUR == '\''){ + } else if (RAW == '\''){ NEXT; q = CUR_PTR; version = xmlParseVersionNum(ctxt); - if (CUR != '\'') { + if (RAW != '\'') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed\n%.50s\n", q); ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else NEXT; } else { @@ -6480,6 +8027,7 @@ xmlParseVersionInfo(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "xmlParseVersionInfo : expected ' or \"\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_STRING_NOT_STARTED; } } @@ -6515,12 +8063,11 @@ xmlParseEncName(xmlParserCtxtPtr ctxt) { buf[len++] = cur; NEXT; cur = CUR; - while (IS_CHAR(cur) && - (((cur >= 'a') && (cur <= 'z')) || - ((cur >= 'A') && (cur <= 'Z')) || - ((cur >= '0') && (cur <= '9')) || - (cur == '.') || (cur == '_') || - (cur == '-'))) { + while (((cur >= 'a') && (cur <= 'z')) || + ((cur >= 'A') && (cur <= 'Z')) || + ((cur >= '0') && (cur <= '9')) || + (cur == '.') || (cur == '_') || + (cur == '-')) { if (len + 1 >= size) { size *= 2; buf = xmlRealloc(buf, size * sizeof(xmlChar)); @@ -6543,6 +8090,7 @@ xmlParseEncName(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Invalid XML encoding name\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_ENCODING_NAME; } return(buf); @@ -6567,51 +8115,55 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) { const xmlChar *q; SKIP_BLANKS; - if ((CUR == 'e') && (NXT(1) == 'n') && + if ((RAW == 'e') && (NXT(1) == 'n') && (NXT(2) == 'c') && (NXT(3) == 'o') && (NXT(4) == 'd') && (NXT(5) == 'i') && (NXT(6) == 'n') && (NXT(7) == 'g')) { SKIP(8); SKIP_BLANKS; - if (CUR != '=') { + if (RAW != '=') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseEncodingDecl : expected '='\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_EQUAL_REQUIRED; return(NULL); } NEXT; SKIP_BLANKS; - if (CUR == '"') { + if (RAW == '"') { NEXT; q = CUR_PTR; encoding = xmlParseEncName(ctxt); - if (CUR != '"') { + if (RAW != '"') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed\n%.50s\n", q); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; } else NEXT; - } else if (CUR == '\''){ + } else if (RAW == '\''){ NEXT; q = CUR_PTR; encoding = xmlParseEncName(ctxt); - if (CUR != '\'') { + if (RAW != '\'') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed\n%.50s\n", q); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; } else NEXT; - } else if (CUR == '"'){ + } else if (RAW == '"'){ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "xmlParseEncodingDecl : expected ' or \"\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_STRING_NOT_STARTED; } } @@ -6649,29 +8201,30 @@ xmlParseSDDecl(xmlParserCtxtPtr ctxt) { int standalone = -1; SKIP_BLANKS; - if ((CUR == 's') && (NXT(1) == 't') && + if ((RAW == 's') && (NXT(1) == 't') && (NXT(2) == 'a') && (NXT(3) == 'n') && (NXT(4) == 'd') && (NXT(5) == 'a') && (NXT(6) == 'l') && (NXT(7) == 'o') && (NXT(8) == 'n') && (NXT(9) == 'e')) { SKIP(10); SKIP_BLANKS; - if (CUR != '=') { + if (RAW != '=') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "XML standalone declaration : expected '='\n"); ctxt->errNo = XML_ERR_EQUAL_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; return(standalone); } NEXT; SKIP_BLANKS; - if (CUR == '\''){ + if (RAW == '\''){ NEXT; - if ((CUR == 'n') && (NXT(1) == 'o')) { + if ((RAW == 'n') && (NXT(1) == 'o')) { standalone = 0; SKIP(2); - } else if ((CUR == 'y') && (NXT(1) == 'e') && + } else if ((RAW == 'y') && (NXT(1) == 'e') && (NXT(2) == 's')) { standalone = 1; SKIP(3); @@ -6681,20 +8234,22 @@ xmlParseSDDecl(xmlParserCtxtPtr ctxt) { "standalone accepts only 'yes' or 'no'\n"); ctxt->errNo = XML_ERR_STANDALONE_VALUE; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } - if (CUR != '\'') { + if (RAW != '\'') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed\n"); ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } else NEXT; - } else if (CUR == '"'){ + } else if (RAW == '"'){ NEXT; - if ((CUR == 'n') && (NXT(1) == 'o')) { + if ((RAW == 'n') && (NXT(1) == 'o')) { standalone = 0; SKIP(2); - } else if ((CUR == 'y') && (NXT(1) == 'e') && + } else if ((RAW == 'y') && (NXT(1) == 'e') && (NXT(2) == 's')) { standalone = 1; SKIP(3); @@ -6704,11 +8259,13 @@ xmlParseSDDecl(xmlParserCtxtPtr ctxt) { "standalone accepts only 'yes' or 'no'\n"); ctxt->errNo = XML_ERR_STANDALONE_VALUE; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } - if (CUR != '"') { + if (RAW != '"') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "String not closed\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_STRING_NOT_CLOSED; } else NEXT; @@ -6717,6 +8274,7 @@ xmlParseSDDecl(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "Standalone value not found\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_STRING_NOT_STARTED; } } @@ -6741,11 +8299,12 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { */ SKIP(5); - if (!IS_BLANK(CUR)) { + if (!IS_BLANK(RAW)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Blank needed after '<?xml'\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } SKIP_BLANKS; @@ -6761,8 +8320,8 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { /* * We may have the encoding declaration */ - if (!IS_BLANK(CUR)) { - if ((CUR == '?') && (NXT(1) == '>')) { + if (!IS_BLANK(RAW)) { + if ((RAW == '?') && (NXT(1) == '>')) { SKIP(2); return; } @@ -6770,34 +8329,37 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "Blank needed here\n"); ctxt->errNo = XML_ERR_SPACE_REQUIRED; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } - ctxt->encoding = xmlParseEncodingDecl(ctxt); + ctxt->input->encoding = xmlParseEncodingDecl(ctxt); /* * We may have the standalone status. */ - if ((ctxt->encoding != NULL) && (!IS_BLANK(CUR))) { - if ((CUR == '?') && (NXT(1) == '>')) { + if ((ctxt->input->encoding != NULL) && (!IS_BLANK(RAW))) { + if ((RAW == '?') && (NXT(1) == '>')) { SKIP(2); return; } if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Blank needed here\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_SPACE_REQUIRED; } SKIP_BLANKS; - ctxt->standalone = xmlParseSDDecl(ctxt); + ctxt->input->standalone = xmlParseSDDecl(ctxt); SKIP_BLANKS; - if ((CUR == '?') && (NXT(1) == '>')) { + if ((RAW == '?') && (NXT(1) == '>')) { SKIP(2); - } else if (CUR == '>') { + } else if (RAW == '>') { /* Deprecated old WD ... */ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "XML declaration must end-up with '?>'\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_XMLDECL_NOT_FINISHED; NEXT; } else { @@ -6805,6 +8367,7 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { ctxt->sax->error(ctxt->userData, "parsing XML declaration: '?>' expected\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_XMLDECL_NOT_FINISHED; MOVETO_ENDTAG(CUR_PTR); NEXT; @@ -6822,11 +8385,11 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { void xmlParseMisc(xmlParserCtxtPtr ctxt) { - while (((CUR == '<') && (NXT(1) == '?')) || - ((CUR == '<') && (NXT(1) == '!') && + while (((RAW == '<') && (NXT(1) == '?')) || + ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '-') && (NXT(3) == '-')) || IS_BLANK(CUR)) { - if ((CUR == '<') && (NXT(1) == '?')) { + if ((RAW == '<') && (NXT(1) == '?')) { xmlParsePI(ctxt); } else if (IS_BLANK(CUR)) { NEXT; @@ -6836,7 +8399,7 @@ xmlParseMisc(xmlParserCtxtPtr ctxt) { } /** - * xmlParseDocument : + * xmlParseDocument: * @ctxt: an XML parser context * * parse an XML document (and build a tree if using the standard SAX @@ -6852,6 +8415,9 @@ xmlParseMisc(xmlParserCtxtPtr ctxt) { int xmlParseDocument(xmlParserCtxtPtr ctxt) { + xmlChar start[4]; + xmlCharEncoding enc; + xmlDefaultSAXHandlerInit(); GROW; @@ -6862,52 +8428,46 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator); - /* - * TODO We should check for encoding here and plug-in some - * conversion code !!!! - */ - - /* - * Wipe out everything which is before the first '<' + /* + * Get the 4 first bytes and decode the charset + * if enc != XML_CHAR_ENCODING_NONE + * plug some encoding conversion routines. */ - if (IS_BLANK(CUR)) { - if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->error(ctxt->userData, - "Extra spaces at the beginning of the document are not allowed\n"); - ctxt->errNo = XML_ERR_DOCUMENT_START; - ctxt->wellFormed = 0; - SKIP_BLANKS; + start[0] = RAW; + start[1] = NXT(1); + start[2] = NXT(2); + start[3] = NXT(3); + enc = xmlDetectCharEncoding(start, 4); + if (enc != XML_CHAR_ENCODING_NONE) { + xmlSwitchEncoding(ctxt, enc); } + if (CUR == 0) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Document is empty\n"); ctxt->errNo = XML_ERR_DOCUMENT_EMPTY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; } /* * Check for the XMLDecl in the Prolog. */ GROW; - if ((CUR == '<') && (NXT(1) == '?') && + if ((RAW == '<') && (NXT(1) == '?') && (NXT(2) == 'x') && (NXT(3) == 'm') && (NXT(4) == 'l') && (IS_BLANK(NXT(5)))) { xmlParseXMLDecl(ctxt); + ctxt->standalone = ctxt->input->standalone; SKIP_BLANKS; - } else if ((CUR == '<') && (NXT(1) == '?') && - (NXT(2) == 'X') && (NXT(3) == 'M') && - (NXT(4) == 'L') && (IS_BLANK(NXT(5)))) { - /* - * The first drafts were using <?XML and the final W3C REC - * now use <?xml ... - */ - xmlParseXMLDecl(ctxt); - SKIP_BLANKS; + if ((ctxt->encoding == NULL) && (ctxt->input->encoding != NULL)) + ctxt->encoding = xmlStrdup(ctxt->input->encoding); + } else { ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION); } - if ((ctxt->sax) && (ctxt->sax->startDocument)) + if ((ctxt->sax) && (ctxt->sax->startDocument) && (!ctxt->disableSAX)) ctxt->sax->startDocument(ctxt->userData); /* @@ -6921,16 +8481,30 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { * (doctypedecl Misc*)? */ GROW; - if ((CUR == '<') && (NXT(1) == '!') && + if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == 'D') && (NXT(3) == 'O') && (NXT(4) == 'C') && (NXT(5) == 'T') && (NXT(6) == 'Y') && (NXT(7) == 'P') && (NXT(8) == 'E')) { + + ctxt->inSubset = 1; xmlParseDocTypeDecl(ctxt); - if (CUR == '[') { + if (RAW == '[') { ctxt->instate = XML_PARSER_DTD; xmlParseInternalSubset(ctxt); } + + /* + * Create and update the external subset. + */ + ctxt->inSubset = 2; + if ((ctxt->sax != NULL) && (ctxt->sax->externalSubset != NULL) && + (!ctxt->disableSAX)) + ctxt->sax->externalSubset(ctxt->userData, ctxt->intSubName, + ctxt->extSubSystem, ctxt->extSubURI); + ctxt->inSubset = 0; + + ctxt->instate = XML_PARSER_PROLOG; xmlParseMisc(ctxt); } @@ -6939,12 +8513,13 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { * Time to start parsing the tree itself */ GROW; - if (CUR != '<') { + if (RAW != '<') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "Start tag expect, '<' not found\n"); + "Start tag expected, '<' not found\n"); ctxt->errNo = XML_ERR_DOCUMENT_EMPTY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->instate = XML_PARSER_EOF; } else { ctxt->instate = XML_PARSER_CONTENT; @@ -6957,11 +8532,12 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { */ xmlParseMisc(ctxt); - if (CUR != 0) { + if (RAW != 0) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Extra content at the end of the document\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_DOCUMENT_END; } ctxt->instate = XML_PARSER_EOF; @@ -6970,8 +8546,18 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { /* * SAX: end of the document processing. */ - if ((ctxt->sax) && (ctxt->sax->endDocument != NULL)) + if ((ctxt->sax) && (ctxt->sax->endDocument != NULL) && + (!ctxt->disableSAX)) ctxt->sax->endDocument(ctxt->userData); + + /* + * Grab the encoding if it was added on-the-fly + */ + if ((ctxt->encoding != NULL) && (ctxt->myDoc != NULL) && + (ctxt->myDoc->encoding == NULL)) { + ctxt->myDoc->encoding = ctxt->encoding; + ctxt->encoding = NULL; + } if (! ctxt->wellFormed) return(-1); return(0); } @@ -7068,7 +8654,6 @@ xmlParseLookupSequence(xmlParserCtxtPtr ctxt, xmlChar first, int xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { int ret = 0; - xmlParserInputPtr in; int avail; xmlChar cur, next; @@ -7111,15 +8696,14 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { /* * Pop-up of finished entities. */ - while ((CUR == 0) && (ctxt->inputNr > 1)) + while ((RAW == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt); - in = ctxt->input; - if (in == NULL) break; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); + if (ctxt->input ==NULL) break; + if (ctxt->input->buf == NULL) + avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = ctxt->input->buf->buffer->use - (ctxt->input->cur - ctxt->input->base); if (avail < 1) goto done; switch (ctxt->instate) { @@ -7132,7 +8716,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { /* * Very first chars read from the document flow. */ - cur = in->cur[0]; + cur = ctxt->input->cur[0]; if (IS_BLANK(cur)) { if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, @@ -7142,18 +8726,19 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { "Extra spaces at the beginning of the document are not allowed\n"); ctxt->errNo = XML_ERR_DOCUMENT_START; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; SKIP_BLANKS; ret++; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); + if (ctxt->input->buf == NULL) + avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = ctxt->input->buf->buffer->use - (ctxt->input->cur - ctxt->input->base); } if (avail < 2) goto done; - cur = in->cur[0]; - next = in->cur[1]; + cur = ctxt->input->cur[0]; + next = ctxt->input->cur[1]; if (cur == 0) { if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, @@ -7162,6 +8747,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { ctxt->sax->error(ctxt->userData, "Document is empty\n"); ctxt->errNo = XML_ERR_DOCUMENT_EMPTY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->instate = XML_PARSER_EOF; #ifdef DEBUG_PUSH fprintf(stderr, "PP: entering EOF\n"); @@ -7179,16 +8765,21 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { if ((ctxt->sax) && (ctxt->sax->setDocumentLocator)) ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator); - if ((in->cur[2] == 'x') && - (in->cur[3] == 'm') && - (in->cur[4] == 'l') && - (IS_BLANK(in->cur[5]))) { + if ((ctxt->input->cur[2] == 'x') && + (ctxt->input->cur[3] == 'm') && + (ctxt->input->cur[4] == 'l') && + (IS_BLANK(ctxt->input->cur[5]))) { ret += 5; #ifdef DEBUG_PUSH fprintf(stderr, "PP: Parsing XML Decl\n"); #endif xmlParseXMLDecl(ctxt); - if ((ctxt->sax) && (ctxt->sax->startDocument)) + ctxt->standalone = ctxt->input->standalone; + if ((ctxt->encoding == NULL) && + (ctxt->input->encoding != NULL)) + ctxt->encoding = xmlStrdup(ctxt->input->encoding); + if ((ctxt->sax) && (ctxt->sax->startDocument) && + (!ctxt->disableSAX)) ctxt->sax->startDocument(ctxt->userData); ctxt->instate = XML_PARSER_MISC; #ifdef DEBUG_PUSH @@ -7196,7 +8787,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { #endif } else { ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION); - if ((ctxt->sax) && (ctxt->sax->startDocument)) + if ((ctxt->sax) && (ctxt->sax->startDocument) && + (!ctxt->disableSAX)) ctxt->sax->startDocument(ctxt->userData); ctxt->instate = XML_PARSER_MISC; #ifdef DEBUG_PUSH @@ -7208,7 +8800,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator); ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION); - if ((ctxt->sax) && (ctxt->sax->startDocument)) + if ((ctxt->sax) && (ctxt->sax->startDocument) && + (!ctxt->disableSAX)) ctxt->sax->startDocument(ctxt->userData); ctxt->instate = XML_PARSER_MISC; #ifdef DEBUG_PUSH @@ -7218,14 +8811,14 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { break; case XML_PARSER_MISC: SKIP_BLANKS; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); + if (ctxt->input->buf == NULL) + avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = ctxt->input->buf->buffer->use - (ctxt->input->cur - ctxt->input->base); if (avail < 2) goto done; - cur = in->cur[0]; - next = in->cur[1]; + cur = ctxt->input->cur[0]; + next = ctxt->input->cur[1]; if ((cur == '<') && (next == '?')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) @@ -7235,7 +8828,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { #endif xmlParsePI(ctxt); } else if ((cur == '<') && (next == '!') && - (in->cur[2] == '-') && (in->cur[3] == '-')) { + (ctxt->input->cur[2] == '-') && (ctxt->input->cur[3] == '-')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) goto done; @@ -7245,23 +8838,34 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { xmlParseComment(ctxt); ctxt->instate = XML_PARSER_MISC; } else if ((cur == '<') && (next == '!') && - (in->cur[2] == 'D') && (in->cur[3] == 'O') && - (in->cur[4] == 'C') && (in->cur[5] == 'T') && - (in->cur[6] == 'Y') && (in->cur[7] == 'P') && - (in->cur[8] == 'E')) { + (ctxt->input->cur[2] == 'D') && (ctxt->input->cur[3] == 'O') && + (ctxt->input->cur[4] == 'C') && (ctxt->input->cur[5] == 'T') && + (ctxt->input->cur[6] == 'Y') && (ctxt->input->cur[7] == 'P') && + (ctxt->input->cur[8] == 'E')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0)) goto done; #ifdef DEBUG_PUSH fprintf(stderr, "PP: Parsing internal subset\n"); #endif + ctxt->inSubset = 1; xmlParseDocTypeDecl(ctxt); - if (CUR == '[') { + if (RAW == '[') { ctxt->instate = XML_PARSER_DTD; #ifdef DEBUG_PUSH fprintf(stderr, "PP: entering DTD\n"); #endif } else { + /* + * Create and update the external subset. + */ + ctxt->inSubset = 2; + if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && + (ctxt->sax->externalSubset != NULL)) + ctxt->sax->externalSubset(ctxt->userData, + ctxt->intSubName, ctxt->extSubSystem, + ctxt->extSubURI); + ctxt->inSubset = 0; ctxt->instate = XML_PARSER_PROLOG; #ifdef DEBUG_PUSH fprintf(stderr, "PP: entering PROLOG\n"); @@ -7279,14 +8883,14 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { break; case XML_PARSER_PROLOG: SKIP_BLANKS; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); + if (ctxt->input->buf == NULL) + avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = ctxt->input->buf->buffer->use - (ctxt->input->cur - ctxt->input->base); if (avail < 2) goto done; - cur = in->cur[0]; - next = in->cur[1]; + cur = ctxt->input->cur[0]; + next = ctxt->input->cur[1]; if ((cur == '<') && (next == '?')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) @@ -7296,7 +8900,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { #endif xmlParsePI(ctxt); } else if ((cur == '<') && (next == '!') && - (in->cur[2] == '-') && (in->cur[3] == '-')) { + (ctxt->input->cur[2] == '-') && (ctxt->input->cur[3] == '-')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) goto done; @@ -7317,14 +8921,14 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { break; case XML_PARSER_EPILOG: SKIP_BLANKS; - if (in->buf == NULL) - avail = in->length - (in->cur - in->base); + if (ctxt->input->buf == NULL) + avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base); else - avail = in->buf->buffer->use - (in->cur - in->base); + avail = ctxt->input->buf->buffer->use - (ctxt->input->cur - ctxt->input->base); if (avail < 2) goto done; - cur = in->cur[0]; - next = in->cur[1]; + cur = ctxt->input->cur[0]; + next = ctxt->input->cur[1]; if ((cur == '<') && (next == '?')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) @@ -7335,7 +8939,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { xmlParsePI(ctxt); ctxt->instate = XML_PARSER_EPILOG; } else if ((cur == '<') && (next == '!') && - (in->cur[2] == '-') && (in->cur[3] == '-')) { + (ctxt->input->cur[2] == '-') && (ctxt->input->cur[3] == '-')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) goto done; @@ -7352,12 +8956,14 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { ctxt->sax->error(ctxt->userData, "Extra content at the end of the document\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_DOCUMENT_END; ctxt->instate = XML_PARSER_EOF; #ifdef DEBUG_PUSH fprintf(stderr, "PP: entering EOF\n"); #endif - if ((ctxt->sax) && (ctxt->sax->endDocument != NULL)) + if ((ctxt->sax) && (ctxt->sax->endDocument != NULL) && + (!ctxt->disableSAX)) ctxt->sax->endDocument(ctxt->userData); goto done; } @@ -7365,33 +8971,41 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { case XML_PARSER_START_TAG: { xmlChar *name, *oldname; - if (avail < 2) + if ((avail < 2) && (ctxt->inputNr == 1)) goto done; - cur = in->cur[0]; + cur = ctxt->input->cur[0]; if (cur != '<') { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Start tag expect, '<' not found\n"); ctxt->errNo = XML_ERR_DOCUMENT_EMPTY; ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->instate = XML_PARSER_EOF; #ifdef DEBUG_PUSH fprintf(stderr, "PP: entering EOF\n"); #endif - if ((ctxt->sax) && (ctxt->sax->endDocument != NULL)) + if ((ctxt->sax) && (ctxt->sax->endDocument != NULL) && + (!ctxt->disableSAX)) ctxt->sax->endDocument(ctxt->userData); goto done; } if ((!terminate) && (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0)) goto done; + if (ctxt->spaceNr == 0) + spacePush(ctxt, -1); + else + spacePush(ctxt, *ctxt->space); name = xmlParseStartTag(ctxt); if (name == NULL) { + spacePop(ctxt); ctxt->instate = XML_PARSER_EOF; #ifdef DEBUG_PUSH fprintf(stderr, "PP: entering EOF\n"); #endif - if ((ctxt->sax) && (ctxt->sax->endDocument != NULL)) + if ((ctxt->sax) && (ctxt->sax->endDocument != NULL) && + (!ctxt->disableSAX)) ctxt->sax->endDocument(ctxt->userData); goto done; } @@ -7403,18 +9017,20 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { * the element type of the root element. */ if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && - ctxt->node && (ctxt->node == ctxt->myDoc->root)) + ctxt->node && (ctxt->node == ctxt->myDoc->children)) ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc); /* * Check for an Empty Element. */ - if ((CUR == '/') && (NXT(1) == '>')) { + if ((RAW == '/') && (NXT(1) == '>')) { SKIP(2); - if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL)) + if ((ctxt->sax != NULL) && + (ctxt->sax->endElement != NULL) && (!ctxt->disableSAX)) ctxt->sax->endElement(ctxt->userData, name); xmlFree(name); oldname = namePop(ctxt); + spacePop(ctxt); if (oldname != NULL) { #ifdef DEBUG_STACK fprintf(stderr,"Close: popped %s\n", oldname); @@ -7434,7 +9050,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { } break; } - if (CUR == '>') { + if (RAW == '>') { NEXT; } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) @@ -7442,6 +9058,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { "Couldn't find end of Start Tag %s\n", name); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_GT_REQUIRED; /* @@ -7449,6 +9066,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { */ nodePop(ctxt); oldname = namePop(ctxt); + spacePop(ctxt); if (oldname != NULL) { #ifdef DEBUG_STACK fprintf(stderr,"Close: popped %s\n", oldname); @@ -7471,14 +9089,15 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { xmlChar cur[2] = { 0 , 0 } ; cur[0] = (xmlChar) ctxt->token; - if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL)) + if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && + (ctxt->sax->characters != NULL)) ctxt->sax->characters(ctxt->userData, cur, 1); ctxt->token = 0; } - if (avail < 2) + if ((avail < 2) && (ctxt->inputNr == 1)) goto done; - cur = in->cur[0]; - next = in->cur[1]; + cur = ctxt->input->cur[0]; + next = ctxt->input->cur[1]; if ((cur == '<') && (next == '?')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) @@ -7488,7 +9107,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { #endif xmlParsePI(ctxt); } else if ((cur == '<') && (next == '!') && - (in->cur[2] == '-') && (in->cur[3] == '-')) { + (ctxt->input->cur[2] == '-') && (ctxt->input->cur[3] == '-')) { if ((!terminate) && (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) goto done; @@ -7497,11 +9116,11 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { #endif xmlParseComment(ctxt); ctxt->instate = XML_PARSER_CONTENT; - } else if ((cur == '<') && (in->cur[1] == '!') && - (in->cur[2] == '[') && (NXT(3) == 'C') && - (in->cur[4] == 'D') && (NXT(5) == 'A') && - (in->cur[6] == 'T') && (NXT(7) == 'A') && - (in->cur[8] == '[')) { + } else if ((cur == '<') && (ctxt->input->cur[1] == '!') && + (ctxt->input->cur[2] == '[') && (NXT(3) == 'C') && + (ctxt->input->cur[4] == 'D') && (NXT(5) == 'A') && + (ctxt->input->cur[6] == 'T') && (NXT(7) == 'A') && + (ctxt->input->cur[8] == '[')) { SKIP(9); ctxt->instate = XML_PARSER_CDATA_SECTION; #ifdef DEBUG_PUSH @@ -7533,9 +9152,9 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { /* TODO: check generation of subtrees if noent !!! */ xmlParseReference(ctxt); } else { - /* TODO Avoid the extra copy, handle directly !!!!!! */ + /* TODO Avoid the extra copy, handle directly !!! */ /* - * Goal of the following test is : + * Goal of the following test is: * - minimize calls to the SAX 'character' callback * when they are mergeable * - handle an problem for isBlank when we only parse @@ -7560,7 +9179,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { /* * Pop-up of finished entities. */ - while ((CUR == 0) && (ctxt->inputNr > 1)) + while ((RAW == 0) && (ctxt->inputNr > 1)) xmlPopInput(ctxt); break; case XML_PARSER_CDATA_SECTION: { @@ -7570,13 +9189,12 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { */ int base; - in = ctxt->input; base = xmlParseLookupSequence(ctxt, ']', ']', '>'); if (base < 0) { if (avail >= XML_PARSER_BIG_BUFFER_SIZE + 2) { - if (ctxt->sax != NULL) { + if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (ctxt->sax->cdataBlock != NULL) - ctxt->sax->cdataBlock(ctxt->userData, in->cur, + ctxt->sax->cdataBlock(ctxt->userData, ctxt->input->cur, XML_PARSER_BIG_BUFFER_SIZE); } SKIP(XML_PARSER_BIG_BUFFER_SIZE); @@ -7584,10 +9202,11 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { } goto done; } else { - if ((ctxt->sax != NULL) && (base > 0)) { + if ((ctxt->sax != NULL) && (base > 0) && + (!ctxt->disableSAX)) { if (ctxt->sax->cdataBlock != NULL) ctxt->sax->cdataBlock(ctxt->userData, - in->cur, base); + ctxt->input->cur, base); } SKIP(base + 3); ctxt->checkIndex = 0; @@ -7632,12 +9251,12 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { xmlChar *buf; xmlChar quote = 0; - base = in->cur - in->base; + base = ctxt->input->cur - ctxt->input->base; if (base < 0) return(0); if (ctxt->checkIndex > base) base = ctxt->checkIndex; - buf = in->buf->buffer->content; - for (;base < in->buf->buffer->use;base++) { + buf = ctxt->input->buf->buffer->content; + for (;base < ctxt->input->buf->buffer->use;base++) { if (quote != 0) { if (buf[base] == quote) quote = 0; @@ -7652,14 +9271,14 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { continue; } if (buf[base] == ']') { - if (base +1 >= in->buf->buffer->use) + if (base +1 >= ctxt->input->buf->buffer->use) break; if (buf[base + 1] == ']') { /* conditional crap, skip both ']' ! */ base++; continue; } - for (i = 0;base + i < in->buf->buffer->use;i++) { + for (i = 0;base + i < ctxt->input->buf->buffer->use;i++) { if (buf[base + i] == '>') goto found_end_int_subset; } @@ -7679,6 +9298,12 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { found_end_int_subset: xmlParseInternalSubset(ctxt); + ctxt->inSubset = 2; + if ((ctxt->sax != NULL) && (!ctxt->disableSAX) && + (ctxt->sax->externalSubset != NULL)) + ctxt->sax->externalSubset(ctxt->userData, ctxt->intSubName, + ctxt->extSubSystem, ctxt->extSubURI); + ctxt->inSubset = 0; ctxt->instate = XML_PARSER_PROLOG; ctxt->checkIndex = 0; #ifdef DEBUG_PUSH @@ -7721,6 +9346,13 @@ found_end_int_subset: fprintf(stderr, "PP: entering START_TAG\n"); #endif break; + case XML_PARSER_SYSTEM_LITERAL: + fprintf(stderr, "PP: internal error, state == SYSTEM_LITERAL\n"); + ctxt->instate = XML_PARSER_START_TAG; +#ifdef DEBUG_PUSH + fprintf(stderr, "PP: entering START_TAG\n"); +#endif + break; } } done: @@ -7774,16 +9406,30 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size, } else if (ctxt->instate != XML_PARSER_EOF) xmlParseTryOrFinish(ctxt, terminate); if (terminate) { + /* + * Grab the encoding if it was added on-the-fly + */ + if ((ctxt->encoding != NULL) && (ctxt->myDoc != NULL) && + (ctxt->myDoc->encoding == NULL)) { + ctxt->myDoc->encoding = ctxt->encoding; + ctxt->encoding = NULL; + } + + /* + * Check for termination + */ if ((ctxt->instate != XML_PARSER_EOF) && (ctxt->instate != XML_PARSER_EPILOG)) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, "Extra content at the end of the document\n"); ctxt->wellFormed = 0; + ctxt->disableSAX = 1; ctxt->errNo = XML_ERR_DOCUMENT_END; } if (ctxt->instate != XML_PARSER_EOF) { - if ((ctxt->sax) && (ctxt->sax->endDocument != NULL)) + if ((ctxt->sax) && (ctxt->sax->endDocument != NULL) && + (!ctxt->disableSAX)) ctxt->sax->endDocument(ctxt->userData); } ctxt->instate = XML_PARSER_EOF; @@ -7798,7 +9444,7 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size, ************************************************************************/ /** - * xmlCreatePushParserCtxt : + * xmlCreatePushParserCtxt: * @sax: a SAX handler * @user_data: The user data returned on SAX callbacks * @chunk: a pointer to an array of chars @@ -7821,10 +9467,10 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, xmlCharEncoding enc = XML_CHAR_ENCODING_NONE; /* - * plug some encoding conversion routines here. !!! + * plug some encoding conversion routines */ if ((chunk != NULL) && (size >= 4)) - enc = xmlDetectCharEncoding((const xmlChar *) chunk); + enc = xmlDetectCharEncoding((const xmlChar *) chunk, size); buf = xmlAllocParserInputBuffer(enc); if (buf == NULL) return(NULL); @@ -7866,6 +9512,9 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, inputStream->buf = buf; inputStream->base = inputStream->buf->buffer->content; inputStream->cur = inputStream->buf->buffer->content; + if (enc != XML_CHAR_ENCODING_NONE) { + xmlSwitchEncoding(ctxt, enc); + } inputPush(ctxt, inputStream); @@ -7881,7 +9530,7 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, } /** - * xmlCreateDocParserCtxt : + * xmlCreateDocParserCtxt: * @cur: a pointer to an array of xmlChar * * Create a parser context for an XML in-memory document. @@ -7892,7 +9541,6 @@ xmlParserCtxtPtr xmlCreateDocParserCtxt(xmlChar *cur) { xmlParserCtxtPtr ctxt; xmlParserInputPtr input; - xmlCharEncoding enc; ctxt = xmlNewParserCtxt(); if (ctxt == NULL) { @@ -7904,12 +9552,6 @@ xmlCreateDocParserCtxt(xmlChar *cur) { return(NULL); } - /* - * plug some encoding conversion routines here. !!! - */ - enc = xmlDetectCharEncoding(cur); - xmlSwitchEncoding(ctxt, enc); - input->base = cur; input->cur = cur; @@ -7918,7 +9560,7 @@ xmlCreateDocParserCtxt(xmlChar *cur) { } /** - * xmlSAXParseDoc : + * xmlSAXParseDoc: * @sax: the SAX handler block * @cur: a pointer to an array of xmlChar * @recovery: work in recovery mode, i.e. tries to read no Well Formed @@ -7961,7 +9603,7 @@ xmlSAXParseDoc(xmlSAXHandlerPtr sax, xmlChar *cur, int recovery) { } /** - * xmlParseDoc : + * xmlParseDoc: * @cur: a pointer to an array of xmlChar * * parse an XML in-memory document and build a tree. @@ -7975,7 +9617,7 @@ xmlParseDoc(xmlChar *cur) { } /** - * xmlSAXParseDTD : + * xmlSAXParseDTD: * @sax: the SAX handler block * @ExternalID: a NAME* containing the External ID of the DTD * @SystemID: a NAME* containing the URL to the DTD @@ -8024,14 +9666,14 @@ xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID, } /* - * plug some encoding conversion routines here. !!! + * plug some encoding conversion routines here. */ xmlPushInput(ctxt, input); - enc = xmlDetectCharEncoding(ctxt->input->cur); + enc = xmlDetectCharEncoding(ctxt->input->cur, 4); xmlSwitchEncoding(ctxt, enc); if (input->filename == NULL) - input->filename = (char *) xmlStrdup(SystemID); /* !!!!!!! */ + input->filename = (char *) xmlStrdup(SystemID); input->line = 1; input->col = 1; input->base = ctxt->input->cur; @@ -8060,7 +9702,7 @@ xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID, } /** - * xmlParseDTD : + * xmlParseDTD: * @ExternalID: a NAME* containing the External ID of the DTD * @SystemID: a NAME* containing the URL to the DTD * @@ -8075,7 +9717,7 @@ xmlParseDTD(const xmlChar *ExternalID, const xmlChar *SystemID) { } /** - * xmlSAXParseBalancedChunk : + * xmlSAXParseBalancedChunk: * @ctx: an XML parser context (possibly NULL) * @sax: the SAX handler bloc (possibly NULL) * @user_data: The user data returned on SAX callbacks (possibly NULL) @@ -8090,7 +9732,7 @@ xmlParseDTD(const xmlChar *ExternalID, const xmlChar *SystemID) { * * [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)* * - * Returns 0 id the chunk is well balanced, -1 in case of args problem and + * Returns 0 if the chunk is well balanced, -1 in case of args problem and * the error code otherwise */ @@ -8147,22 +9789,305 @@ xmlSAXParseBalancedChunk(xmlParserCtxtPtr ctx, xmlSAXHandlerPtr sax, } /** - * xmlParseBalancedChunk : + * xmlParseExternalEntity: * @doc: the document the chunk pertains to - * @node: the node defining the context in which informations will be added + * @sax: the SAX handler bloc (possibly NULL) + * @user_data: The user data returned on SAX callbacks (possibly NULL) + * @depth: Used for loop detection, use 0 + * @URL: the URL for the entity to load + * @ID: the System ID for the entity to load + * @list: the return value for the set of parsed nodes * - * Parse a well-balanced chunk of an XML document present in memory - * - * Returns the resulting list of nodes resulting from the parsing, - * they are not added to @node + * Parse an external general entity + * An external general parsed entity is well-formed if it matches the + * production labeled extParsedEnt. + * + * [78] extParsedEnt ::= TextDecl? content + * + * Returns 0 if the entity is well formed, -1 in case of args problem and + * the parser error code otherwise */ -xmlNodePtr -xmlParseBalancedChunkMemory(xmlDocPtr doc, xmlNodePtr node) { +int +xmlParseExternalEntity(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, + int depth, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *list) { + xmlParserCtxtPtr ctxt; + xmlDocPtr newDoc; + xmlSAXHandlerPtr oldsax = NULL; + int ret = 0; + + if (depth > 40) { + return(XML_ERR_ENTITY_LOOP); + } + + + + if (list != NULL) + *list = NULL; + if ((URL == NULL) && (ID == NULL)) + return(-1); + + + ctxt = xmlCreateEntityParserCtxt(URL, ID, doc->URL); + if (ctxt == NULL) return(-1); + ctxt->userData = ctxt; + if (sax != NULL) { + oldsax = ctxt->sax; + ctxt->sax = sax; + if (user_data != NULL) + ctxt->userData = user_data; + } + newDoc = xmlNewDoc(BAD_CAST "1.0"); + if (newDoc == NULL) { + xmlFreeParserCtxt(ctxt); + return(-1); + } + if (doc != NULL) { + newDoc->intSubset = doc->intSubset; + newDoc->extSubset = doc->extSubset; + } + if (doc->URL != NULL) { + newDoc->URL = xmlStrdup(doc->URL); + } + newDoc->children = xmlNewDocNode(newDoc, NULL, BAD_CAST "pseudoroot", NULL); + if (newDoc->children == NULL) { + if (sax != NULL) + ctxt->sax = oldsax; + xmlFreeParserCtxt(ctxt); + newDoc->intSubset = NULL; + newDoc->extSubset = NULL; + xmlFreeDoc(newDoc); + return(-1); + } + nodePush(ctxt, newDoc->children); + if (doc == NULL) { + ctxt->myDoc = newDoc; + } else { + ctxt->myDoc = doc; + newDoc->children->doc = doc; + } + + /* + * Parse a possible text declaration first + */ + GROW; + if ((RAW == '<') && (NXT(1) == '?') && + (NXT(2) == 'x') && (NXT(3) == 'm') && + (NXT(4) == 'l') && (IS_BLANK(NXT(5)))) { + xmlParseTextDecl(ctxt); + } + + /* + * Doing validity checking on chunk doesn't make sense + */ + ctxt->instate = XML_PARSER_CONTENT; + ctxt->validate = 0; + ctxt->depth = depth; + + xmlParseContent(ctxt); + + if ((RAW == '<') && (NXT(1) == '/')) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "chunk is not well balanced\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_NOT_WELL_BALANCED; + } else if (RAW != 0) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "extra content at the end of well balanced chunk\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_EXTRA_CONTENT; + } + if (ctxt->node != newDoc->children) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "chunk is not well balanced\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_NOT_WELL_BALANCED; + } + + if (!ctxt->wellFormed) { + if (ctxt->errNo == 0) + ret = 1; + else + ret = ctxt->errNo; + } else { + if (list != NULL) { + xmlNodePtr cur; + + /* + * Return the newly created nodeset after unlinking it from + * they pseudo parent. + */ + cur = newDoc->children->children; + *list = cur; + while (cur != NULL) { + cur->parent = NULL; + cur = cur->next; + } + newDoc->children->children = NULL; + } + ret = 0; + } + if (sax != NULL) + ctxt->sax = oldsax; + xmlFreeParserCtxt(ctxt); + newDoc->intSubset = NULL; + newDoc->extSubset = NULL; + xmlFreeDoc(newDoc); + + return(ret); } /** - * xmlParseBalancedChunkFile : + * xmlParseBalancedChunk: + * @doc: the document the chunk pertains to + * @sax: the SAX handler bloc (possibly NULL) + * @user_data: The user data returned on SAX callbacks (possibly NULL) + * @depth: Used for loop detection, use 0 + * @string: the input string in UTF8 or ISO-Latin (zero terminated) + * @list: the return value for the set of parsed nodes + * + * Parse a well-balanced chunk of an XML document + * called by the parser + * The allowed sequence for the Well Balanced Chunk is the one defined by + * the content production in the XML grammar: + * + * [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)* + * + * Returns 0 if the chunk is well balanced, -1 in case of args problem and + * the parser error code otherwise + */ + +int +xmlParseBalancedChunkMemory(xmlDocPtr doc, xmlSAXHandlerPtr sax, + void *user_data, int depth, const xmlChar *string, xmlNodePtr *list) { + xmlParserCtxtPtr ctxt; + xmlDocPtr newDoc; + xmlSAXHandlerPtr oldsax = NULL; + int size; + int ret = 0; + + if (depth > 40) { + return(XML_ERR_ENTITY_LOOP); + } + + + if (list != NULL) + *list = NULL; + if (string == NULL) + return(-1); + + size = xmlStrlen(string); + + ctxt = xmlCreateMemoryParserCtxt((char *) string, size); + if (ctxt == NULL) return(-1); + ctxt->userData = ctxt; + if (sax != NULL) { + oldsax = ctxt->sax; + ctxt->sax = sax; + if (user_data != NULL) + ctxt->userData = user_data; + } + newDoc = xmlNewDoc(BAD_CAST "1.0"); + if (newDoc == NULL) { + xmlFreeParserCtxt(ctxt); + return(-1); + } + if (doc != NULL) { + newDoc->intSubset = doc->intSubset; + newDoc->extSubset = doc->extSubset; + } + newDoc->children = xmlNewDocNode(newDoc, NULL, BAD_CAST "pseudoroot", NULL); + if (newDoc->children == NULL) { + if (sax != NULL) + ctxt->sax = oldsax; + xmlFreeParserCtxt(ctxt); + newDoc->intSubset = NULL; + newDoc->extSubset = NULL; + xmlFreeDoc(newDoc); + return(-1); + } + nodePush(ctxt, newDoc->children); + if (doc == NULL) { + ctxt->myDoc = newDoc; + } else { + ctxt->myDoc = doc; + newDoc->children->doc = doc; + } + ctxt->instate = XML_PARSER_CONTENT; + ctxt->depth = depth; + + /* + * Doing validity checking on chunk doesn't make sense + */ + ctxt->validate = 0; + + xmlParseContent(ctxt); + + if ((RAW == '<') && (NXT(1) == '/')) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "chunk is not well balanced\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_NOT_WELL_BALANCED; + } else if (RAW != 0) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "extra content at the end of well balanced chunk\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_EXTRA_CONTENT; + } + if (ctxt->node != newDoc->children) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "chunk is not well balanced\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; + ctxt->errNo = XML_ERR_NOT_WELL_BALANCED; + } + + if (!ctxt->wellFormed) { + if (ctxt->errNo == 0) + ret = 1; + else + ret = ctxt->errNo; + } else { + if (list != NULL) { + xmlNodePtr cur; + + /* + * Return the newly created nodeset after unlinking it from + * they pseudo parent. + */ + cur = newDoc->children->children; + *list = cur; + while (cur != NULL) { + cur->parent = NULL; + cur = cur->next; + } + newDoc->children->children = NULL; + } + ret = 0; + } + if (sax != NULL) + ctxt->sax = oldsax; + xmlFreeParserCtxt(ctxt); + newDoc->intSubset = NULL; + newDoc->extSubset = NULL; + xmlFreeDoc(newDoc); + + return(ret); +} + +/** + * xmlParseBalancedChunkFile: * @doc: the document the chunk pertains to * * Parse a well-balanced chunk of an XML document contained in a file @@ -8173,10 +10098,12 @@ xmlParseBalancedChunkMemory(xmlDocPtr doc, xmlNodePtr node) { xmlNodePtr xmlParseBalancedChunkFile(xmlDocPtr doc, xmlNodePtr node) { + /* TODO !!! */ + return(NULL); } /** - * xmlRecoverDoc : + * xmlRecoverDoc: * @cur: a pointer to an array of xmlChar * * parse an XML in-memory document and build a tree. @@ -8191,7 +10118,47 @@ xmlRecoverDoc(xmlChar *cur) { } /** - * xmlCreateFileParserCtxt : + * xmlCreateEntityParserCtxt: + * @URL: the entity URL + * @ID: the entity PUBLIC ID + * @base: a posible base for the target URI + * + * Create a parser context for an external entity + * Automatic support for ZLIB/Compress compressed document is provided + * by default if found at compile-time. + * + * Returns the new parser context or NULL + */ +xmlParserCtxtPtr +xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID, + const xmlChar *base) { + xmlParserCtxtPtr ctxt; + xmlParserInputPtr inputStream; + char *directory = NULL; + + ctxt = xmlNewParserCtxt(); + if (ctxt == NULL) { + return(NULL); + } + + inputStream = xmlLoadExternalEntity((char *)URL, (char *)ID, ctxt); + if (inputStream == NULL) { + xmlFreeParserCtxt(ctxt); + return(NULL); + } + + inputPush(ctxt, inputStream); + + if ((ctxt->directory == NULL) && (directory == NULL)) + directory = xmlParserGetDirectory((char *)URL); + if ((ctxt->directory == NULL) && (directory != NULL)) + ctxt->directory = directory; + + return(ctxt); +} + +/** + * xmlCreateFileParserCtxt: * @filename: the filename * * Create a parser context for a file content. @@ -8237,7 +10204,7 @@ xmlCreateFileParserCtxt(const char *filename) } /** - * xmlSAXParseFile : + * xmlSAXParseFile: * @sax: the SAX handler block * @filename: the filename * @recovery: work in recovery mode, i.e. tries to read no Well Formed @@ -8270,7 +10237,7 @@ xmlSAXParseFile(xmlSAXHandlerPtr sax, const char *filename, if ((ctxt->directory == NULL) && (directory == NULL)) directory = xmlParserGetDirectory(filename); if ((ctxt->directory == NULL) && (directory != NULL)) - ctxt->directory = (char *) xmlStrdup((xmlChar *) directory); /* !!!!!!! */ + ctxt->directory = (char *) xmlStrdup((xmlChar *) directory); xmlParseDocument(ctxt); @@ -8288,7 +10255,7 @@ xmlSAXParseFile(xmlSAXHandlerPtr sax, const char *filename, } /** - * xmlParseFile : + * xmlParseFile: * @filename: the filename * * parse an XML file and build a tree. Automatic support for ZLIB/Compress @@ -8303,7 +10270,7 @@ xmlParseFile(const char *filename) { } /** - * xmlRecoverFile : + * xmlRecoverFile: * @filename: the filename * * parse an XML file and build a tree. Automatic support for ZLIB/Compress @@ -8319,8 +10286,8 @@ xmlRecoverFile(const char *filename) { } /** - * xmlCreateMemoryParserCtxt : - * @buffer: an pointer to a zero terminated char array + * xmlCreateMemoryParserCtxt: + * @buffer: a pointer to a zero terminated char array * @size: the size of the array (without the trailing 0) * * Create a parser context for an XML in-memory document. @@ -8331,15 +10298,13 @@ xmlParserCtxtPtr xmlCreateMemoryParserCtxt(char *buffer, int size) { xmlParserCtxtPtr ctxt; xmlParserInputPtr input; - xmlCharEncoding enc; - if (buffer[size] != '\0') + if (buffer[size] != 0) return(NULL); ctxt = xmlNewParserCtxt(); - if (ctxt == NULL) { + if (ctxt == NULL) return(NULL); - } input = xmlNewInputStream(ctxt); if (input == NULL) { @@ -8353,12 +10318,6 @@ xmlCreateMemoryParserCtxt(char *buffer, int size) { input->buf = NULL; input->consumed = 0; - /* - * plug some encoding conversion routines here. !!! - */ - enc = xmlDetectCharEncoding(BAD_CAST buffer); - xmlSwitchEncoding(ctxt, enc); - input->base = BAD_CAST buffer; input->cur = BAD_CAST buffer; input->free = NULL; @@ -8368,7 +10327,7 @@ xmlCreateMemoryParserCtxt(char *buffer, int size) { } /** - * xmlSAXParseMemory : + * xmlSAXParseMemory: * @sax: the SAX handler block * @buffer: an pointer to a char array * @size: the size of the array @@ -8409,7 +10368,7 @@ xmlSAXParseMemory(xmlSAXHandlerPtr sax, char *buffer, int size, int recovery) { } /** - * xmlParseMemory : + * xmlParseMemory: * @buffer: an pointer to a char array * @size: the size of the array * @@ -8423,7 +10382,7 @@ xmlDocPtr xmlParseMemory(char *buffer, int size) { } /** - * xmlRecoverMemory : + * xmlRecoverMemory: * @buffer: an pointer to a char array * @size: the size of the array * @@ -8596,7 +10555,7 @@ const xmlParserNodeInfo* xmlParserFindNodeInfo(const xmlParserCtxt* ctx, /** - * xmlInitNodeInfoSeq : + * xmlInitNodeInfoSeq: * @seq: a node info sequence pointer * * -- Initialize (set to initial state) node info sequence @@ -8610,7 +10569,7 @@ xmlInitNodeInfoSeq(xmlParserNodeInfoSeqPtr seq) } /** - * xmlClearNodeInfoSeq : + * xmlClearNodeInfoSeq: * @seq: a node info sequence pointer * * -- Clear (release memory and reinitialize) node @@ -8724,7 +10683,7 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt, /** - * xmlSubstituteEntitiesDefault : + * xmlSubstituteEntitiesDefault: * @val: int 0 or 1 * * Set and return the previous value for default entity support. @@ -49,6 +49,9 @@ struct _xmlParserInput { int col; /* Current column */ int consumed; /* How many xmlChars already consumed */ xmlParserInputDeallocate free; /* function to deallocate the base */ + const xmlChar *encoding; /* the encoding string for entity */ + const xmlChar *version; /* the version string for entity */ + int standalone; /* Was that entity marked standalone */ }; /** @@ -95,6 +98,7 @@ typedef enum { XML_PARSER_ENTITY_DECL, /* within an entity declaration */ XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */ + XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */ XML_PARSER_EPILOG /* the Misc* after the last end tag */ } xmlParserInputState; @@ -151,7 +155,7 @@ struct _xmlParserCtxt { char *directory; /* the data directory */ - /* Node name stack only used for HTML parsing */ + /* Node name stack */ xmlChar *name; /* Current parsed Node */ int nameNr; /* Depth of the parsing stack */ int nameMax; /* Max depth of the parsing stack */ @@ -160,6 +164,20 @@ struct _xmlParserCtxt { long nbChars; /* number of xmlChar processed */ long checkIndex; /* used by progressive parsing lookup */ int keepBlanks; /* ugly but ... */ + int disableSAX; /* SAX callbacks are disabled */ + int inSubset; /* Parsing is in int 1/ext 2 subset */ + xmlChar * intSubName; /* name of subset */ + xmlChar * extSubURI; /* URI of external subset */ + xmlChar * extSubSystem; /* SYSTEM ID of external subset */ + + /* xml:space values */ + int * space; /* Should the parser preserve spaces */ + int spaceNr; /* Depth of the parsing stack */ + int spaceMax; /* Max depth of the parsing stack */ + int * spaceTab; /* array of space infos */ + + int depth; /* to prevent entity substitution loops */ + xmlParserInputPtr entity; /* used to check entities boundaries */ }; /** @@ -183,6 +201,8 @@ typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, const xmlChar *publicId, const xmlChar *systemId); typedef void (*internalSubsetSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); +typedef void (*externalSubsetSAXFunc) (void *ctx, const xmlChar *name, + const xmlChar *ExternalID, const xmlChar *SystemID); typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, const xmlChar *name); typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, @@ -254,6 +274,7 @@ struct _xmlSAXHandler { fatalErrorSAXFunc fatalError; getParameterEntitySAXFunc getParameterEntity; cdataBlockSAXFunc cdataBlock; + externalSubsetSAXFunc externalSubset; }; /** @@ -278,7 +299,7 @@ extern xmlSAXHandler htmlDefaultSAXHandler; */ extern int xmlSubstituteEntitiesDefaultValue; - +extern int xmlGetWarningsDefaultValue; /** @@ -363,6 +384,20 @@ xmlDtdPtr xmlParseDTD (const xmlChar *ExternalID, xmlDtdPtr xmlSAXParseDTD (xmlSAXHandlerPtr sax, const xmlChar *ExternalID, const xmlChar *SystemID); +int xmlParseBalancedChunkMemory(xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *string, + xmlNodePtr *list); +int xmlParseExternalEntity (xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *URL, + const xmlChar *ID, + xmlNodePtr *list); + /** * SAX initialization routines */ diff --git a/parserInternals.h b/parserInternals.h index 5a7b7ffe..db7965a6 100644 --- a/parserInternals.h +++ b/parserInternals.h @@ -17,31 +17,6 @@ extern "C" { #define XML_MAX_NAMELEN 1000 -/** - * A few macros needed to help building the parser. - */ -/* #define UNICODE */ - -#ifdef UNICODE -typedef unsigned long CHARVAL; - -#define NEXTCHARVAL(p) (unsigned long) \ - ((*(p) == 0) ? (unsigned long) 0 : \ - ((*(p) < 0x80) ? (unsigned long) (*(p)++) : \ - (*(p) < 0xC0) ? (unsigned long) 0 : \ - (*(p) < 0xE0) ? ((((unsigned long) *(p)++) << 6) + (*(p)++ & 0x3F)) : \ - (*(p) < 0xF0) ? (((((unsigned long) *(p)++) << 6) + (*(p)++ & 0x3F)) << 6 + \ - (*(p)++ & 0x3F)) : \ - (*(p) < 0xF8) ? ((((((unsigned long) *(p)++) << 6) + (*(p)++ & 0x3F)) << 6 + \ - (*(p)++ & 0x3F)) << 6 + (*(p)++ & 0x3F)) : 0)) -#else -typedef unsigned char CHARVAL; - -#define NEXTCHARVAL(p) (unsigned long) *(p); -#define SKIPCHARVAL(p) (p)++; -#endif - -#ifdef UNICODE /************************************************************************ * * * UNICODE version of the macros. * @@ -404,7 +379,7 @@ typedef unsigned char CHARVAL; #define IS_EXTENDER(c) \ (((c) == 0xb7) || ((c) == 0x2d0) || ((c) == 0x2d1) || \ ((c) == 0x387) || ((c) == 0x640) || ((c) == 0xe46) || \ - ((c) == 0xec6) || ((c) == 0x3005) \ + ((c) == 0xec6) || ((c) == 0x3005) || \ (((c) >= 0x3031) && ((c) <= 0x3035)) || \ (((c) >= 0x309b) && ((c) <= 0x309e)) || \ (((c) >= 0x30fc) && ((c) <= 0x30fe))) @@ -423,65 +398,6 @@ typedef unsigned char CHARVAL; */ #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c)) -#else -/************************************************************************ - * * - * 8bits / ISO-Latin version of the macros. * - * * - ************************************************************************/ -/* - * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] - * | [#x10000-#x10FFFF] - * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. - */ -#define IS_CHAR(c) \ - ((((c) >= 0x20) && ((c) <= 0xD7FF)) || \ - ((c) == 0x09) || ((c) == 0x0a) || ((c) == 0x0d) || \ - (((c) >= 0xE000) && ((c) <= 0xFFFD)) || \ - (((c) >= 0x10000) && ((c) <= 0x10FFFF))) - -/* - * [85] BaseChar ::= ... long list see REC ... - */ -#define IS_BASECHAR(c) \ - ((((c) >= 0x0041) && ((c) <= 0x005A)) || \ - (((c) >= 0x0061) && ((c) <= 0x007A)) || \ - (((c) >= 0x00C0) && ((c) <= 0x00D6)) || \ - (((c) >= 0x00D8) && ((c) <= 0x00F6)) || \ - (((c) >= 0x00F8) && ((c) <= 0x00FF))) - -/* - * [88] Digit ::= ... long list see REC ... - */ -#define IS_DIGIT(c) (((c) >= 0x30) && ((c) <= 0x39)) - -/* - * [84] Letter ::= BaseChar | Ideographic - */ -#define IS_LETTER(c) IS_BASECHAR(c) - - -/* - * [87] CombiningChar ::= ... long list see REC ... - */ -#define IS_COMBINING(c) 0 - -/* - * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | - * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | - * [#x309D-#x309E] | [#x30FC-#x30FE] - */ -#define IS_EXTENDER(c) ((c) == 0xb7) - -#endif /* !UNICODE */ - -/* - * Blank chars. - * - * [3] S ::= (#x20 | #x9 | #xD | #xA)+ - */ -#define IS_BLANK(c) (((c) == 0x20) || ((c) == 0x09) || ((c) == 0xa) || \ - ((c) == 0x0D)) /* * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] @@ -502,10 +418,10 @@ typedef unsigned char CHARVAL; if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; } #define MOVETO_ENDTAG(p) \ - while (IS_CHAR(*p) && (*(p) != '>')) (p)++ + while ((*p) && (*(p) != '>')) (p)++ #define MOVETO_STARTTAG(p) \ - while (IS_CHAR(*p) && (*(p) != '<')) (p)++ + while ((*p) && (*(p) != '<')) (p)++ /** * Parser context @@ -514,10 +430,13 @@ xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur); xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename); xmlParserCtxtPtr xmlCreateMemoryParserCtxt(char *buffer, int size); -void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); xmlParserCtxtPtr xmlNewParserCtxt (void); +xmlParserCtxtPtr xmlCreateEntityParserCtxt(const xmlChar *URL, + const xmlChar *ID, + const xmlChar *base); void xmlSwitchEncoding (xmlParserCtxtPtr ctxt, xmlCharEncoding enc); +void xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); /** * Entities @@ -540,33 +459,34 @@ xmlParserInputPtr xmlNewInputFromFile (xmlParserCtxtPtr ctxt, /** * Namespaces. */ -xmlChar * xmlSplitQName (const xmlChar *name, +xmlChar * xmlSplitQName (xmlParserCtxtPtr ctxt, + const xmlChar *name, xmlChar **prefix); -xmlChar * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); -xmlChar * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, +xmlChar * xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); +xmlChar * xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, xmlChar **prefix); -xmlChar * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt); +xmlChar * xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt); void xmlParseNamespace (xmlParserCtxtPtr ctxt); /** * Generic production rules */ -xmlChar * xmlScanName (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseName (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseNmtoken (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseEntityValue (xmlParserCtxtPtr ctxt, +xmlChar * xmlScanName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseNmtoken (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEntityValue (xmlParserCtxtPtr ctxt, xmlChar **orig); -xmlChar * xmlParseAttValue (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); -xmlChar * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseAttValue (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); +xmlChar * xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); void xmlParseCharData (xmlParserCtxtPtr ctxt, int cdata); -xmlChar * xmlParseExternalID (xmlParserCtxtPtr ctxt, +xmlChar * xmlParseExternalID (xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict); void xmlParseComment (xmlParserCtxtPtr ctxt); -xmlChar * xmlParsePITarget (xmlParserCtxtPtr ctxt); +xmlChar * xmlParsePITarget (xmlParserCtxtPtr ctxt); void xmlParsePI (xmlParserCtxtPtr ctxt); void xmlParseNotationDecl (xmlParserCtxtPtr ctxt); void xmlParseEntityDecl (xmlParserCtxtPtr ctxt); @@ -593,19 +513,20 @@ xmlEntityPtr xmlParseEntityRef (xmlParserCtxtPtr ctxt); void xmlParseReference (xmlParserCtxtPtr ctxt); void xmlParsePEReference (xmlParserCtxtPtr ctxt); void xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseAttribute (xmlParserCtxtPtr ctxt, +xmlChar * xmlParseAttribute (xmlParserCtxtPtr ctxt, xmlChar **value); -xmlChar * xmlParseStartTag (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseStartTag (xmlParserCtxtPtr ctxt); void xmlParseEndTag (xmlParserCtxtPtr ctxt); void xmlParseCDSect (xmlParserCtxtPtr ctxt); void xmlParseContent (xmlParserCtxtPtr ctxt); void xmlParseElement (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseVersionNum (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseEncName (xmlParserCtxtPtr ctxt); -xmlChar * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseVersionNum (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseVersionInfo (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEncName (xmlParserCtxtPtr ctxt); +xmlChar * xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); int xmlParseSDDecl (xmlParserCtxtPtr ctxt); void xmlParseXMLDecl (xmlParserCtxtPtr ctxt); +void xmlParseTextDecl (xmlParserCtxtPtr ctxt); void xmlParseMisc (xmlParserCtxtPtr ctxt); void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, @@ -618,12 +539,18 @@ void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, #define XML_SUBSTITUTE_PEREF 2 #define XML_SUBSTITUTE_BOTH 3 -xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt, +xmlChar * xmlDecodeEntities (xmlParserCtxtPtr ctxt, int len, int what, xmlChar end, xmlChar end2, xmlChar end3); +xmlChar * xmlStringDecodeEntities (xmlParserCtxtPtr ctxt, + const xmlChar *str, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); /* * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP diff --git a/result/SVG/bike.xml b/result/SVG/bike.xml index c702188d..410869da 100644 --- a/result/SVG/bike.xml +++ b/result/SVG/bike.xml @@ -1,6 +1,5 @@ <?xml version="1.0"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd"> -<!--DOCTYPE svg SYSTEM "svg-19990412.dtd"--> <svg width="4in" height="3in"> <title>Kona Lavadome mountain bike
</title> diff --git a/result/VC/OneID b/result/VC/OneID index 3ad97fad..c5dbd6c2 100644 --- a/result/VC/OneID +++ b/result/VC/OneID @@ -1,3 +1,6 @@ ./test/VC/OneID:4: validity error: Element doc has too may ID attributes defined : id <!ATTLIST doc id ID #IMPLIED> ^ +./test/VC/OneID:4: validity error: Element doc has 2 ID attribute defined in the internal subset : id +<!ATTLIST doc id ID #IMPLIED> + ^ diff --git a/result/VC/OneID2 b/result/VC/OneID2 index 738c42e1..b1e2ed5e 100644 --- a/result/VC/OneID2 +++ b/result/VC/OneID2 @@ -1,3 +1,6 @@ +./test/VC/OneID2:3: validity error: Element doc has 2 ID attribute defined in the internal subset : id +<!ATTLIST doc id ID #IMPLIED> + ^ ./test/VC/OneID2:4: validity error: Element doc has too may ID attributes defined : val <!ELEMENT doc (#PCDATA)> ^ diff --git a/result/VC/OneID3 b/result/VC/OneID3 index 03077571..3f08c9ef 100644 --- a/result/VC/OneID3 +++ b/result/VC/OneID3 @@ -1,3 +1,3 @@ -./test/VC/OneID3:2: validity error: Element doc has ID attribute defined in the external subset : id -<!ATTLIST doc id ID #IMPLIED> - ^ +dtds/doc.dtd:2: validity error: Element doc has ID attributes defined in the internal and external subset : val +<!ATTLIST doc val ID #IMPLIED> + ^ diff --git a/result/VC/UniqueElementTypeDeclaration b/result/VC/UniqueElementTypeDeclaration index c648610a..e24b8e7c 100644 --- a/result/VC/UniqueElementTypeDeclaration +++ b/result/VC/UniqueElementTypeDeclaration @@ -1,3 +1,3 @@ -./test/VC/UniqueElementTypeDeclaration:3: validity error: Redefinition of element a +dtds/a.dtd:1: validity error: Redefinition of element a <!ELEMENT a (#PCDATA | b | c)*> ^ diff --git a/result/comment.xml b/result/comment.xml index 567160aa..98c5effd 100644 --- a/result/comment.xml +++ b/result/comment.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <doc> <!-- document start --> - <empty/> +<empty/> <!-- document end --> </doc> diff --git a/result/comment2.xml b/result/comment2.xml index 26242381..9e122ecf 100644 --- a/result/comment2.xml +++ b/result/comment2.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- document start --> <doc> - <empty/> +<empty/> </doc> <!-- document end --> diff --git a/result/dtd1 b/result/dtd1 index 2cb4398e..fb11ffa8 100644 --- a/result/dtd1 +++ b/result/dtd1 @@ -1,3 +1,4 @@ <?xml version="1.0"?> <!DOCTYPE MEMO PUBLIC "-//SGMLSOURCE//DTD MEMO//EN" "http://www.sgmlsource.com/dtds/memo.dtd"> -<MEMO/> +<MEMO> +</MEMO> diff --git a/result/dtd10 b/result/dtd10 index 82ac138b..86bf28d4 100644 --- a/result/dtd10 +++ b/result/dtd10 @@ -7,7 +7,7 @@ <!ELEMENT d (#PCDATA)> ]> <doc> - <b>This</b> - <c> is a</c> - <d> valid document</d> +<b>This</b> +<c> is a</c> +<d> valid document</d> </doc> diff --git a/result/dtd12 b/result/dtd12 index c7bc1bcf..f0d12610 100644 --- a/result/dtd12 +++ b/result/dtd12 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE doc [ -<!ENTITY % YN '"Yes"'> -<!ENTITY WhatHeSaid "He said %YN;"> +<!ENTITY YN '"Yes"'> +<!ENTITY WhatHeSaid "He said &YN;"> ]> <doc>&WhatHeSaid;</doc> diff --git a/result/dtd13 b/result/dtd13 index e69de29b..28141464 100644 --- a/result/dtd13 +++ b/result/dtd13 @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<!-- comment before the DTD --> +<!DOCTYPE doc [ +<!ELEMENT doc ANY> +]> +<!-- comment after the DTD --> +<doc/> diff --git a/result/dtd6 b/result/dtd6 index 8b3875e0..51ed4559 100644 --- a/result/dtd6 +++ b/result/dtd6 @@ -5,7 +5,7 @@ <!ELEMENT b (#PCDATA)> ]> <doc> - <a>This</a> - <b> is a valid</b> - <a> document</a> +<a>This</a> +<b> is a valid</b> +<a> document</a> </doc> diff --git a/result/dtd7 b/result/dtd7 index 4da0ce61..1dec0338 100644 --- a/result/dtd7 +++ b/result/dtd7 @@ -5,6 +5,6 @@ <!ELEMENT b (#PCDATA)> ]> <doc> - <a>This</a> - <b> is a valid document</b> +<a>This</a> +<b> is a valid document</b> </doc> diff --git a/result/dtd8 b/result/dtd8 index 77ab6426..b845a9e9 100644 --- a/result/dtd8 +++ b/result/dtd8 @@ -7,6 +7,6 @@ <!ELEMENT d (#PCDATA)> ]> <doc> - <b>This</b> - <c> is a valid document</c> +<b>This</b> +<c> is a valid document</c> </doc> diff --git a/result/dtd9 b/result/dtd9 index 020ab720..cded2117 100644 --- a/result/dtd9 +++ b/result/dtd9 @@ -7,6 +7,6 @@ <!ELEMENT d (#PCDATA)> ]> <doc> - <b>This</b> - <d> is a valid document</d> +<b>This</b> +<d> is a valid document</d> </doc> diff --git a/result/ent5 b/result/ent5 index d5b34e52..16e7e103 100644 --- a/result/ent5 +++ b/result/ent5 @@ -1,5 +1,5 @@ <?xml version="1.0"?> <EXAMPLE> - This is an inverted exclamation sign ¡ + This is an inverted exclamation sign ¡ This is a space </EXAMPLE> diff --git a/result/ent7 b/result/ent7 index e4e095ab..dcbc9cab 100644 --- a/result/ent7 +++ b/result/ent7 @@ -6,5 +6,5 @@ <!ELEMENT para (#PCDATA)> ]> <item> - <para>'they called me &sampleEnt;'</para> +<para>'they called me &sampleEnt;'</para> </item> diff --git a/result/ent8 b/result/ent8 index 7b8f814c..86e6c302 100644 --- a/result/ent8 +++ b/result/ent8 @@ -4,7 +4,7 @@ <!ENTITY test2 "test 2"> ]> <doc> - <Content>Retenção</Content> - <Content><></Content> - <Content>&test1;&test2;</Content> + <Content>Retenção</Content> + <Content><></Content> + <Content>&test1;&test2;</Content> </doc> diff --git a/result/eve.xml b/result/eve.xml index 7156e2ec..dab72086 100644 --- a/result/eve.xml +++ b/result/eve.xml @@ -2,4 +2,5 @@ <!DOCTYPE spec PUBLIC "-//testspec//" "dtds/eve.dtd" [ <!ENTITY iso6.doc.date "29-May-1999"> ]> -<spec/> +<spec> +</spec> diff --git a/result/noent/comment.xml b/result/noent/comment.xml index 567160aa..98c5effd 100644 --- a/result/noent/comment.xml +++ b/result/noent/comment.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <doc> <!-- document start --> - <empty/> +<empty/> <!-- document end --> </doc> diff --git a/result/noent/comment2.xml b/result/noent/comment2.xml index 26242381..9e122ecf 100644 --- a/result/noent/comment2.xml +++ b/result/noent/comment2.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- document start --> <doc> - <empty/> +<empty/> </doc> <!-- document end --> diff --git a/result/noent/dtd1 b/result/noent/dtd1 index 2cb4398e..fb11ffa8 100644 --- a/result/noent/dtd1 +++ b/result/noent/dtd1 @@ -1,3 +1,4 @@ <?xml version="1.0"?> <!DOCTYPE MEMO PUBLIC "-//SGMLSOURCE//DTD MEMO//EN" "http://www.sgmlsource.com/dtds/memo.dtd"> -<MEMO/> +<MEMO> +</MEMO> diff --git a/result/noent/dtd10 b/result/noent/dtd10 index 82ac138b..86bf28d4 100644 --- a/result/noent/dtd10 +++ b/result/noent/dtd10 @@ -7,7 +7,7 @@ <!ELEMENT d (#PCDATA)> ]> <doc> - <b>This</b> - <c> is a</c> - <d> valid document</d> +<b>This</b> +<c> is a</c> +<d> valid document</d> </doc> diff --git a/result/noent/dtd12 b/result/noent/dtd12 index 92c25609..8c4bf36d 100644 --- a/result/noent/dtd12 +++ b/result/noent/dtd12 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE doc [ -<!ENTITY % YN '"Yes"'> -<!ENTITY WhatHeSaid "He said %YN;"> +<!ENTITY YN '"Yes"'> +<!ENTITY WhatHeSaid "He said &YN;"> ]> -<doc>He said "Yes"</doc> +<doc>He said &YN;</doc> diff --git a/result/noent/dtd6 b/result/noent/dtd6 index 8b3875e0..51ed4559 100644 --- a/result/noent/dtd6 +++ b/result/noent/dtd6 @@ -5,7 +5,7 @@ <!ELEMENT b (#PCDATA)> ]> <doc> - <a>This</a> - <b> is a valid</b> - <a> document</a> +<a>This</a> +<b> is a valid</b> +<a> document</a> </doc> diff --git a/result/noent/dtd7 b/result/noent/dtd7 index 4da0ce61..1dec0338 100644 --- a/result/noent/dtd7 +++ b/result/noent/dtd7 @@ -5,6 +5,6 @@ <!ELEMENT b (#PCDATA)> ]> <doc> - <a>This</a> - <b> is a valid document</b> +<a>This</a> +<b> is a valid document</b> </doc> diff --git a/result/noent/dtd8 b/result/noent/dtd8 index 77ab6426..b845a9e9 100644 --- a/result/noent/dtd8 +++ b/result/noent/dtd8 @@ -7,6 +7,6 @@ <!ELEMENT d (#PCDATA)> ]> <doc> - <b>This</b> - <c> is a valid document</c> +<b>This</b> +<c> is a valid document</c> </doc> diff --git a/result/noent/dtd9 b/result/noent/dtd9 index 020ab720..cded2117 100644 --- a/result/noent/dtd9 +++ b/result/noent/dtd9 @@ -7,6 +7,6 @@ <!ELEMENT d (#PCDATA)> ]> <doc> - <b>This</b> - <d> is a valid document</d> +<b>This</b> +<d> is a valid document</d> </doc> diff --git a/result/noent/ent5 b/result/noent/ent5 index d5b34e52..16e7e103 100644 --- a/result/noent/ent5 +++ b/result/noent/ent5 @@ -1,5 +1,5 @@ <?xml version="1.0"?> <EXAMPLE> - This is an inverted exclamation sign ¡ + This is an inverted exclamation sign ¡ This is a space </EXAMPLE> diff --git a/result/noent/ent7 b/result/noent/ent7 index 45a1ceeb..1bf69cea 100644 --- a/result/noent/ent7 +++ b/result/noent/ent7 @@ -6,5 +6,5 @@ <!ELEMENT para (#PCDATA)> ]> <item> - <para>'they called me the hyacinth girl'</para> +<para>'they called me the hyacinth girl'</para> </item> diff --git a/result/noent/ent8 b/result/noent/ent8 index 0ed738ae..676266c9 100644 --- a/result/noent/ent8 +++ b/result/noent/ent8 @@ -4,7 +4,7 @@ <!ENTITY test2 "test 2"> ]> <doc> - <Content>Retenção</Content> - <Content><></Content> - <Content>test 1test 2</Content> + <Content>Retenção</Content> + <Content><></Content> + <Content>test 1test 2</Content> </doc> diff --git a/result/noent/eve.xml b/result/noent/eve.xml index 7156e2ec..dab72086 100644 --- a/result/noent/eve.xml +++ b/result/noent/eve.xml @@ -2,4 +2,5 @@ <!DOCTYPE spec PUBLIC "-//testspec//" "dtds/eve.dtd" [ <!ENTITY iso6.doc.date "29-May-1999"> ]> -<spec/> +<spec> +</spec> diff --git a/result/noent/p3p b/result/noent/p3p index b2ba102f..5e366b56 100644 --- a/result/noent/p3p +++ b/result/noent/p3p @@ -1,22 +1,19 @@ <?xml version="1.0"?> <RDF:RDF xmlns:RDF="http://www.w3.org/TR/WD-rdf-syntax#" p3p="http//www.w3.org/TR/1998/WD-P3P10-syntax#proposal.DTD"> - <PROP realm="http://www.CoolCatalog.com/catalogue/" entity="CoolCatalog" agreeID="94df1293a3e519bb" assurance="http://www.TrustUs.org"> - <USES> - <STATEMENT purp="2,3" recpnt="0" id="0" consq="a site with clothes you'd appreciate."> - <WITH> - <PREFIX name="User."> - <REF name="Name.First"/> - <REF name="Bdate.Year" optional="1"/> - <REF name="Gender"/> - </PREFIX> - </WITH> - </STATEMENT> - </USES> - <USES> - <STATEMENT action="read&write" purp="0" recpnt="0" id="1"> - <REF name="User.Shipping."/> - </STATEMENT> - </USES> - <DISCLOSURE discURI="http://www.CoolCatalog.com/PrivacyPractice.html" access="3" other="0,1"/> - </PROP> -</RDF:RDF> +<PROP realm="http://www.CoolCatalog.com/catalogue/" entity="CoolCatalog" agreeID="94df1293a3e519bb" assurance="http://www.TrustUs.org"> + <USES> + <STATEMENT purp="2,3" recpnt="0" id="0" consq="a site with clothes you'd appreciate."> + <WITH><PREFIX name="User."> + <REF name="Name.First"/> + <REF name="Bdate.Year" optional="1"/> + <REF name="Gender"/> + </PREFIX></WITH> + </STATEMENT> + </USES> + <USES> + <STATEMENT action="read&write" purp="0" recpnt="0" id="1"> + <REF name="User.Shipping."/> + </STATEMENT> + </USES> + <DISCLOSURE discURI="http://www.CoolCatalog.com/PrivacyPractice.html" access="3" other="0,1"/> +</PROP></RDF:RDF> diff --git a/result/noent/pi.xml b/result/noent/pi.xml index 27bed5b9..48c7ff04 100644 --- a/result/noent/pi.xml +++ b/result/noent/pi.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <doc> <?document-start doc?> - <empty/> +<empty/> <?document-end doc?> </doc> diff --git a/result/noent/pi2.xml b/result/noent/pi2.xml index acf76f95..710d51c9 100644 --- a/result/noent/pi2.xml +++ b/result/noent/pi2.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <?document-start doc?> <doc> - <empty/> +<empty/> </doc> <?document-end doc?> diff --git a/result/noent/rdf2 b/result/noent/rdf2 index fe803995..284946bf 100644 --- a/result/noent/rdf2 +++ b/result/noent/rdf2 @@ -11,11 +11,11 @@ <RPM:Packager>Till Bubeck <bubeck@delix.de>, Ngo Than <than@delix.de></RPM:Packager> <RPM:Group>Libraries</RPM:Group> <RPM:Summary>Bibliothek zur Ansteuerung von Terminals</RPM:Summary> - <RPM:Description>Diese Library stellt dem Programmierer vom Terminal unabhängige -Routinen zur Ansteuerung Ihres Bildschirms zur Verfügung, die + <RPM:Description>Diese Library stellt dem Programmierer vom Terminal unabhängige +Routinen zur Ansteuerung Ihres Bildschirms zur Verfügung, die speziell optimiert sind. -Diese Version ist die 'new curses' (ncurses) Variante und ist der -anerkannte Ersatz für die klassische Curses-Library, die nicht mehr +Diese Version ist die 'new curses' (ncurses) Variante und ist der +anerkannte Ersatz für die klassische Curses-Library, die nicht mehr weiterentwickelt wird.</RPM:Description> <RPM:Copyright>GPL</RPM:Copyright> <RPM:Sources>ncurses4-4.2-3.src.rpm</RPM:Sources> diff --git a/result/noent/slashdot.rdf b/result/noent/slashdot.rdf index 08d4922d..2fc1f07f 100644 --- a/result/noent/slashdot.rdf +++ b/result/noent/slashdot.rdf @@ -1,51 +1,63 @@ <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/"> + <channel> <title>Slashdot:News for Nerds. Stuff that Matters.</title> <link>http://slashdot.org/</link> <description>News for Nerds. Stuff that Matters</description> </channel> + <image> <title>Slashdot</title> <url>http://slashdot.org/images/slashdotlg.gif</url> <link>http://slashdot.org</link> </image> + <item> <title>100 Mbit/s on Fibre to the home</title> <link>http://slashdot.org/articles/99/06/06/1440211.shtml</link> </item> + <item> <title>Gimp 1.2 Preview</title> <link>http://slashdot.org/articles/99/06/06/1438246.shtml</link> </item> + <item> - <title>Sony's AIBO robot Sold Out</title> + <title>Sony's AIBO robot Sold Out</title> <link>http://slashdot.org/articles/99/06/06/1432256.shtml</link> </item> + <item> <title>Ask Slashdot: Another Word for "Hacker"?</title> <link>http://slashdot.org/askslashdot/99/06/05/1815225.shtml</link> </item> + <item> <title>Corel Linux FAQ</title> <link>http://slashdot.org/articles/99/06/05/1842218.shtml</link> </item> + <item> <title>Upside downsides MP3.COM.</title> <link>http://slashdot.org/articles/99/06/05/1558210.shtml</link> </item> + <item> <title>2 Terabits of Bandwidth</title> <link>http://slashdot.org/articles/99/06/05/1554258.shtml</link> </item> + <item> <title>Suppression of cold fusion research?</title> <link>http://slashdot.org/articles/99/06/04/2313200.shtml</link> </item> + <item> <title>California Gov. Halts Wage Info Sale</title> <link>http://slashdot.org/articles/99/06/04/235256.shtml</link> </item> + <item> <title>Red Hat Announces IPO</title> <link>http://slashdot.org/articles/99/06/04/0849207.shtml</link> diff --git a/result/noent/slashdot.xml b/result/noent/slashdot.xml index f52ca805..5521254c 100644 --- a/result/noent/slashdot.xml +++ b/result/noent/slashdot.xml @@ -1,17 +1,17 @@ <?xml version="1.0"?> <ultramode> - <story> + <story> <title>100 Mbit/s on Fibre to the home</title> <url>http://slashdot.org/articles/99/06/06/1440211.shtml</url> <time>1999-06-06 14:39:59</time> <author>CmdrTaco</author> - <department>wouldn't-it-be-nice</department> + <department>wouldn't-it-be-nice</department> <topic>internet</topic> <comments>20</comments> <section>articles</section> <image>topicinternet.jpg</image> </story> - <story> + <story> <title>Gimp 1.2 Preview</title> <url>http://slashdot.org/articles/99/06/06/1438246.shtml</url> <time>1999-06-06 14:38:40</time> @@ -22,8 +22,8 @@ <section>articles</section> <image>topicgimp.gif</image> </story> - <story> - <title>Sony's AIBO robot Sold Out</title> + <story> + <title>Sony's AIBO robot Sold Out</title> <url>http://slashdot.org/articles/99/06/06/1432256.shtml</url> <time>1999-06-06 14:32:51</time> <author>CmdrTaco</author> @@ -33,7 +33,7 @@ <section>articles</section> <image>topictech2.jpg</image> </story> - <story> + <story> <title>Ask Slashdot: Another Word for "Hacker"?</title> <url>http://slashdot.org/askslashdot/99/06/05/1815225.shtml</url> <time>1999-06-05 20:00:00</time> @@ -44,7 +44,7 @@ <section>askslashdot</section> <image>topicnews.gif</image> </story> - <story> + <story> <title>Corel Linux FAQ</title> <url>http://slashdot.org/articles/99/06/05/1842218.shtml</url> <time>1999-06-05 18:42:06</time> @@ -55,7 +55,7 @@ <section>articles</section> <image>topiccorel.gif</image> </story> - <story> + <story> <title>Upside downsides MP3.COM.</title> <url>http://slashdot.org/articles/99/06/05/1558210.shtml</url> <time>1999-06-05 15:56:45</time> @@ -66,7 +66,7 @@ <section>articles</section> <image>topicmusic.gif</image> </story> - <story> + <story> <title>2 Terabits of Bandwidth</title> <url>http://slashdot.org/articles/99/06/05/1554258.shtml</url> <time>1999-06-05 15:53:43</time> @@ -77,7 +77,7 @@ <section>articles</section> <image>topicinternet.jpg</image> </story> - <story> + <story> <title>Suppression of cold fusion research?</title> <url>http://slashdot.org/articles/99/06/04/2313200.shtml</url> <time>1999-06-04 23:12:29</time> @@ -88,7 +88,7 @@ <section>articles</section> <image>topicscience.gif</image> </story> - <story> + <story> <title>California Gov. Halts Wage Info Sale</title> <url>http://slashdot.org/articles/99/06/04/235256.shtml</url> <time>1999-06-04 23:05:34</time> @@ -99,7 +99,7 @@ <section>articles</section> <image>topicus.gif</image> </story> - <story> + <story> <title>Red Hat Announces IPO</title> <url>http://slashdot.org/articles/99/06/04/0849207.shtml</url> <time>1999-06-04 19:30:18</time> diff --git a/result/noent/svg1 b/result/noent/svg1 index 6802e5cd..359bd455 100644 --- a/result/noent/svg1 +++ b/result/noent/svg1 @@ -1,161 +1,161 @@ <?xml version="1.0" standalone="yes"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd"> <svg width="242px" height="383px"> - <g style="stroke: #000000"/> - <g style="fill: #f2cc99"> - <polyline verts=" 69,18 82,8 99,3 118,5 135,12 149,21 156,13 165,9 177,13 183,28 180,50 164,91 155,107 154,114 151,121 141,127 139,136 155,206 157,251 126,342 133,357 128,376 83,376 75,368 67,350 61,350 53,369 4,369 2,361 5,354 12,342 16,321 4,257 4,244 7,218 9,179 26,127 43,93 32,77 30,70 24,67 16,49 17,35 18,23 30,12 40,7 53,7 62,12 69,18 69,18 69,18"/> - </g> - <g style="fill: #e5b27f"> - <polyline verts=" 142,79 136,74 138,82 133,78 133,84 127,78 128,85 124,80 125,87 119,82 119,90 125,99 125,96 128,100 128,94 131,98 132,93 135,97 136,93 138,97 139,94 141,98 143,94 144,85 142,79 142,79 142,79"/> - </g> - <g style="fill: #eb8080"> - <polyline verts=" 127,101 132,100 137,99 144,101 143,105 135,110 127,101 127,101 127,101"/> - </g> - <g style="fill: #f2cc99"> - <polyline verts=" 178,229 157,248 139,296 126,349 137,356 158,357 183,342 212,332 235,288 235,261 228,252 212,250 188,251 178,229 178,229 178,229"/> - </g> - <g style="fill: #9c826b"> - <polyline verts=" 56,229 48,241 48,250 57,281 63,325 71,338 81,315 76,321 79,311 83,301 75,308 80,298 73,303 76,296 71,298 74,292 69,293 74,284 78,278 71,278 74,274 68,273 70,268 66,267 68,261 60,266 62,259 65,253 57,258 59,251 55,254 55,248 60,237 54,240 58,234 54,236 56,229 56,229 56,229"/> - <polyline verts=" 74,363 79,368 81,368 85,362 89,363 92,370 96,373 101,372 108,361 110,371 113,373 116,371 120,358 122,363 123,371 126,371 129,367 132,357 135,361 130,376 127,377 94,378 84,376 76,371 74,363 74,363 74,363"/> - <polyline verts=" 212,250 219,251 228,258 236,270 235,287 225,304 205,332 177,343 171,352 158,357 166,352 168,346 168,339 165,333 155,327 155,323 161,320 165,316 169,316 167,312 171,313 168,308 173,309 170,306 177,306 175,308 177,311 174,311 176,316 171,315 174,319 168,320 168,323 175,327 179,332 183,326 184,332 189,323 190,328 194,320 194,325 199,316 201,320 204,313 206,316 208,310 211,305 219,298 226,288 229,279 228,266 224,259 217,253 212,250 212,250 212,250"/> - <polyline verts=" 151,205 151,238 149,252 141,268 128,282 121,301 130,300 126,313 118,324 116,337 120,346 133,352 133,340 137,333 145,329 156,327 153,319 153,291 157,271 170,259 178,277 193,250 174,216 151,205 151,205 151,205"/> - <polyline verts=" 78,127 90,142 95,155 108,164 125,167 139,175 150,206 152,191 141,140 121,148 100,136 78,127 78,127 78,127"/> - <polyline verts=" 21,58 35,63 38,68 32,69 42,74 40,79 47,80 54,83 45,94 34,81 32,73 24,66 21,58 21,58 21,58"/> - <polyline verts=" 71,34 67,34 66,27 59,24 54,17 48,17 39,22 30,26 28,31 31,39 38,46 29,45 36,54 41,61 41,70 50,69 54,71 55,58 67,52 76,43 76,39 68,44 71,34 71,34 71,34"/> - <polyline verts=" 139,74 141,83 143,89 144,104 148,104 155,106 154,86 157,77 155,72 150,77 144,77 139,74 139,74 139,74"/> - <polyline verts=" 105,44 102,53 108,58 111,62 112,55 105,44 105,44 105,44"/> - <polyline verts=" 141,48 141,54 144,58 139,62 137,66 136,59 137,52 141,48 141,48 141,48"/> - <polyline verts=" 98,135 104,130 105,134 108,132 108,135 112,134 113,137 116,136 116,139 119,139 124,141 128,140 133,138 140,133 139,140 126,146 104,144 98,135 98,135 98,135"/> - <polyline verts=" 97,116 103,119 103,116 111,118 116,117 122,114 127,107 135,111 142,107 141,114 145,118 149,121 145,125 140,124 127,121 113,125 100,124 97,116 97,116 97,116"/> - <polyline verts=" 147,33 152,35 157,34 153,31 160,31 156,28 161,28 159,24 163,25 163,21 165,22 170,23 167,17 172,21 174,18 175,23 176,22 177,28 177,33 174,37 176,39 174,44 171,49 168,53 164,57 159,68 156,70 154,60 150,51 146,43 144,35 147,33 147,33 147,33"/> - <polyline verts=" 85,72 89,74 93,75 100,76 105,75 102,79 94,79 88,76 85,72 85,72 85,72"/> - <polyline verts=" 86,214 79,221 76,232 82,225 78,239 82,234 78,245 81,243 79,255 84,250 84,267 87,254 90,271 90,257 95,271 93,256 95,249 92,252 93,243 89,253 89,241 86,250 87,236 83,245 87,231 82,231 90,219 84,221 86,214 86,214 86,214"/> - </g> - <g style="fill: #ffcc7f"> - <polyline verts=" 93,68 96,72 100,73 106,72 108,66 105,63 100,62 93,68 93,68 93,68"/> - <polyline verts=" 144,64 142,68 142,73 146,74 150,73 154,64 149,62 144,64 144,64 144,64"/> - </g> - <g style="fill: #9c826b"> - <polyline verts=" 57,91 42,111 52,105 41,117 53,112 46,120 53,116 50,124 57,119 55,127 61,122 60,130 67,126 66,134 71,129 72,136 77,130 76,137 80,133 82,138 86,135 96,135 94,129 86,124 83,117 77,123 79,117 73,120 75,112 68,116 71,111 65,114 69,107 63,110 68,102 61,107 66,98 61,103 63,97 57,99 57,91 57,91 57,91"/> - <polyline verts=" 83,79 76,79 67,82 75,83 65,88 76,87 65,92 76,91 68,96 77,95 70,99 80,98 72,104 80,102 76,108 85,103 92,101 87,98 93,96 86,94 91,93 85,91 93,89 99,89 105,93 107,85 102,82 92,80 83,79 83,79 83,79"/> - <polyline verts=" 109,77 111,83 109,89 113,94 117,90 117,81 114,78 109,77 109,77 109,77"/> - <polyline verts=" 122,128 127,126 134,127 136,129 134,130 130,128 124,129 122,128 122,128 122,128"/> - <polyline verts=" 78,27 82,32 80,33 82,36 78,37 82,40 78,42 81,46 76,47 78,49 74,50 82,52 87,50 83,48 91,46 86,45 91,42 88,40 92,37 86,34 90,31 86,29 89,26 78,27 78,27 78,27"/> - <polyline verts=" 82,17 92,20 79,21 90,25 81,25 94,28 93,26 101,30 101,26 107,33 108,28 111,40 113,34 115,45 117,39 119,54 121,46 124,58 126,47 129,59 130,49 134,58 133,44 137,48 133,37 137,40 133,32 126,20 135,26 132,19 138,23 135,17 142,18 132,11 116,6 94,6 78,11 92,12 80,14 90,16 82,17 82,17 82,17"/> - <polyline verts=" 142,234 132,227 124,223 115,220 110,225 118,224 127,229 135,236 122,234 115,237 113,242 121,238 139,243 121,245 111,254 95,254 102,244 104,235 110,229 100,231 104,224 113,216 122,215 132,217 141,224 145,230 149,240 142,234 142,234 142,234"/> - <polyline verts=" 115,252 125,248 137,249 143,258 134,255 125,254 115,252 115,252 115,252"/> - <polyline verts=" 114,212 130,213 140,219 147,225 144,214 137,209 128,207 114,212 114,212 114,212"/> - <polyline verts=" 102,263 108,258 117,257 131,258 116,260 109,265 102,263 102,263 102,263"/> - <polyline verts=" 51,241 35,224 40,238 23,224 31,242 19,239 28,247 17,246 25,250 37,254 39,263 44,271 47,294 48,317 51,328 60,351 60,323 53,262 47,246 51,241 51,241 51,241"/> - <polyline verts=" 2,364 9,367 14,366 18,355 20,364 26,366 31,357 35,364 39,364 42,357 47,363 53,360 59,357 54,369 7,373 2,364 2,364 2,364"/> - <polyline verts=" 7,349 19,345 25,339 18,341 23,333 28,326 23,326 27,320 23,316 25,311 20,298 15,277 12,264 9,249 10,223 3,248 5,261 15,307 17,326 11,343 7,349 7,349 7,349"/> - <polyline verts=" 11,226 15,231 25,236 18,227 11,226 11,226 11,226"/> - <polyline verts=" 13,214 19,217 32,227 23,214 16,208 15,190 24,148 31,121 24,137 14,170 8,189 13,214 13,214 13,214"/> - <polyline verts=" 202,254 195,258 199,260 193,263 197,263 190,268 196,268 191,273 188,282 200,272 194,272 201,266 197,265 204,262 200,258 204,256 202,254 202,254 202,254"/> - </g> - <g style="fill: #845433"> - <polyline verts=" 151,213 165,212 179,225 189,246 187,262 179,275 176,263 177,247 171,233 163,230 165,251 157,264 146,298 145,321 133,326 143,285 154,260 153,240 151,213 151,213 151,213"/> - <polyline verts=" 91,132 95,145 97,154 104,148 107,155 109,150 111,158 115,152 118,159 120,153 125,161 126,155 133,164 132,154 137,163 137,152 142,163 147,186 152,192 148,167 141,143 124,145 105,143 91,132 91,132 91,132"/> - </g> - <g style="fill: #9c826b"> - <polyline verts=" 31,57 23,52 26,51 20,44 23,42 21,36 22,29 25,23 24,32 30,43 26,41 30,50 26,48 31,57 31,57 31,57"/> - <polyline verts=" 147,21 149,28 155,21 161,16 167,14 175,15 173,11 161,9 147,21 147,21 147,21"/> - <polyline verts=" 181,39 175,51 169,57 171,65 165,68 165,75 160,76 162,91 171,71 180,51 181,39 181,39 181,39"/> - <polyline verts=" 132,346 139,348 141,346 142,341 147,342 143,355 133,350 132,346 132,346 132,346"/> - <polyline verts=" 146,355 151,352 155,348 157,343 160,349 151,356 147,357 146,355 146,355 146,355"/> - <polyline verts=" 99,266 100,281 94,305 86,322 78,332 72,346 73,331 91,291 99,266 99,266 99,266"/> - <polyline verts=" 20,347 32,342 45,340 54,345 45,350 42,353 38,350 31,353 29,356 23,350 19,353 15,349 20,347 20,347 20,347"/> - <polyline verts=" 78,344 86,344 92,349 88,358 84,352 78,344 78,344 78,344"/> - <polyline verts=" 93,347 104,344 117,345 124,354 121,357 116,351 112,351 108,355 102,351 93,347 93,347 93,347"/> - </g> - <g style="fill: #000000"> - <polyline verts=" 105,12 111,18 113,24 113,29 119,34 116,23 112,16 105,12 105,12 105,12"/> - <polyline verts=" 122,27 125,34 127,43 128,34 125,29 122,27 122,27 122,27"/> - <polyline verts=" 115,13 122,19 122,15 113,10 115,13 115,13 115,13"/> - </g> - <g style="fill: #ffe5b2"> - <polyline verts=" 116,172 107,182 98,193 98,183 90,199 89,189 84,207 88,206 87,215 95,206 93,219 91,230 98,216 97,226 104,214 112,209 104,208 113,202 126,200 139,207 132,198 142,203 134,192 142,195 134,187 140,185 130,181 136,177 126,177 125,171 116,180 116,172 116,172 116,172"/> - <polyline verts=" 74,220 67,230 67,221 59,235 63,233 60,248 70,232 65,249 71,243 67,256 73,250 69,262 73,259 71,267 76,262 72,271 78,270 76,275 82,274 78,290 86,279 86,289 92,274 88,275 87,264 82,270 82,258 77,257 78,247 73,246 77,233 72,236 74,220 74,220 74,220"/> - <polyline verts=" 133,230 147,242 148,250 145,254 138,247 129,246 142,245 138,241 128,237 137,238 133,230 133,230 133,230"/> - <polyline verts=" 133,261 125,261 116,263 111,267 125,265 133,261 133,261 133,261"/> - <polyline verts=" 121,271 109,273 103,279 99,305 92,316 85,327 83,335 89,340 97,341 94,336 101,336 96,331 103,330 97,327 108,325 99,322 109,321 100,318 110,317 105,314 110,312 107,310 113,308 105,306 114,303 105,301 115,298 107,295 115,294 108,293 117,291 109,289 117,286 109,286 118,283 112,281 118,279 114,278 119,276 115,274 121,271 121,271 121,271"/> - <polyline verts=" 79,364 74,359 74,353 76,347 80,351 83,356 82,360 79,364 79,364 79,364"/> - <polyline verts=" 91,363 93,356 97,353 103,355 105,360 103,366 99,371 94,368 91,363 91,363 91,363"/> - <polyline verts=" 110,355 114,353 118,357 117,363 113,369 111,362 110,355 110,355 110,355"/> - <polyline verts=" 126,354 123,358 124,367 126,369 129,361 129,357 126,354 126,354 126,354"/> - <polyline verts=" 30,154 24,166 20,182 23,194 29,208 37,218 41,210 41,223 46,214 46,227 52,216 52,227 61,216 59,225 68,213 73,219 70,207 77,212 69,200 77,202 70,194 78,197 68,187 76,182 64,182 58,175 58,185 53,177 50,186 46,171 44,182 39,167 36,172 36,162 30,166 30,154 30,154 30,154"/> - <polyline verts=" 44,130 41,137 45,136 43,150 48,142 48,157 53,150 52,164 60,156 61,169 64,165 66,175 70,167 74,176 77,168 80,183 85,172 90,182 93,174 98,181 99,173 104,175 105,169 114,168 102,163 95,157 94,166 90,154 87,162 82,149 75,159 72,148 68,155 67,143 62,148 62,138 58,145 56,133 52,142 52,128 49,134 47,125 44,130 44,130 44,130"/> - <polyline verts=" 13,216 19,219 36,231 22,223 16,222 22,227 12,224 13,220 16,220 13,216 13,216 13,216"/> - <polyline verts=" 10,231 14,236 25,239 27,237 19,234 10,231 10,231 10,231"/> - <polyline verts=" 9,245 14,242 25,245 13,245 9,245 9,245 9,245"/> - <polyline verts=" 33,255 26,253 18,254 25,256 18,258 27,260 18,263 27,265 19,267 29,270 21,272 29,276 21,278 30,281 22,283 31,287 24,288 32,292 23,293 34,298 26,299 37,303 32,305 39,309 33,309 39,314 34,314 40,318 34,317 40,321 34,321 41,326 33,326 40,330 33,332 39,333 33,337 42,337 54,341 49,337 52,335 47,330 50,330 45,325 49,325 45,321 48,321 45,316 46,306 45,286 43,274 36,261 33,255 33,255 33,255"/> - <polyline verts=" 7,358 9,351 14,351 17,359 11,364 7,358 7,358 7,358"/> - <polyline verts=" 44,354 49,351 52,355 49,361 44,354 44,354 44,354"/> - <polyline verts=" 32,357 37,353 40,358 36,361 32,357 32,357 32,357"/> - <polyline verts=" 139,334 145,330 154,330 158,334 154,341 152,348 145,350 149,340 147,336 141,339 139,345 136,342 136,339 139,334 139,334 139,334"/> - <polyline verts=" 208,259 215,259 212,255 220,259 224,263 225,274 224,283 220,292 208,300 206,308 203,304 199,315 197,309 195,318 193,313 190,322 190,316 185,325 182,318 180,325 172,321 178,320 176,313 186,312 180,307 188,307 184,303 191,302 186,299 195,294 187,290 197,288 192,286 201,283 194,280 203,277 198,275 207,271 200,269 209,265 204,265 212,262 208,259 208,259 208,259"/> - <polyline verts=" 106,126 106,131 109,132 111,134 115,132 115,135 119,133 118,137 123,137 128,137 133,134 136,130 136,127 132,124 118,128 112,128 106,126 106,126 106,126"/> - <polyline verts=" 107,114 101,110 98,102 105,97 111,98 119,102 121,108 118,112 113,115 107,114 107,114 107,114"/> - <polyline verts=" 148,106 145,110 146,116 150,118 152,111 151,107 148,106 148,106 148,106"/> - <polyline verts=" 80,55 70,52 75,58 63,57 72,61 57,61 67,66 57,67 62,69 54,71 61,73 54,77 63,78 53,85 60,84 56,90 69,84 63,82 75,76 70,75 77,72 72,71 78,69 72,66 81,67 78,64 82,63 80,60 86,62 80,55 80,55 80,55"/> - <polyline verts=" 87,56 91,52 96,50 102,56 98,56 92,60 87,56 87,56 87,56"/> - <polyline verts=" 85,68 89,73 98,76 106,74 96,73 91,70 85,68 85,68 85,68"/> - <polyline verts=" 115,57 114,64 111,64 115,75 122,81 122,74 126,79 126,74 131,78 130,72 133,77 131,68 126,61 119,57 115,57 115,57 115,57"/> - <polyline verts=" 145,48 143,53 147,59 151,59 150,55 145,48 145,48 145,48"/> - <polyline verts=" 26,22 34,15 43,10 52,10 59,16 47,15 32,22 26,22 26,22 26,22"/> - <polyline verts=" 160,19 152,26 149,34 154,33 152,30 157,30 155,26 158,27 157,23 161,23 160,19 160,19 160,19"/> - </g> - <g style="fill: #000000"> - <polyline verts=" 98,117 105,122 109,122 105,117 113,120 121,120 130,112 128,108 123,103 123,99 128,101 132,106 135,109 142,105 142,101 145,101 145,91 148,101 145,105 136,112 135,116 143,124 148,120 150,122 142,128 133,122 121,125 112,126 103,125 100,129 96,124 98,117 98,117 98,117"/> - <polyline verts=" 146,118 152,118 152,115 149,115 146,118 146,118 146,118"/> - <polyline verts=" 148,112 154,111 154,109 149,109 148,112 148,112 148,112"/> - <polyline verts=" 106,112 108,115 114,116 118,114 106,112 106,112 106,112"/> - <polyline verts=" 108,108 111,110 116,110 119,108 108,108 108,108 108,108"/> - <polyline verts=" 106,104 109,105 117,106 115,104 106,104 106,104 106,104"/> - <polyline verts=" 50,25 41,26 34,33 39,43 49,58 36,51 47,68 55,69 54,59 61,57 74,46 60,52 67,42 57,48 61,40 54,45 60,36 59,29 48,38 52,30 47,32 50,25 50,25 50,25"/> - <polyline verts=" 147,34 152,41 155,49 161,53 157,47 164,47 158,43 168,44 159,40 164,37 169,37 164,33 169,34 165,28 170,30 170,25 173,29 175,27 176,32 173,36 175,39 172,42 172,46 168,49 170,55 162,57 158,63 155,58 153,50 149,46 147,34 147,34 147,34"/> - <polyline verts=" 155,71 159,80 157,93 157,102 155,108 150,101 149,93 154,101 152,91 151,83 155,79 155,71 155,71 155,71"/> - <polyline verts=" 112,78 115,81 114,91 112,87 113,82 112,78 112,78 112,78"/> - <polyline verts=" 78,28 64,17 58,11 47,9 36,10 28,16 21,26 18,41 20,51 23,61 33,65 28,68 37,74 36,81 43,87 48,90 43,100 40,98 39,90 31,80 30,72 22,71 17,61 14,46 16,28 23,17 33,9 45,6 54,6 65,12 78,28 78,28 78,28"/> - <polyline verts=" 67,18 76,9 87,5 101,2 118,3 135,8 149,20 149,26 144,19 132,12 121,9 105,7 89,8 76,14 70,20 67,18 67,18 67,18"/> - <polyline verts=" 56,98 48,106 56,103 47,112 56,110 52,115 57,113 52,121 62,115 58,123 65,119 63,125 69,121 68,127 74,125 74,129 79,128 83,132 94,135 93,129 85,127 81,122 76,126 75,121 71,124 71,117 66,121 66,117 62,117 64,112 60,113 60,110 57,111 61,105 57,107 60,101 55,102 56,98 56,98 56,98"/> - <polyline verts=" 101,132 103,138 106,134 106,139 112,136 111,142 115,139 114,143 119,142 125,145 131,142 135,138 140,134 140,129 143,135 145,149 150,171 149,184 145,165 141,150 136,147 132,151 131,149 126,152 125,150 121,152 117,148 111,152 110,148 105,149 104,145 98,150 96,138 94,132 94,130 98,132 101,132 101,132 101,132"/> - <polyline verts=" 41,94 32,110 23,132 12,163 6,190 7,217 5,236 3,247 9,230 12,211 12,185 18,160 26,134 35,110 43,99 41,94 41,94 41,94"/> - <polyline verts=" 32,246 41,250 50,257 52,267 53,295 53,323 59,350 54,363 51,365 44,366 42,360 40,372 54,372 59,366 62,353 71,352 75,335 73,330 66,318 68,302 64,294 67,288 63,286 63,279 59,275 58,267 56,262 50,247 42,235 44,246 32,236 35,244 32,246 32,246 32,246"/> - <polyline verts=" 134,324 146,320 159,322 173,327 179,337 179,349 172,355 158,357 170,350 174,343 170,333 163,328 152,326 134,329 134,324 134,324 134,324"/> - <polyline verts=" 173,339 183,334 184,338 191,329 194,332 199,323 202,325 206,318 209,320 213,309 221,303 228,296 232,289 234,279 233,269 230,262 225,256 219,253 208,252 198,252 210,249 223,250 232,257 237,265 238,277 238,291 232,305 221,323 218,335 212,342 200,349 178,348 173,339 173,339 173,339"/> - <polyline verts=" 165,296 158,301 156,310 156,323 162,324 159,318 162,308 162,304 165,296 165,296 165,296"/> - <polyline verts=" 99,252 105,244 107,234 115,228 121,228 131,235 122,233 113,235 109,246 121,239 133,243 121,243 110,251 99,252 99,252 99,252"/> - <polyline verts=" 117,252 124,247 134,249 136,253 126,252 117,252 117,252 117,252"/> - <polyline verts=" 117,218 132,224 144,233 140,225 132,219 117,218 117,218 117,218"/> - <polyline verts=" 122,212 134,214 143,221 141,213 132,210 122,212 122,212 122,212"/> - <polyline verts=" 69,352 70,363 76,373 86,378 97,379 108,379 120,377 128,378 132,373 135,361 133,358 132,366 127,375 121,374 121,362 119,367 117,374 110,376 110,362 107,357 106,371 104,375 97,376 90,375 90,368 86,362 83,364 86,369 85,373 78,370 73,362 71,351 69,352 69,352 69,352"/> - <polyline verts=" 100,360 96,363 99,369 102,364 100,360 100,360 100,360"/> - <polyline verts=" 115,360 112,363 114,369 117,364 115,360 115,360 115,360"/> - <polyline verts=" 127,362 125,364 126,369 128,365 127,362 127,362 127,362"/> - <polyline verts=" 5,255 7,276 11,304 15,320 13,334 6,348 2,353 0,363 5,372 12,374 25,372 38,372 44,369 42,367 36,368 31,369 30,360 27,368 20,370 16,361 15,368 10,369 3,366 3,359 6,352 11,348 17,331 19,316 12,291 9,274 5,255 5,255 5,255"/> - <polyline verts=" 10,358 7,362 10,366 11,362 10,358 10,358 10,358"/> - <polyline verts=" 25,357 22,360 24,366 27,360 25,357 25,357 25,357"/> - <polyline verts=" 37,357 34,361 36,365 38,361 37,357 37,357 37,357"/> - <polyline verts=" 49,356 46,359 47,364 50,360 49,356 49,356 49,356"/> - <polyline verts=" 130,101 132,102 135,101 139,102 143,103 142,101 137,100 133,100 130,101 130,101 130,101"/> - <polyline verts=" 106,48 105,52 108,56 109,52 106,48 106,48 106,48"/> - <polyline verts=" 139,52 139,56 140,60 142,58 141,56 139,52 139,52 139,52"/> - <polyline verts=" 25,349 29,351 30,355 33,350 37,348 42,351 45,347 49,345 44,343 36,345 25,349 25,349 25,349"/> - <polyline verts=" 98,347 105,351 107,354 109,349 115,349 120,353 118,349 113,346 104,346 98,347 98,347 98,347"/> - <polyline verts=" 83,348 87,352 87,357 89,351 87,348 83,348 83,348 83,348"/> - <polyline verts=" 155,107 163,107 170,107 186,108 175,109 155,109 155,107 155,107 155,107"/> - <polyline verts=" 153,114 162,113 175,112 192,114 173,114 154,115 153,114 153,114 153,114"/> - <polyline verts=" 152,118 164,120 180,123 197,129 169,123 151,120 152,118 152,118 152,118"/> - <polyline verts=" 68,109 87,106 107,106 106,108 88,108 68,109 68,109 68,109"/> - <polyline verts=" 105,111 95,112 79,114 71,116 85,115 102,113 105,111 105,111 105,111"/> - <polyline verts=" 108,101 98,99 87,99 78,99 93,100 105,102 108,101 108,101 108,101"/> - <polyline verts=" 85,63 91,63 97,60 104,60 108,62 111,69 112,75 110,74 108,71 103,73 106,69 105,65 103,64 103,67 102,70 99,70 97,66 94,67 97,72 88,67 84,66 85,63 85,63 85,63"/> - <polyline verts=" 140,74 141,66 144,61 150,61 156,62 153,70 150,73 152,65 150,65 151,68 149,71 146,71 144,66 143,70 143,74 140,74 140,74 140,74"/> - <polyline verts=" 146,20 156,11 163,9 172,9 178,14 182,18 184,32 182,42 182,52 177,58 176,67 171,76 165,90 157,105 160,92 164,85 168,78 167,73 173,66 172,62 175,59 174,55 177,53 180,46 181,29 179,21 173,13 166,11 159,13 153,18 148,23 146,20 146,20 146,20"/> - <polyline verts=" 150,187 148,211 150,233 153,247 148,267 135,283 125,299 136,292 131,313 122,328 122,345 129,352 133,359 133,367 137,359 148,356 140,350 131,347 129,340 132,332 140,328 137,322 140,304 154,265 157,244 155,223 161,220 175,229 186,247 185,260 176,275 178,287 185,277 188,261 196,253 189,236 174,213 150,187 150,187 150,187"/> - <polyline verts=" 147,338 142,341 143,345 141,354 147,343 147,338 147,338 147,338"/> - <polyline verts=" 157,342 156,349 150,356 157,353 163,346 162,342 157,342 157,342 157,342"/> - <polyline verts=" 99,265 96,284 92,299 73,339 73,333 87,300 99,265 99,265 99,265"/> - </g> -</svg> +<g style="stroke: #000000"> +</g> +<g style="fill: #f2cc99"> + <polyline verts=" 69,18 82,8 99,3 118,5 135,12 149,21 156,13 165,9 177,13 183,28 180,50 164,91 155,107 154,114 151,121 141,127 139,136 155,206 157,251 126,342 133,357 128,376 83,376 75,368 67,350 61,350 53,369 4,369 2,361 5,354 12,342 16,321 4,257 4,244 7,218 9,179 26,127 43,93 32,77 30,70 24,67 16,49 17,35 18,23 30,12 40,7 53,7 62,12 69,18 69,18 69,18"/> +</g> +<g style="fill: #e5b27f"> + <polyline verts=" 142,79 136,74 138,82 133,78 133,84 127,78 128,85 124,80 125,87 119,82 119,90 125,99 125,96 128,100 128,94 131,98 132,93 135,97 136,93 138,97 139,94 141,98 143,94 144,85 142,79 142,79 142,79"/> +</g> +<g style="fill: #eb8080"> + <polyline verts=" 127,101 132,100 137,99 144,101 143,105 135,110 127,101 127,101 127,101"/> +</g> +<g style="fill: #f2cc99"> + <polyline verts=" 178,229 157,248 139,296 126,349 137,356 158,357 183,342 212,332 235,288 235,261 228,252 212,250 188,251 178,229 178,229 178,229"/> +</g> +<g style="fill: #9c826b"> + <polyline verts=" 56,229 48,241 48,250 57,281 63,325 71,338 81,315 76,321 79,311 83,301 75,308 80,298 73,303 76,296 71,298 74,292 69,293 74,284 78,278 71,278 74,274 68,273 70,268 66,267 68,261 60,266 62,259 65,253 57,258 59,251 55,254 55,248 60,237 54,240 58,234 54,236 56,229 56,229 56,229"/> + <polyline verts=" 74,363 79,368 81,368 85,362 89,363 92,370 96,373 101,372 108,361 110,371 113,373 116,371 120,358 122,363 123,371 126,371 129,367 132,357 135,361 130,376 127,377 94,378 84,376 76,371 74,363 74,363 74,363"/> + <polyline verts=" 212,250 219,251 228,258 236,270 235,287 225,304 205,332 177,343 171,352 158,357 166,352 168,346 168,339 165,333 155,327 155,323 161,320 165,316 169,316 167,312 171,313 168,308 173,309 170,306 177,306 175,308 177,311 174,311 176,316 171,315 174,319 168,320 168,323 175,327 179,332 183,326 184,332 189,323 190,328 194,320 194,325 199,316 201,320 204,313 206,316 208,310 211,305 219,298 226,288 229,279 228,266 224,259 217,253 212,250 212,250 212,250"/> + <polyline verts=" 151,205 151,238 149,252 141,268 128,282 121,301 130,300 126,313 118,324 116,337 120,346 133,352 133,340 137,333 145,329 156,327 153,319 153,291 157,271 170,259 178,277 193,250 174,216 151,205 151,205 151,205"/> + <polyline verts=" 78,127 90,142 95,155 108,164 125,167 139,175 150,206 152,191 141,140 121,148 100,136 78,127 78,127 78,127"/> + <polyline verts=" 21,58 35,63 38,68 32,69 42,74 40,79 47,80 54,83 45,94 34,81 32,73 24,66 21,58 21,58 21,58"/> + <polyline verts=" 71,34 67,34 66,27 59,24 54,17 48,17 39,22 30,26 28,31 31,39 38,46 29,45 36,54 41,61 41,70 50,69 54,71 55,58 67,52 76,43 76,39 68,44 71,34 71,34 71,34"/> + <polyline verts=" 139,74 141,83 143,89 144,104 148,104 155,106 154,86 157,77 155,72 150,77 144,77 139,74 139,74 139,74"/> + <polyline verts=" 105,44 102,53 108,58 111,62 112,55 105,44 105,44 105,44"/> + <polyline verts=" 141,48 141,54 144,58 139,62 137,66 136,59 137,52 141,48 141,48 141,48"/> + <polyline verts=" 98,135 104,130 105,134 108,132 108,135 112,134 113,137 116,136 116,139 119,139 124,141 128,140 133,138 140,133 139,140 126,146 104,144 98,135 98,135 98,135"/> + <polyline verts=" 97,116 103,119 103,116 111,118 116,117 122,114 127,107 135,111 142,107 141,114 145,118 149,121 145,125 140,124 127,121 113,125 100,124 97,116 97,116 97,116"/> + <polyline verts=" 147,33 152,35 157,34 153,31 160,31 156,28 161,28 159,24 163,25 163,21 165,22 170,23 167,17 172,21 174,18 175,23 176,22 177,28 177,33 174,37 176,39 174,44 171,49 168,53 164,57 159,68 156,70 154,60 150,51 146,43 144,35 147,33 147,33 147,33"/> + <polyline verts=" 85,72 89,74 93,75 100,76 105,75 102,79 94,79 88,76 85,72 85,72 85,72"/> + <polyline verts=" 86,214 79,221 76,232 82,225 78,239 82,234 78,245 81,243 79,255 84,250 84,267 87,254 90,271 90,257 95,271 93,256 95,249 92,252 93,243 89,253 89,241 86,250 87,236 83,245 87,231 82,231 90,219 84,221 86,214 86,214 86,214"/> +</g> +<g style="fill: #ffcc7f"> + <polyline verts=" 93,68 96,72 100,73 106,72 108,66 105,63 100,62 93,68 93,68 93,68"/> + <polyline verts=" 144,64 142,68 142,73 146,74 150,73 154,64 149,62 144,64 144,64 144,64"/> +</g> +<g style="fill: #9c826b"> + <polyline verts=" 57,91 42,111 52,105 41,117 53,112 46,120 53,116 50,124 57,119 55,127 61,122 60,130 67,126 66,134 71,129 72,136 77,130 76,137 80,133 82,138 86,135 96,135 94,129 86,124 83,117 77,123 79,117 73,120 75,112 68,116 71,111 65,114 69,107 63,110 68,102 61,107 66,98 61,103 63,97 57,99 57,91 57,91 57,91"/> + <polyline verts=" 83,79 76,79 67,82 75,83 65,88 76,87 65,92 76,91 68,96 77,95 70,99 80,98 72,104 80,102 76,108 85,103 92,101 87,98 93,96 86,94 91,93 85,91 93,89 99,89 105,93 107,85 102,82 92,80 83,79 83,79 83,79"/> + <polyline verts=" 109,77 111,83 109,89 113,94 117,90 117,81 114,78 109,77 109,77 109,77"/> + <polyline verts=" 122,128 127,126 134,127 136,129 134,130 130,128 124,129 122,128 122,128 122,128"/> + <polyline verts=" 78,27 82,32 80,33 82,36 78,37 82,40 78,42 81,46 76,47 78,49 74,50 82,52 87,50 83,48 91,46 86,45 91,42 88,40 92,37 86,34 90,31 86,29 89,26 78,27 78,27 78,27"/> + <polyline verts=" 82,17 92,20 79,21 90,25 81,25 94,28 93,26 101,30 101,26 107,33 108,28 111,40 113,34 115,45 117,39 119,54 121,46 124,58 126,47 129,59 130,49 134,58 133,44 137,48 133,37 137,40 133,32 126,20 135,26 132,19 138,23 135,17 142,18 132,11 116,6 94,6 78,11 92,12 80,14 90,16 82,17 82,17 82,17"/> + <polyline verts=" 142,234 132,227 124,223 115,220 110,225 118,224 127,229 135,236 122,234 115,237 113,242 121,238 139,243 121,245 111,254 95,254 102,244 104,235 110,229 100,231 104,224 113,216 122,215 132,217 141,224 145,230 149,240 142,234 142,234 142,234"/> + <polyline verts=" 115,252 125,248 137,249 143,258 134,255 125,254 115,252 115,252 115,252"/> + <polyline verts=" 114,212 130,213 140,219 147,225 144,214 137,209 128,207 114,212 114,212 114,212"/> + <polyline verts=" 102,263 108,258 117,257 131,258 116,260 109,265 102,263 102,263 102,263"/> + <polyline verts=" 51,241 35,224 40,238 23,224 31,242 19,239 28,247 17,246 25,250 37,254 39,263 44,271 47,294 48,317 51,328 60,351 60,323 53,262 47,246 51,241 51,241 51,241"/> + <polyline verts=" 2,364 9,367 14,366 18,355 20,364 26,366 31,357 35,364 39,364 42,357 47,363 53,360 59,357 54,369 7,373 2,364 2,364 2,364"/> + <polyline verts=" 7,349 19,345 25,339 18,341 23,333 28,326 23,326 27,320 23,316 25,311 20,298 15,277 12,264 9,249 10,223 3,248 5,261 15,307 17,326 11,343 7,349 7,349 7,349"/> + <polyline verts=" 11,226 15,231 25,236 18,227 11,226 11,226 11,226"/> + <polyline verts=" 13,214 19,217 32,227 23,214 16,208 15,190 24,148 31,121 24,137 14,170 8,189 13,214 13,214 13,214"/> + <polyline verts=" 202,254 195,258 199,260 193,263 197,263 190,268 196,268 191,273 188,282 200,272 194,272 201,266 197,265 204,262 200,258 204,256 202,254 202,254 202,254"/> +</g> +<g style="fill: #845433"> + <polyline verts=" 151,213 165,212 179,225 189,246 187,262 179,275 176,263 177,247 171,233 163,230 165,251 157,264 146,298 145,321 133,326 143,285 154,260 153,240 151,213 151,213 151,213"/> + <polyline verts=" 91,132 95,145 97,154 104,148 107,155 109,150 111,158 115,152 118,159 120,153 125,161 126,155 133,164 132,154 137,163 137,152 142,163 147,186 152,192 148,167 141,143 124,145 105,143 91,132 91,132 91,132"/> +</g> +<g style="fill: #9c826b"> + <polyline verts=" 31,57 23,52 26,51 20,44 23,42 21,36 22,29 25,23 24,32 30,43 26,41 30,50 26,48 31,57 31,57 31,57"/> + <polyline verts=" 147,21 149,28 155,21 161,16 167,14 175,15 173,11 161,9 147,21 147,21 147,21"/> + <polyline verts=" 181,39 175,51 169,57 171,65 165,68 165,75 160,76 162,91 171,71 180,51 181,39 181,39 181,39"/> + <polyline verts=" 132,346 139,348 141,346 142,341 147,342 143,355 133,350 132,346 132,346 132,346"/> + <polyline verts=" 146,355 151,352 155,348 157,343 160,349 151,356 147,357 146,355 146,355 146,355"/> + <polyline verts=" 99,266 100,281 94,305 86,322 78,332 72,346 73,331 91,291 99,266 99,266 99,266"/> + <polyline verts=" 20,347 32,342 45,340 54,345 45,350 42,353 38,350 31,353 29,356 23,350 19,353 15,349 20,347 20,347 20,347"/> + <polyline verts=" 78,344 86,344 92,349 88,358 84,352 78,344 78,344 78,344"/> + <polyline verts=" 93,347 104,344 117,345 124,354 121,357 116,351 112,351 108,355 102,351 93,347 93,347 93,347"/> +</g> +<g style="fill: #000000"> + <polyline verts=" 105,12 111,18 113,24 113,29 119,34 116,23 112,16 105,12 105,12 105,12"/> + <polyline verts=" 122,27 125,34 127,43 128,34 125,29 122,27 122,27 122,27"/> + <polyline verts=" 115,13 122,19 122,15 113,10 115,13 115,13 115,13"/> +</g> +<g style="fill: #ffe5b2"> + <polyline verts=" 116,172 107,182 98,193 98,183 90,199 89,189 84,207 88,206 87,215 95,206 93,219 91,230 98,216 97,226 104,214 112,209 104,208 113,202 126,200 139,207 132,198 142,203 134,192 142,195 134,187 140,185 130,181 136,177 126,177 125,171 116,180 116,172 116,172 116,172"/> + <polyline verts=" 74,220 67,230 67,221 59,235 63,233 60,248 70,232 65,249 71,243 67,256 73,250 69,262 73,259 71,267 76,262 72,271 78,270 76,275 82,274 78,290 86,279 86,289 92,274 88,275 87,264 82,270 82,258 77,257 78,247 73,246 77,233 72,236 74,220 74,220 74,220"/> + <polyline verts=" 133,230 147,242 148,250 145,254 138,247 129,246 142,245 138,241 128,237 137,238 133,230 133,230 133,230"/> + <polyline verts=" 133,261 125,261 116,263 111,267 125,265 133,261 133,261 133,261"/> + <polyline verts=" 121,271 109,273 103,279 99,305 92,316 85,327 83,335 89,340 97,341 94,336 101,336 96,331 103,330 97,327 108,325 99,322 109,321 100,318 110,317 105,314 110,312 107,310 113,308 105,306 114,303 105,301 115,298 107,295 115,294 108,293 117,291 109,289 117,286 109,286 118,283 112,281 118,279 114,278 119,276 115,274 121,271 121,271 121,271"/> + <polyline verts=" 79,364 74,359 74,353 76,347 80,351 83,356 82,360 79,364 79,364 79,364"/> + <polyline verts=" 91,363 93,356 97,353 103,355 105,360 103,366 99,371 94,368 91,363 91,363 91,363"/> + <polyline verts=" 110,355 114,353 118,357 117,363 113,369 111,362 110,355 110,355 110,355"/> + <polyline verts=" 126,354 123,358 124,367 126,369 129,361 129,357 126,354 126,354 126,354"/> + <polyline verts=" 30,154 24,166 20,182 23,194 29,208 37,218 41,210 41,223 46,214 46,227 52,216 52,227 61,216 59,225 68,213 73,219 70,207 77,212 69,200 77,202 70,194 78,197 68,187 76,182 64,182 58,175 58,185 53,177 50,186 46,171 44,182 39,167 36,172 36,162 30,166 30,154 30,154 30,154"/> + <polyline verts=" 44,130 41,137 45,136 43,150 48,142 48,157 53,150 52,164 60,156 61,169 64,165 66,175 70,167 74,176 77,168 80,183 85,172 90,182 93,174 98,181 99,173 104,175 105,169 114,168 102,163 95,157 94,166 90,154 87,162 82,149 75,159 72,148 68,155 67,143 62,148 62,138 58,145 56,133 52,142 52,128 49,134 47,125 44,130 44,130 44,130"/> + <polyline verts=" 13,216 19,219 36,231 22,223 16,222 22,227 12,224 13,220 16,220 13,216 13,216 13,216"/> + <polyline verts=" 10,231 14,236 25,239 27,237 19,234 10,231 10,231 10,231"/> + <polyline verts=" 9,245 14,242 25,245 13,245 9,245 9,245 9,245"/> + <polyline verts=" 33,255 26,253 18,254 25,256 18,258 27,260 18,263 27,265 19,267 29,270 21,272 29,276 21,278 30,281 22,283 31,287 24,288 32,292 23,293 34,298 26,299 37,303 32,305 39,309 33,309 39,314 34,314 40,318 34,317 40,321 34,321 41,326 33,326 40,330 33,332 39,333 33,337 42,337 54,341 49,337 52,335 47,330 50,330 45,325 49,325 45,321 48,321 45,316 46,306 45,286 43,274 36,261 33,255 33,255 33,255"/> + <polyline verts=" 7,358 9,351 14,351 17,359 11,364 7,358 7,358 7,358"/> + <polyline verts=" 44,354 49,351 52,355 49,361 44,354 44,354 44,354"/> + <polyline verts=" 32,357 37,353 40,358 36,361 32,357 32,357 32,357"/> + <polyline verts=" 139,334 145,330 154,330 158,334 154,341 152,348 145,350 149,340 147,336 141,339 139,345 136,342 136,339 139,334 139,334 139,334"/> + <polyline verts=" 208,259 215,259 212,255 220,259 224,263 225,274 224,283 220,292 208,300 206,308 203,304 199,315 197,309 195,318 193,313 190,322 190,316 185,325 182,318 180,325 172,321 178,320 176,313 186,312 180,307 188,307 184,303 191,302 186,299 195,294 187,290 197,288 192,286 201,283 194,280 203,277 198,275 207,271 200,269 209,265 204,265 212,262 208,259 208,259 208,259"/> + <polyline verts=" 106,126 106,131 109,132 111,134 115,132 115,135 119,133 118,137 123,137 128,137 133,134 136,130 136,127 132,124 118,128 112,128 106,126 106,126 106,126"/> + <polyline verts=" 107,114 101,110 98,102 105,97 111,98 119,102 121,108 118,112 113,115 107,114 107,114 107,114"/> + <polyline verts=" 148,106 145,110 146,116 150,118 152,111 151,107 148,106 148,106 148,106"/> + <polyline verts=" 80,55 70,52 75,58 63,57 72,61 57,61 67,66 57,67 62,69 54,71 61,73 54,77 63,78 53,85 60,84 56,90 69,84 63,82 75,76 70,75 77,72 72,71 78,69 72,66 81,67 78,64 82,63 80,60 86,62 80,55 80,55 80,55"/> + <polyline verts=" 87,56 91,52 96,50 102,56 98,56 92,60 87,56 87,56 87,56"/> + <polyline verts=" 85,68 89,73 98,76 106,74 96,73 91,70 85,68 85,68 85,68"/> + <polyline verts=" 115,57 114,64 111,64 115,75 122,81 122,74 126,79 126,74 131,78 130,72 133,77 131,68 126,61 119,57 115,57 115,57 115,57"/> + <polyline verts=" 145,48 143,53 147,59 151,59 150,55 145,48 145,48 145,48"/> + <polyline verts=" 26,22 34,15 43,10 52,10 59,16 47,15 32,22 26,22 26,22 26,22"/> + <polyline verts=" 160,19 152,26 149,34 154,33 152,30 157,30 155,26 158,27 157,23 161,23 160,19 160,19 160,19"/> +</g> +<g style="fill: #000000"> + <polyline verts=" 98,117 105,122 109,122 105,117 113,120 121,120 130,112 128,108 123,103 123,99 128,101 132,106 135,109 142,105 142,101 145,101 145,91 148,101 145,105 136,112 135,116 143,124 148,120 150,122 142,128 133,122 121,125 112,126 103,125 100,129 96,124 98,117 98,117 98,117"/> + <polyline verts=" 146,118 152,118 152,115 149,115 146,118 146,118 146,118"/> + <polyline verts=" 148,112 154,111 154,109 149,109 148,112 148,112 148,112"/> + <polyline verts=" 106,112 108,115 114,116 118,114 106,112 106,112 106,112"/> + <polyline verts=" 108,108 111,110 116,110 119,108 108,108 108,108 108,108"/> + <polyline verts=" 106,104 109,105 117,106 115,104 106,104 106,104 106,104"/> + <polyline verts=" 50,25 41,26 34,33 39,43 49,58 36,51 47,68 55,69 54,59 61,57 74,46 60,52 67,42 57,48 61,40 54,45 60,36 59,29 48,38 52,30 47,32 50,25 50,25 50,25"/> + <polyline verts=" 147,34 152,41 155,49 161,53 157,47 164,47 158,43 168,44 159,40 164,37 169,37 164,33 169,34 165,28 170,30 170,25 173,29 175,27 176,32 173,36 175,39 172,42 172,46 168,49 170,55 162,57 158,63 155,58 153,50 149,46 147,34 147,34 147,34"/> + <polyline verts=" 155,71 159,80 157,93 157,102 155,108 150,101 149,93 154,101 152,91 151,83 155,79 155,71 155,71 155,71"/> + <polyline verts=" 112,78 115,81 114,91 112,87 113,82 112,78 112,78 112,78"/> + <polyline verts=" 78,28 64,17 58,11 47,9 36,10 28,16 21,26 18,41 20,51 23,61 33,65 28,68 37,74 36,81 43,87 48,90 43,100 40,98 39,90 31,80 30,72 22,71 17,61 14,46 16,28 23,17 33,9 45,6 54,6 65,12 78,28 78,28 78,28"/> + <polyline verts=" 67,18 76,9 87,5 101,2 118,3 135,8 149,20 149,26 144,19 132,12 121,9 105,7 89,8 76,14 70,20 67,18 67,18 67,18"/> + <polyline verts=" 56,98 48,106 56,103 47,112 56,110 52,115 57,113 52,121 62,115 58,123 65,119 63,125 69,121 68,127 74,125 74,129 79,128 83,132 94,135 93,129 85,127 81,122 76,126 75,121 71,124 71,117 66,121 66,117 62,117 64,112 60,113 60,110 57,111 61,105 57,107 60,101 55,102 56,98 56,98 56,98"/> + <polyline verts=" 101,132 103,138 106,134 106,139 112,136 111,142 115,139 114,143 119,142 125,145 131,142 135,138 140,134 140,129 143,135 145,149 150,171 149,184 145,165 141,150 136,147 132,151 131,149 126,152 125,150 121,152 117,148 111,152 110,148 105,149 104,145 98,150 96,138 94,132 94,130 98,132 101,132 101,132 101,132"/> + <polyline verts=" 41,94 32,110 23,132 12,163 6,190 7,217 5,236 3,247 9,230 12,211 12,185 18,160 26,134 35,110 43,99 41,94 41,94 41,94"/> + <polyline verts=" 32,246 41,250 50,257 52,267 53,295 53,323 59,350 54,363 51,365 44,366 42,360 40,372 54,372 59,366 62,353 71,352 75,335 73,330 66,318 68,302 64,294 67,288 63,286 63,279 59,275 58,267 56,262 50,247 42,235 44,246 32,236 35,244 32,246 32,246 32,246"/> + <polyline verts=" 134,324 146,320 159,322 173,327 179,337 179,349 172,355 158,357 170,350 174,343 170,333 163,328 152,326 134,329 134,324 134,324 134,324"/> + <polyline verts=" 173,339 183,334 184,338 191,329 194,332 199,323 202,325 206,318 209,320 213,309 221,303 228,296 232,289 234,279 233,269 230,262 225,256 219,253 208,252 198,252 210,249 223,250 232,257 237,265 238,277 238,291 232,305 221,323 218,335 212,342 200,349 178,348 173,339 173,339 173,339"/> + <polyline verts=" 165,296 158,301 156,310 156,323 162,324 159,318 162,308 162,304 165,296 165,296 165,296"/> + <polyline verts=" 99,252 105,244 107,234 115,228 121,228 131,235 122,233 113,235 109,246 121,239 133,243 121,243 110,251 99,252 99,252 99,252"/> + <polyline verts=" 117,252 124,247 134,249 136,253 126,252 117,252 117,252 117,252"/> + <polyline verts=" 117,218 132,224 144,233 140,225 132,219 117,218 117,218 117,218"/> + <polyline verts=" 122,212 134,214 143,221 141,213 132,210 122,212 122,212 122,212"/> + <polyline verts=" 69,352 70,363 76,373 86,378 97,379 108,379 120,377 128,378 132,373 135,361 133,358 132,366 127,375 121,374 121,362 119,367 117,374 110,376 110,362 107,357 106,371 104,375 97,376 90,375 90,368 86,362 83,364 86,369 85,373 78,370 73,362 71,351 69,352 69,352 69,352"/> + <polyline verts=" 100,360 96,363 99,369 102,364 100,360 100,360 100,360"/> + <polyline verts=" 115,360 112,363 114,369 117,364 115,360 115,360 115,360"/> + <polyline verts=" 127,362 125,364 126,369 128,365 127,362 127,362 127,362"/> + <polyline verts=" 5,255 7,276 11,304 15,320 13,334 6,348 2,353 0,363 5,372 12,374 25,372 38,372 44,369 42,367 36,368 31,369 30,360 27,368 20,370 16,361 15,368 10,369 3,366 3,359 6,352 11,348 17,331 19,316 12,291 9,274 5,255 5,255 5,255"/> + <polyline verts=" 10,358 7,362 10,366 11,362 10,358 10,358 10,358"/> + <polyline verts=" 25,357 22,360 24,366 27,360 25,357 25,357 25,357"/> + <polyline verts=" 37,357 34,361 36,365 38,361 37,357 37,357 37,357"/> + <polyline verts=" 49,356 46,359 47,364 50,360 49,356 49,356 49,356"/> + <polyline verts=" 130,101 132,102 135,101 139,102 143,103 142,101 137,100 133,100 130,101 130,101 130,101"/> + <polyline verts=" 106,48 105,52 108,56 109,52 106,48 106,48 106,48"/> + <polyline verts=" 139,52 139,56 140,60 142,58 141,56 139,52 139,52 139,52"/> + <polyline verts=" 25,349 29,351 30,355 33,350 37,348 42,351 45,347 49,345 44,343 36,345 25,349 25,349 25,349"/> + <polyline verts=" 98,347 105,351 107,354 109,349 115,349 120,353 118,349 113,346 104,346 98,347 98,347 98,347"/> + <polyline verts=" 83,348 87,352 87,357 89,351 87,348 83,348 83,348 83,348"/> + <polyline verts=" 155,107 163,107 170,107 186,108 175,109 155,109 155,107 155,107 155,107"/> + <polyline verts=" 153,114 162,113 175,112 192,114 173,114 154,115 153,114 153,114 153,114"/> + <polyline verts=" 152,118 164,120 180,123 197,129 169,123 151,120 152,118 152,118 152,118"/> + <polyline verts=" 68,109 87,106 107,106 106,108 88,108 68,109 68,109 68,109"/> + <polyline verts=" 105,111 95,112 79,114 71,116 85,115 102,113 105,111 105,111 105,111"/> + <polyline verts=" 108,101 98,99 87,99 78,99 93,100 105,102 108,101 108,101 108,101"/> + <polyline verts=" 85,63 91,63 97,60 104,60 108,62 111,69 112,75 110,74 108,71 103,73 106,69 105,65 103,64 103,67 102,70 99,70 97,66 94,67 97,72 88,67 84,66 85,63 85,63 85,63"/> + <polyline verts=" 140,74 141,66 144,61 150,61 156,62 153,70 150,73 152,65 150,65 151,68 149,71 146,71 144,66 143,70 143,74 140,74 140,74 140,74"/> + <polyline verts=" 146,20 156,11 163,9 172,9 178,14 182,18 184,32 182,42 182,52 177,58 176,67 171,76 165,90 157,105 160,92 164,85 168,78 167,73 173,66 172,62 175,59 174,55 177,53 180,46 181,29 179,21 173,13 166,11 159,13 153,18 148,23 146,20 146,20 146,20"/> + <polyline verts=" 150,187 148,211 150,233 153,247 148,267 135,283 125,299 136,292 131,313 122,328 122,345 129,352 133,359 133,367 137,359 148,356 140,350 131,347 129,340 132,332 140,328 137,322 140,304 154,265 157,244 155,223 161,220 175,229 186,247 185,260 176,275 178,287 185,277 188,261 196,253 189,236 174,213 150,187 150,187 150,187"/> + <polyline verts=" 147,338 142,341 143,345 141,354 147,343 147,338 147,338 147,338"/> + <polyline verts=" 157,342 156,349 150,356 157,353 163,346 162,342 157,342 157,342 157,342"/> + <polyline verts=" 99,265 96,284 92,299 73,339 73,333 87,300 99,265 99,265 99,265"/> +</g></svg> diff --git a/result/noent/svg2 b/result/noent/svg2 index 5e53829a..6c3990c8 100644 --- a/result/noent/svg2 +++ b/result/noent/svg2 @@ -1,54 +1,56 @@ <?xml version="1.0" standalone="yes"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd"> <svg width="268px" height="207px"> - <g style="stroke: #000000"> - <path d=" M 29 28 "/> - <path d=" L 19 74 "/> - </g> - <g style="stroke: #800040"> - <polyline verts=" 32,100 72,50 90,82 73,16 120,64 152,9 177,107"/> - </g> - <g style="stroke: #000000"/> - <g style="stroke: #0000ff"> - <rect x="30" y="101" width="51" height="33"/> - </g> - <g style="fill: #0000ff"> - <ellipse cx="182" cy="127" major="37" minor="31" angle="90"/> - </g> - <g style="fill: #ff0000"> - <polyline verts=" 78,180 76,151 131,149 136,182 135,182 134,183 127,185 117,186 109,192 104,194 98,199 96,200 95,201 94,202 92,202 85,202 70,200 54,199 47,198 46,197 45,197 37,195 26,193 17,187 9,181 8,181 7,176 6,175 6,173 6,172 6,170 8,164 8,163 8,162 9,162 10,162 11,162 13,162 20,162 26,162 27,162 28,162 30,162 30,163 31,163 32,164 34,166 35,166 36,167 36,168 37,169 38,169 39,169 41,170 43,170 45,170 47,170 49,170 50,168 50,161 50,160 50,159 47,162 78,180"/> - <g> - <desc> Java Font definition:Dialog 0</desc> - </g> - <g> - <desc> Java Font definition:Helvetica 0</desc> - </g> - </g> - <g style="stroke: #000000"> - <text x="188" y="36">this is text</text> - </g> - <g style="stroke: #000000"> - <g> - <desc> Java Font definition:Dialog 0</desc> - </g> - <g> - <desc> Java Font definition:Helvetica 700</desc> - </g> - </g> - <g style="stroke: #008080"> - <text x="176" y="85">sadfsadfsad</text> - </g> - <g style="stroke: #000000"/> - <g style="fill: #800040"> - <ellipse cx="208" cy="180" major="45" minor="31" angle="0"/> - </g> - <g style="stroke: #000000"/> - <g style="fill: #ffffff"> - <g> - <desc> Java Font definition:Dialog 700</desc> - </g> - <g> - <desc> Java Font definition:Dialog 700</desc> - </g> - </g> -</svg> +<g style="stroke: #000000"> + <path d=" M 29 28 "/> + <path d=" L 19 74 "/> +</g> +<g style="stroke: #800040"> + <polyline verts=" 32,100 72,50 90,82 73,16 120,64 152,9 177,107"/> +</g> +<g style="stroke: #000000"> +</g> +<g style="stroke: #0000ff"> + <rect x="30" y="101" width="51" height="33"/> +</g> +<g style="fill: #0000ff"> + <ellipse cx="182" cy="127" major="37" minor="31" angle="90"/> +</g> +<g style="fill: #ff0000"> + <polyline verts=" 78,180 76,151 131,149 136,182 135,182 134,183 127,185 117,186 109,192 104,194 98,199 96,200 95,201 94,202 92,202 85,202 70,200 54,199 47,198 46,197 45,197 37,195 26,193 17,187 9,181 8,181 7,176 6,175 6,173 6,172 6,170 8,164 8,163 8,162 9,162 10,162 11,162 13,162 20,162 26,162 27,162 28,162 30,162 30,163 31,163 32,164 34,166 35,166 36,167 36,168 37,169 38,169 39,169 41,170 43,170 45,170 47,170 49,170 50,168 50,161 50,160 50,159 47,162 78,180"/> + <g> + <desc> Java Font definition:Dialog 0</desc> + </g> + <g> + <desc> Java Font definition:Helvetica 0</desc> + </g> +</g> +<g style="stroke: #000000"> + <text x="188" y="36">this is text</text> +</g> +<g style="stroke: #000000"> + <g> + <desc> Java Font definition:Dialog 0</desc> + </g> + <g> + <desc> Java Font definition:Helvetica 700</desc> + </g> +</g> +<g style="stroke: #008080"> + <text x="176" y="85">sadfsadfsad</text> +</g> +<g style="stroke: #000000"> +</g> +<g style="fill: #800040"> + <ellipse cx="208" cy="180" major="45" minor="31" angle="0"/> +</g> +<g style="stroke: #000000"> +</g> +<g style="fill: #ffffff"> + <g> + <desc> Java Font definition:Dialog 700</desc> + </g> + <g> + <desc> Java Font definition:Dialog 700</desc> + </g> +</g></svg> diff --git a/result/noent/svg3 b/result/noent/svg3 index 35b9cd88..c4994b85 100644 --- a/result/noent/svg3 +++ b/result/noent/svg3 @@ -1,723 +1,723 @@ <?xml version="1.0"?> <svg> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M77.696 284.285C77.696 284.285 77.797 286.179 76.973 286.16C76.149 286.141 59.695 238.066 39.167 240.309C39.167 240.309 56.95 232.956 77.696 284.285z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M81.226 281.262C81.226 281.262 80.677 283.078 79.908 282.779C79.14 282.481 80.023 231.675 59.957 226.801C59.957 226.801 79.18 225.937 81.226 281.262z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M108.716 323.59C108.716 323.59 110.352 324.55 109.882 325.227C109.411 325.904 60.237 313.102 50.782 331.459C50.782 331.459 54.461 312.572 108.716 323.59z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M105.907 333.801C105.907 333.801 107.763 334.197 107.529 334.988C107.296 335.779 56.593 339.121 53.403 359.522C53.403 359.522 50.945 340.437 105.907 333.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M101.696 328.276C101.696 328.276 103.474 328.939 103.128 329.687C102.782 330.435 52.134 326.346 46.002 346.064C46.002 346.064 46.354 326.825 101.696 328.276z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M90.991 310.072C90.991 310.072 92.299 311.446 91.66 311.967C91.021 312.488 47.278 286.634 33.131 301.676C33.131 301.676 41.872 284.533 90.991 310.072z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M83.446 314.263C83.446 314.263 84.902 315.48 84.326 316.071C83.75 316.661 37.362 295.922 25.008 312.469C25.008 312.469 31.753 294.447 83.446 314.263z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M80.846 318.335C80.846 318.335 82.454 319.343 81.964 320.006C81.474 320.669 32.692 306.446 22.709 324.522C22.709 324.522 26.934 305.749 80.846 318.335z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M91.58 318.949C91.58 318.949 92.702 320.48 92.001 320.915C91.3 321.35 51.231 290.102 35.273 303.207C35.273 303.207 46.138 287.326 91.58 318.949z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M71.8 290C71.8 290 72.4 291.8 71.6 292C70.8 292.2 42.2 250.2 22.999 257.8C22.999 257.8 38.2 246 71.8 290z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M72.495 296.979C72.495 296.979 73.47 298.608 72.731 298.975C71.993 299.343 35.008 264.499 17.899 276.061C17.899 276.061 30.196 261.261 72.495 296.979z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M72.38 301.349C72.38 301.349 73.502 302.88 72.801 303.315C72.1 303.749 32.031 272.502 16.073 285.607C16.073 285.607 26.938 269.726 72.38 301.349z"/> - </g> - <g style="fill: #ffffff; stroke:#000000"> - <path d="M70.17 303.065C70.673 309.113 71.661 315.682 73.4 318.801C73.4 318.801 69.8 331.201 78.6 344.401C78.6 344.401 78.2 351.601 79.8 354.801C79.8 354.801 83.8 363.201 88.6 364.001C92.484 364.648 101.207 367.717 111.068 369.121C111.068 369.121 128.2 383.201 125 396.001C125 396.001 124.6 412.401 121 414.001C121 414.001 132.6 402.801 123 419.601L118.6 438.401C118.6 438.401 144.2 416.801 128.6 435.201L118.6 461.201C118.6 461.201 138.2 442.801 131 451.201L127.8 460.001C127.8 460.001 171 432.801 140.2 462.401C140.2 462.401 148.2 458.801 152.6 461.601C152.6 461.601 159.4 460.401 158.6 462.001C158.6 462.001 137.8 472.401 134.2 490.801C134.2 490.801 142.6 480.801 139.4 491.601L139.8 503.201C139.8 503.201 143.8 481.601 143.4 519.201C143.4 519.201 162.6 501.201 151 522.001L151 538.801C151 538.801 166.2 522.401 159.8 535.201C159.8 535.201 169.8 526.401 165.8 541.601C165.8 541.601 165 552.001 169.4 540.801C169.4 540.801 185.4 510.201 179.4 536.401C179.4 536.401 178.6 555.601 183.4 540.801C183.4 540.801 183.8 551.201 193 558.401C193 558.401 191.8 507.601 204.6 543.601L208.6 560.001C208.6 560.001 211.4 550.801 211 545.601C211 545.601 225.8 529.201 219 553.601C219 553.601 234.2 530.801 231 544.001C231 544.001 223.4 560.001 225 564.801C225 564.801 241.8 530.001 243 528.401C243 528.401 241 570.802 251.8 534.801C251.8 534.801 257.4 546.801 254.6 551.201C254.6 551.201 262.6 543.201 261.8 540.001C261.8 540.001 266.4 531.801 269.2 545.401C269.2 545.401 271 554.801 272.6 551.601C272.6 551.601 276.6 575.602 277.8 552.801C277.8 552.801 279.4 539.201 272.2 527.601C272.2 527.601 273 524.401 270.2 520.401C270.2 520.401 283.8 542.001 276.6 513.201C276.6 513.201 287.801 521.201 289.001 521.201C289.001 521.201 275.4 498.001 284.2 502.801C284.2 502.801 279 492.401 297.001 504.401C297.001 504.401 281 488.401 298.601 498.001C298.601 498.001 306.601 504.401 299.001 494.401C299.001 494.401 284.6 478.401 306.601 496.401C306.601 496.401 318.201 512.801 319.001 515.601C319.001 515.601 309.001 486.401 304.601 483.601C304.601 483.601 313.001 447.201 354.201 462.801C354.201 462.801 361.001 480.001 365.401 461.601C365.401 461.601 378.201 455.201 389.401 482.801C389.401 482.801 393.401 469.201 392.601 466.401C392.601 466.401 399.401 467.601 398.601 466.401C398.601 466.401 411.801 470.801 413.001 470.001C413.001 470.001 419.801 476.801 420.201 473.201C420.201 473.201 429.401 476.001 427.401 472.401C427.401 472.401 436.201 488.001 436.601 491.601L439.001 477.601L441.001 480.401C441.001 480.401 442.601 472.801 441.801 471.601C441.001 470.401 461.801 478.401 466.601 499.201L468.601 507.601C468.601 507.601 474.601 492.801 473.001 488.801C473.001 488.801 478.201 489.601 478.601 494.001C478.601 494.001 482.601 470.801 477.801 464.801C477.801 464.801 482.201 464.001 483.401 467.601L483.401 460.401C483.401 460.401 490.601 461.201 490.601 458.801C490.601 458.801 495.001 454.801 497.001 459.601C497.001 459.601 484.601 424.401 503.001 443.601C503.001 443.601 510.201 454.401 506.601 435.601C503.001 416.801 499.001 415.201 503.801 414.801C503.801 414.801 504.601 411.201 502.601 409.601C500.601 408.001 503.801 409.601 503.801 409.601C503.801 409.601 508.601 413.601 503.401 391.601C503.401 391.601 509.801 393.201 497.801 364.001C497.801 364.001 500.601 361.601 496.601 353.201C496.601 353.201 504.601 357.601 507.401 356.001C507.401 356.001 507.001 354.401 503.801 350.401C503.801 350.401 482.201 295.6 502.601 317.601C502.601 317.601 514.451 331.151 508.051 308.351C508.051 308.351 498.94 284.341 499.717 280.045L70.17 303.065z"/> - </g> - <g style="fill: #cc7226; stroke:#000000"> - <path d="M499.717 280.245C500.345 280.426 502.551 281.55 503.801 283.2C503.801 283.2 510.601 294 505.401 275.6C505.401 275.6 496.201 246.8 505.001 258C505.001 258 511.001 265.2 507.801 251.6C503.936 235.173 501.401 228.8 501.401 228.8C501.401 228.8 513.001 233.6 486.201 194L495.001 197.6C495.001 197.6 475.401 158 453.801 152.8L445.801 146.8C445.801 146.8 484.201 108.8 471.401 72C471.401 72 464.601 66.8 455.001 76C455.001 76 448.601 80.8 442.601 79.2C442.601 79.2 411.801 80.4 409.801 80.4C407.801 80.4 373.001 43.2 307.401 60.8C307.401 60.8 302.201 62.8 297.801 61.6C297.801 61.6 279.4 45.6 230.6 68.4C230.6 68.4 220.6 70.4 219 70.4C217.4 70.4 214.6 70.4 206.6 76.8C198.6 83.2 198.2 84 196.2 85.6C196.2 85.6 179.8 96.8 175 97.6C175 97.6 163.4 104 159 114L155.4 115.2C155.4 115.2 153.8 122.4 153.4 123.6C153.4 123.6 148.6 127.2 147.8 132.8C147.8 132.8 139 138.8 139.4 143.2C139.4 143.2 137.8 148.4 137 153.2C137 153.2 129.8 158 130.6 160.8C130.6 160.8 123 174.8 124.2 181.6C124.2 181.6 117.8 181.2 115 183.6C115 183.6 114.2 188.4 112.6 188.8C112.6 188.8 109.8 190 112.2 194C112.2 194 110.6 196.8 110.2 198.4C110.2 198.4 111 201.2 106.6 206.8C106.6 206.8 100.2 225.6 102.2 230.8C102.2 230.8 102.6 235.6 99.8 237.2C99.8 237.2 96.2 236.8 104.6 248.8C104.6 248.8 105.4 250 102.2 252.4C102.2 252.4 85 256 82.6 272.4C82.6 272.4 69 287.2 69 292.4C69 294.705 69.271 297.852 69.97 302.465C69.97 302.465 69.4 310.801 97 311.601C124.6 312.401 499.717 280.245 499.717 280.245z"/> - </g> - <g style="fill: #cc7226"> - <path d="M84.4 302.6C59.4 263.2 73.8 319.601 73.8 319.601C82.6 354.001 212.2 316.401 212.2 316.401C212.2 316.401 381.001 286 392.201 282C403.401 278 498.601 284.4 498.601 284.4L493.001 267.6C428.201 221.2 409.001 244.4 395.401 240.4C381.801 236.4 384.201 246 381.001 246.8C377.801 247.6 338.601 222.8 332.201 223.6C325.801 224.4 300.459 200.649 315.401 232.4C331.401 266.4 257 271.6 240.2 260.4C223.4 249.2 247.4 278.8 247.4 278.8C265.8 298.8 231.4 282 231.4 282C197 269.2 173 294.8 169.8 295.6C166.6 296.4 161.8 299.6 161 293.2C160.2 286.8 152.69 270.099 121 296.4C101 313.001 87.2 291 87.2 291L84.4 302.6z"/> - </g> - <g style="fill: #e87f3a"> - <path d="M333.51 225.346C327.11 226.146 301.743 202.407 316.71 234.146C333.31 269.346 258.31 273.346 241.51 262.146C224.709 250.946 248.71 280.546 248.71 280.546C267.11 300.546 232.709 283.746 232.709 283.746C198.309 270.946 174.309 296.546 171.109 297.346C167.909 298.146 163.109 301.346 162.309 294.946C161.509 288.546 154.13 272.012 122.309 298.146C101.073 315.492 87.582 294.037 87.582 294.037L84.382 304.146C59.382 264.346 74.454 322.655 74.454 322.655C83.255 357.056 213.509 318.146 213.509 318.146C213.509 318.146 382.31 287.746 393.51 283.746C404.71 279.746 499.038 286.073 499.038 286.073L493.51 268.764C428.71 222.364 410.31 246.146 396.71 242.146C383.11 238.146 385.51 247.746 382.31 248.546C379.11 249.346 339.91 224.546 333.51 225.346z"/> - </g> - <g style="fill: #ea8c4d"> - <path d="M334.819 227.091C328.419 227.891 303.685 203.862 318.019 235.891C334.219 272.092 259.619 275.092 242.819 263.892C226.019 252.692 250.019 282.292 250.019 282.292C268.419 302.292 234.019 285.492 234.019 285.492C199.619 272.692 175.618 298.292 172.418 299.092C169.218 299.892 164.418 303.092 163.618 296.692C162.818 290.292 155.57 273.925 123.618 299.892C101.145 317.983 87.964 297.074 87.964 297.074L84.364 305.692C60.564 266.692 75.109 325.71 75.109 325.71C83.909 360.11 214.819 319.892 214.819 319.892C214.819 319.892 383.619 289.492 394.819 285.492C406.019 281.492 499.474 287.746 499.474 287.746L494.02 269.928C429.219 223.528 411.619 247.891 398.019 243.891C384.419 239.891 386.819 249.491 383.619 250.292C380.419 251.092 341.219 226.291 334.819 227.091z"/> - </g> - <g style="fill: #ec9961"> - <path d="M336.128 228.837C329.728 229.637 304.999 205.605 319.328 237.637C336.128 275.193 260.394 276.482 244.128 265.637C227.328 254.437 251.328 284.037 251.328 284.037C269.728 304.037 235.328 287.237 235.328 287.237C200.928 274.437 176.928 300.037 173.728 300.837C170.528 301.637 165.728 304.837 164.928 298.437C164.128 292.037 157.011 275.839 124.927 301.637C101.218 320.474 88.345 300.11 88.345 300.11L84.345 307.237C62.545 270.437 75.764 328.765 75.764 328.765C84.564 363.165 216.128 321.637 216.128 321.637C216.128 321.637 384.928 291.237 396.129 287.237C407.329 283.237 499.911 289.419 499.911 289.419L494.529 271.092C429.729 224.691 412.929 249.637 399.329 245.637C385.728 241.637 388.128 251.237 384.928 252.037C381.728 252.837 342.528 228.037 336.128 228.837z"/> - </g> - <g style="fill: #eea575"> - <path d="M337.438 230.583C331.037 231.383 306.814 207.129 320.637 239.383C337.438 278.583 262.237 278.583 245.437 267.383C228.637 256.183 252.637 285.783 252.637 285.783C271.037 305.783 236.637 288.983 236.637 288.983C202.237 276.183 178.237 301.783 175.037 302.583C171.837 303.383 167.037 306.583 166.237 300.183C165.437 293.783 158.452 277.752 126.237 303.383C101.291 322.965 88.727 303.146 88.727 303.146L84.327 308.783C64.527 273.982 76.418 331.819 76.418 331.819C85.218 366.22 217.437 323.383 217.437 323.383C217.437 323.383 386.238 292.983 397.438 288.983C408.638 284.983 500.347 291.092 500.347 291.092L495.038 272.255C430.238 225.855 414.238 251.383 400.638 247.383C387.038 243.383 389.438 252.983 386.238 253.783C383.038 254.583 343.838 229.783 337.438 230.583z"/> - </g> - <g style="fill: #f1b288"> - <path d="M338.747 232.328C332.347 233.128 306.383 209.677 321.947 241.128C341.147 279.928 263.546 280.328 246.746 269.128C229.946 257.928 253.946 287.528 253.946 287.528C272.346 307.528 237.946 290.728 237.946 290.728C203.546 277.928 179.546 303.528 176.346 304.328C173.146 305.128 168.346 308.328 167.546 301.928C166.746 295.528 159.892 279.665 127.546 305.128C101.364 325.456 89.109 306.183 89.109 306.183L84.309 310.328C66.309 277.128 77.073 334.874 77.073 334.874C85.873 369.274 218.746 325.128 218.746 325.128C218.746 325.128 387.547 294.728 398.747 290.728C409.947 286.728 500.783 292.764 500.783 292.764L495.547 273.419C430.747 227.019 415.547 253.128 401.947 249.128C388.347 245.128 390.747 254.728 387.547 255.528C384.347 256.328 345.147 231.528 338.747 232.328z"/> - </g> - <g style="fill: #f3bf9c"> - <path d="M340.056 234.073C333.655 234.873 307.313 211.613 323.255 242.873C343.656 282.874 264.855 282.074 248.055 270.874C231.255 259.674 255.255 289.274 255.255 289.274C273.655 309.274 239.255 292.474 239.255 292.474C204.855 279.674 180.855 305.274 177.655 306.074C174.455 306.874 169.655 310.074 168.855 303.674C168.055 297.274 161.332 281.578 128.855 306.874C101.436 327.947 89.491 309.219 89.491 309.219L84.291 311.874C68.291 281.674 77.727 337.929 77.727 337.929C86.527 372.329 220.055 326.874 220.055 326.874C220.055 326.874 388.856 296.474 400.056 292.474C411.256 288.474 501.22 294.437 501.22 294.437L496.056 274.583C431.256 228.183 416.856 254.874 403.256 250.874C389.656 246.873 392.056 256.474 388.856 257.274C385.656 258.074 346.456 233.273 340.056 234.073z"/> - </g> - <g style="fill: #f5ccb0"> - <path d="M341.365 235.819C334.965 236.619 307.523 213.944 324.565 244.619C346.565 284.219 266.164 283.819 249.364 272.619C232.564 261.419 256.564 291.019 256.564 291.019C274.964 311.019 240.564 294.219 240.564 294.219C206.164 281.419 182.164 307.019 178.964 307.819C175.764 308.619 170.964 311.819 170.164 305.419C169.364 299.019 162.773 283.492 130.164 308.619C101.509 330.438 89.873 312.256 89.873 312.256L84.273 313.419C69.872 285.019 78.382 340.983 78.382 340.983C87.182 375.384 221.364 328.619 221.364 328.619C221.364 328.619 390.165 298.219 401.365 294.219C412.565 290.219 501.656 296.11 501.656 296.11L496.565 275.746C431.765 229.346 418.165 256.619 404.565 252.619C390.965 248.619 393.365 258.219 390.165 259.019C386.965 259.819 347.765 235.019 341.365 235.819z"/> - </g> - <g style="fill: #f8d8c4"> - <path d="M342.674 237.565C336.274 238.365 308.832 215.689 325.874 246.365C347.874 285.965 267.474 285.565 250.674 274.365C233.874 263.165 257.874 292.765 257.874 292.765C276.274 312.765 241.874 295.965 241.874 295.965C207.473 283.165 183.473 308.765 180.273 309.565C177.073 310.365 172.273 313.565 171.473 307.165C170.673 300.765 164.214 285.405 131.473 310.365C101.582 332.929 90.255 315.293 90.255 315.293L84.255 314.965C70.654 288.564 79.037 344.038 79.037 344.038C87.837 378.438 222.673 330.365 222.673 330.365C222.673 330.365 391.474 299.965 402.674 295.965C413.874 291.965 502.093 297.783 502.093 297.783L497.075 276.91C432.274 230.51 419.474 258.365 405.874 254.365C392.274 250.365 394.674 259.965 391.474 260.765C388.274 261.565 349.074 236.765 342.674 237.565z"/> - </g> - <g style="fill: #fae5d7"> - <path d="M343.983 239.31C337.583 240.11 310.529 217.223 327.183 248.11C349.183 288.91 268.783 287.31 251.983 276.11C235.183 264.91 259.183 294.51 259.183 294.51C277.583 314.51 243.183 297.71 243.183 297.71C208.783 284.91 184.783 310.51 181.583 311.31C178.382 312.11 173.582 315.31 172.782 308.91C171.982 302.51 165.654 287.318 132.782 312.11C101.655 335.42 90.637 318.329 90.637 318.329L84.236 316.51C71.236 292.51 79.691 347.093 79.691 347.093C88.491 381.493 223.983 332.11 223.983 332.11C223.983 332.11 392.783 301.71 403.983 297.71C415.183 293.71 502.529 299.456 502.529 299.456L497.583 278.074C432.783 231.673 420.783 260.11 407.183 256.11C393.583 252.11 395.983 261.71 392.783 262.51C389.583 263.31 350.383 238.51 343.983 239.31z"/> - </g> - <g style="fill: #fcf2eb"> - <path d="M345.292 241.055C338.892 241.855 312.917 218.411 328.492 249.855C349.692 292.656 270.092 289.056 253.292 277.856C236.492 266.656 260.492 296.256 260.492 296.256C278.892 316.256 244.492 299.456 244.492 299.456C210.092 286.656 186.092 312.256 182.892 313.056C179.692 313.856 174.892 317.056 174.092 310.656C173.292 304.256 167.095 289.232 134.092 313.856C101.727 337.911 91.018 321.365 91.018 321.365L84.218 318.056C71.418 294.856 80.346 350.147 80.346 350.147C89.146 384.547 225.292 333.856 225.292 333.856C225.292 333.856 394.093 303.456 405.293 299.456C416.493 295.456 502.965 301.128 502.965 301.128L498.093 279.237C433.292 232.837 422.093 261.856 408.493 257.856C394.893 253.855 397.293 263.456 394.093 264.256C390.892 265.056 351.692 240.255 345.292 241.055z"/> - </g> - <g style="fill: #ffffff"> - <path d="M84.2 319.601C71.4 297.6 81 353.201 81 353.201C89.8 387.601 226.6 335.601 226.6 335.601C226.6 335.601 395.401 305.2 406.601 301.2C417.801 297.2 503.401 302.8 503.401 302.8L498.601 280.4C433.801 234 423.401 263.6 409.801 259.6C396.201 255.6 398.601 265.2 395.401 266C392.201 266.8 353.001 242 346.601 242.8C340.201 243.6 314.981 219.793 329.801 251.6C352.028 299.307 269.041 289.227 254.6 279.6C237.8 268.4 261.8 298 261.8 298C280.2 318.001 245.8 301.2 245.8 301.2C211.4 288.4 187.4 314.001 184.2 314.801C181 315.601 176.2 318.801 175.4 312.401C174.6 306 168.535 291.144 135.4 315.601C101.8 340.401 91.4 324.401 91.4 324.401L84.2 319.601z"/> - </g> - <g style="fill: #000000"> - <path d="M125.8 349.601C125.8 349.601 118.6 361.201 139.4 374.401C139.4 374.401 140.8 375.801 122.8 371.601C122.8 371.601 116.6 369.601 115 359.201C115 359.201 110.2 354.801 105.4 349.201C100.6 343.601 125.8 349.601 125.8 349.601z"/> - </g> - <g style="fill: #cccccc"> - <path d="M265.8 302C265.8 302 283.498 328.821 282.9 333.601C281.6 344.001 281.4 353.601 284.6 357.601C287.801 361.601 296.601 394.801 296.601 394.801C296.601 394.801 296.201 396.001 308.601 358.001C308.601 358.001 320.201 342.001 300.201 323.601C300.201 323.601 265 294.8 265.8 302z"/> - </g> - <g style="fill: #000000"> - <path d="M145.8 376.401C145.8 376.401 157 383.601 142.6 414.801L149 412.401C149 412.401 148.2 423.601 145 426.001L152.2 422.801C152.2 422.801 157 430.801 153 435.601C153 435.601 169.8 443.601 169 450.001C169 450.001 175.4 442.001 171.4 435.601C167.4 429.201 160.2 433.201 161 414.801L152.2 418.001C152.2 418.001 157.8 409.201 157.8 402.801L149.8 405.201C149.8 405.201 165.269 378.623 154.6 377.201C148.6 376.401 145.8 376.401 145.8 376.401z"/> - </g> - <g style="fill: #cccccc"> - <path d="M178.2 393.201C178.2 393.201 181 388.801 178.2 389.601C175.4 390.401 144.2 405.201 138.2 414.801C138.2 414.801 172.6 390.401 178.2 393.201z"/> - </g> - <g style="fill: #cccccc"> - <path d="M188.6 401.201C188.6 401.201 191.4 396.801 188.6 397.601C185.8 398.401 154.6 413.201 148.6 422.801C148.6 422.801 183 398.401 188.6 401.201z"/> - </g> - <g style="fill: #cccccc"> - <path d="M201.8 386.001C201.8 386.001 204.6 381.601 201.8 382.401C199 383.201 167.8 398.001 161.8 407.601C161.8 407.601 196.2 383.201 201.8 386.001z"/> - </g> - <g style="fill: #cccccc"> - <path d="M178.6 429.601C178.6 429.601 178.6 423.601 175.8 424.401C173 425.201 137 442.801 131 452.401C131 452.401 173 426.801 178.6 429.601z"/> - </g> - <g style="fill: #cccccc"> - <path d="M179.8 418.801C179.8 418.801 181 414.001 178.2 414.801C176.2 414.801 149.8 426.401 143.8 436.001C143.8 436.001 173.4 414.401 179.8 418.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M165.4 466.401L155.4 474.001C155.4 474.001 165.8 466.401 169.4 467.601C169.4 467.601 162.6 478.801 161.8 484.001C161.8 484.001 172.2 471.201 177.8 471.601C177.8 471.601 185.4 472.001 185.4 482.801C185.4 482.801 191 472.401 194.2 472.801C194.2 472.801 195.4 479.201 194.2 486.001C194.2 486.001 198.2 478.401 202.2 480.001C202.2 480.001 208.6 478.001 207.8 489.601C207.8 489.601 207.8 500.001 207 502.801C207 502.801 212.6 476.401 215 476.001C215 476.001 223 474.801 227.8 483.601C227.8 483.601 223.8 476.001 228.6 478.001C228.6 478.001 239.4 479.601 242.6 486.401C242.6 486.401 235.8 474.401 241.4 477.601C241.4 477.601 248.2 477.601 249.4 484.001C249.4 484.001 257.8 505.201 259.8 506.801C259.8 506.801 252.2 485.201 253.8 485.201C253.8 485.201 251.8 473.201 257 488.001C257 488.001 253.8 474.001 259.4 474.801C265 475.601 269.4 485.601 277.8 483.201C277.8 483.201 287.401 488.801 289.401 419.601L165.4 466.401z"/> - </g> - <g style="fill: #000000"> - <path d="M170.2 373.601C170.2 373.601 185 367.601 225 373.601C225 373.601 232.2 374.001 239 365.201C245.8 356.401 272.6 349.201 279 351.201L288.601 357.601L289.401 358.801C289.401 358.801 301.801 369.201 302.201 376.801C302.601 384.401 287.801 432.401 278.2 448.401C268.6 464.401 259 476.801 239.8 474.401C239.8 474.401 219 470.401 193.4 474.401C193.4 474.401 164.2 472.801 161.4 464.801C158.6 456.801 172.6 441.601 172.6 441.601C172.6 441.601 177 433.201 175.8 418.801C174.6 404.401 175 376.401 170.2 373.601z"/> - </g> - <g style="fill: #e5668c"> - <path d="M192.2 375.601C200.6 394.001 171 459.201 171 459.201C169 460.801 183.66 466.846 193.8 464.401C204.746 461.763 245 466.001 245 466.001C268.6 450.401 281.4 406.001 281.4 406.001C281.4 406.001 291.801 382.001 274.2 378.801C256.6 375.601 192.2 375.601 192.2 375.601z"/> - </g> - <g style="fill: #b23259"> - <path d="M190.169 406.497C193.495 393.707 195.079 381.906 192.2 375.601C192.2 375.601 254.6 382.001 265.8 361.201C270.041 353.326 284.801 384.001 284.4 393.601C284.4 393.601 221.4 408.001 206.6 396.801L190.169 406.497z"/> - </g> - <g style="fill: #a5264c"> - <path d="M194.6 422.801C194.6 422.801 196.6 430.001 194.2 434.001C194.2 434.001 192.6 434.801 191.4 435.201C191.4 435.201 192.6 438.801 198.6 440.401C198.6 440.401 200.6 444.801 203 445.201C205.4 445.601 210.2 451.201 214.2 450.001C218.2 448.801 229.4 444.801 229.4 444.801C229.4 444.801 235 441.601 243.8 445.201C243.8 445.201 246.175 444.399 246.6 440.401C247.1 435.701 250.2 432.001 252.2 430.001C254.2 428.001 263.8 415.201 262.6 414.801C261.4 414.401 194.6 422.801 194.6 422.801z"/> - </g> - <g style="fill: #ff727f; stroke:#000000"> - <path d="M190.2 374.401C190.2 374.401 187.4 396.801 190.6 405.201C193.8 413.601 193 415.601 192.2 419.601C191.4 423.601 195.8 433.601 201.4 439.601L213.4 441.201C213.4 441.201 228.6 437.601 237.8 440.401C237.8 440.401 246.794 441.744 250.2 426.801C250.2 426.801 255 420.401 262.2 417.601C269.4 414.801 276.6 373.201 272.6 365.201C268.6 357.201 254.2 352.801 238.2 368.401C222.2 384.001 220.2 367.201 190.2 374.401z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M191.8 449.201C191.8 449.201 191 447.201 186.6 446.801C186.6 446.801 164.2 443.201 155.8 430.801C155.8 430.801 149 425.201 153.4 436.801C153.4 436.801 163.8 457.201 170.6 460.001C170.6 460.001 187 464.001 191.8 449.201z"/> - </g> - <g style="fill: #cc3f4c"> - <path d="M271.742 385.229C272.401 377.323 274.354 368.709 272.6 365.201C266.154 352.307 249.181 357.695 238.2 368.401C222.2 384.001 220.2 367.201 190.2 374.401C190.2 374.401 188.455 388.364 189.295 398.376C189.295 398.376 226.6 386.801 227.4 392.401C227.4 392.401 229 389.201 238.2 389.201C247.4 389.201 270.142 388.029 271.742 385.229z"/> - </g> - <g style="stroke:#a51926; stroke-width:2"> - <path d="M228.6 375.201C228.6 375.201 233.4 380.001 229.8 389.601C229.8 389.601 215.4 405.601 217.4 419.601"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M180.6 460.001C180.6 460.001 176.2 447.201 185 454.001C185 454.001 189.8 456.001 188.6 457.601C187.4 459.201 181.8 463.201 180.6 460.001z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M185.64 461.201C185.64 461.201 182.12 450.961 189.16 456.401C189.16 456.401 193.581 458.849 192.04 459.281C187.48 460.561 192.04 463.121 185.64 461.201z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M190.44 461.201C190.44 461.201 186.92 450.961 193.96 456.401C193.96 456.401 198.335 458.711 196.84 459.281C193.48 460.561 196.84 463.121 190.44 461.201z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M197.04 461.401C197.04 461.401 193.52 451.161 200.56 456.601C200.56 456.601 204.943 458.933 203.441 459.481C200.48 460.561 203.441 463.321 197.04 461.401z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M203.52 461.321C203.52 461.321 200 451.081 207.041 456.521C207.041 456.521 210.881 458.121 209.921 459.401C208.961 460.681 209.921 463.241 203.52 461.321z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M210.2 462.001C210.2 462.001 205.4 449.601 214.6 456.001C214.6 456.001 219.4 458.001 218.2 459.601C217 461.201 218.2 464.401 210.2 462.001z"/> - </g> - <g style="stroke:#a5264c; stroke-width:2"> - <path d="M181.8 444.801C181.8 444.801 195 442.001 201 445.201C201 445.201 207 446.401 208.2 446.001C209.4 445.601 212.6 445.201 212.6 445.201"/> - </g> - <g style="stroke:#a5264c; stroke-width:2"> - <path d="M215.8 453.601C215.8 453.601 227.8 440.001 239.8 444.401C246.816 446.974 245.8 443.601 246.6 440.801C247.4 438.001 247.6 433.801 252.6 430.801"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M233 437.601C233 437.601 229 426.801 226.2 439.601C223.4 452.401 220.2 456.001 218.6 458.801C218.6 458.801 218.6 464.001 227 463.601C227 463.601 237.8 463.201 238.2 460.401C238.6 457.601 237 446.001 233 437.601z"/> - </g> - <g style="stroke:#a5264c; stroke-width:2"> - <path d="M247 444.801C247 444.801 250.6 442.401 253 443.601"/> - </g> - <g style="stroke:#a5264c; stroke-width:2"> - <path d="M253.5 428.401C253.5 428.401 256.4 423.501 261.2 422.701"/> - </g> - <g style="fill: #b2b2b2"> - <path d="M174.2 465.201C174.2 465.201 192.2 468.401 196.6 466.801C196.6 466.801 205.4 466.801 197 468.801C197 468.801 184.2 468.801 176.2 467.601C176.2 467.601 164.6 462.001 174.2 465.201z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M188.2 372.001C188.2 372.001 205.8 372.001 207.8 372.801C207.8 372.801 215 403.601 211.4 411.201C211.4 411.201 210.2 414.001 207.4 408.401C207.4 408.401 189 375.601 185.8 373.601C182.6 371.601 187 372.001 188.2 372.001z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M111.1 369.301C111.1 369.301 120 371.001 132.6 373.601C132.6 373.601 137.4 396.001 140.6 400.801C143.8 405.601 140.2 405.601 136.6 402.801C133 400.001 118.2 386.001 116.2 381.601C114.2 377.201 111.1 369.301 111.1 369.301z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M132.961 373.818C132.961 373.818 138.761 375.366 139.77 377.581C140.778 379.795 138.568 383.092 138.568 383.092C138.568 383.092 137.568 386.397 136.366 384.235C135.164 382.072 132.292 374.412 132.961 373.818z"/> - </g> - <g style="fill: #000000"> - <path d="M133 373.601C133 373.601 136.6 378.801 140.2 378.801C143.8 378.801 144.182 378.388 147 379.001C151.6 380.001 151.2 378.001 157.8 379.201C160.44 379.681 163 378.801 165.8 380.001C168.6 381.201 171.8 380.401 173 378.401C174.2 376.401 179 372.201 179 372.201C179 372.201 166.2 374.001 163.4 374.801C163.4 374.801 141 376.001 133 373.601z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M177.6 373.801C177.6 373.801 171.15 377.301 170.75 379.701C170.35 382.101 176 385.801 176 385.801C176 385.801 178.75 390.401 179.35 388.001C179.95 385.601 178.4 374.201 177.6 373.801z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M140.115 379.265C140.115 379.265 147.122 390.453 147.339 379.242C147.339 379.242 147.896 377.984 146.136 377.962C140.061 377.886 141.582 373.784 140.115 379.265z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M147.293 379.514C147.293 379.514 155.214 390.701 154.578 379.421C154.578 379.421 154.585 379.089 152.832 378.936C148.085 378.522 148.43 374.004 147.293 379.514z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M154.506 379.522C154.506 379.522 162.466 390.15 161.797 380.484C161.797 380.484 161.916 379.251 160.262 378.95C156.37 378.244 156.159 374.995 154.506 379.522z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M161.382 379.602C161.382 379.602 169.282 391.163 169.63 381.382C169.63 381.382 171.274 380.004 169.528 379.782C163.71 379.042 164.508 374.588 161.382 379.602z"/> - </g> - <g style="fill: #e5e5b2"> - <path d="M125.208 383.132L117.55 381.601C114.95 376.601 112.85 370.451 112.85 370.451C112.85 370.451 119.2 371.451 131.7 374.251C131.7 374.251 132.576 377.569 134.048 383.364L125.208 383.132z"/> - </g> - <g style="fill: #e5e5b2"> - <path d="M190.276 378.47C188.61 375.964 187.293 374.206 186.643 373.8C183.63 371.917 187.773 372.294 188.902 372.294C188.902 372.294 205.473 372.294 207.356 373.047C207.356 373.047 207.88 375.289 208.564 378.68C208.564 378.68 198.476 376.67 190.276 378.47z"/> - </g> - <g style="fill: #cc7226"> - <path d="M243.88 240.321C271.601 244.281 297.121 208.641 298.881 198.96C300.641 189.28 290.521 177.4 290.521 177.4C291.841 174.32 287.001 160.24 281.721 151C276.441 141.76 260.54 142.734 243 141.76C227.16 140.88 208.68 164.2 207.36 165.96C206.04 167.72 212.2 206.001 213.52 211.721C214.84 217.441 212.2 243.841 212.2 243.841C246.44 234.741 216.16 236.361 243.88 240.321z"/> - </g> - <g style="fill: #ea8e51"> - <path d="M208.088 166.608C206.792 168.336 212.84 205.921 214.136 211.537C215.432 217.153 212.84 243.073 212.84 243.073C245.512 234.193 216.728 235.729 243.944 239.617C271.161 243.505 296.217 208.513 297.945 199.008C299.673 189.504 289.737 177.84 289.737 177.84C291.033 174.816 286.281 160.992 281.097 151.92C275.913 142.848 260.302 143.805 243.08 142.848C227.528 141.984 209.384 164.88 208.088 166.608z"/> - </g> - <g style="fill: #efaa7c"> - <path d="M208.816 167.256C207.544 168.952 213.48 205.841 214.752 211.353C216.024 216.865 213.48 242.305 213.48 242.305C244.884 233.145 217.296 235.097 244.008 238.913C270.721 242.729 295.313 208.385 297.009 199.056C298.705 189.728 288.953 178.28 288.953 178.28C290.225 175.312 285.561 161.744 280.473 152.84C275.385 143.936 260.063 144.875 243.16 143.936C227.896 143.088 210.088 165.56 208.816 167.256z"/> - </g> - <g style="fill: #f4c6a8"> - <path d="M209.544 167.904C208.296 169.568 214.12 205.761 215.368 211.169C216.616 216.577 214.12 241.537 214.12 241.537C243.556 232.497 217.864 234.465 244.072 238.209C270.281 241.953 294.409 208.257 296.073 199.105C297.737 189.952 288.169 178.72 288.169 178.72C289.417 175.808 284.841 162.496 279.849 153.76C274.857 145.024 259.824 145.945 243.24 145.024C228.264 144.192 210.792 166.24 209.544 167.904z"/> - </g> - <g style="fill: #f9e2d3"> - <path d="M210.272 168.552C209.048 170.184 214.76 205.681 215.984 210.985C217.208 216.289 214.76 240.769 214.76 240.769C242.628 231.849 218.432 233.833 244.136 237.505C269.841 241.177 293.505 208.129 295.137 199.152C296.769 190.176 287.385 179.16 287.385 179.16C288.609 176.304 284.121 163.248 279.225 154.68C274.329 146.112 259.585 147.015 243.32 146.112C228.632 145.296 211.496 166.92 210.272 168.552z"/> - </g> - <g style="fill: #ffffff"> - <path d="M244.2 236.8C269.4 240.4 292.601 208 294.201 199.2C295.801 190.4 286.601 179.6 286.601 179.6C287.801 176.8 283.4 164 278.6 155.6C273.8 147.2 259.346 148.086 243.4 147.2C229 146.4 212.2 167.6 211 169.2C209.8 170.8 215.4 205.6 216.6 210.8C217.8 216 215.4 240 215.4 240C240.9 231.4 219 233.2 244.2 236.8z"/> - </g> - <g style="fill: #cccccc"> - <path d="M290.601 202.8C290.601 202.8 262.8 210.4 251.2 208.8C251.2 208.8 235.4 202.2 226.6 224C226.6 224 223 231.2 221 233.2C219 235.2 290.601 202.8 290.601 202.8z"/> - </g> - <g style="fill: #000000"> - <path d="M294.401 200.6C294.401 200.6 265.4 212.8 255.4 212.4C255.4 212.4 239 207.8 230.6 222.4C230.6 222.4 222.2 231.6 219 233.2C219 233.2 218.6 234.8 225 230.8L235.4 236C235.4 236 250.2 245.6 259.8 229.6C259.8 229.6 263.8 218.4 263.8 216.4C263.8 214.4 285 208.8 286.601 208.4C288.201 208 294.801 203.8 294.401 200.6z"/> - </g> - <g style="fill: #99cc32"> - <path d="M247 236.514C240.128 236.514 231.755 232.649 231.755 226.4C231.755 220.152 240.128 213.887 247 213.887C253.874 213.887 259.446 218.952 259.446 225.2C259.446 231.449 253.874 236.514 247 236.514z"/> - </g> - <g style="fill: #659900"> - <path d="M243.377 219.83C238.531 220.552 233.442 222.055 233.514 221.839C235.054 217.22 241.415 213.887 247 213.887C251.296 213.887 255.084 215.865 257.32 218.875C257.32 218.875 252.004 218.545 243.377 219.83z"/> - </g> - <g style="fill: #ffffff"> - <path d="M255.4 219.6C255.4 219.6 251 216.4 251 218.6C251 218.6 254.6 223 255.4 219.6z"/> - </g> - <g style="fill: #000000"> - <path d="M245.4 227.726C242.901 227.726 240.875 225.7 240.875 223.2C240.875 220.701 242.901 218.675 245.4 218.675C247.9 218.675 249.926 220.701 249.926 223.2C249.926 225.7 247.9 227.726 245.4 227.726z"/> - </g> - <g style="fill: #cc7226"> - <path d="M141.4 214.4C141.4 214.4 138.2 193.2 140.6 188.8C140.6 188.8 151.4 178.8 151 175.2C151 175.2 150.6 157.2 149.4 156.4C148.2 155.6 140.6 149.6 134.6 156C134.6 156 124.2 174 125 180.4L125 182.4C125 182.4 117.4 182 115.8 184C115.8 184 114.6 189.2 113.4 189.6C113.4 189.6 110.6 192 112.6 194.8C112.6 194.8 110.6 197.2 111 201.2L118.6 205.2C118.6 205.2 120.6 219.6 131.4 224.8C136.236 227.129 139.4 220.4 141.4 214.4z"/> - </g> - <g style="fill: #ffffff"> - <path d="M140.4 212.56C140.4 212.56 137.52 193.48 139.68 189.52C139.68 189.52 149.4 180.52 149.04 177.28C149.04 177.28 148.68 161.08 147.6 160.36C146.52 159.64 139.68 154.24 134.28 160C134.28 160 124.92 176.2 125.64 181.96L125.64 183.76C125.64 183.76 118.8 183.4 117.36 185.2C117.36 185.2 116.28 189.88 115.2 190.24C115.2 190.24 112.68 192.4 114.48 194.92C114.48 194.92 112.68 197.08 113.04 200.68L119.88 204.28C119.88 204.28 121.68 217.24 131.4 221.92C135.752 224.015 138.6 217.96 140.4 212.56z"/> - </g> - <g style="fill: #eb955c"> - <path d="M148.95 157.39C147.86 156.53 140.37 150.76 134.52 157C134.52 157 124.38 174.55 125.16 180.79L125.16 182.74C125.16 182.74 117.75 182.35 116.19 184.3C116.19 184.3 115.02 189.37 113.85 189.76C113.85 189.76 111.12 192.1 113.07 194.83C113.07 194.83 111.12 197.17 111.51 201.07L118.92 204.97C118.92 204.97 120.87 219.01 131.4 224.08C136.114 226.35 139.2 219.79 141.15 213.94C141.15 213.94 138.03 193.27 140.37 188.98C140.37 188.98 150.9 179.23 150.51 175.72C150.51 175.72 150.12 158.17 148.95 157.39z"/> - </g> - <g style="fill: #f2b892"> - <path d="M148.5 158.38C147.52 157.46 140.14 151.92 134.44 158C134.44 158 124.56 175.1 125.32 181.18L125.32 183.08C125.32 183.08 118.1 182.7 116.58 184.6C116.58 184.6 115.44 189.54 114.3 189.92C114.3 189.92 111.64 192.2 113.54 194.86C113.54 194.86 111.64 197.14 112.02 200.94L119.24 204.74C119.24 204.74 121.14 218.42 131.4 223.36C135.994 225.572 139 219.18 140.9 213.48C140.9 213.48 137.86 193.34 140.14 189.16C140.14 189.16 150.4 179.66 150.02 176.24C150.02 176.24 149.64 159.14 148.5 158.38z"/> - </g> - <g style="fill: #f8dcc8"> - <path d="M148.05 159.37C147.18 158.39 139.91 153.08 134.36 159C134.36 159 124.74 175.65 125.48 181.57L125.48 183.42C125.48 183.42 118.45 183.05 116.97 184.9C116.97 184.9 115.86 189.71 114.75 190.08C114.75 190.08 112.16 192.3 114.01 194.89C114.01 194.89 112.16 197.11 112.53 200.81L119.56 204.51C119.56 204.51 121.41 217.83 131.4 222.64C135.873 224.794 138.8 218.57 140.65 213.02C140.65 213.02 137.69 193.41 139.91 189.34C139.91 189.34 149.9 180.09 149.53 176.76C149.53 176.76 149.16 160.11 148.05 159.37z"/> - </g> - <g style="fill: #ffffff"> - <path d="M140.4 212.46C140.4 212.46 137.52 193.48 139.68 189.52C139.68 189.52 149.4 180.52 149.04 177.28C149.04 177.28 148.68 161.08 147.6 160.36C146.84 159.32 139.68 154.24 134.28 160C134.28 160 124.92 176.2 125.64 181.96L125.64 183.76C125.64 183.76 118.8 183.4 117.36 185.2C117.36 185.2 116.28 189.88 115.2 190.24C115.2 190.24 112.68 192.4 114.48 194.92C114.48 194.92 112.68 197.08 113.04 200.68L119.88 204.28C119.88 204.28 121.68 217.24 131.4 221.92C135.752 224.015 138.6 217.86 140.4 212.46z"/> - </g> - <g style="fill: #cccccc"> - <path d="M137.3 206.2C137.3 206.2 115.7 196 114.8 195.2C114.8 195.2 123.9 203.4 124.7 203.4C125.5 203.4 137.3 206.2 137.3 206.2z"/> - </g> - <g style="fill: #000000"> - <path d="M120.2 200C120.2 200 138.6 203.6 138.6 208C138.6 210.912 138.357 224.331 133 222.8C124.6 220.4 128.2 206 120.2 200z"/> - </g> - <g style="fill: #99cc32"> - <path d="M128.6 203.8C128.6 203.8 137.578 205.274 138.6 208C139.2 209.6 139.863 217.908 134.4 219C129.848 219.911 127.618 209.69 128.6 203.8z"/> - </g> - <g style="fill: #000000"> - <path d="M214.595 246.349C214.098 244.607 215.409 244.738 217.2 244.2C219.2 243.6 231.4 239.8 232.2 237.2C233 234.6 246.2 239 246.2 239C248 239.8 252.4 242.4 252.4 242.4C257.2 243.6 263.8 244 263.8 244C266.2 245 269.6 247.8 269.6 247.8C284.2 258 296.601 250.8 296.601 250.8C316.601 244.2 310.601 227 310.601 227C307.601 218 310.801 214.6 310.801 214.6C311.001 210.8 318.201 217.2 318.201 217.2C320.801 221.4 321.601 226.4 321.601 226.4C329.601 237.6 326.201 219.8 326.201 219.8C326.401 218.8 323.601 215.2 323.601 214C323.601 212.8 321.801 209.4 321.801 209.4C318.801 206 321.201 199 321.201 199C323.001 185.2 320.801 187 320.801 187C319.601 185.2 310.401 195.2 310.401 195.2C308.201 198.6 302.201 200.2 302.201 200.2C299.401 202 296.001 200.6 296.001 200.6C293.401 200.2 287.801 207.2 287.801 207.2C290.601 207 293.001 211.4 295.401 211.6C297.801 211.8 299.601 209.2 301.201 208.6C302.801 208 305.601 213.8 305.601 213.8C306.001 216.4 300.401 221.2 300.401 221.2C300.001 225.8 298.401 224.2 298.401 224.2C295.401 223.6 294.201 227.4 293.201 232C292.201 236.6 288.001 237 288.001 237C286.401 244.4 285.2 241.4 285.2 241.4C285 235.8 279 241.6 279 241.6C277.8 243.6 273.2 241.4 273.2 241.4C266.4 239.4 268.8 237.4 268.8 237.4C270.6 235.2 281.8 237.4 281.8 237.4C284 235.8 276 231.8 276 231.8C275.4 230 276.4 225.6 276.4 225.6C277.6 222.4 284.4 216.8 284.4 216.8C293.801 215.6 291.001 214 291.001 214C284.801 208.8 279 216.4 279 216.4C276.8 222.6 259.4 237.6 259.4 237.6C254.6 241 257.2 234.2 253.2 237.6C249.2 241 228.6 232 228.6 232C217.038 230.807 214.306 246.549 210.777 243.429C210.777 243.429 216.195 251.949 214.595 246.349z"/> - </g> - <g style="fill: #000000"> - <path d="M409.401 80C409.401 80 383.801 88 381.001 106.8C381.001 106.8 378.601 129.6 399.001 147.2C399.001 147.2 399.401 153.6 401.401 156.8C401.401 156.8 399.801 161.6 418.601 154L445.801 145.6C445.801 145.6 452.201 143.2 457.401 134.4C462.601 125.6 477.801 106.8 474.201 81.6C474.201 81.6 475.401 70.4 469.401 70C469.401 70 461.001 68.4 453.801 76C453.801 76 447.001 79.2 444.601 78.8L409.401 80z"/> - </g> - <g style="fill: #000000"> - <path d="M464.022 79.01C464.022 79.01 466.122 70.08 461.282 74.92C461.282 74.92 454.242 80.64 446.761 80.64C446.761 80.64 432.241 82.84 427.841 96.04C427.841 96.04 423.881 122.88 431.801 128.6C431.801 128.6 436.641 136.08 443.681 129.48C450.722 122.88 466.222 92.65 464.022 79.01z"/> - </g> - <g style="fill: #323232"> - <path d="M463.648 79.368C463.648 79.368 465.738 70.624 460.986 75.376C460.986 75.376 454.074 80.992 446.729 80.992C446.729 80.992 432.473 83.152 428.153 96.112C428.153 96.112 424.265 122.464 432.041 128.08C432.041 128.08 436.793 135.424 443.705 128.944C450.618 122.464 465.808 92.76 463.648 79.368z"/> - </g> - <g style="fill: #666666"> - <path d="M463.274 79.726C463.274 79.726 465.354 71.168 460.69 75.832C460.69 75.832 453.906 81.344 446.697 81.344C446.697 81.344 432.705 83.464 428.465 96.184C428.465 96.184 424.649 122.048 432.281 127.56C432.281 127.56 436.945 134.768 443.729 128.408C450.514 122.048 465.394 92.87 463.274 79.726z"/> - </g> - <g style="fill: #999999"> - <path d="M462.9 80.084C462.9 80.084 464.97 71.712 460.394 76.288C460.394 76.288 453.738 81.696 446.665 81.696C446.665 81.696 432.937 83.776 428.777 96.256C428.777 96.256 425.033 121.632 432.521 127.04C432.521 127.04 437.097 134.112 443.753 127.872C450.41 121.632 464.98 92.98 462.9 80.084z"/> - </g> - <g style="fill: #cccccc"> - <path d="M462.526 80.442C462.526 80.442 464.586 72.256 460.098 76.744C460.098 76.744 453.569 82.048 446.633 82.048C446.633 82.048 433.169 84.088 429.089 96.328C429.089 96.328 425.417 121.216 432.761 126.52C432.761 126.52 437.249 133.456 443.777 127.336C450.305 121.216 464.566 93.09 462.526 80.442z"/> - </g> - <g style="fill: #ffffff"> - <path d="M462.151 80.8C462.151 80.8 464.201 72.8 459.801 77.2C459.801 77.2 453.401 82.4 446.601 82.4C446.601 82.4 433.401 84.4 429.401 96.4C429.401 96.4 425.801 120.8 433.001 126C433.001 126 437.401 132.8 443.801 126.8C450.201 120.8 464.151 93.2 462.151 80.8z"/> - </g> - <g style="fill: #992600"> - <path d="M250.6 284C250.6 284 230.2 264.8 222.2 264C222.2 264 187.8 260 173 278C173 278 190.6 257.6 218.2 263.2C218.2 263.2 196.6 258.8 184.2 262C184.2 262 167.4 262 157.8 276L155 280.8C155 280.8 159 266 177.4 260C177.4 260 200.2 255.2 211 260C211 260 189.4 253.2 179.4 255.2C179.4 255.2 149 252.8 136.2 279.2C136.2 279.2 140.2 264.8 155 257.6C155 257.6 168.6 248.8 189 251.6C189 251.6 203.4 254.8 208.6 257.2C213.8 259.6 212.6 256.8 204.2 252C204.2 252 198.6 242 184.6 242.4C184.6 242.4 141.8 246 131.4 258C131.4 258 145 246.8 155.4 244C155.4 244 177.8 236 186.2 236.8C186.2 236.8 211 237.8 218.6 233.8C218.6 233.8 207.4 238.8 210.6 242C213.8 245.2 220.6 252.8 220.6 254C220.6 255.2 244.8 277.3 248.4 281.7L250.6 284z"/> - </g> - <g style="fill: #cccccc"> - <path d="M389 478C389 478 373.5 441.5 361 432C361 432 387 448 390.5 466C390.5 466 390.5 476 389 478z"/> - </g> - <g style="fill: #cccccc"> - <path d="M436 485.5C436 485.5 409.5 430.5 391 406.5C391 406.5 434.5 444 439.5 470.5L440 476L437 473.5C437 473.5 436.5 482.5 436 485.5z"/> - </g> - <g style="fill: #cccccc"> - <path d="M492.5 437C492.5 437 430 377.5 428.5 375C428.5 375 489 441 492 448.5C492 448.5 490 439.5 492.5 437z"/> - </g> - <g style="fill: #cccccc"> - <path d="M304 480.5C304 480.5 323.5 428.5 342.5 451C342.5 451 357.5 461 357 464C357 464 353 457.5 335 458C335 458 316 455 304 480.5z"/> - </g> - <g style="fill: #cccccc"> - <path d="M494.5 353C494.5 353 449.5 324.5 442 323C430.193 320.639 491.5 352 496.5 362.5C496.5 362.5 498.5 360 494.5 353z"/> - </g> - <g style="fill: #000000"> - <path d="M343.801 459.601C343.801 459.601 364.201 457.601 371.001 450.801L375.401 454.401L393.001 416.001L396.601 421.201C396.601 421.201 411.001 406.401 410.201 398.401C409.401 390.401 423.001 404.401 423.001 404.401C423.001 404.401 422.201 392.801 429.401 399.601C429.401 399.601 427.001 384.001 435.401 392.001C435.401 392.001 424.864 361.844 447.401 387.601C453.001 394.001 448.601 387.201 448.601 387.201C448.601 387.201 422.601 339.201 444.201 353.601C444.201 353.601 446.201 330.801 445.001 326.401C443.801 322.001 441.801 299.6 437.001 294.4C432.201 289.2 437.401 287.6 443.001 292.8C443.001 292.8 431.801 268.8 445.001 280.8C445.001 280.8 441.401 265.6 437.001 262.8C437.001 262.8 431.401 245.6 446.601 256.4C446.601 256.4 442.201 244 439.001 240.8C439.001 240.8 427.401 213.2 434.601 218L439.001 221.6C439.001 221.6 432.201 207.6 438.601 212C445.001 216.4 445.001 216 445.001 216C445.001 216 423.801 182.8 444.201 200.4C444.201 200.4 436.042 186.482 432.601 179.6C432.601 179.6 413.801 159.2 428.201 165.6L433.001 167.2C433.001 167.2 424.201 157.2 416.201 155.6C408.201 154 418.601 147.6 425.001 149.6C431.401 151.6 447.001 159.2 447.001 159.2C447.001 159.2 459.801 178 463.801 178.4C463.801 178.4 443.801 170.8 449.801 178.8C449.801 178.8 464.201 192.8 457.001 192.4C457.001 192.4 451.001 199.6 455.801 208.4C455.801 208.4 437.342 190.009 452.201 215.6L459.001 232C459.001 232 434.601 207.2 445.801 229.2C445.801 229.2 463.001 252.8 465.001 253.2C467.001 253.6 471.401 262.4 471.401 262.4L467.001 260.4L472.201 269.2C472.201 269.2 461.001 257.2 467.001 270.4L472.601 284.8C472.601 284.8 452.201 262.8 465.801 292.4C465.801 292.4 449.401 287.2 458.201 304.4C458.201 304.4 456.601 320.401 457.001 325.601C457.401 330.801 458.601 359.201 454.201 367.201C449.801 375.201 460.201 394.401 462.201 398.401C464.201 402.401 467.801 413.201 459.001 404.001C450.201 394.801 454.601 400.401 456.601 409.201C458.601 418.001 464.601 433.601 463.801 439.201C463.801 439.201 462.601 440.401 459.401 436.801C459.401 436.801 444.601 414.001 446.201 428.401C446.201 428.401 445.001 436.401 441.801 445.201C441.801 445.201 438.601 456.001 438.601 447.201C438.601 447.201 435.401 430.401 432.601 438.001C429.801 445.601 426.201 451.601 423.401 454.001C420.601 456.401 415.401 433.601 414.201 444.001C414.201 444.001 402.201 431.601 397.401 448.001L385.801 464.401C385.801 464.401 385.401 452.001 384.201 458.001C384.201 458.001 354.201 464.001 343.801 459.601z"/> - </g> - <g style="fill: #000000"> - <path d="M309.401 102.8C309.401 102.8 297.801 94.8 293.801 95.2C289.801 95.6 321.401 86.4 362.601 114C362.601 114 367.401 116.8 371.001 116.4C371.001 116.4 374.201 118.8 371.401 122.4C371.401 122.4 362.601 132 373.801 143.2C373.801 143.2 392.201 150 386.601 141.2C386.601 141.2 397.401 145.2 399.801 149.2C402.201 153.2 401.001 149.2 401.001 149.2C401.001 149.2 394.601 142 388.601 136.8C388.601 136.8 383.401 134.8 380.601 126.4C377.801 118 375.401 108 379.801 104.8C379.801 104.8 375.801 109.2 376.601 105.2C377.401 101.2 381.001 97.6 382.601 97.2C384.201 96.8 400.601 81 407.401 80.6C407.401 80.6 398.201 82 395.201 81C392.201 80 365.601 68.6 359.601 67.4C359.601 67.4 342.801 60.8 354.801 62.8C354.801 62.8 390.601 66.6 408.801 79.8C408.801 79.8 401.601 71.4 383.201 64.4C383.201 64.4 361.001 51.8 325.801 56.8C325.801 56.8 308.001 60 300.201 61.8C300.201 61.8 297.601 61.2 297.001 60.8C296.401 60.4 284.6 51.4 257 58.4C257 58.4 240 63 231.4 67.8C231.4 67.8 216.2 69 212.6 72.2C212.6 72.2 194 86.8 192 87.6C190 88.4 178.6 96 177.8 96.4C177.8 96.4 202.4 89.8 204.8 87.4C207.2 85 224.6 82.4 227 83.8C229.4 85.2 237.8 84.6 228.2 85.2C228.2 85.2 303.801 100 304.601 102C305.401 104 309.401 102.8 309.401 102.8z"/> - </g> - <g style="fill: #cc7226"> - <path d="M380.801 93.6C380.801 93.6 370.601 86.2 368.601 86.2C366.601 86.2 354.201 76 350.001 76.4C345.801 76.8 333.601 66.8 306.201 75C306.201 75 305.601 73 309.201 72.2C309.201 72.2 315.601 70 316.001 69.4C316.001 69.4 336.201 65.2 343.401 68.8C343.401 68.8 352.601 71.4 358.801 77.6C358.801 77.6 370.001 80.8 373.201 79.8C373.201 79.8 382.001 82 382.401 83.8C382.401 83.8 388.201 86.8 386.401 89.4C386.401 89.4 386.801 91 380.801 93.6z"/> - </g> - <g style="fill: #cc7226"> - <path d="M368.33 91.491C369.137 92.123 370.156 92.221 370.761 93.03C370.995 93.344 370.706 93.67 370.391 93.767C369.348 94.084 368.292 93.514 367.15 94.102C366.748 94.309 366.106 94.127 365.553 93.978C363.921 93.537 362.092 93.512 360.401 94.2C358.416 93.071 356.056 93.655 353.975 92.654C353.917 92.627 353.695 92.973 353.621 92.946C350.575 91.801 346.832 92.084 344.401 89.8C341.973 89.388 339.616 88.926 337.188 88.246C335.37 87.737 333.961 86.748 332.341 85.916C330.964 85.208 329.507 84.686 327.973 84.314C326.11 83.862 324.279 83.974 322.386 83.454C322.293 83.429 322.101 83.773 322.019 83.746C321.695 83.638 321.405 83.055 321.234 83.108C319.553 83.63 318.065 82.658 316.401 83C315.223 81.776 313.495 82.021 311.949 81.579C308.985 80.731 305.831 82.001 302.801 81C306.914 79.158 311.601 80.39 315.663 78.321C317.991 77.135 320.653 78.237 323.223 77.477C323.71 77.333 324.401 77.131 324.801 77.8C324.935 77.665 325.117 77.426 325.175 77.454C327.625 78.611 329.94 79.885 332.422 80.951C332.763 81.097 333.295 80.865 333.547 81.067C335.067 82.283 337.01 82.18 338.401 83.4C340.099 82.898 341.892 83.278 343.621 82.654C343.698 82.627 343.932 82.968 343.965 82.946C345.095 82.198 346.25 82.469 347.142 82.773C347.48 82.888 348.143 83.135 348.448 83.209C349.574 83.485 350.43 83.965 351.609 84.148C351.723 84.166 351.908 83.826 351.98 83.854C353.103 84.292 354.145 84.236 354.801 85.4C354.936 85.265 355.101 85.027 355.183 85.054C356.21 85.392 356.859 86.147 357.96 86.388C358.445 86.494 359.057 87.12 359.633 87.296C362.025 88.027 363.868 89.556 366.062 90.451C366.821 90.761 367.697 90.995 368.33 91.491z"/> - </g> - <g style="fill: #cc7226"> - <path d="M291.696 77.261C289.178 75.536 286.81 74.43 284.368 72.644C284.187 72.511 283.827 72.681 283.625 72.559C282.618 71.95 281.73 71.369 280.748 70.673C280.209 70.291 279.388 70.302 278.88 70.044C276.336 68.752 273.707 68.194 271.2 67C271.882 66.362 273.004 66.606 273.6 65.8C273.795 66.08 274.033 66.364 274.386 66.173C276.064 65.269 277.914 65.116 279.59 65.206C281.294 65.298 283.014 65.603 284.789 65.875C285.096 65.922 285.295 66.445 285.618 66.542C287.846 67.205 290.235 66.68 292.354 67.518C293.945 68.147 295.515 68.97 296.754 70.245C297.006 70.505 296.681 70.806 296.401 71C296.789 70.891 297.062 71.097 297.173 71.41C297.257 71.649 297.257 71.951 297.173 72.19C297.061 72.502 296.782 72.603 296.408 72.654C295.001 72.844 296.773 71.464 296.073 71.912C294.8 72.726 295.546 74.132 294.801 75.4C294.521 75.206 294.291 74.988 294.401 74.6C294.635 75.122 294.033 75.412 293.865 75.728C293.48 76.453 292.581 77.868 291.696 77.261z"/> - </g> - <g style="fill: #cc7226"> - <path d="M259.198 84.609C256.044 83.815 252.994 83.93 249.978 82.654C249.911 82.626 249.688 82.973 249.624 82.946C248.258 82.352 247.34 81.386 246.264 80.34C245.351 79.452 243.693 79.839 242.419 79.352C242.095 79.228 241.892 78.716 241.591 78.677C240.372 78.52 239.445 77.571 238.4 77C240.736 76.205 243.147 76.236 245.609 75.852C245.722 75.834 245.867 76.155 246 76.155C246.136 76.155 246.266 75.934 246.4 75.8C246.595 76.08 246.897 76.406 247.154 76.152C247.702 75.612 248.258 75.802 248.798 75.842C248.942 75.852 249.067 76.155 249.2 76.155C249.336 76.155 249.467 75.844 249.6 75.844C249.736 75.845 249.867 76.155 250 76.155C250.136 76.155 250.266 75.934 250.4 75.8C251.092 76.582 251.977 76.028 252.799 76.207C253.837 76.434 254.104 77.582 255.178 77.88C259.893 79.184 264.03 81.329 268.393 83.416C268.7 83.563 268.91 83.811 268.8 84.2C269.067 84.2 269.38 84.112 269.57 84.244C270.628 84.976 271.669 85.524 272.366 86.622C272.582 86.961 272.253 87.368 272.02 87.316C267.591 86.321 263.585 85.713 259.198 84.609z"/> - </g> - <g style="fill: #cc7226"> - <path d="M245.338 128.821C243.746 127.602 243.162 125.571 242.034 123.779C241.82 123.439 242.094 123.125 242.411 123.036C242.971 122.877 243.514 123.355 243.923 123.557C245.668 124.419 247.203 125.661 249.2 125.8C251.19 128.034 255.45 128.419 255.457 131.8C255.458 132.659 254.03 131.741 253.6 132.6C251.149 131.597 248.76 131.7 246.38 130.233C245.763 129.852 246.093 129.399 245.338 128.821z"/> - </g> - <g style="fill: #cc7226"> - <path d="M217.8 76.244C217.935 76.245 224.966 76.478 224.949 76.592C224.904 76.901 217.174 77.95 216.81 77.78C216.646 77.704 209.134 80.134 209 80C209.268 79.865 217.534 76.244 217.8 76.244z"/> - </g> - <g style="fill: #000000"> - <path d="M233.2 86C233.2 86 218.4 87.8 214 89C209.6 90.2 191 97.8 188 99.8C188 99.8 174.6 105.2 157.6 125.2C157.6 125.2 165.2 121.8 167.4 119C167.4 119 181 106.4 180.8 109C180.8 109 193 100.4 192.4 102.6C192.4 102.6 216.8 91.4 214.8 94.6C214.8 94.6 236.4 90 235.4 92C235.4 92 254.2 96.4 251.4 96.6C251.4 96.6 245.6 97.8 252 101.4C252 101.4 248.6 105.8 243.2 101.8C237.8 97.8 240.8 100 235.8 101C235.8 101 233.2 101.8 228.6 97.8C228.6 97.8 223 93.2 214.2 96.8C214.2 96.8 183.6 109.4 181.6 110C181.6 110 178 112.8 175.6 116.4C175.6 116.4 169.8 120.8 166.8 122.2C166.8 122.2 154 133.8 152.8 135.2C152.8 135.2 149.4 140.4 148.6 140.8C148.6 140.8 155 137 157 135C157 135 171 125 176.4 124.2C176.4 124.2 180.8 121.2 181.6 119.8C181.6 119.8 196 110.6 200.2 110.6C200.2 110.6 209.4 115.8 211.8 108.8C211.8 108.8 217.6 107 223.2 108.2C223.2 108.2 226.4 105.6 225.6 103.4C225.6 103.4 227.2 101.6 228.2 105.4C228.2 105.4 231.6 109 236.4 107C236.4 107 240.4 106.8 238.4 109.2C238.4 109.2 234 113 222.2 113.2C222.2 113.2 209.8 113.8 193.4 121.4C193.4 121.4 163.6 131.8 154.4 142.2C154.4 142.2 148 151 142.6 152.2C142.6 152.2 136.8 153 130.8 160.4C130.8 160.4 140.6 154.6 149.6 154.6C149.6 154.6 153.6 152.2 149.8 155.8C149.8 155.8 146.2 163.4 147.8 168.8C147.8 168.8 147.2 174 146.4 175.6C146.4 175.6 138.6 188.4 138.6 190.8C138.6 193.2 139.8 203 140.2 203.6C140.6 204.2 139.2 202 143 204.4C146.8 206.8 149.6 208.4 150.4 211.2C151.2 214 148.4 205.8 148.2 204C148 202.2 143.8 195 144.6 192.6C144.6 192.6 145.6 193.6 146.4 195C146.4 195 145.8 194.4 146.4 190.8C146.4 190.8 147.2 185.6 148.6 182.4C150 179.2 152 175.4 152.4 174.6C152.8 173.8 152.8 168 154.2 170.6L157.6 173.2C157.6 173.2 154.8 170.6 157 168.4C157 168.4 156 162.8 157.8 160.2C157.8 160.2 164.8 151.8 166.4 150.8C168 149.8 166.6 150.2 166.6 150.2C166.6 150.2 172.6 146 166.8 147.6C166.8 147.6 162.8 149.2 159.8 149.2C159.8 149.2 152.2 151.2 156.2 147C160.2 142.8 170.2 137.4 174 137.6L174.8 139.2L186 136.8L184.8 137.6C184.8 137.6 184.6 137.4 188.8 137C193 136.6 198.8 138 200.2 136.2C201.6 134.4 205 133.4 204.6 134.8C204.2 136.2 204 138.2 204 138.2C204 138.2 209 132.4 208.4 134.6C207.8 136.8 199.6 142 198.2 148.2L208.6 140L212.2 137C212.2 137 215.8 139.2 216 137.6C216.2 136 220.8 130.2 222 130.4C223.2 130.6 225.2 127.8 225 130.4C224.8 133 232.4 138.4 232.4 138.4C232.4 138.4 235.6 136.6 237 138C238.4 139.4 242.6 118.2 242.6 118.2L267.6 107.6L311.201 104.2L294.201 97.4L233.2 86z"/> - </g> - <g style="stroke:#4c0000; stroke-width:2"> - <path d="M251.4 285C251.4 285 236.4 268.2 228 265.6C228 265.6 214.6 258.8 190 266.6"/> - </g> - <g style="stroke:#4c0000; stroke-width:2"> - <path d="M224.8 264.2C224.8 264.2 199.6 256.2 184.2 260.4C184.2 260.4 165.8 262.4 157.4 276.2"/> - </g> - <g style="stroke:#4c0000; stroke-width:2"> - <path d="M221.2 263C221.2 263 204.2 255.8 189.4 253.6C189.4 253.6 172.8 251 156.2 258.2C156.2 258.2 144 264.2 138.6 274.4"/> - </g> - <g style="stroke:#4c0000; stroke-width:2"> - <path d="M222.2 263.4C222.2 263.4 206.8 252.4 205.8 251C205.8 251 198.8 240 185.8 239.6C185.8 239.6 164.4 240.4 147.2 248.4"/> - </g> - <g style="fill: #000000"> - <path d="M220.895 254.407C222.437 255.87 249.4 284.8 249.4 284.8C284.6 321.401 256.6 287.2 256.6 287.2C249 282.4 239.8 263.6 239.8 263.6C238.6 260.8 253.8 270.8 253.8 270.8C257.8 271.6 271.4 290.8 271.4 290.8C264.6 288.4 269.4 295.6 269.4 295.6C272.2 297.6 292.601 313.201 292.601 313.201C296.201 317.201 300.201 318.801 300.201 318.801C314.201 313.601 307.801 326.801 307.801 326.801C310.201 333.601 315.801 322.001 315.801 322.001C327.001 305.2 310.601 307.601 310.601 307.601C280.6 310.401 273.8 294.4 273.8 294.4C271.4 292 280.2 294.4 280.2 294.4C288.601 296.4 273 282 273 282C275.4 282 284.6 288.8 284.6 288.8C295.001 298 297.001 296 297.001 296C315.001 287.2 325.401 294.8 325.401 294.8C327.401 296.4 321.801 303.2 323.401 308.401C325.001 313.601 329.801 326.001 329.801 326.001C327.401 327.601 327.801 338.401 327.801 338.401C344.601 361.601 335.001 359.601 335.001 359.601C319.401 359.201 334.201 366.801 334.201 366.801C337.401 368.801 346.201 376.001 346.201 376.001C343.401 374.801 341.801 380.001 341.801 380.001C346.601 384.001 343.801 388.801 343.801 388.801C337.801 390.001 336.601 394.001 336.601 394.001C343.401 402.001 333.401 402.401 333.401 402.401C337.001 406.801 332.201 418.801 332.201 418.801C327.401 418.801 321.001 424.401 321.001 424.401C323.401 429.201 313.001 434.801 313.001 434.801C304.601 436.401 307.401 443.201 307.401 443.201C299.401 449.201 297.001 465.201 297.001 465.201C296.201 475.601 293.801 478.801 299.001 476.801C304.201 474.801 303.401 462.401 303.401 462.401C298.601 446.801 341.401 430.801 341.401 430.801C345.401 429.201 346.201 424.001 346.201 424.001C348.201 424.401 357.001 432.001 357.001 432.001C364.601 443.201 365.001 434.001 365.001 434.001C366.201 430.401 364.601 424.401 364.601 424.401C370.601 402.801 356.601 396.401 356.601 396.401C346.601 362.801 360.601 371.201 360.601 371.201C363.401 376.801 374.201 382.001 374.201 382.001L377.801 379.601C376.201 374.801 384.601 368.801 384.601 368.801C387.401 375.201 393.401 367.201 393.401 367.201C397.001 342.801 409.401 357.201 409.401 357.201C413.401 358.401 414.601 351.601 414.601 351.601C418.201 341.201 414.601 327.601 414.601 327.601C418.201 327.201 427.801 333.201 427.801 333.201C430.601 329.601 421.401 312.801 425.401 315.201C429.401 317.601 433.801 319.201 433.801 319.201C434.601 317.201 424.601 304.801 424.601 304.801C420.201 302 415.001 281.6 415.001 281.6C422.201 285.2 412.201 270 412.201 270C412.201 266.8 418.201 255.6 418.201 255.6C417.401 248.8 418.201 249.2 418.201 249.2C421.001 250.4 429.001 252 422.201 245.6C415.401 239.2 423.001 234.4 423.001 234.4C427.401 231.6 413.801 232 413.801 232C408.601 227.6 409.001 223.6 409.001 223.6C417.001 225.6 402.601 211.2 400.201 207.6C397.801 204 407.401 198.8 407.401 198.8C420.601 195.2 409.001 192 409.001 192C389.401 192.4 400.201 181.6 400.201 181.6C406.201 182 404.601 179.6 404.601 179.6C399.401 178.4 389.801 172 389.801 172C385.801 168.4 389.401 169.2 389.401 169.2C406.201 170.4 377.401 159.2 377.401 159.2C385.401 159.2 367.401 148.8 367.401 148.8C365.401 147.2 362.201 139.6 362.201 139.6C356.201 134.4 351.401 127.6 351.401 127.6C351.001 123.2 346.201 118.4 346.201 118.4C334.601 104.8 329.001 105.2 329.001 105.2C314.201 101.6 309.001 102.4 309.001 102.4L256.2 106.8C229.8 119.6 237.6 140.6 237.6 140.6C244 149 253.2 145.2 253.2 145.2C257.8 139 269.4 141.2 269.4 141.2C289.801 144.4 287.201 140.8 287.201 140.8C284.801 136.2 268.6 130 268.4 129.4C268.2 128.8 259.4 125.4 259.4 125.4C256.4 124.2 252 115 252 115C248.8 111.6 264.6 117.4 264.6 117.4C263.4 118.4 270.8 122.4 270.8 122.4C288.201 121.4 298.801 132.2 298.801 132.2C309.601 148.8 309.801 140.6 309.801 140.6C312.601 131.2 300.801 110 300.801 110C301.201 108 309.401 114.6 309.401 114.6C310.801 112.6 311.601 118.4 311.601 118.4C311.801 120.8 315.601 128.8 315.601 128.8C318.401 141.8 322.001 134.4 322.001 134.4L326.601 143.8C328.001 146.4 322.001 154 322.001 154C321.801 156.8 322.601 156.6 317.001 164.2C311.401 171.8 314.801 176.2 314.801 176.2C313.401 182.8 322.201 182.4 322.201 182.4C324.801 184.6 328.201 184.6 328.201 184.6C330.001 186.6 332.401 186 332.401 186C334.001 182.2 340.201 184.2 340.201 184.2C341.601 181.8 349.801 181.4 349.801 181.4C350.801 178.8 351.201 177.2 354.601 176.6C358.001 176 333.401 133 333.401 133C339.801 132.2 331.601 119.8 331.601 119.8C329.401 113.2 340.801 127.8 343.001 129.2C345.201 130.6 346.201 132.8 344.601 132.6C343.001 132.4 341.201 134.6 342.601 134.8C344.001 135 357.001 150 360.401 160.2C363.801 170.4 369.801 174.4 376.001 180.4C382.201 186.4 381.401 210.6 381.401 210.6C381.001 219.4 387.001 230 387.001 230C389.001 233.8 384.801 252 384.801 252C382.801 254.2 384.201 255 384.201 255C385.201 256.2 392.001 269.4 392.001 269.4C390.201 269.2 393.801 272.8 393.801 272.8C399.001 278.8 392.601 275.8 392.601 275.8C386.601 274.2 393.601 284 393.601 284C394.801 285.8 385.801 281.2 385.801 281.2C376.601 280.6 388.201 287.8 388.201 287.8C396.801 295 385.401 290.6 385.401 290.6C380.801 288.8 384.001 295.6 384.001 295.6C387.201 297.2 404.401 304.2 404.401 304.2C404.801 308.001 401.801 313.001 401.801 313.001C402.201 317.001 400.001 320.401 400.001 320.401C398.801 328.601 398.201 329.401 398.201 329.401C394.001 329.601 386.601 343.401 386.601 343.401C384.801 346.001 374.601 358.001 374.601 358.001C372.601 365.001 354.601 357.801 354.601 357.801C348.001 361.201 350.001 357.801 350.001 357.801C349.601 355.601 354.401 349.601 354.401 349.601C361.401 347.001 358.801 336.201 358.801 336.201C362.801 334.801 351.601 332.001 351.801 330.801C352.001 329.601 357.801 328.201 357.801 328.201C365.801 326.201 361.401 323.801 361.401 323.801C360.801 319.801 363.801 314.201 363.801 314.201C375.401 313.401 363.801 297.2 363.801 297.2C353.001 289.6 352.001 283.8 352.001 283.8C364.601 275.6 356.401 263.2 356.601 259.6C356.801 256 358.001 234.4 358.001 234.4C356.001 228.2 353.001 214.6 353.001 214.6C355.201 209.4 362.601 196.8 362.601 196.8C365.401 192.6 374.201 187.8 372.001 184.8C369.801 181.8 362.001 183.6 362.001 183.6C354.201 182.2 354.801 187.4 354.801 187.4C353.201 188.4 352.401 193.4 352.401 193.4C351.68 201.333 342.801 207.6 342.801 207.6C331.601 213.8 340.801 217.8 340.801 217.8C346.801 224.4 337.001 224.6 337.001 224.6C326.001 222.8 334.201 233 334.201 233C345.001 245.8 342.001 248.6 342.001 248.6C331.801 249.6 344.401 258.8 344.401 258.8C344.401 258.8 343.601 256.8 343.801 258.6C344.001 260.4 347.001 264.6 347.801 266.6C348.601 268.6 344.601 268.8 344.601 268.8C345.201 278.4 329.801 274.2 329.801 274.2C329.801 274.2 329.801 274.2 328.201 274.4C326.601 274.6 315.401 273.8 309.601 271.6C303.801 269.4 297.001 269.4 297.001 269.4C297.001 269.4 293.001 271.2 285.4 271C277.8 270.8 269.8 273.6 269.8 273.6C265.4 273.2 274 268.8 274.2 269C274.4 269.2 280 263.6 272 264.2C250.203 265.835 239.4 255.6 239.4 255.6C237.4 254.2 234.8 251.4 234.8 251.4C224.8 249.4 236.2 263.8 236.2 263.8C237.4 265.2 236 266.2 236 266.2C235.2 264.6 227.4 259.2 227.4 259.2C224.589 258.227 223.226 256.893 220.895 254.407z"/> - </g> - <g style="fill: #4c0000"> - <path d="M197 242.8C197 242.8 208.6 248.4 211.2 251.2C213.8 254 227.8 265.4 227.8 265.4C227.8 265.4 222.4 263.4 219.8 261.6C217.2 259.8 206.4 251.6 206.4 251.6C206.4 251.6 202.6 245.6 197 242.8z"/> - </g> - <g style="fill: #99cc32"> - <path d="M138.991 211.603C139.328 211.455 138.804 208.743 138.6 208.2C137.578 205.474 128.6 204 128.6 204C128.373 205.365 128.318 206.961 128.424 208.599C128.424 208.599 133.292 214.118 138.991 211.603z"/> - </g> - <g style="fill: #659900"> - <path d="M138.991 211.403C138.542 211.561 138.976 208.669 138.8 208.2C137.778 205.474 128.6 203.9 128.6 203.9C128.373 205.265 128.318 206.861 128.424 208.499C128.424 208.499 132.692 213.618 138.991 211.403z"/> - </g> - <g style="fill: #000000"> - <path d="M134.6 211.546C133.975 211.546 133.469 210.406 133.469 209C133.469 207.595 133.975 206.455 134.6 206.455C135.225 206.455 135.732 207.595 135.732 209C135.732 210.406 135.225 211.546 134.6 211.546z"/> - </g> - <g style="fill: #000000"> - <path d="M134.6 209z"/> - </g> - <g style="fill: #000000"> - <path d="M89 309.601C89 309.601 83.4 319.601 108.2 313.601C108.2 313.601 122.2 312.401 124.6 310.001C125.8 310.801 134.166 313.734 137 314.401C143.8 316.001 152.2 306 152.2 306C152.2 306 156.8 295.5 159.6 295.5C162.4 295.5 159.2 297.1 159.2 297.1C159.2 297.1 152.6 307.201 153 308.801C153 308.801 147.8 328.801 131.8 329.601C131.8 329.601 115.65 330.551 117 336.401C117 336.401 125.8 334.001 128.2 336.401C128.2 336.401 139 336.001 131 342.401L124.2 354.001C124.2 354.001 124.34 357.919 114.2 354.401C104.4 351.001 94.1 338.101 94.1 338.101C94.1 338.101 78.15 323.551 89 309.601z"/> - </g> - <g style="fill: #e59999"> - <path d="M87.8 313.601C87.8 313.601 85.8 323.201 122.6 312.801C122.6 312.801 127 312.801 129.4 313.601C131.8 314.401 143.8 317.201 145.8 316.001C145.8 316.001 138.6 329.601 127 328.001C127 328.001 113.8 329.601 114.2 334.401C114.2 334.401 118.2 341.601 123 344.001C123 344.001 125.8 346.401 125.4 349.601C125 352.801 122.2 354.401 120.2 355.201C118.2 356.001 115 352.801 113.4 352.801C111.8 352.801 103.4 346.401 99 341.601C94.6 336.801 86.2 324.801 86.6 322.001C87 319.201 87.8 313.601 87.8 313.601z"/> - </g> - <g style="fill: #b26565"> - <path d="M91 331.051C93.6 335.001 96.8 339.201 99 341.601C103.4 346.401 111.8 352.801 113.4 352.801C115 352.801 118.2 356.001 120.2 355.201C122.2 354.401 125 352.801 125.4 349.601C125.8 346.401 123 344.001 123 344.001C119.934 342.468 117.194 338.976 115.615 336.653C115.615 336.653 115.8 339.201 110.6 338.401C105.4 337.601 100.2 334.801 98.6 331.601C97 328.401 94.6 326.001 96.2 329.601C97.8 333.201 100.2 336.801 101.8 337.201C103.4 337.601 103 338.801 100.6 338.401C98.2 338.001 95.4 337.601 91 332.401z"/> - </g> - <g style="fill: #992600"> - <path d="M88.4 310.001C88.4 310.001 90.2 296.4 91.4 292.4C91.4 292.4 90.6 285.6 93 281.4C95.4 277.2 97.4 271 100.4 265.6C103.4 260.2 103.6 256.2 107.6 254.6C111.6 253 117.6 244.4 120.4 243.4C123.2 242.4 123 243.2 123 243.2C123 243.2 129.8 228.4 143.4 232.4C143.4 232.4 127.2 229.6 143 220.2C143 220.2 138.2 221.3 141.5 214.3C143.701 209.632 143.2 216.4 132.2 228.2C132.2 228.2 127.2 236.8 122 239.8C116.8 242.8 104.8 249.8 103.6 253.6C102.4 257.4 99.2 263.2 97.2 264.8C95.2 266.4 92.4 270.6 92 274C92 274 90.8 278 89.4 279.2C88 280.4 87.8 283.6 87.8 285.6C87.8 287.6 85.8 290.4 86 292.8C86 292.8 86.8 311.801 86.4 313.801L88.4 310.001z"/> - </g> - <g style="fill: #ffffff"> - <path d="M79.8 314.601C79.8 314.601 77.8 313.201 73.4 319.201C73.4 319.201 80.7 352.201 80.7 353.601C80.7 353.601 81.8 351.501 80.5 344.301C79.2 337.101 78.3 324.401 78.3 324.401L79.8 314.601z"/> - </g> - <g style="fill: #992600"> - <path d="M101.4 254C101.4 254 83.8 257.2 84.2 286.4L83.4 311.201C83.4 311.201 82.2 285.6 81 284C79.8 282.4 83.8 271.2 80.6 277.2C80.6 277.2 66.6 291.2 74.6 312.401C74.6 312.401 76.1 315.701 73.1 311.101C73.1 311.101 68.5 298.5 69.6 292.1C69.6 292.1 69.8 289.9 71.7 287.1C71.7 287.1 80.3 275.4 83 273.1C83 273.1 84.8 258.7 100.2 253.5C100.2 253.5 105.9 251.2 101.4 254z"/> - </g> - <g style="fill: #000000"> - <path d="M240.8 187.8C241.46 187.446 241.451 186.476 242.031 186.303C243.18 185.959 243.344 184.892 243.862 184.108C244.735 182.789 244.928 181.256 245.51 179.765C245.782 179.065 245.809 178.11 245.496 177.45C244.322 174.969 243.62 172.52 242.178 170.094C241.91 169.644 241.648 168.85 241.447 168.252C240.984 166.868 239.727 165.877 238.867 164.557C238.579 164.116 239.104 163.191 238.388 163.107C237.491 163.002 236.042 162.422 235.809 163.448C235.221 166.035 236.232 168.558 237.2 171C236.418 171.692 236.752 172.613 236.904 173.38C237.614 176.986 236.416 180.338 235.655 183.812C235.632 183.916 235.974 184.114 235.946 184.176C234.724 186.862 233.272 189.307 231.453 191.688C230.695 192.68 229.823 193.596 229.326 194.659C228.958 195.446 228.55 196.412 228.8 197.4C225.365 200.18 223.115 204.025 220.504 207.871C220.042 208.551 220.333 209.76 220.884 210.029C221.697 210.427 222.653 209.403 223.123 208.557C223.512 207.859 223.865 207.209 224.356 206.566C224.489 206.391 224.31 205.972 224.445 205.851C227.078 203.504 228.747 200.568 231.2 198.2C233.15 197.871 234.687 196.873 236.435 195.86C236.743 195.681 237.267 195.93 237.557 195.735C239.31 194.558 239.308 192.522 239.414 190.612C239.464 189.728 239.66 188.411 240.8 187.8z"/> - </g> - <g style="fill: #000000"> - <path d="M231.959 183.334C232.083 183.257 231.928 182.834 232.037 182.618C232.199 182.294 232.602 182.106 232.764 181.782C232.873 181.566 232.71 181.186 232.846 181.044C235.179 178.597 235.436 175.573 234.4 172.6C235.424 171.98 235.485 170.718 235.06 169.871C234.207 168.171 234.014 166.245 233.039 164.702C232.237 163.433 230.659 162.189 229.288 163.492C228.867 163.892 228.546 164.679 228.824 165.391C228.888 165.554 229.173 165.7 229.146 165.782C229.039 166.106 228.493 166.33 228.487 166.602C228.457 168.098 227.503 169.609 228.133 170.938C228.905 172.567 229.724 174.424 230.4 176.2C229.166 178.316 230.199 180.765 228.446 182.642C228.31 182.788 228.319 183.174 228.441 183.376C228.733 183.862 229.139 184.268 229.625 184.56C229.827 184.681 230.175 184.683 230.375 184.559C230.953 184.197 231.351 183.71 231.959 183.334z"/> - </g> - <g style="fill: #000000"> - <path d="M294.771 173.023C296.16 174.815 296.45 177.61 294.401 179C294.951 182.309 298.302 180.33 300.401 179.8C300.292 179.412 300.519 179.068 300.802 179.063C301.859 179.048 302.539 178.016 303.601 178.2C304.035 176.643 305.673 175.941 306.317 174.561C308.043 170.866 307.452 166.593 304.868 163.347C304.666 163.093 304.883 162.576 304.759 162.214C304.003 160.003 301.935 159.688 300.001 159C298.824 155.125 298.163 151.094 296.401 147.4C294.787 147.15 294.089 145.411 292.752 144.691C291.419 143.972 290.851 145.551 290.892 146.597C290.899 146.802 291.351 147.026 291.181 147.391C291.105 147.555 290.845 147.666 290.845 147.8C290.846 147.935 291.067 148.066 291.201 148.2C290.283 149.02 288.86 149.497 288.565 150.642C287.611 154.352 290.184 157.477 291.852 160.678C292.443 161.813 291.707 163.084 290.947 164.292C290.509 164.987 290.617 166.114 290.893 166.97C291.645 169.301 293.236 171.04 294.771 173.023z"/> - </g> - <g style="fill: #000000"> - <path d="M257.611 191.409C256.124 193.26 252.712 195.829 255.629 197.757C255.823 197.886 256.193 197.89 256.366 197.756C258.387 196.191 260.39 195.288 262.826 194.706C262.95 194.677 263.224 195.144 263.593 194.983C265.206 194.28 267.216 194.338 268.4 193C272.167 193.224 275.732 192.108 279.123 190.8C280.284 190.352 281.554 189.793 282.755 189.291C284.131 188.715 285.335 187.787 286.447 186.646C286.58 186.51 286.934 186.6 287.201 186.6C287.161 185.737 288.123 185.61 288.37 184.988C288.462 184.756 288.312 184.36 288.445 184.258C290.583 182.628 291.503 180.61 290.334 178.233C290.049 177.655 289.8 177.037 289.234 176.561C288.149 175.65 287.047 176.504 286 176.2C285.841 176.828 285.112 176.656 284.726 176.854C283.867 177.293 282.534 176.708 281.675 177.146C280.313 177.841 279.072 178.01 277.65 178.387C277.338 178.469 276.56 178.373 276.4 179C276.266 178.866 276.118 178.632 276.012 178.654C274.104 179.05 272.844 179.264 271.543 180.956C271.44 181.089 270.998 180.91 270.839 181.045C269.882 181.853 269.477 183.087 268.376 183.759C268.175 183.882 267.823 183.714 267.629 183.843C266.983 184.274 266.616 184.915 265.974 185.362C265.645 185.591 265.245 185.266 265.277 185.01C265.522 183.063 266.175 181.276 265.6 179.4C267.677 176.88 270.194 174.931 272 172.2C272.015 170.034 272.707 167.888 272.594 165.811C272.584 165.618 272.296 164.885 272.17 164.538C271.858 163.684 272.764 162.618 271.92 161.894C270.516 160.691 269.224 161.567 268.4 163C266.562 163.39 264.496 164.083 262.918 162.849C261.911 162.062 261.333 161.156 260.534 160.1C259.549 158.798 259.884 157.362 259.954 155.798C259.96 155.67 259.645 155.534 259.645 155.4C259.646 155.265 259.866 155.134 260 155C259.294 154.374 259.019 153.316 258 153C258.305 151.908 257.629 151.024 256.758 150.722C254.763 150.031 253.086 151.943 251.194 152.016C250.68 152.035 250.213 150.997 249.564 150.672C249.132 150.456 248.428 150.423 248.066 150.689C247.378 151.193 246.789 151.307 246.031 151.512C244.414 151.948 243.136 153.042 241.656 153.897C240.171 154.754 239.216 156.191 238.136 157.511C237.195 158.663 237.059 161.077 238.479 161.577C240.322 162.227 241.626 159.524 243.592 159.85C243.904 159.901 244.11 160.212 244 160.6C244.389 160.709 244.607 160.48 244.8 160.2C245.658 161.219 246.822 161.556 247.76 162.429C248.73 163.333 250.476 162.915 251.491 163.912C253.02 165.414 252.461 168.095 254.4 169.4C253.814 170.713 253.207 171.99 252.872 173.417C252.59 174.623 253.584 175.82 254.795 175.729C256.053 175.635 256.315 174.876 256.8 173.8C257.067 174.067 257.536 174.364 257.495 174.58C257.038 176.967 256.011 178.96 255.553 181.391C255.494 181.708 255.189 181.91 254.8 181.8C254.332 185.949 250.28 188.343 247.735 191.508C247.332 192.01 247.328 193.259 247.737 193.662C249.14 195.049 251.1 193.503 252.8 193C253.013 191.794 253.872 190.852 255.204 190.908C255.46 190.918 255.695 190.376 256.019 190.246C256.367 190.108 256.869 190.332 257.155 190.134C258.884 188.939 260.292 187.833 262.03 186.644C262.222 186.513 262.566 186.672 262.782 186.564C263.107 186.402 263.294 186.015 263.617 185.83C263.965 185.63 264.207 185.92 264.4 186.2C263.754 186.549 263.75 187.506 263.168 187.708C262.393 187.976 261.832 188.489 261.158 188.936C260.866 189.129 260.207 188.881 260.103 189.06C259.505 190.088 258.321 190.526 257.611 191.409z"/> - </g> - <g style="fill: #000000"> - <path d="M202.2 142C202.2 142 192.962 139.128 181.8 164.8C181.8 164.8 179.4 170 177 172C174.6 174 163.4 177.6 161.4 181.6L151 197.6C151 197.6 165.8 181.6 169 179.2C169 179.2 177 170.8 173.8 177.6C173.8 177.6 159.8 188.4 161 197.6C161 197.6 155.4 212 154.6 214C154.6 214 170.6 182 173 180.8C175.4 179.6 176.6 179.6 175.4 183.2C174.2 186.8 173.8 203.2 171 205.2C171 205.2 179 184.8 178.2 181.6C178.2 181.6 181.4 178 183.8 183.2L182.6 199.2L187 211.2C187 211.2 184.6 200 186.2 184.4C186.2 184.4 184.2 174 188.2 179.6C192.2 185.2 201.8 191.2 201.8 196C201.8 196 196.6 178.4 187.4 173.6L183.4 179.6L182.2 177.6C182.2 177.6 178.6 176.8 183 170C187.4 163.2 187 162.4 187 162.4C187 162.4 193.4 169.6 195 169.6C195 169.6 208.2 162 209.4 186.4C209.4 186.4 216.2 172 207 165.2C207 165.2 192.2 163.2 193.4 158L200.6 145.6C204.2 140.4 202.6 143.2 202.6 143.2z"/> - </g> - <g style="fill: #000000"> - <path d="M182.2 158.4C182.2 158.4 169.4 158.4 166.2 163.6L159 173.2C159 173.2 176.2 163.2 180.2 162C184.2 160.8 182.2 158.4 182.2 158.4z"/> - </g> - <g style="fill: #000000"> - <path d="M142.2 164.8C142.2 164.8 140.2 166 139.8 168.8C139.4 171.6 137 172 137.8 174.8C138.6 177.6 140.6 180 140.6 176C140.6 172 142.2 170 143 168.8C143.8 167.6 145.4 163.2 142.2 164.8z"/> - </g> - <g style="fill: #000000"> - <path d="M133.4 226C133.4 226 125 222 121.8 218.4C118.6 214.8 119.052 219.966 114.2 219.6C108.353 219.159 109.4 203.2 109.4 203.2L105.4 210.8C105.4 210.8 104.2 225.2 112.2 222.8C116.107 221.628 117.4 223.2 115.8 224C114.2 224.8 121.4 225.2 118.6 226.8C115.8 228.4 130.2 223.2 127.8 233.6L133.4 226z"/> - </g> - <g style="fill: #000000"> - <path d="M120.8 240.4C120.8 240.4 105.4 244.8 101.8 235.2C101.8 235.2 97 237.6 99.2 240.6C101.4 243.6 102.6 244 102.6 244C102.6 244 108 245.2 107.4 246C106.8 246.8 104.4 250.2 104.4 250.2C104.4 250.2 114.6 244.2 120.8 240.4z"/> - </g> - <g style="fill: #ffffff"> - <path d="M349.201 318.601C348.774 320.735 347.103 321.536 345.201 322.201C343.284 321.243 340.686 318.137 338.801 320.201C338.327 319.721 337.548 319.661 337.204 318.999C336.739 318.101 337.011 317.055 336.669 316.257C336.124 314.985 335.415 313.619 335.601 312.201C337.407 311.489 338.002 309.583 337.528 307.82C337.459 307.563 337.03 307.366 337.23 307.017C337.416 306.694 337.734 306.467 338.001 306.2C337.866 306.335 337.721 306.568 337.61 306.548C337 306.442 337.124 305.805 337.254 305.418C337.839 303.672 339.853 303.408 341.201 304.6C341.457 304.035 341.966 304.229 342.401 304.2C342.351 303.621 342.759 303.094 342.957 302.674C343.475 301.576 345.104 302.682 345.901 302.07C346.977 301.245 348.04 300.546 349.118 301.149C350.927 302.162 352.636 303.374 353.835 305.115C354.41 305.949 354.65 307.23 354.592 308.188C354.554 308.835 353.173 308.483 352.83 309.412C352.185 311.16 354.016 311.679 354.772 313.017C354.97 313.366 354.706 313.67 354.391 313.768C353.98 313.896 353.196 313.707 353.334 314.16C354.306 317.353 351.55 318.031 349.201 318.601z"/> - </g> - <g style="fill: #ffffff"> - <path d="M339.6 338.201C339.593 336.463 337.992 334.707 339.201 333.001C339.336 333.135 339.467 333.356 339.601 333.356C339.736 333.356 339.867 333.135 340.001 333.001C341.496 335.217 345.148 336.145 345.006 338.991C344.984 339.438 343.897 340.356 344.801 341.001C342.988 342.349 342.933 344.719 342.001 346.601C340.763 346.315 339.551 345.952 338.401 345.401C338.753 343.915 338.636 342.231 339.456 340.911C339.89 340.213 339.603 339.134 339.6 338.201z"/> - </g> - <g style="fill: #cccccc"> - <path d="M173.4 329.201C173.4 329.201 156.542 339.337 170.6 324.001C179.4 314.401 189.4 308.801 189.4 308.801C189.4 308.801 199.8 304.4 203.4 303.2C207 302 222.2 296.8 225.4 296.4C228.6 296 238.2 292 245 296C251.8 300 259.8 304.4 259.8 304.4C259.8 304.4 243.4 296 239.8 298.4C236.2 300.8 229 300.4 223 303.6C223 303.6 208.2 308.001 205 310.001C201.8 312.001 191.4 323.601 189.8 322.801C188.2 322.001 190.2 321.601 191.4 318.801C192.6 316.001 190.6 314.401 182.6 320.801C174.6 327.201 173.4 329.201 173.4 329.201z"/> - </g> - <g style="fill: #000000"> - <path d="M180.805 323.234C180.805 323.234 182.215 310.194 190.693 311.859C190.693 311.859 198.919 307.689 201.641 305.721C201.641 305.721 209.78 304.019 211.09 303.402C229.569 294.702 244.288 299.221 244.835 298.101C245.381 296.982 265.006 304.099 268.615 308.185C269.006 308.628 258.384 302.588 248.686 300.697C240.413 299.083 218.811 300.944 207.905 306.48C204.932 307.989 195.987 313.773 193.456 313.662C190.925 313.55 180.805 323.234 180.805 323.234z"/> - </g> - <g style="fill: #cccccc"> - <path d="M177 348.801C177 348.801 161.8 346.401 178.6 344.801C178.6 344.801 196.6 342.801 200.6 337.601C200.6 337.601 214.2 328.401 217 328.001C219.8 327.601 249.8 320.401 250.2 318.001C250.6 315.601 256.2 315.601 257.8 316.401C259.4 317.201 258.6 318.401 255.8 319.201C253 320.001 221.8 336.401 215.4 337.601C209 338.801 197.4 346.401 192.6 347.601C187.8 348.801 177 348.801 177 348.801z"/> - </g> - <g style="fill: #000000"> - <path d="M196.52 341.403C196.52 341.403 187.938 340.574 196.539 339.755C196.539 339.755 205.355 336.331 207.403 333.668C207.403 333.668 214.367 328.957 215.8 328.753C217.234 328.548 231.194 324.861 231.399 323.633C231.604 322.404 265.67 309.823 270.09 313.013C273.001 315.114 263.1 313.437 253.466 317.847C252.111 318.467 218.258 333.054 214.981 333.668C211.704 334.283 205.765 338.174 203.307 338.788C200.85 339.403 196.52 341.403 196.52 341.403z"/> - </g> - <g style="fill: #000000"> - <path d="M188.6 343.601C188.6 343.601 193.8 343.201 192.6 344.801C191.4 346.401 189 345.601 189 345.601L188.6 343.601z"/> - </g> - <g style="fill: #000000"> - <path d="M181.4 345.201C181.4 345.201 186.6 344.801 185.4 346.401C184.2 348.001 181.8 347.201 181.8 347.201L181.4 345.201z"/> - </g> - <g style="fill: #000000"> - <path d="M171 346.801C171 346.801 176.2 346.401 175 348.001C173.8 349.601 171.4 348.801 171.4 348.801L171 346.801z"/> - </g> - <g style="fill: #000000"> - <path d="M163.4 347.601C163.4 347.601 168.6 347.201 167.4 348.801C166.2 350.401 163.8 349.601 163.8 349.601L163.4 347.601z"/> - </g> - <g style="fill: #000000"> - <path d="M201.8 308.001C201.8 308.001 206.2 308.001 205 309.601C203.8 311.201 200.6 310.801 200.6 310.801L201.8 308.001z"/> - </g> - <g style="fill: #000000"> - <path d="M191.8 313.601C191.8 313.601 198.306 311.46 195.8 314.801C194.6 316.401 192.2 315.601 192.2 315.601L191.8 313.601z"/> - </g> - <g style="fill: #000000"> - <path d="M180.6 318.401C180.6 318.401 185.8 318.001 184.6 319.601C183.4 321.201 181 320.401 181 320.401L180.6 318.401z"/> - </g> - <g style="fill: #000000"> - <path d="M173 324.401C173 324.401 178.2 324.001 177 325.601C175.8 327.201 173.4 326.401 173.4 326.401L173 324.401z"/> - </g> - <g style="fill: #000000"> - <path d="M166.2 329.201C166.2 329.201 171.4 328.801 170.2 330.401C169 332.001 166.6 331.201 166.6 331.201L166.2 329.201z"/> - </g> - <g style="fill: #000000"> - <path d="M205.282 335.598C205.282 335.598 212.203 335.066 210.606 337.195C209.009 339.325 205.814 338.26 205.814 338.26L205.282 335.598z"/> - </g> - <g style="fill: #000000"> - <path d="M215.682 330.798C215.682 330.798 222.603 330.266 221.006 332.395C219.409 334.525 216.214 333.46 216.214 333.46L215.682 330.798z"/> - </g> - <g style="fill: #000000"> - <path d="M226.482 326.398C226.482 326.398 233.403 325.866 231.806 327.995C230.209 330.125 227.014 329.06 227.014 329.06L226.482 326.398z"/> - </g> - <g style="fill: #000000"> - <path d="M236.882 321.598C236.882 321.598 243.803 321.066 242.206 323.195C240.609 325.325 237.414 324.26 237.414 324.26L236.882 321.598z"/> - </g> - <g style="fill: #000000"> - <path d="M209.282 303.598C209.282 303.598 216.203 303.066 214.606 305.195C213.009 307.325 209.014 307.06 209.014 307.06L209.282 303.598z"/> - </g> - <g style="fill: #000000"> - <path d="M219.282 300.398C219.282 300.398 226.203 299.866 224.606 301.995C223.009 304.125 218.614 303.86 218.614 303.86L219.282 300.398z"/> - </g> - <g style="fill: #000000"> - <path d="M196.6 340.401C196.6 340.401 201.8 340.001 200.6 341.601C199.4 343.201 197 342.401 197 342.401L196.6 340.401z"/> - </g> - <g style="fill: #992600"> - <path d="M123.4 241.2C123.4 241.2 119 250 118.6 253.2C118.6 253.2 119.4 244.4 120.6 242.4C121.8 240.4 123.4 241.2 123.4 241.2z"/> - </g> - <g style="fill: #992600"> - <path d="M105 255.2C105 255.2 101.8 269.6 102.2 272.4C102.2 272.4 101 260.8 101.4 259.6C101.8 258.4 105 255.2 105 255.2z"/> - </g> - <g style="fill: #cccccc"> - <path d="M125.8 180.6L125.6 183.8L123.4 184C123.4 184 137.6 196.6 138.2 204.2C138.2 204.2 139 196 125.8 180.6z"/> - </g> - <g style="fill: #000000"> - <path d="M129.784 181.865C129.353 181.449 129.572 180.704 129.164 180.444C128.355 179.928 130.462 179.871 130.234 179.155C129.851 177.949 130.038 177.928 129.916 176.652C129.859 176.054 130.447 174.514 130.832 174.074C132.278 172.422 130.954 169.49 132.594 167.939C132.898 167.65 133.274 167.098 133.559 166.68C134.218 165.717 135.402 165.229 136.352 164.401C136.67 164.125 136.469 163.298 137.038 163.39C137.752 163.505 138.993 163.375 138.948 164.216C138.835 166.336 137.506 168.056 136.226 169.724C136.677 170.428 136.219 171.063 135.935 171.62C134.6 174.24 134.789 177.081 134.615 179.921C134.61 180.006 134.303 180.084 134.311 180.137C134.664 182.472 135.248 184.671 136.127 186.9C136.493 187.83 136.964 188.725 137.114 189.652C137.225 190.338 137.328 191.171 136.92 191.876C138.955 194.766 137.646 197.417 138.815 200.948C139.022 201.573 140.714 203.487 140.251 203.326C137.738 202.455 137.626 202.057 137.449 201.304C137.303 200.681 136.973 199.304 136.736 198.702C136.672 198.538 136.501 196.654 136.423 196.532C134.91 194.15 136.268 194.326 134.898 191.968C133.47 191.288 132.504 190.184 131.381 189.022C131.183 188.818 132.326 188.094 132.145 187.881C131.053 186.592 129.9 185.825 130.236 184.332C130.391 183.642 130.528 182.585 129.784 181.865z"/> - </g> - <g style="fill: #000000"> - <path d="M126.2 183.6C126.2 183.6 126.6 190.4 129 192C131.4 193.6 130.2 192.8 127 191.6C123.8 190.4 125 189.6 125 189.6C125 189.6 122.2 190 124.6 192C127 194 130.6 196.4 129 196.4C127.4 196.4 119.8 192.4 119.8 189.6C119.8 186.8 118.8 182.7 118.8 182.7C118.8 182.7 119.9 181.9 124.7 182C124.7 182 126.1 182.7 126.2 183.6z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M125.4 202.2C125.4 202.2 116.88 199.409 98.4 202.8C98.4 202.8 107.431 200.722 126.2 203C136.5 204.25 125.4 202.2 125.4 202.2z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M127.498 202.129C127.498 202.129 119.252 198.611 100.547 200.392C100.547 200.392 109.725 199.103 128.226 202.995C138.38 205.131 127.498 202.129 127.498 202.129z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M129.286 202.222C129.286 202.222 121.324 198.101 102.539 198.486C102.539 198.486 111.787 197.882 129.948 203.14C139.914 206.025 129.286 202.222 129.286 202.222z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M130.556 202.445C130.556 202.445 123.732 198.138 106.858 197.04C106.858 197.04 115.197 197.21 131.078 203.319C139.794 206.672 130.556 202.445 130.556 202.445z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M245.84 212.961C245.84 212.961 244.91 213.605 245.124 212.424C245.339 211.243 273.547 198.073 277.161 198.323C277.161 198.323 246.913 211.529 245.84 212.961z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M242.446 213.6C242.446 213.6 241.57 214.315 241.691 213.121C241.812 211.927 268.899 196.582 272.521 196.548C272.521 196.548 243.404 212.089 242.446 213.6z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M239.16 214.975C239.16 214.975 238.332 215.747 238.374 214.547C238.416 213.348 258.233 197.851 268.045 195.977C268.045 195.977 250.015 204.104 239.16 214.975z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M236.284 216.838C236.284 216.838 235.539 217.532 235.577 216.453C235.615 215.373 253.449 201.426 262.28 199.74C262.28 199.74 246.054 207.054 236.284 216.838z"/> - </g> - <g style="fill: #cccccc"> - <path d="M204.6 364.801C204.6 364.801 189.4 362.401 206.2 360.801C206.2 360.801 224.2 358.801 228.2 353.601C228.2 353.601 241.8 344.401 244.6 344.001C247.4 343.601 263.8 340.001 264.2 337.601C264.6 335.201 270.6 332.801 272.2 333.601C273.8 334.401 273.8 343.601 271 344.401C268.2 345.201 249.4 352.401 243 353.601C236.6 354.801 225 362.401 220.2 363.601C215.4 364.801 204.6 364.801 204.6 364.801z"/> - </g> - <g style="fill: #000000"> - <path d="M277.6 327.401C277.6 327.401 274.6 329.001 273.4 331.601C273.4 331.601 267 342.201 252.8 345.401C252.8 345.401 229.8 354.401 222 356.401C222 356.401 208.6 361.401 201.2 360.601C201.2 360.601 194.2 360.801 200.4 362.401C200.4 362.401 220.6 360.401 224 358.601C224 358.601 239.6 353.401 242.6 350.801C245.6 348.201 263.8 343.201 266 341.201C268.2 339.201 278 330.801 277.6 327.401z"/> - </g> - <g style="fill: #000000"> - <path d="M218.882 358.911C218.882 358.911 224.111 358.685 222.958 360.234C221.805 361.784 219.357 360.91 219.357 360.91L218.882 358.911z"/> - </g> - <g style="fill: #000000"> - <path d="M211.68 360.263C211.68 360.263 216.908 360.037 215.756 361.586C214.603 363.136 212.155 362.263 212.155 362.263L211.68 360.263z"/> - </g> - <g style="fill: #000000"> - <path d="M201.251 361.511C201.251 361.511 206.48 361.284 205.327 362.834C204.174 364.383 201.726 363.51 201.726 363.51L201.251 361.511z"/> - </g> - <g style="fill: #000000"> - <path d="M193.617 362.055C193.617 362.055 198.846 361.829 197.693 363.378C196.54 364.928 194.092 364.054 194.092 364.054L193.617 362.055z"/> - </g> - <g style="fill: #000000"> - <path d="M235.415 351.513C235.415 351.513 242.375 351.212 240.84 353.274C239.306 355.336 236.047 354.174 236.047 354.174L235.415 351.513z"/> - </g> - <g style="fill: #000000"> - <path d="M245.73 347.088C245.73 347.088 251.689 343.787 251.155 348.849C250.885 351.405 246.362 349.749 246.362 349.749L245.73 347.088z"/> - </g> - <g style="fill: #000000"> - <path d="M254.862 344.274C254.862 344.274 262.021 340.573 260.287 346.035C259.509 348.485 255.493 346.935 255.493 346.935L254.862 344.274z"/> - </g> - <g style="fill: #000000"> - <path d="M264.376 339.449C264.376 339.449 268.735 334.548 269.801 341.21C270.207 343.748 265.008 342.11 265.008 342.11L264.376 339.449z"/> - </g> - <g style="fill: #000000"> - <path d="M226.834 355.997C226.834 355.997 232.062 355.77 230.91 357.32C229.757 358.869 227.308 357.996 227.308 357.996L226.834 355.997z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M262.434 234.603C262.434 234.603 261.708 235.268 261.707 234.197C261.707 233.127 279.191 219.863 288.034 218.479C288.034 218.479 271.935 225.208 262.434 234.603z"/> - </g> - <g style="fill: #000000"> - <path d="M265.4 298.4C265.4 298.4 287.401 320.801 296.601 324.401C296.601 324.401 305.801 335.601 301.801 361.601C301.801 361.601 298.601 369.201 295.401 348.401C295.401 348.401 298.601 323.201 287.401 339.201C287.401 339.201 279 329.301 285.4 329.601C285.4 329.601 288.601 331.601 289.001 330.001C289.401 328.401 281.4 314.801 264.2 300.4C247 286 265.4 298.4 265.4 298.4z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M207 337.201C207 337.201 206.8 335.401 208.6 336.201C210.4 337.001 304.601 343.201 336.201 367.201C336.201 367.201 291.001 344.001 207 337.201z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M217.4 332.801C217.4 332.801 217.2 331.001 219 331.801C220.8 332.601 357.401 331.601 381.001 364.001C381.001 364.001 359.001 338.801 217.4 332.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M229 328.801C229 328.801 228.8 327.001 230.6 327.801C232.4 328.601 405.801 315.601 429.401 348.001C429.401 348.001 419.801 322.401 229 328.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M239 324.001C239 324.001 238.8 322.201 240.6 323.001C242.4 323.801 364.601 285.2 388.201 317.601C388.201 317.601 374.801 293 239 324.001z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M181 346.801C181 346.801 180.8 345.001 182.6 345.801C184.4 346.601 202.2 348.801 204.2 387.601C204.2 387.601 197 345.601 181 346.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M172.2 348.401C172.2 348.401 172 346.601 173.8 347.401C175.6 348.201 189.8 343.601 187 382.401C187 382.401 188.2 347.201 172.2 348.401z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M164.2 348.801C164.2 348.801 164 347.001 165.8 347.801C167.6 348.601 183 349.201 170.6 371.601C170.6 371.601 180.2 347.601 164.2 348.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M211.526 304.465C211.526 304.465 211.082 306.464 212.631 305.247C228.699 292.622 261.141 233.72 316.826 228.086C316.826 228.086 278.518 215.976 211.526 304.465z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M222.726 302.665C222.726 302.665 221.363 301.472 223.231 300.847C225.099 300.222 337.541 227.72 376.826 235.686C376.826 235.686 349.719 228.176 222.726 302.665z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M201.885 308.767C201.885 308.767 201.376 310.366 203.087 309.39C212.062 304.27 215.677 247.059 259.254 245.804C259.254 245.804 226.843 231.09 201.885 308.767z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M181.962 319.793C181.962 319.793 180.885 321.079 182.838 320.825C193.084 319.493 214.489 278.222 258.928 283.301C258.928 283.301 226.962 268.955 181.962 319.793z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M193.2 313.667C193.2 313.667 192.389 315.136 194.258 314.511C204.057 311.237 217.141 266.625 261.729 263.078C261.729 263.078 227.603 255.135 193.2 313.667z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M174.922 324.912C174.922 324.912 174.049 325.954 175.631 325.748C183.93 324.669 201.268 291.24 237.264 295.354C237.264 295.354 211.371 283.734 174.922 324.912z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M167.323 330.821C167.323 330.821 166.318 331.866 167.909 331.748C172.077 331.439 202.715 298.36 221.183 313.862C221.183 313.862 209.168 295.139 167.323 330.821z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M236.855 298.898C236.855 298.898 235.654 297.543 237.586 297.158C239.518 296.774 360.221 239.061 398.184 251.927C398.184 251.927 372.243 241.053 236.855 298.898z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M203.4 363.201C203.4 363.201 203.2 361.401 205 362.201C206.8 363.001 222.2 363.601 209.8 386.001C209.8 386.001 219.4 362.001 203.4 363.201z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M213.8 361.601C213.8 361.601 213.6 359.801 215.4 360.601C217.2 361.401 235 363.601 237 402.401C237 402.401 229.8 360.401 213.8 361.601z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M220.6 360.001C220.6 360.001 220.4 358.201 222.2 359.001C224 359.801 248.6 363.201 272.2 395.601C272.2 395.601 236.6 358.801 220.6 360.001z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M228.225 357.972C228.225 357.972 227.788 356.214 229.678 356.768C231.568 357.322 252.002 355.423 290.099 389.599C290.099 389.599 243.924 354.656 228.225 357.972z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M238.625 353.572C238.625 353.572 238.188 351.814 240.078 352.368C241.968 352.922 276.802 357.423 328.499 392.399C328.499 392.399 254.324 350.256 238.625 353.572z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M198.2 342.001C198.2 342.001 198 340.201 199.8 341.001C201.6 341.801 255 344.401 285.4 371.201C285.4 371.201 250.499 346.426 198.2 342.001z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M188.2 346.001C188.2 346.001 188 344.201 189.8 345.001C191.6 345.801 216.2 349.201 239.8 381.601C239.8 381.601 204.2 344.801 188.2 346.001z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M249.503 348.962C249.503 348.962 248.938 347.241 250.864 347.655C252.79 348.068 287.86 350.004 341.981 381.098C341.981 381.098 264.317 346.704 249.503 348.962z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M257.903 346.562C257.903 346.562 257.338 344.841 259.264 345.255C261.19 345.668 296.26 347.604 350.381 378.698C350.381 378.698 273.317 343.904 257.903 346.562z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M267.503 341.562C267.503 341.562 266.938 339.841 268.864 340.255C270.79 340.668 313.86 345.004 403.582 379.298C403.582 379.298 282.917 338.904 267.503 341.562z"/> - </g> - <g style="fill: #000000"> - <path d="M156.2 348.401C156.2 348.401 161.4 348.001 160.2 349.601C159 351.201 156.6 350.401 156.6 350.401L156.2 348.401z"/> - </g> - <g style="fill: #000000"> - <path d="M187 362.401C187 362.401 192.2 362.001 191 363.601C189.8 365.201 187.4 364.401 187.4 364.401L187 362.401z"/> - </g> - <g style="fill: #000000"> - <path d="M178.2 362.001C178.2 362.001 183.4 361.601 182.2 363.201C181 364.801 178.6 364.001 178.6 364.001L178.2 362.001z"/> - </g> - <g style="fill: #000000"> - <path d="M82.831 350.182C82.831 350.182 87.876 351.505 86.218 352.624C84.561 353.744 82.554 352.202 82.554 352.202L82.831 350.182z"/> - </g> - <g style="fill: #000000"> - <path d="M84.831 340.582C84.831 340.582 89.876 341.905 88.218 343.024C86.561 344.144 84.554 342.602 84.554 342.602L84.831 340.582z"/> - </g> - <g style="fill: #000000"> - <path d="M77.631 336.182C77.631 336.182 82.676 337.505 81.018 338.624C79.361 339.744 77.354 338.202 77.354 338.202L77.631 336.182z"/> - </g> - <g style="fill: #cccccc"> - <path d="M157.4 411.201C157.4 411.201 155.8 411.201 151.8 413.201C149.8 413.201 138.6 416.801 133 426.801C133 426.801 145.4 417.201 157.4 411.201z"/> - </g> - <g style="fill: #cccccc"> - <path d="M245.116 503.847C245.257 504.105 245.312 504.525 245.604 504.542C246.262 504.582 247.495 504.883 247.37 504.247C246.522 499.941 245.648 495.004 241.515 493.197C240.876 492.918 239.434 493.331 239.36 494.215C239.233 495.739 239.116 497.088 239.425 498.554C239.725 499.975 241.883 499.985 242.8 498.601C243.736 500.273 244.168 502.116 245.116 503.847z"/> - </g> - <g style="fill: #cccccc"> - <path d="M234.038 508.581C234.786 509.994 234.659 511.853 236.074 512.416C236.814 512.71 238.664 511.735 238.246 510.661C237.444 508.6 237.056 506.361 235.667 504.55C235.467 504.288 235.707 503.755 235.547 503.427C234.953 502.207 233.808 501.472 232.4 501.801C231.285 504.004 232.433 506.133 233.955 507.842C234.091 507.994 233.925 508.37 234.038 508.581z"/> - </g> - <g style="fill: #cccccc"> - <path d="M194.436 503.391C194.328 503.014 194.29 502.551 194.455 502.23C194.986 501.197 195.779 500.075 195.442 499.053C195.094 497.997 193.978 498.179 193.328 498.748C192.193 499.742 192.144 501.568 191.453 502.927C191.257 503.313 191.308 503.886 190.867 504.277C190.393 504.698 189.953 506.222 190.049 506.793C190.102 507.106 189.919 517.014 190.141 516.751C190.76 516.018 193.81 506.284 193.879 505.392C193.936 504.661 194.668 504.196 194.436 503.391z"/> - </g> - <g style="fill: #cccccc"> - <path d="M168.798 496.599C171.432 494.1 174.222 491.139 173.78 487.427C173.664 486.451 171.889 486.978 171.702 487.824C170.9 491.449 168.861 494.11 166.293 496.502C164.097 498.549 162.235 504.893 162 505.401C165.697 500.145 167.954 497.399 168.798 496.599z"/> - </g> - <g style="fill: #cccccc"> - <path d="M155.224 490.635C155.747 490.265 155.445 489.774 155.662 489.442C156.615 487.984 157.916 486.738 157.934 485C157.937 484.723 157.559 484.414 157.224 484.638C156.947 484.822 156.605 484.952 156.497 485.082C154.467 487.531 153.067 490.202 151.624 493.014C151.441 493.371 150.297 497.862 150.61 497.973C150.849 498.058 152.569 493.877 152.779 493.763C154.042 493.077 154.054 491.462 155.224 490.635z"/> - </g> - <g style="fill: #cccccc"> - <path d="M171.957 510.179C172.401 509.31 173.977 508.108 173.864 507.219C173.746 506.291 174.214 504.848 173.302 505.536C172.045 506.484 168.596 507.833 168.326 513.641C168.3 514.212 171.274 511.519 171.957 510.179z"/> - </g> - <g style="fill: #cccccc"> - <path d="M186.4 493.001C186.8 492.333 187.508 492.806 187.967 492.543C188.615 492.171 189.226 491.613 189.518 490.964C190.488 488.815 192.257 486.995 192.4 484.601C190.909 483.196 190.23 485.236 189.6 486.201C188.277 484.554 187.278 486.428 185.978 486.947C185.908 486.975 185.695 486.628 185.62 486.655C184.443 487.095 183.763 488.176 182.765 488.957C182.594 489.091 182.189 488.911 182.042 489.047C181.39 489.65 180.417 489.975 180.137 490.657C179.027 493.364 175.887 495.459 174 503.001C174.381 503.91 178.512 496.359 178.999 495.661C179.835 494.465 179.953 497.322 181.229 496.656C181.28 496.629 181.466 496.867 181.6 497.001C181.794 496.721 182.012 496.492 182.4 496.601C182.4 496.201 182.266 495.645 182.467 495.486C183.704 494.509 183.62 493.441 184.4 492.201C184.858 492.99 185.919 492.271 186.4 493.001z"/> - </g> - <g style="fill: #cccccc"> - <path d="M246.2 547.401C246.2 547.401 253.6 527.001 249.2 515.801C249.2 515.801 260.6 537.401 256 548.601C256 548.601 255.6 538.201 251.6 533.201C251.6 533.201 247.6 546.001 246.2 547.401z"/> - </g> - <g style="fill: #cccccc"> - <path d="M231.4 544.801C231.4 544.801 236.8 536.001 228.8 517.601C228.8 517.601 228 538.001 221.2 549.001C221.2 549.001 235.4 528.801 231.4 544.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M221.4 542.801C221.4 542.801 221.2 522.801 221.6 519.801C221.6 519.801 217.8 536.401 207.6 546.001C207.6 546.001 222 534.001 221.4 542.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M211.8 510.801C211.8 510.801 217.8 524.401 207.8 542.801C207.8 542.801 214.2 530.601 209.4 523.601C209.4 523.601 212 520.201 211.8 510.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M192.6 542.401C192.6 542.401 191.6 526.801 193.4 524.601C193.4 524.601 193.6 518.201 193.2 517.201C193.2 517.201 197.2 511.001 197.4 518.401C197.4 518.401 198.8 526.201 201.6 530.801C201.6 530.801 205.2 536.201 205 542.601C205 542.601 195 512.401 192.6 542.401z"/> - </g> - <g style="fill: #cccccc"> - <path d="M189 514.801C189 514.801 182.4 525.601 180.6 544.601C180.6 544.601 179.2 538.401 183 524.001C183 524.001 187.2 508.601 189 514.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M167.2 534.601C167.2 534.601 172.2 529.201 173.6 524.201C173.6 524.201 177.2 508.401 170.8 517.001C170.8 517.001 171 525.001 162.8 532.401C162.8 532.401 167.6 530.001 167.2 534.601z"/> - </g> - <g style="fill: #cccccc"> - <path d="M161.4 529.601C161.4 529.601 164.8 512.201 165.6 511.401C165.6 511.401 167.4 508.001 164.6 511.201C164.6 511.201 155.8 530.401 151.8 537.001C151.8 537.001 159.8 527.801 161.4 529.601z"/> - </g> - <g style="fill: #cccccc"> - <path d="M155.6 513.001C155.6 513.001 167.2 490.601 145.4 516.401C145.4 516.401 156.4 506.601 155.6 513.001z"/> - </g> - <g style="fill: #cccccc"> - <path d="M140.2 498.401C140.2 498.401 145 479.601 147.6 479.801C147.6 479.801 155.8 470.801 149.2 481.401C149.2 481.401 143.2 491.001 143.8 500.801C143.8 500.801 143.2 491.201 140.2 498.401z"/> - </g> - <g style="fill: #cccccc"> - <path d="M470.5 487C470.5 487 458.5 477 456 473.5C456 473.5 469.5 492 469.5 499C469.5 499 472 491.5 470.5 487z"/> - </g> - <g style="fill: #cccccc"> - <path d="M476 465C476 465 455 450 451.5 442.5C451.5 442.5 478 472 478 476.5C478 476.5 478.5 467.5 476 465z"/> - </g> - <g style="fill: #cccccc"> - <path d="M493 311C493 311 481 303 479.5 305C479.5 305 490 311.5 492.5 320C492.5 320 491 311 493 311z"/> - </g> - <g style="fill: #cccccc"> - <path d="M501.5 391.5L484 379.5C484 379.5 503 396.5 503.5 400.5L501.5 391.5z"/> - </g> - <g style="stroke:#000000"> - <path d="M110.75 369L132.75 373.75"/> - </g> - <g style="stroke:#000000"> - <path d="M161 531C161 531 160.5 527.5 151.5 538"/> - </g> - <g style="stroke:#000000"> - <path d="M166.5 536C166.5 536 168.5 529.5 162 534"/> - </g> - <g style="stroke:#000000"> - <path d="M220.5 544.5C220.5 544.5 222 533.5 210.5 546.5"/> - </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M77.696 284.285C77.696 284.285 77.797 286.179 76.973 286.16C76.149 286.141 59.695 238.066 39.167 240.309C39.167 240.309 56.95 232.956 77.696 284.285z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M81.226 281.262C81.226 281.262 80.677 283.078 79.908 282.779C79.14 282.481 80.023 231.675 59.957 226.801C59.957 226.801 79.18 225.937 81.226 281.262z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M108.716 323.59C108.716 323.59 110.352 324.55 109.882 325.227C109.411 325.904 60.237 313.102 50.782 331.459C50.782 331.459 54.461 312.572 108.716 323.59z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M105.907 333.801C105.907 333.801 107.763 334.197 107.529 334.988C107.296 335.779 56.593 339.121 53.403 359.522C53.403 359.522 50.945 340.437 105.907 333.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M101.696 328.276C101.696 328.276 103.474 328.939 103.128 329.687C102.782 330.435 52.134 326.346 46.002 346.064C46.002 346.064 46.354 326.825 101.696 328.276z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M90.991 310.072C90.991 310.072 92.299 311.446 91.66 311.967C91.021 312.488 47.278 286.634 33.131 301.676C33.131 301.676 41.872 284.533 90.991 310.072z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M83.446 314.263C83.446 314.263 84.902 315.48 84.326 316.071C83.75 316.661 37.362 295.922 25.008 312.469C25.008 312.469 31.753 294.447 83.446 314.263z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M80.846 318.335C80.846 318.335 82.454 319.343 81.964 320.006C81.474 320.669 32.692 306.446 22.709 324.522C22.709 324.522 26.934 305.749 80.846 318.335z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M91.58 318.949C91.58 318.949 92.702 320.48 92.001 320.915C91.3 321.35 51.231 290.102 35.273 303.207C35.273 303.207 46.138 287.326 91.58 318.949z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M71.8 290C71.8 290 72.4 291.8 71.6 292C70.8 292.2 42.2 250.2 22.999 257.8C22.999 257.8 38.2 246 71.8 290z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M72.495 296.979C72.495 296.979 73.47 298.608 72.731 298.975C71.993 299.343 35.008 264.499 17.899 276.061C17.899 276.061 30.196 261.261 72.495 296.979z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M72.38 301.349C72.38 301.349 73.502 302.88 72.801 303.315C72.1 303.749 32.031 272.502 16.073 285.607C16.073 285.607 26.938 269.726 72.38 301.349z"/> + </g> + <g style="fill: #ffffff; stroke:#000000"> + <path d="M70.17 303.065C70.673 309.113 71.661 315.682 73.4 318.801C73.4 318.801 69.8 331.201 78.6 344.401C78.6 344.401 78.2 351.601 79.8 354.801C79.8 354.801 83.8 363.201 88.6 364.001C92.484 364.648 101.207 367.717 111.068 369.121C111.068 369.121 128.2 383.201 125 396.001C125 396.001 124.6 412.401 121 414.001C121 414.001 132.6 402.801 123 419.601L118.6 438.401C118.6 438.401 144.2 416.801 128.6 435.201L118.6 461.201C118.6 461.201 138.2 442.801 131 451.201L127.8 460.001C127.8 460.001 171 432.801 140.2 462.401C140.2 462.401 148.2 458.801 152.6 461.601C152.6 461.601 159.4 460.401 158.6 462.001C158.6 462.001 137.8 472.401 134.2 490.801C134.2 490.801 142.6 480.801 139.4 491.601L139.8 503.201C139.8 503.201 143.8 481.601 143.4 519.201C143.4 519.201 162.6 501.201 151 522.001L151 538.801C151 538.801 166.2 522.401 159.8 535.201C159.8 535.201 169.8 526.401 165.8 541.601C165.8 541.601 165 552.001 169.4 540.801C169.4 540.801 185.4 510.201 179.4 536.401C179.4 536.401 178.6 555.601 183.4 540.801C183.4 540.801 183.8 551.201 193 558.401C193 558.401 191.8 507.601 204.6 543.601L208.6 560.001C208.6 560.001 211.4 550.801 211 545.601C211 545.601 225.8 529.201 219 553.601C219 553.601 234.2 530.801 231 544.001C231 544.001 223.4 560.001 225 564.801C225 564.801 241.8 530.001 243 528.401C243 528.401 241 570.802 251.8 534.801C251.8 534.801 257.4 546.801 254.6 551.201C254.6 551.201 262.6 543.201 261.8 540.001C261.8 540.001 266.4 531.801 269.2 545.401C269.2 545.401 271 554.801 272.6 551.601C272.6 551.601 276.6 575.602 277.8 552.801C277.8 552.801 279.4 539.201 272.2 527.601C272.2 527.601 273 524.401 270.2 520.401C270.2 520.401 283.8 542.001 276.6 513.201C276.6 513.201 287.801 521.201 289.001 521.201C289.001 521.201 275.4 498.001 284.2 502.801C284.2 502.801 279 492.401 297.001 504.401C297.001 504.401 281 488.401 298.601 498.001C298.601 498.001 306.601 504.401 299.001 494.401C299.001 494.401 284.6 478.401 306.601 496.401C306.601 496.401 318.201 512.801 319.001 515.601C319.001 515.601 309.001 486.401 304.601 483.601C304.601 483.601 313.001 447.201 354.201 462.801C354.201 462.801 361.001 480.001 365.401 461.601C365.401 461.601 378.201 455.201 389.401 482.801C389.401 482.801 393.401 469.201 392.601 466.401C392.601 466.401 399.401 467.601 398.601 466.401C398.601 466.401 411.801 470.801 413.001 470.001C413.001 470.001 419.801 476.801 420.201 473.201C420.201 473.201 429.401 476.001 427.401 472.401C427.401 472.401 436.201 488.001 436.601 491.601L439.001 477.601L441.001 480.401C441.001 480.401 442.601 472.801 441.801 471.601C441.001 470.401 461.801 478.401 466.601 499.201L468.601 507.601C468.601 507.601 474.601 492.801 473.001 488.801C473.001 488.801 478.201 489.601 478.601 494.001C478.601 494.001 482.601 470.801 477.801 464.801C477.801 464.801 482.201 464.001 483.401 467.601L483.401 460.401C483.401 460.401 490.601 461.201 490.601 458.801C490.601 458.801 495.001 454.801 497.001 459.601C497.001 459.601 484.601 424.401 503.001 443.601C503.001 443.601 510.201 454.401 506.601 435.601C503.001 416.801 499.001 415.201 503.801 414.801C503.801 414.801 504.601 411.201 502.601 409.601C500.601 408.001 503.801 409.601 503.801 409.601C503.801 409.601 508.601 413.601 503.401 391.601C503.401 391.601 509.801 393.201 497.801 364.001C497.801 364.001 500.601 361.601 496.601 353.201C496.601 353.201 504.601 357.601 507.401 356.001C507.401 356.001 507.001 354.401 503.801 350.401C503.801 350.401 482.201 295.6 502.601 317.601C502.601 317.601 514.451 331.151 508.051 308.351C508.051 308.351 498.94 284.341 499.717 280.045L70.17 303.065z"/> + </g> + <g style="fill: #cc7226; stroke:#000000"> + <path d="M499.717 280.245C500.345 280.426 502.551 281.55 503.801 283.2C503.801 283.2 510.601 294 505.401 275.6C505.401 275.6 496.201 246.8 505.001 258C505.001 258 511.001 265.2 507.801 251.6C503.936 235.173 501.401 228.8 501.401 228.8C501.401 228.8 513.001 233.6 486.201 194L495.001 197.6C495.001 197.6 475.401 158 453.801 152.8L445.801 146.8C445.801 146.8 484.201 108.8 471.401 72C471.401 72 464.601 66.8 455.001 76C455.001 76 448.601 80.8 442.601 79.2C442.601 79.2 411.801 80.4 409.801 80.4C407.801 80.4 373.001 43.2 307.401 60.8C307.401 60.8 302.201 62.8 297.801 61.6C297.801 61.6 279.4 45.6 230.6 68.4C230.6 68.4 220.6 70.4 219 70.4C217.4 70.4 214.6 70.4 206.6 76.8C198.6 83.2 198.2 84 196.2 85.6C196.2 85.6 179.8 96.8 175 97.6C175 97.6 163.4 104 159 114L155.4 115.2C155.4 115.2 153.8 122.4 153.4 123.6C153.4 123.6 148.6 127.2 147.8 132.8C147.8 132.8 139 138.8 139.4 143.2C139.4 143.2 137.8 148.4 137 153.2C137 153.2 129.8 158 130.6 160.8C130.6 160.8 123 174.8 124.2 181.6C124.2 181.6 117.8 181.2 115 183.6C115 183.6 114.2 188.4 112.6 188.8C112.6 188.8 109.8 190 112.2 194C112.2 194 110.6 196.8 110.2 198.4C110.2 198.4 111 201.2 106.6 206.8C106.6 206.8 100.2 225.6 102.2 230.8C102.2 230.8 102.6 235.6 99.8 237.2C99.8 237.2 96.2 236.8 104.6 248.8C104.6 248.8 105.4 250 102.2 252.4C102.2 252.4 85 256 82.6 272.4C82.6 272.4 69 287.2 69 292.4C69 294.705 69.271 297.852 69.97 302.465C69.97 302.465 69.4 310.801 97 311.601C124.6 312.401 499.717 280.245 499.717 280.245z"/> + </g> + <g style="fill: #cc7226"> + <path d="M84.4 302.6C59.4 263.2 73.8 319.601 73.8 319.601C82.6 354.001 212.2 316.401 212.2 316.401C212.2 316.401 381.001 286 392.201 282C403.401 278 498.601 284.4 498.601 284.4L493.001 267.6C428.201 221.2 409.001 244.4 395.401 240.4C381.801 236.4 384.201 246 381.001 246.8C377.801 247.6 338.601 222.8 332.201 223.6C325.801 224.4 300.459 200.649 315.401 232.4C331.401 266.4 257 271.6 240.2 260.4C223.4 249.2 247.4 278.8 247.4 278.8C265.8 298.8 231.4 282 231.4 282C197 269.2 173 294.8 169.8 295.6C166.6 296.4 161.8 299.6 161 293.2C160.2 286.8 152.69 270.099 121 296.4C101 313.001 87.2 291 87.2 291L84.4 302.6z"/> + </g> + <g style="fill: #e87f3a"> + <path d="M333.51 225.346C327.11 226.146 301.743 202.407 316.71 234.146C333.31 269.346 258.31 273.346 241.51 262.146C224.709 250.946 248.71 280.546 248.71 280.546C267.11 300.546 232.709 283.746 232.709 283.746C198.309 270.946 174.309 296.546 171.109 297.346C167.909 298.146 163.109 301.346 162.309 294.946C161.509 288.546 154.13 272.012 122.309 298.146C101.073 315.492 87.582 294.037 87.582 294.037L84.382 304.146C59.382 264.346 74.454 322.655 74.454 322.655C83.255 357.056 213.509 318.146 213.509 318.146C213.509 318.146 382.31 287.746 393.51 283.746C404.71 279.746 499.038 286.073 499.038 286.073L493.51 268.764C428.71 222.364 410.31 246.146 396.71 242.146C383.11 238.146 385.51 247.746 382.31 248.546C379.11 249.346 339.91 224.546 333.51 225.346z"/> + </g> + <g style="fill: #ea8c4d"> + <path d="M334.819 227.091C328.419 227.891 303.685 203.862 318.019 235.891C334.219 272.092 259.619 275.092 242.819 263.892C226.019 252.692 250.019 282.292 250.019 282.292C268.419 302.292 234.019 285.492 234.019 285.492C199.619 272.692 175.618 298.292 172.418 299.092C169.218 299.892 164.418 303.092 163.618 296.692C162.818 290.292 155.57 273.925 123.618 299.892C101.145 317.983 87.964 297.074 87.964 297.074L84.364 305.692C60.564 266.692 75.109 325.71 75.109 325.71C83.909 360.11 214.819 319.892 214.819 319.892C214.819 319.892 383.619 289.492 394.819 285.492C406.019 281.492 499.474 287.746 499.474 287.746L494.02 269.928C429.219 223.528 411.619 247.891 398.019 243.891C384.419 239.891 386.819 249.491 383.619 250.292C380.419 251.092 341.219 226.291 334.819 227.091z"/> + </g> + <g style="fill: #ec9961"> + <path d="M336.128 228.837C329.728 229.637 304.999 205.605 319.328 237.637C336.128 275.193 260.394 276.482 244.128 265.637C227.328 254.437 251.328 284.037 251.328 284.037C269.728 304.037 235.328 287.237 235.328 287.237C200.928 274.437 176.928 300.037 173.728 300.837C170.528 301.637 165.728 304.837 164.928 298.437C164.128 292.037 157.011 275.839 124.927 301.637C101.218 320.474 88.345 300.11 88.345 300.11L84.345 307.237C62.545 270.437 75.764 328.765 75.764 328.765C84.564 363.165 216.128 321.637 216.128 321.637C216.128 321.637 384.928 291.237 396.129 287.237C407.329 283.237 499.911 289.419 499.911 289.419L494.529 271.092C429.729 224.691 412.929 249.637 399.329 245.637C385.728 241.637 388.128 251.237 384.928 252.037C381.728 252.837 342.528 228.037 336.128 228.837z"/> + </g> + <g style="fill: #eea575"> + <path d="M337.438 230.583C331.037 231.383 306.814 207.129 320.637 239.383C337.438 278.583 262.237 278.583 245.437 267.383C228.637 256.183 252.637 285.783 252.637 285.783C271.037 305.783 236.637 288.983 236.637 288.983C202.237 276.183 178.237 301.783 175.037 302.583C171.837 303.383 167.037 306.583 166.237 300.183C165.437 293.783 158.452 277.752 126.237 303.383C101.291 322.965 88.727 303.146 88.727 303.146L84.327 308.783C64.527 273.982 76.418 331.819 76.418 331.819C85.218 366.22 217.437 323.383 217.437 323.383C217.437 323.383 386.238 292.983 397.438 288.983C408.638 284.983 500.347 291.092 500.347 291.092L495.038 272.255C430.238 225.855 414.238 251.383 400.638 247.383C387.038 243.383 389.438 252.983 386.238 253.783C383.038 254.583 343.838 229.783 337.438 230.583z"/> + </g> + <g style="fill: #f1b288"> + <path d="M338.747 232.328C332.347 233.128 306.383 209.677 321.947 241.128C341.147 279.928 263.546 280.328 246.746 269.128C229.946 257.928 253.946 287.528 253.946 287.528C272.346 307.528 237.946 290.728 237.946 290.728C203.546 277.928 179.546 303.528 176.346 304.328C173.146 305.128 168.346 308.328 167.546 301.928C166.746 295.528 159.892 279.665 127.546 305.128C101.364 325.456 89.109 306.183 89.109 306.183L84.309 310.328C66.309 277.128 77.073 334.874 77.073 334.874C85.873 369.274 218.746 325.128 218.746 325.128C218.746 325.128 387.547 294.728 398.747 290.728C409.947 286.728 500.783 292.764 500.783 292.764L495.547 273.419C430.747 227.019 415.547 253.128 401.947 249.128C388.347 245.128 390.747 254.728 387.547 255.528C384.347 256.328 345.147 231.528 338.747 232.328z"/> + </g> + <g style="fill: #f3bf9c"> + <path d="M340.056 234.073C333.655 234.873 307.313 211.613 323.255 242.873C343.656 282.874 264.855 282.074 248.055 270.874C231.255 259.674 255.255 289.274 255.255 289.274C273.655 309.274 239.255 292.474 239.255 292.474C204.855 279.674 180.855 305.274 177.655 306.074C174.455 306.874 169.655 310.074 168.855 303.674C168.055 297.274 161.332 281.578 128.855 306.874C101.436 327.947 89.491 309.219 89.491 309.219L84.291 311.874C68.291 281.674 77.727 337.929 77.727 337.929C86.527 372.329 220.055 326.874 220.055 326.874C220.055 326.874 388.856 296.474 400.056 292.474C411.256 288.474 501.22 294.437 501.22 294.437L496.056 274.583C431.256 228.183 416.856 254.874 403.256 250.874C389.656 246.873 392.056 256.474 388.856 257.274C385.656 258.074 346.456 233.273 340.056 234.073z"/> + </g> + <g style="fill: #f5ccb0"> + <path d="M341.365 235.819C334.965 236.619 307.523 213.944 324.565 244.619C346.565 284.219 266.164 283.819 249.364 272.619C232.564 261.419 256.564 291.019 256.564 291.019C274.964 311.019 240.564 294.219 240.564 294.219C206.164 281.419 182.164 307.019 178.964 307.819C175.764 308.619 170.964 311.819 170.164 305.419C169.364 299.019 162.773 283.492 130.164 308.619C101.509 330.438 89.873 312.256 89.873 312.256L84.273 313.419C69.872 285.019 78.382 340.983 78.382 340.983C87.182 375.384 221.364 328.619 221.364 328.619C221.364 328.619 390.165 298.219 401.365 294.219C412.565 290.219 501.656 296.11 501.656 296.11L496.565 275.746C431.765 229.346 418.165 256.619 404.565 252.619C390.965 248.619 393.365 258.219 390.165 259.019C386.965 259.819 347.765 235.019 341.365 235.819z"/> + </g> + <g style="fill: #f8d8c4"> + <path d="M342.674 237.565C336.274 238.365 308.832 215.689 325.874 246.365C347.874 285.965 267.474 285.565 250.674 274.365C233.874 263.165 257.874 292.765 257.874 292.765C276.274 312.765 241.874 295.965 241.874 295.965C207.473 283.165 183.473 308.765 180.273 309.565C177.073 310.365 172.273 313.565 171.473 307.165C170.673 300.765 164.214 285.405 131.473 310.365C101.582 332.929 90.255 315.293 90.255 315.293L84.255 314.965C70.654 288.564 79.037 344.038 79.037 344.038C87.837 378.438 222.673 330.365 222.673 330.365C222.673 330.365 391.474 299.965 402.674 295.965C413.874 291.965 502.093 297.783 502.093 297.783L497.075 276.91C432.274 230.51 419.474 258.365 405.874 254.365C392.274 250.365 394.674 259.965 391.474 260.765C388.274 261.565 349.074 236.765 342.674 237.565z"/> + </g> + <g style="fill: #fae5d7"> + <path d="M343.983 239.31C337.583 240.11 310.529 217.223 327.183 248.11C349.183 288.91 268.783 287.31 251.983 276.11C235.183 264.91 259.183 294.51 259.183 294.51C277.583 314.51 243.183 297.71 243.183 297.71C208.783 284.91 184.783 310.51 181.583 311.31C178.382 312.11 173.582 315.31 172.782 308.91C171.982 302.51 165.654 287.318 132.782 312.11C101.655 335.42 90.637 318.329 90.637 318.329L84.236 316.51C71.236 292.51 79.691 347.093 79.691 347.093C88.491 381.493 223.983 332.11 223.983 332.11C223.983 332.11 392.783 301.71 403.983 297.71C415.183 293.71 502.529 299.456 502.529 299.456L497.583 278.074C432.783 231.673 420.783 260.11 407.183 256.11C393.583 252.11 395.983 261.71 392.783 262.51C389.583 263.31 350.383 238.51 343.983 239.31z"/> + </g> + <g style="fill: #fcf2eb"> + <path d="M345.292 241.055C338.892 241.855 312.917 218.411 328.492 249.855C349.692 292.656 270.092 289.056 253.292 277.856C236.492 266.656 260.492 296.256 260.492 296.256C278.892 316.256 244.492 299.456 244.492 299.456C210.092 286.656 186.092 312.256 182.892 313.056C179.692 313.856 174.892 317.056 174.092 310.656C173.292 304.256 167.095 289.232 134.092 313.856C101.727 337.911 91.018 321.365 91.018 321.365L84.218 318.056C71.418 294.856 80.346 350.147 80.346 350.147C89.146 384.547 225.292 333.856 225.292 333.856C225.292 333.856 394.093 303.456 405.293 299.456C416.493 295.456 502.965 301.128 502.965 301.128L498.093 279.237C433.292 232.837 422.093 261.856 408.493 257.856C394.893 253.855 397.293 263.456 394.093 264.256C390.892 265.056 351.692 240.255 345.292 241.055z"/> + </g> + <g style="fill: #ffffff"> + <path d="M84.2 319.601C71.4 297.6 81 353.201 81 353.201C89.8 387.601 226.6 335.601 226.6 335.601C226.6 335.601 395.401 305.2 406.601 301.2C417.801 297.2 503.401 302.8 503.401 302.8L498.601 280.4C433.801 234 423.401 263.6 409.801 259.6C396.201 255.6 398.601 265.2 395.401 266C392.201 266.8 353.001 242 346.601 242.8C340.201 243.6 314.981 219.793 329.801 251.6C352.028 299.307 269.041 289.227 254.6 279.6C237.8 268.4 261.8 298 261.8 298C280.2 318.001 245.8 301.2 245.8 301.2C211.4 288.4 187.4 314.001 184.2 314.801C181 315.601 176.2 318.801 175.4 312.401C174.6 306 168.535 291.144 135.4 315.601C101.8 340.401 91.4 324.401 91.4 324.401L84.2 319.601z"/> + </g> + <g style="fill: #000000"> + <path d="M125.8 349.601C125.8 349.601 118.6 361.201 139.4 374.401C139.4 374.401 140.8 375.801 122.8 371.601C122.8 371.601 116.6 369.601 115 359.201C115 359.201 110.2 354.801 105.4 349.201C100.6 343.601 125.8 349.601 125.8 349.601z"/> + </g> + <g style="fill: #cccccc"> + <path d="M265.8 302C265.8 302 283.498 328.821 282.9 333.601C281.6 344.001 281.4 353.601 284.6 357.601C287.801 361.601 296.601 394.801 296.601 394.801C296.601 394.801 296.201 396.001 308.601 358.001C308.601 358.001 320.201 342.001 300.201 323.601C300.201 323.601 265 294.8 265.8 302z"/> + </g> + <g style="fill: #000000"> + <path d="M145.8 376.401C145.8 376.401 157 383.601 142.6 414.801L149 412.401C149 412.401 148.2 423.601 145 426.001L152.2 422.801C152.2 422.801 157 430.801 153 435.601C153 435.601 169.8 443.601 169 450.001C169 450.001 175.4 442.001 171.4 435.601C167.4 429.201 160.2 433.201 161 414.801L152.2 418.001C152.2 418.001 157.8 409.201 157.8 402.801L149.8 405.201C149.8 405.201 165.269 378.623 154.6 377.201C148.6 376.401 145.8 376.401 145.8 376.401z"/> + </g> + <g style="fill: #cccccc"> + <path d="M178.2 393.201C178.2 393.201 181 388.801 178.2 389.601C175.4 390.401 144.2 405.201 138.2 414.801C138.2 414.801 172.6 390.401 178.2 393.201z"/> + </g> + <g style="fill: #cccccc"> + <path d="M188.6 401.201C188.6 401.201 191.4 396.801 188.6 397.601C185.8 398.401 154.6 413.201 148.6 422.801C148.6 422.801 183 398.401 188.6 401.201z"/> + </g> + <g style="fill: #cccccc"> + <path d="M201.8 386.001C201.8 386.001 204.6 381.601 201.8 382.401C199 383.201 167.8 398.001 161.8 407.601C161.8 407.601 196.2 383.201 201.8 386.001z"/> + </g> + <g style="fill: #cccccc"> + <path d="M178.6 429.601C178.6 429.601 178.6 423.601 175.8 424.401C173 425.201 137 442.801 131 452.401C131 452.401 173 426.801 178.6 429.601z"/> + </g> + <g style="fill: #cccccc"> + <path d="M179.8 418.801C179.8 418.801 181 414.001 178.2 414.801C176.2 414.801 149.8 426.401 143.8 436.001C143.8 436.001 173.4 414.401 179.8 418.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M165.4 466.401L155.4 474.001C155.4 474.001 165.8 466.401 169.4 467.601C169.4 467.601 162.6 478.801 161.8 484.001C161.8 484.001 172.2 471.201 177.8 471.601C177.8 471.601 185.4 472.001 185.4 482.801C185.4 482.801 191 472.401 194.2 472.801C194.2 472.801 195.4 479.201 194.2 486.001C194.2 486.001 198.2 478.401 202.2 480.001C202.2 480.001 208.6 478.001 207.8 489.601C207.8 489.601 207.8 500.001 207 502.801C207 502.801 212.6 476.401 215 476.001C215 476.001 223 474.801 227.8 483.601C227.8 483.601 223.8 476.001 228.6 478.001C228.6 478.001 239.4 479.601 242.6 486.401C242.6 486.401 235.8 474.401 241.4 477.601C241.4 477.601 248.2 477.601 249.4 484.001C249.4 484.001 257.8 505.201 259.8 506.801C259.8 506.801 252.2 485.201 253.8 485.201C253.8 485.201 251.8 473.201 257 488.001C257 488.001 253.8 474.001 259.4 474.801C265 475.601 269.4 485.601 277.8 483.201C277.8 483.201 287.401 488.801 289.401 419.601L165.4 466.401z"/> + </g> + <g style="fill: #000000"> + <path d="M170.2 373.601C170.2 373.601 185 367.601 225 373.601C225 373.601 232.2 374.001 239 365.201C245.8 356.401 272.6 349.201 279 351.201L288.601 357.601L289.401 358.801C289.401 358.801 301.801 369.201 302.201 376.801C302.601 384.401 287.801 432.401 278.2 448.401C268.6 464.401 259 476.801 239.8 474.401C239.8 474.401 219 470.401 193.4 474.401C193.4 474.401 164.2 472.801 161.4 464.801C158.6 456.801 172.6 441.601 172.6 441.601C172.6 441.601 177 433.201 175.8 418.801C174.6 404.401 175 376.401 170.2 373.601z"/> + </g> + <g style="fill: #e5668c"> + <path d="M192.2 375.601C200.6 394.001 171 459.201 171 459.201C169 460.801 183.66 466.846 193.8 464.401C204.746 461.763 245 466.001 245 466.001C268.6 450.401 281.4 406.001 281.4 406.001C281.4 406.001 291.801 382.001 274.2 378.801C256.6 375.601 192.2 375.601 192.2 375.601z"/> + </g> + <g style="fill: #b23259"> + <path d="M190.169 406.497C193.495 393.707 195.079 381.906 192.2 375.601C192.2 375.601 254.6 382.001 265.8 361.201C270.041 353.326 284.801 384.001 284.4 393.601C284.4 393.601 221.4 408.001 206.6 396.801L190.169 406.497z"/> + </g> + <g style="fill: #a5264c"> + <path d="M194.6 422.801C194.6 422.801 196.6 430.001 194.2 434.001C194.2 434.001 192.6 434.801 191.4 435.201C191.4 435.201 192.6 438.801 198.6 440.401C198.6 440.401 200.6 444.801 203 445.201C205.4 445.601 210.2 451.201 214.2 450.001C218.2 448.801 229.4 444.801 229.4 444.801C229.4 444.801 235 441.601 243.8 445.201C243.8 445.201 246.175 444.399 246.6 440.401C247.1 435.701 250.2 432.001 252.2 430.001C254.2 428.001 263.8 415.201 262.6 414.801C261.4 414.401 194.6 422.801 194.6 422.801z"/> + </g> + <g style="fill: #ff727f; stroke:#000000"> + <path d="M190.2 374.401C190.2 374.401 187.4 396.801 190.6 405.201C193.8 413.601 193 415.601 192.2 419.601C191.4 423.601 195.8 433.601 201.4 439.601L213.4 441.201C213.4 441.201 228.6 437.601 237.8 440.401C237.8 440.401 246.794 441.744 250.2 426.801C250.2 426.801 255 420.401 262.2 417.601C269.4 414.801 276.6 373.201 272.6 365.201C268.6 357.201 254.2 352.801 238.2 368.401C222.2 384.001 220.2 367.201 190.2 374.401z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M191.8 449.201C191.8 449.201 191 447.201 186.6 446.801C186.6 446.801 164.2 443.201 155.8 430.801C155.8 430.801 149 425.201 153.4 436.801C153.4 436.801 163.8 457.201 170.6 460.001C170.6 460.001 187 464.001 191.8 449.201z"/> + </g> + <g style="fill: #cc3f4c"> + <path d="M271.742 385.229C272.401 377.323 274.354 368.709 272.6 365.201C266.154 352.307 249.181 357.695 238.2 368.401C222.2 384.001 220.2 367.201 190.2 374.401C190.2 374.401 188.455 388.364 189.295 398.376C189.295 398.376 226.6 386.801 227.4 392.401C227.4 392.401 229 389.201 238.2 389.201C247.4 389.201 270.142 388.029 271.742 385.229z"/> + </g> + <g style="stroke:#a51926; stroke-width:2"> + <path d="M228.6 375.201C228.6 375.201 233.4 380.001 229.8 389.601C229.8 389.601 215.4 405.601 217.4 419.601"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M180.6 460.001C180.6 460.001 176.2 447.201 185 454.001C185 454.001 189.8 456.001 188.6 457.601C187.4 459.201 181.8 463.201 180.6 460.001z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M185.64 461.201C185.64 461.201 182.12 450.961 189.16 456.401C189.16 456.401 193.581 458.849 192.04 459.281C187.48 460.561 192.04 463.121 185.64 461.201z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M190.44 461.201C190.44 461.201 186.92 450.961 193.96 456.401C193.96 456.401 198.335 458.711 196.84 459.281C193.48 460.561 196.84 463.121 190.44 461.201z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M197.04 461.401C197.04 461.401 193.52 451.161 200.56 456.601C200.56 456.601 204.943 458.933 203.441 459.481C200.48 460.561 203.441 463.321 197.04 461.401z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M203.52 461.321C203.52 461.321 200 451.081 207.041 456.521C207.041 456.521 210.881 458.121 209.921 459.401C208.961 460.681 209.921 463.241 203.52 461.321z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M210.2 462.001C210.2 462.001 205.4 449.601 214.6 456.001C214.6 456.001 219.4 458.001 218.2 459.601C217 461.201 218.2 464.401 210.2 462.001z"/> + </g> + <g style="stroke:#a5264c; stroke-width:2"> + <path d="M181.8 444.801C181.8 444.801 195 442.001 201 445.201C201 445.201 207 446.401 208.2 446.001C209.4 445.601 212.6 445.201 212.6 445.201"/> + </g> + <g style="stroke:#a5264c; stroke-width:2"> + <path d="M215.8 453.601C215.8 453.601 227.8 440.001 239.8 444.401C246.816 446.974 245.8 443.601 246.6 440.801C247.4 438.001 247.6 433.801 252.6 430.801"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M233 437.601C233 437.601 229 426.801 226.2 439.601C223.4 452.401 220.2 456.001 218.6 458.801C218.6 458.801 218.6 464.001 227 463.601C227 463.601 237.8 463.201 238.2 460.401C238.6 457.601 237 446.001 233 437.601z"/> + </g> + <g style="stroke:#a5264c; stroke-width:2"> + <path d="M247 444.801C247 444.801 250.6 442.401 253 443.601"/> + </g> + <g style="stroke:#a5264c; stroke-width:2"> + <path d="M253.5 428.401C253.5 428.401 256.4 423.501 261.2 422.701"/> + </g> + <g style="fill: #b2b2b2"> + <path d="M174.2 465.201C174.2 465.201 192.2 468.401 196.6 466.801C196.6 466.801 205.4 466.801 197 468.801C197 468.801 184.2 468.801 176.2 467.601C176.2 467.601 164.6 462.001 174.2 465.201z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M188.2 372.001C188.2 372.001 205.8 372.001 207.8 372.801C207.8 372.801 215 403.601 211.4 411.201C211.4 411.201 210.2 414.001 207.4 408.401C207.4 408.401 189 375.601 185.8 373.601C182.6 371.601 187 372.001 188.2 372.001z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M111.1 369.301C111.1 369.301 120 371.001 132.6 373.601C132.6 373.601 137.4 396.001 140.6 400.801C143.8 405.601 140.2 405.601 136.6 402.801C133 400.001 118.2 386.001 116.2 381.601C114.2 377.201 111.1 369.301 111.1 369.301z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M132.961 373.818C132.961 373.818 138.761 375.366 139.77 377.581C140.778 379.795 138.568 383.092 138.568 383.092C138.568 383.092 137.568 386.397 136.366 384.235C135.164 382.072 132.292 374.412 132.961 373.818z"/> + </g> + <g style="fill: #000000"> + <path d="M133 373.601C133 373.601 136.6 378.801 140.2 378.801C143.8 378.801 144.182 378.388 147 379.001C151.6 380.001 151.2 378.001 157.8 379.201C160.44 379.681 163 378.801 165.8 380.001C168.6 381.201 171.8 380.401 173 378.401C174.2 376.401 179 372.201 179 372.201C179 372.201 166.2 374.001 163.4 374.801C163.4 374.801 141 376.001 133 373.601z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M177.6 373.801C177.6 373.801 171.15 377.301 170.75 379.701C170.35 382.101 176 385.801 176 385.801C176 385.801 178.75 390.401 179.35 388.001C179.95 385.601 178.4 374.201 177.6 373.801z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M140.115 379.265C140.115 379.265 147.122 390.453 147.339 379.242C147.339 379.242 147.896 377.984 146.136 377.962C140.061 377.886 141.582 373.784 140.115 379.265z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M147.293 379.514C147.293 379.514 155.214 390.701 154.578 379.421C154.578 379.421 154.585 379.089 152.832 378.936C148.085 378.522 148.43 374.004 147.293 379.514z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M154.506 379.522C154.506 379.522 162.466 390.15 161.797 380.484C161.797 380.484 161.916 379.251 160.262 378.95C156.37 378.244 156.159 374.995 154.506 379.522z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M161.382 379.602C161.382 379.602 169.282 391.163 169.63 381.382C169.63 381.382 171.274 380.004 169.528 379.782C163.71 379.042 164.508 374.588 161.382 379.602z"/> + </g> + <g style="fill: #e5e5b2"> + <path d="M125.208 383.132L117.55 381.601C114.95 376.601 112.85 370.451 112.85 370.451C112.85 370.451 119.2 371.451 131.7 374.251C131.7 374.251 132.576 377.569 134.048 383.364L125.208 383.132z"/> + </g> + <g style="fill: #e5e5b2"> + <path d="M190.276 378.47C188.61 375.964 187.293 374.206 186.643 373.8C183.63 371.917 187.773 372.294 188.902 372.294C188.902 372.294 205.473 372.294 207.356 373.047C207.356 373.047 207.88 375.289 208.564 378.68C208.564 378.68 198.476 376.67 190.276 378.47z"/> + </g> + <g style="fill: #cc7226"> + <path d="M243.88 240.321C271.601 244.281 297.121 208.641 298.881 198.96C300.641 189.28 290.521 177.4 290.521 177.4C291.841 174.32 287.001 160.24 281.721 151C276.441 141.76 260.54 142.734 243 141.76C227.16 140.88 208.68 164.2 207.36 165.96C206.04 167.72 212.2 206.001 213.52 211.721C214.84 217.441 212.2 243.841 212.2 243.841C246.44 234.741 216.16 236.361 243.88 240.321z"/> + </g> + <g style="fill: #ea8e51"> + <path d="M208.088 166.608C206.792 168.336 212.84 205.921 214.136 211.537C215.432 217.153 212.84 243.073 212.84 243.073C245.512 234.193 216.728 235.729 243.944 239.617C271.161 243.505 296.217 208.513 297.945 199.008C299.673 189.504 289.737 177.84 289.737 177.84C291.033 174.816 286.281 160.992 281.097 151.92C275.913 142.848 260.302 143.805 243.08 142.848C227.528 141.984 209.384 164.88 208.088 166.608z"/> + </g> + <g style="fill: #efaa7c"> + <path d="M208.816 167.256C207.544 168.952 213.48 205.841 214.752 211.353C216.024 216.865 213.48 242.305 213.48 242.305C244.884 233.145 217.296 235.097 244.008 238.913C270.721 242.729 295.313 208.385 297.009 199.056C298.705 189.728 288.953 178.28 288.953 178.28C290.225 175.312 285.561 161.744 280.473 152.84C275.385 143.936 260.063 144.875 243.16 143.936C227.896 143.088 210.088 165.56 208.816 167.256z"/> + </g> + <g style="fill: #f4c6a8"> + <path d="M209.544 167.904C208.296 169.568 214.12 205.761 215.368 211.169C216.616 216.577 214.12 241.537 214.12 241.537C243.556 232.497 217.864 234.465 244.072 238.209C270.281 241.953 294.409 208.257 296.073 199.105C297.737 189.952 288.169 178.72 288.169 178.72C289.417 175.808 284.841 162.496 279.849 153.76C274.857 145.024 259.824 145.945 243.24 145.024C228.264 144.192 210.792 166.24 209.544 167.904z"/> + </g> + <g style="fill: #f9e2d3"> + <path d="M210.272 168.552C209.048 170.184 214.76 205.681 215.984 210.985C217.208 216.289 214.76 240.769 214.76 240.769C242.628 231.849 218.432 233.833 244.136 237.505C269.841 241.177 293.505 208.129 295.137 199.152C296.769 190.176 287.385 179.16 287.385 179.16C288.609 176.304 284.121 163.248 279.225 154.68C274.329 146.112 259.585 147.015 243.32 146.112C228.632 145.296 211.496 166.92 210.272 168.552z"/> + </g> + <g style="fill: #ffffff"> + <path d="M244.2 236.8C269.4 240.4 292.601 208 294.201 199.2C295.801 190.4 286.601 179.6 286.601 179.6C287.801 176.8 283.4 164 278.6 155.6C273.8 147.2 259.346 148.086 243.4 147.2C229 146.4 212.2 167.6 211 169.2C209.8 170.8 215.4 205.6 216.6 210.8C217.8 216 215.4 240 215.4 240C240.9 231.4 219 233.2 244.2 236.8z"/> + </g> + <g style="fill: #cccccc"> + <path d="M290.601 202.8C290.601 202.8 262.8 210.4 251.2 208.8C251.2 208.8 235.4 202.2 226.6 224C226.6 224 223 231.2 221 233.2C219 235.2 290.601 202.8 290.601 202.8z"/> + </g> + <g style="fill: #000000"> + <path d="M294.401 200.6C294.401 200.6 265.4 212.8 255.4 212.4C255.4 212.4 239 207.8 230.6 222.4C230.6 222.4 222.2 231.6 219 233.2C219 233.2 218.6 234.8 225 230.8L235.4 236C235.4 236 250.2 245.6 259.8 229.6C259.8 229.6 263.8 218.4 263.8 216.4C263.8 214.4 285 208.8 286.601 208.4C288.201 208 294.801 203.8 294.401 200.6z"/> + </g> + <g style="fill: #99cc32"> + <path d="M247 236.514C240.128 236.514 231.755 232.649 231.755 226.4C231.755 220.152 240.128 213.887 247 213.887C253.874 213.887 259.446 218.952 259.446 225.2C259.446 231.449 253.874 236.514 247 236.514z"/> + </g> + <g style="fill: #659900"> + <path d="M243.377 219.83C238.531 220.552 233.442 222.055 233.514 221.839C235.054 217.22 241.415 213.887 247 213.887C251.296 213.887 255.084 215.865 257.32 218.875C257.32 218.875 252.004 218.545 243.377 219.83z"/> + </g> + <g style="fill: #ffffff"> + <path d="M255.4 219.6C255.4 219.6 251 216.4 251 218.6C251 218.6 254.6 223 255.4 219.6z"/> + </g> + <g style="fill: #000000"> + <path d="M245.4 227.726C242.901 227.726 240.875 225.7 240.875 223.2C240.875 220.701 242.901 218.675 245.4 218.675C247.9 218.675 249.926 220.701 249.926 223.2C249.926 225.7 247.9 227.726 245.4 227.726z"/> + </g> + <g style="fill: #cc7226"> + <path d="M141.4 214.4C141.4 214.4 138.2 193.2 140.6 188.8C140.6 188.8 151.4 178.8 151 175.2C151 175.2 150.6 157.2 149.4 156.4C148.2 155.6 140.6 149.6 134.6 156C134.6 156 124.2 174 125 180.4L125 182.4C125 182.4 117.4 182 115.8 184C115.8 184 114.6 189.2 113.4 189.6C113.4 189.6 110.6 192 112.6 194.8C112.6 194.8 110.6 197.2 111 201.2L118.6 205.2C118.6 205.2 120.6 219.6 131.4 224.8C136.236 227.129 139.4 220.4 141.4 214.4z"/> + </g> + <g style="fill: #ffffff"> + <path d="M140.4 212.56C140.4 212.56 137.52 193.48 139.68 189.52C139.68 189.52 149.4 180.52 149.04 177.28C149.04 177.28 148.68 161.08 147.6 160.36C146.52 159.64 139.68 154.24 134.28 160C134.28 160 124.92 176.2 125.64 181.96L125.64 183.76C125.64 183.76 118.8 183.4 117.36 185.2C117.36 185.2 116.28 189.88 115.2 190.24C115.2 190.24 112.68 192.4 114.48 194.92C114.48 194.92 112.68 197.08 113.04 200.68L119.88 204.28C119.88 204.28 121.68 217.24 131.4 221.92C135.752 224.015 138.6 217.96 140.4 212.56z"/> + </g> + <g style="fill: #eb955c"> + <path d="M148.95 157.39C147.86 156.53 140.37 150.76 134.52 157C134.52 157 124.38 174.55 125.16 180.79L125.16 182.74C125.16 182.74 117.75 182.35 116.19 184.3C116.19 184.3 115.02 189.37 113.85 189.76C113.85 189.76 111.12 192.1 113.07 194.83C113.07 194.83 111.12 197.17 111.51 201.07L118.92 204.97C118.92 204.97 120.87 219.01 131.4 224.08C136.114 226.35 139.2 219.79 141.15 213.94C141.15 213.94 138.03 193.27 140.37 188.98C140.37 188.98 150.9 179.23 150.51 175.72C150.51 175.72 150.12 158.17 148.95 157.39z"/> + </g> + <g style="fill: #f2b892"> + <path d="M148.5 158.38C147.52 157.46 140.14 151.92 134.44 158C134.44 158 124.56 175.1 125.32 181.18L125.32 183.08C125.32 183.08 118.1 182.7 116.58 184.6C116.58 184.6 115.44 189.54 114.3 189.92C114.3 189.92 111.64 192.2 113.54 194.86C113.54 194.86 111.64 197.14 112.02 200.94L119.24 204.74C119.24 204.74 121.14 218.42 131.4 223.36C135.994 225.572 139 219.18 140.9 213.48C140.9 213.48 137.86 193.34 140.14 189.16C140.14 189.16 150.4 179.66 150.02 176.24C150.02 176.24 149.64 159.14 148.5 158.38z"/> + </g> + <g style="fill: #f8dcc8"> + <path d="M148.05 159.37C147.18 158.39 139.91 153.08 134.36 159C134.36 159 124.74 175.65 125.48 181.57L125.48 183.42C125.48 183.42 118.45 183.05 116.97 184.9C116.97 184.9 115.86 189.71 114.75 190.08C114.75 190.08 112.16 192.3 114.01 194.89C114.01 194.89 112.16 197.11 112.53 200.81L119.56 204.51C119.56 204.51 121.41 217.83 131.4 222.64C135.873 224.794 138.8 218.57 140.65 213.02C140.65 213.02 137.69 193.41 139.91 189.34C139.91 189.34 149.9 180.09 149.53 176.76C149.53 176.76 149.16 160.11 148.05 159.37z"/> + </g> + <g style="fill: #ffffff"> + <path d="M140.4 212.46C140.4 212.46 137.52 193.48 139.68 189.52C139.68 189.52 149.4 180.52 149.04 177.28C149.04 177.28 148.68 161.08 147.6 160.36C146.84 159.32 139.68 154.24 134.28 160C134.28 160 124.92 176.2 125.64 181.96L125.64 183.76C125.64 183.76 118.8 183.4 117.36 185.2C117.36 185.2 116.28 189.88 115.2 190.24C115.2 190.24 112.68 192.4 114.48 194.92C114.48 194.92 112.68 197.08 113.04 200.68L119.88 204.28C119.88 204.28 121.68 217.24 131.4 221.92C135.752 224.015 138.6 217.86 140.4 212.46z"/> + </g> + <g style="fill: #cccccc"> + <path d="M137.3 206.2C137.3 206.2 115.7 196 114.8 195.2C114.8 195.2 123.9 203.4 124.7 203.4C125.5 203.4 137.3 206.2 137.3 206.2z"/> + </g> + <g style="fill: #000000"> + <path d="M120.2 200C120.2 200 138.6 203.6 138.6 208C138.6 210.912 138.357 224.331 133 222.8C124.6 220.4 128.2 206 120.2 200z"/> + </g> + <g style="fill: #99cc32"> + <path d="M128.6 203.8C128.6 203.8 137.578 205.274 138.6 208C139.2 209.6 139.863 217.908 134.4 219C129.848 219.911 127.618 209.69 128.6 203.8z"/> + </g> + <g style="fill: #000000"> + <path d="M214.595 246.349C214.098 244.607 215.409 244.738 217.2 244.2C219.2 243.6 231.4 239.8 232.2 237.2C233 234.6 246.2 239 246.2 239C248 239.8 252.4 242.4 252.4 242.4C257.2 243.6 263.8 244 263.8 244C266.2 245 269.6 247.8 269.6 247.8C284.2 258 296.601 250.8 296.601 250.8C316.601 244.2 310.601 227 310.601 227C307.601 218 310.801 214.6 310.801 214.6C311.001 210.8 318.201 217.2 318.201 217.2C320.801 221.4 321.601 226.4 321.601 226.4C329.601 237.6 326.201 219.8 326.201 219.8C326.401 218.8 323.601 215.2 323.601 214C323.601 212.8 321.801 209.4 321.801 209.4C318.801 206 321.201 199 321.201 199C323.001 185.2 320.801 187 320.801 187C319.601 185.2 310.401 195.2 310.401 195.2C308.201 198.6 302.201 200.2 302.201 200.2C299.401 202 296.001 200.6 296.001 200.6C293.401 200.2 287.801 207.2 287.801 207.2C290.601 207 293.001 211.4 295.401 211.6C297.801 211.8 299.601 209.2 301.201 208.6C302.801 208 305.601 213.8 305.601 213.8C306.001 216.4 300.401 221.2 300.401 221.2C300.001 225.8 298.401 224.2 298.401 224.2C295.401 223.6 294.201 227.4 293.201 232C292.201 236.6 288.001 237 288.001 237C286.401 244.4 285.2 241.4 285.2 241.4C285 235.8 279 241.6 279 241.6C277.8 243.6 273.2 241.4 273.2 241.4C266.4 239.4 268.8 237.4 268.8 237.4C270.6 235.2 281.8 237.4 281.8 237.4C284 235.8 276 231.8 276 231.8C275.4 230 276.4 225.6 276.4 225.6C277.6 222.4 284.4 216.8 284.4 216.8C293.801 215.6 291.001 214 291.001 214C284.801 208.8 279 216.4 279 216.4C276.8 222.6 259.4 237.6 259.4 237.6C254.6 241 257.2 234.2 253.2 237.6C249.2 241 228.6 232 228.6 232C217.038 230.807 214.306 246.549 210.777 243.429C210.777 243.429 216.195 251.949 214.595 246.349z"/> + </g> + <g style="fill: #000000"> + <path d="M409.401 80C409.401 80 383.801 88 381.001 106.8C381.001 106.8 378.601 129.6 399.001 147.2C399.001 147.2 399.401 153.6 401.401 156.8C401.401 156.8 399.801 161.6 418.601 154L445.801 145.6C445.801 145.6 452.201 143.2 457.401 134.4C462.601 125.6 477.801 106.8 474.201 81.6C474.201 81.6 475.401 70.4 469.401 70C469.401 70 461.001 68.4 453.801 76C453.801 76 447.001 79.2 444.601 78.8L409.401 80z"/> + </g> + <g style="fill: #000000"> + <path d="M464.022 79.01C464.022 79.01 466.122 70.08 461.282 74.92C461.282 74.92 454.242 80.64 446.761 80.64C446.761 80.64 432.241 82.84 427.841 96.04C427.841 96.04 423.881 122.88 431.801 128.6C431.801 128.6 436.641 136.08 443.681 129.48C450.722 122.88 466.222 92.65 464.022 79.01z"/> + </g> + <g style="fill: #323232"> + <path d="M463.648 79.368C463.648 79.368 465.738 70.624 460.986 75.376C460.986 75.376 454.074 80.992 446.729 80.992C446.729 80.992 432.473 83.152 428.153 96.112C428.153 96.112 424.265 122.464 432.041 128.08C432.041 128.08 436.793 135.424 443.705 128.944C450.618 122.464 465.808 92.76 463.648 79.368z"/> + </g> + <g style="fill: #666666"> + <path d="M463.274 79.726C463.274 79.726 465.354 71.168 460.69 75.832C460.69 75.832 453.906 81.344 446.697 81.344C446.697 81.344 432.705 83.464 428.465 96.184C428.465 96.184 424.649 122.048 432.281 127.56C432.281 127.56 436.945 134.768 443.729 128.408C450.514 122.048 465.394 92.87 463.274 79.726z"/> + </g> + <g style="fill: #999999"> + <path d="M462.9 80.084C462.9 80.084 464.97 71.712 460.394 76.288C460.394 76.288 453.738 81.696 446.665 81.696C446.665 81.696 432.937 83.776 428.777 96.256C428.777 96.256 425.033 121.632 432.521 127.04C432.521 127.04 437.097 134.112 443.753 127.872C450.41 121.632 464.98 92.98 462.9 80.084z"/> + </g> + <g style="fill: #cccccc"> + <path d="M462.526 80.442C462.526 80.442 464.586 72.256 460.098 76.744C460.098 76.744 453.569 82.048 446.633 82.048C446.633 82.048 433.169 84.088 429.089 96.328C429.089 96.328 425.417 121.216 432.761 126.52C432.761 126.52 437.249 133.456 443.777 127.336C450.305 121.216 464.566 93.09 462.526 80.442z"/> + </g> + <g style="fill: #ffffff"> + <path d="M462.151 80.8C462.151 80.8 464.201 72.8 459.801 77.2C459.801 77.2 453.401 82.4 446.601 82.4C446.601 82.4 433.401 84.4 429.401 96.4C429.401 96.4 425.801 120.8 433.001 126C433.001 126 437.401 132.8 443.801 126.8C450.201 120.8 464.151 93.2 462.151 80.8z"/> + </g> + <g style="fill: #992600"> + <path d="M250.6 284C250.6 284 230.2 264.8 222.2 264C222.2 264 187.8 260 173 278C173 278 190.6 257.6 218.2 263.2C218.2 263.2 196.6 258.8 184.2 262C184.2 262 167.4 262 157.8 276L155 280.8C155 280.8 159 266 177.4 260C177.4 260 200.2 255.2 211 260C211 260 189.4 253.2 179.4 255.2C179.4 255.2 149 252.8 136.2 279.2C136.2 279.2 140.2 264.8 155 257.6C155 257.6 168.6 248.8 189 251.6C189 251.6 203.4 254.8 208.6 257.2C213.8 259.6 212.6 256.8 204.2 252C204.2 252 198.6 242 184.6 242.4C184.6 242.4 141.8 246 131.4 258C131.4 258 145 246.8 155.4 244C155.4 244 177.8 236 186.2 236.8C186.2 236.8 211 237.8 218.6 233.8C218.6 233.8 207.4 238.8 210.6 242C213.8 245.2 220.6 252.8 220.6 254C220.6 255.2 244.8 277.3 248.4 281.7L250.6 284z"/> + </g> + <g style="fill: #cccccc"> + <path d="M389 478C389 478 373.5 441.5 361 432C361 432 387 448 390.5 466C390.5 466 390.5 476 389 478z"/> + </g> + <g style="fill: #cccccc"> + <path d="M436 485.5C436 485.5 409.5 430.5 391 406.5C391 406.5 434.5 444 439.5 470.5L440 476L437 473.5C437 473.5 436.5 482.5 436 485.5z"/> + </g> + <g style="fill: #cccccc"> + <path d="M492.5 437C492.5 437 430 377.5 428.5 375C428.5 375 489 441 492 448.5C492 448.5 490 439.5 492.5 437z"/> + </g> + <g style="fill: #cccccc"> + <path d="M304 480.5C304 480.5 323.5 428.5 342.5 451C342.5 451 357.5 461 357 464C357 464 353 457.5 335 458C335 458 316 455 304 480.5z"/> + </g> + <g style="fill: #cccccc"> + <path d="M494.5 353C494.5 353 449.5 324.5 442 323C430.193 320.639 491.5 352 496.5 362.5C496.5 362.5 498.5 360 494.5 353z"/> + </g> + <g style="fill: #000000"> + <path d="M343.801 459.601C343.801 459.601 364.201 457.601 371.001 450.801L375.401 454.401L393.001 416.001L396.601 421.201C396.601 421.201 411.001 406.401 410.201 398.401C409.401 390.401 423.001 404.401 423.001 404.401C423.001 404.401 422.201 392.801 429.401 399.601C429.401 399.601 427.001 384.001 435.401 392.001C435.401 392.001 424.864 361.844 447.401 387.601C453.001 394.001 448.601 387.201 448.601 387.201C448.601 387.201 422.601 339.201 444.201 353.601C444.201 353.601 446.201 330.801 445.001 326.401C443.801 322.001 441.801 299.6 437.001 294.4C432.201 289.2 437.401 287.6 443.001 292.8C443.001 292.8 431.801 268.8 445.001 280.8C445.001 280.8 441.401 265.6 437.001 262.8C437.001 262.8 431.401 245.6 446.601 256.4C446.601 256.4 442.201 244 439.001 240.8C439.001 240.8 427.401 213.2 434.601 218L439.001 221.6C439.001 221.6 432.201 207.6 438.601 212C445.001 216.4 445.001 216 445.001 216C445.001 216 423.801 182.8 444.201 200.4C444.201 200.4 436.042 186.482 432.601 179.6C432.601 179.6 413.801 159.2 428.201 165.6L433.001 167.2C433.001 167.2 424.201 157.2 416.201 155.6C408.201 154 418.601 147.6 425.001 149.6C431.401 151.6 447.001 159.2 447.001 159.2C447.001 159.2 459.801 178 463.801 178.4C463.801 178.4 443.801 170.8 449.801 178.8C449.801 178.8 464.201 192.8 457.001 192.4C457.001 192.4 451.001 199.6 455.801 208.4C455.801 208.4 437.342 190.009 452.201 215.6L459.001 232C459.001 232 434.601 207.2 445.801 229.2C445.801 229.2 463.001 252.8 465.001 253.2C467.001 253.6 471.401 262.4 471.401 262.4L467.001 260.4L472.201 269.2C472.201 269.2 461.001 257.2 467.001 270.4L472.601 284.8C472.601 284.8 452.201 262.8 465.801 292.4C465.801 292.4 449.401 287.2 458.201 304.4C458.201 304.4 456.601 320.401 457.001 325.601C457.401 330.801 458.601 359.201 454.201 367.201C449.801 375.201 460.201 394.401 462.201 398.401C464.201 402.401 467.801 413.201 459.001 404.001C450.201 394.801 454.601 400.401 456.601 409.201C458.601 418.001 464.601 433.601 463.801 439.201C463.801 439.201 462.601 440.401 459.401 436.801C459.401 436.801 444.601 414.001 446.201 428.401C446.201 428.401 445.001 436.401 441.801 445.201C441.801 445.201 438.601 456.001 438.601 447.201C438.601 447.201 435.401 430.401 432.601 438.001C429.801 445.601 426.201 451.601 423.401 454.001C420.601 456.401 415.401 433.601 414.201 444.001C414.201 444.001 402.201 431.601 397.401 448.001L385.801 464.401C385.801 464.401 385.401 452.001 384.201 458.001C384.201 458.001 354.201 464.001 343.801 459.601z"/> + </g> + <g style="fill: #000000"> + <path d="M309.401 102.8C309.401 102.8 297.801 94.8 293.801 95.2C289.801 95.6 321.401 86.4 362.601 114C362.601 114 367.401 116.8 371.001 116.4C371.001 116.4 374.201 118.8 371.401 122.4C371.401 122.4 362.601 132 373.801 143.2C373.801 143.2 392.201 150 386.601 141.2C386.601 141.2 397.401 145.2 399.801 149.2C402.201 153.2 401.001 149.2 401.001 149.2C401.001 149.2 394.601 142 388.601 136.8C388.601 136.8 383.401 134.8 380.601 126.4C377.801 118 375.401 108 379.801 104.8C379.801 104.8 375.801 109.2 376.601 105.2C377.401 101.2 381.001 97.6 382.601 97.2C384.201 96.8 400.601 81 407.401 80.6C407.401 80.6 398.201 82 395.201 81C392.201 80 365.601 68.6 359.601 67.4C359.601 67.4 342.801 60.8 354.801 62.8C354.801 62.8 390.601 66.6 408.801 79.8C408.801 79.8 401.601 71.4 383.201 64.4C383.201 64.4 361.001 51.8 325.801 56.8C325.801 56.8 308.001 60 300.201 61.8C300.201 61.8 297.601 61.2 297.001 60.8C296.401 60.4 284.6 51.4 257 58.4C257 58.4 240 63 231.4 67.8C231.4 67.8 216.2 69 212.6 72.2C212.6 72.2 194 86.8 192 87.6C190 88.4 178.6 96 177.8 96.4C177.8 96.4 202.4 89.8 204.8 87.4C207.2 85 224.6 82.4 227 83.8C229.4 85.2 237.8 84.6 228.2 85.2C228.2 85.2 303.801 100 304.601 102C305.401 104 309.401 102.8 309.401 102.8z"/> + </g> + <g style="fill: #cc7226"> + <path d="M380.801 93.6C380.801 93.6 370.601 86.2 368.601 86.2C366.601 86.2 354.201 76 350.001 76.4C345.801 76.8 333.601 66.8 306.201 75C306.201 75 305.601 73 309.201 72.2C309.201 72.2 315.601 70 316.001 69.4C316.001 69.4 336.201 65.2 343.401 68.8C343.401 68.8 352.601 71.4 358.801 77.6C358.801 77.6 370.001 80.8 373.201 79.8C373.201 79.8 382.001 82 382.401 83.8C382.401 83.8 388.201 86.8 386.401 89.4C386.401 89.4 386.801 91 380.801 93.6z"/> + </g> + <g style="fill: #cc7226"> + <path d="M368.33 91.491C369.137 92.123 370.156 92.221 370.761 93.03C370.995 93.344 370.706 93.67 370.391 93.767C369.348 94.084 368.292 93.514 367.15 94.102C366.748 94.309 366.106 94.127 365.553 93.978C363.921 93.537 362.092 93.512 360.401 94.2C358.416 93.071 356.056 93.655 353.975 92.654C353.917 92.627 353.695 92.973 353.621 92.946C350.575 91.801 346.832 92.084 344.401 89.8C341.973 89.388 339.616 88.926 337.188 88.246C335.37 87.737 333.961 86.748 332.341 85.916C330.964 85.208 329.507 84.686 327.973 84.314C326.11 83.862 324.279 83.974 322.386 83.454C322.293 83.429 322.101 83.773 322.019 83.746C321.695 83.638 321.405 83.055 321.234 83.108C319.553 83.63 318.065 82.658 316.401 83C315.223 81.776 313.495 82.021 311.949 81.579C308.985 80.731 305.831 82.001 302.801 81C306.914 79.158 311.601 80.39 315.663 78.321C317.991 77.135 320.653 78.237 323.223 77.477C323.71 77.333 324.401 77.131 324.801 77.8C324.935 77.665 325.117 77.426 325.175 77.454C327.625 78.611 329.94 79.885 332.422 80.951C332.763 81.097 333.295 80.865 333.547 81.067C335.067 82.283 337.01 82.18 338.401 83.4C340.099 82.898 341.892 83.278 343.621 82.654C343.698 82.627 343.932 82.968 343.965 82.946C345.095 82.198 346.25 82.469 347.142 82.773C347.48 82.888 348.143 83.135 348.448 83.209C349.574 83.485 350.43 83.965 351.609 84.148C351.723 84.166 351.908 83.826 351.98 83.854C353.103 84.292 354.145 84.236 354.801 85.4C354.936 85.265 355.101 85.027 355.183 85.054C356.21 85.392 356.859 86.147 357.96 86.388C358.445 86.494 359.057 87.12 359.633 87.296C362.025 88.027 363.868 89.556 366.062 90.451C366.821 90.761 367.697 90.995 368.33 91.491z"/> + </g> + <g style="fill: #cc7226"> + <path d="M291.696 77.261C289.178 75.536 286.81 74.43 284.368 72.644C284.187 72.511 283.827 72.681 283.625 72.559C282.618 71.95 281.73 71.369 280.748 70.673C280.209 70.291 279.388 70.302 278.88 70.044C276.336 68.752 273.707 68.194 271.2 67C271.882 66.362 273.004 66.606 273.6 65.8C273.795 66.08 274.033 66.364 274.386 66.173C276.064 65.269 277.914 65.116 279.59 65.206C281.294 65.298 283.014 65.603 284.789 65.875C285.096 65.922 285.295 66.445 285.618 66.542C287.846 67.205 290.235 66.68 292.354 67.518C293.945 68.147 295.515 68.97 296.754 70.245C297.006 70.505 296.681 70.806 296.401 71C296.789 70.891 297.062 71.097 297.173 71.41C297.257 71.649 297.257 71.951 297.173 72.19C297.061 72.502 296.782 72.603 296.408 72.654C295.001 72.844 296.773 71.464 296.073 71.912C294.8 72.726 295.546 74.132 294.801 75.4C294.521 75.206 294.291 74.988 294.401 74.6C294.635 75.122 294.033 75.412 293.865 75.728C293.48 76.453 292.581 77.868 291.696 77.261z"/> + </g> + <g style="fill: #cc7226"> + <path d="M259.198 84.609C256.044 83.815 252.994 83.93 249.978 82.654C249.911 82.626 249.688 82.973 249.624 82.946C248.258 82.352 247.34 81.386 246.264 80.34C245.351 79.452 243.693 79.839 242.419 79.352C242.095 79.228 241.892 78.716 241.591 78.677C240.372 78.52 239.445 77.571 238.4 77C240.736 76.205 243.147 76.236 245.609 75.852C245.722 75.834 245.867 76.155 246 76.155C246.136 76.155 246.266 75.934 246.4 75.8C246.595 76.08 246.897 76.406 247.154 76.152C247.702 75.612 248.258 75.802 248.798 75.842C248.942 75.852 249.067 76.155 249.2 76.155C249.336 76.155 249.467 75.844 249.6 75.844C249.736 75.845 249.867 76.155 250 76.155C250.136 76.155 250.266 75.934 250.4 75.8C251.092 76.582 251.977 76.028 252.799 76.207C253.837 76.434 254.104 77.582 255.178 77.88C259.893 79.184 264.03 81.329 268.393 83.416C268.7 83.563 268.91 83.811 268.8 84.2C269.067 84.2 269.38 84.112 269.57 84.244C270.628 84.976 271.669 85.524 272.366 86.622C272.582 86.961 272.253 87.368 272.02 87.316C267.591 86.321 263.585 85.713 259.198 84.609z"/> + </g> + <g style="fill: #cc7226"> + <path d="M245.338 128.821C243.746 127.602 243.162 125.571 242.034 123.779C241.82 123.439 242.094 123.125 242.411 123.036C242.971 122.877 243.514 123.355 243.923 123.557C245.668 124.419 247.203 125.661 249.2 125.8C251.19 128.034 255.45 128.419 255.457 131.8C255.458 132.659 254.03 131.741 253.6 132.6C251.149 131.597 248.76 131.7 246.38 130.233C245.763 129.852 246.093 129.399 245.338 128.821z"/> + </g> + <g style="fill: #cc7226"> + <path d="M217.8 76.244C217.935 76.245 224.966 76.478 224.949 76.592C224.904 76.901 217.174 77.95 216.81 77.78C216.646 77.704 209.134 80.134 209 80C209.268 79.865 217.534 76.244 217.8 76.244z"/> + </g> + <g style="fill: #000000"> + <path d="M233.2 86C233.2 86 218.4 87.8 214 89C209.6 90.2 191 97.8 188 99.8C188 99.8 174.6 105.2 157.6 125.2C157.6 125.2 165.2 121.8 167.4 119C167.4 119 181 106.4 180.8 109C180.8 109 193 100.4 192.4 102.6C192.4 102.6 216.8 91.4 214.8 94.6C214.8 94.6 236.4 90 235.4 92C235.4 92 254.2 96.4 251.4 96.6C251.4 96.6 245.6 97.8 252 101.4C252 101.4 248.6 105.8 243.2 101.8C237.8 97.8 240.8 100 235.8 101C235.8 101 233.2 101.8 228.6 97.8C228.6 97.8 223 93.2 214.2 96.8C214.2 96.8 183.6 109.4 181.6 110C181.6 110 178 112.8 175.6 116.4C175.6 116.4 169.8 120.8 166.8 122.2C166.8 122.2 154 133.8 152.8 135.2C152.8 135.2 149.4 140.4 148.6 140.8C148.6 140.8 155 137 157 135C157 135 171 125 176.4 124.2C176.4 124.2 180.8 121.2 181.6 119.8C181.6 119.8 196 110.6 200.2 110.6C200.2 110.6 209.4 115.8 211.8 108.8C211.8 108.8 217.6 107 223.2 108.2C223.2 108.2 226.4 105.6 225.6 103.4C225.6 103.4 227.2 101.6 228.2 105.4C228.2 105.4 231.6 109 236.4 107C236.4 107 240.4 106.8 238.4 109.2C238.4 109.2 234 113 222.2 113.2C222.2 113.2 209.8 113.8 193.4 121.4C193.4 121.4 163.6 131.8 154.4 142.2C154.4 142.2 148 151 142.6 152.2C142.6 152.2 136.8 153 130.8 160.4C130.8 160.4 140.6 154.6 149.6 154.6C149.6 154.6 153.6 152.2 149.8 155.8C149.8 155.8 146.2 163.4 147.8 168.8C147.8 168.8 147.2 174 146.4 175.6C146.4 175.6 138.6 188.4 138.6 190.8C138.6 193.2 139.8 203 140.2 203.6C140.6 204.2 139.2 202 143 204.4C146.8 206.8 149.6 208.4 150.4 211.2C151.2 214 148.4 205.8 148.2 204C148 202.2 143.8 195 144.6 192.6C144.6 192.6 145.6 193.6 146.4 195C146.4 195 145.8 194.4 146.4 190.8C146.4 190.8 147.2 185.6 148.6 182.4C150 179.2 152 175.4 152.4 174.6C152.8 173.8 152.8 168 154.2 170.6L157.6 173.2C157.6 173.2 154.8 170.6 157 168.4C157 168.4 156 162.8 157.8 160.2C157.8 160.2 164.8 151.8 166.4 150.8C168 149.8 166.6 150.2 166.6 150.2C166.6 150.2 172.6 146 166.8 147.6C166.8 147.6 162.8 149.2 159.8 149.2C159.8 149.2 152.2 151.2 156.2 147C160.2 142.8 170.2 137.4 174 137.6L174.8 139.2L186 136.8L184.8 137.6C184.8 137.6 184.6 137.4 188.8 137C193 136.6 198.8 138 200.2 136.2C201.6 134.4 205 133.4 204.6 134.8C204.2 136.2 204 138.2 204 138.2C204 138.2 209 132.4 208.4 134.6C207.8 136.8 199.6 142 198.2 148.2L208.6 140L212.2 137C212.2 137 215.8 139.2 216 137.6C216.2 136 220.8 130.2 222 130.4C223.2 130.6 225.2 127.8 225 130.4C224.8 133 232.4 138.4 232.4 138.4C232.4 138.4 235.6 136.6 237 138C238.4 139.4 242.6 118.2 242.6 118.2L267.6 107.6L311.201 104.2L294.201 97.4L233.2 86z"/> + </g> + <g style="stroke:#4c0000; stroke-width:2"> + <path d="M251.4 285C251.4 285 236.4 268.2 228 265.6C228 265.6 214.6 258.8 190 266.6"/> + </g> + <g style="stroke:#4c0000; stroke-width:2"> + <path d="M224.8 264.2C224.8 264.2 199.6 256.2 184.2 260.4C184.2 260.4 165.8 262.4 157.4 276.2"/> + </g> + <g style="stroke:#4c0000; stroke-width:2"> + <path d="M221.2 263C221.2 263 204.2 255.8 189.4 253.6C189.4 253.6 172.8 251 156.2 258.2C156.2 258.2 144 264.2 138.6 274.4"/> + </g> + <g style="stroke:#4c0000; stroke-width:2"> + <path d="M222.2 263.4C222.2 263.4 206.8 252.4 205.8 251C205.8 251 198.8 240 185.8 239.6C185.8 239.6 164.4 240.4 147.2 248.4"/> + </g> + <g style="fill: #000000"> + <path d="M220.895 254.407C222.437 255.87 249.4 284.8 249.4 284.8C284.6 321.401 256.6 287.2 256.6 287.2C249 282.4 239.8 263.6 239.8 263.6C238.6 260.8 253.8 270.8 253.8 270.8C257.8 271.6 271.4 290.8 271.4 290.8C264.6 288.4 269.4 295.6 269.4 295.6C272.2 297.6 292.601 313.201 292.601 313.201C296.201 317.201 300.201 318.801 300.201 318.801C314.201 313.601 307.801 326.801 307.801 326.801C310.201 333.601 315.801 322.001 315.801 322.001C327.001 305.2 310.601 307.601 310.601 307.601C280.6 310.401 273.8 294.4 273.8 294.4C271.4 292 280.2 294.4 280.2 294.4C288.601 296.4 273 282 273 282C275.4 282 284.6 288.8 284.6 288.8C295.001 298 297.001 296 297.001 296C315.001 287.2 325.401 294.8 325.401 294.8C327.401 296.4 321.801 303.2 323.401 308.401C325.001 313.601 329.801 326.001 329.801 326.001C327.401 327.601 327.801 338.401 327.801 338.401C344.601 361.601 335.001 359.601 335.001 359.601C319.401 359.201 334.201 366.801 334.201 366.801C337.401 368.801 346.201 376.001 346.201 376.001C343.401 374.801 341.801 380.001 341.801 380.001C346.601 384.001 343.801 388.801 343.801 388.801C337.801 390.001 336.601 394.001 336.601 394.001C343.401 402.001 333.401 402.401 333.401 402.401C337.001 406.801 332.201 418.801 332.201 418.801C327.401 418.801 321.001 424.401 321.001 424.401C323.401 429.201 313.001 434.801 313.001 434.801C304.601 436.401 307.401 443.201 307.401 443.201C299.401 449.201 297.001 465.201 297.001 465.201C296.201 475.601 293.801 478.801 299.001 476.801C304.201 474.801 303.401 462.401 303.401 462.401C298.601 446.801 341.401 430.801 341.401 430.801C345.401 429.201 346.201 424.001 346.201 424.001C348.201 424.401 357.001 432.001 357.001 432.001C364.601 443.201 365.001 434.001 365.001 434.001C366.201 430.401 364.601 424.401 364.601 424.401C370.601 402.801 356.601 396.401 356.601 396.401C346.601 362.801 360.601 371.201 360.601 371.201C363.401 376.801 374.201 382.001 374.201 382.001L377.801 379.601C376.201 374.801 384.601 368.801 384.601 368.801C387.401 375.201 393.401 367.201 393.401 367.201C397.001 342.801 409.401 357.201 409.401 357.201C413.401 358.401 414.601 351.601 414.601 351.601C418.201 341.201 414.601 327.601 414.601 327.601C418.201 327.201 427.801 333.201 427.801 333.201C430.601 329.601 421.401 312.801 425.401 315.201C429.401 317.601 433.801 319.201 433.801 319.201C434.601 317.201 424.601 304.801 424.601 304.801C420.201 302 415.001 281.6 415.001 281.6C422.201 285.2 412.201 270 412.201 270C412.201 266.8 418.201 255.6 418.201 255.6C417.401 248.8 418.201 249.2 418.201 249.2C421.001 250.4 429.001 252 422.201 245.6C415.401 239.2 423.001 234.4 423.001 234.4C427.401 231.6 413.801 232 413.801 232C408.601 227.6 409.001 223.6 409.001 223.6C417.001 225.6 402.601 211.2 400.201 207.6C397.801 204 407.401 198.8 407.401 198.8C420.601 195.2 409.001 192 409.001 192C389.401 192.4 400.201 181.6 400.201 181.6C406.201 182 404.601 179.6 404.601 179.6C399.401 178.4 389.801 172 389.801 172C385.801 168.4 389.401 169.2 389.401 169.2C406.201 170.4 377.401 159.2 377.401 159.2C385.401 159.2 367.401 148.8 367.401 148.8C365.401 147.2 362.201 139.6 362.201 139.6C356.201 134.4 351.401 127.6 351.401 127.6C351.001 123.2 346.201 118.4 346.201 118.4C334.601 104.8 329.001 105.2 329.001 105.2C314.201 101.6 309.001 102.4 309.001 102.4L256.2 106.8C229.8 119.6 237.6 140.6 237.6 140.6C244 149 253.2 145.2 253.2 145.2C257.8 139 269.4 141.2 269.4 141.2C289.801 144.4 287.201 140.8 287.201 140.8C284.801 136.2 268.6 130 268.4 129.4C268.2 128.8 259.4 125.4 259.4 125.4C256.4 124.2 252 115 252 115C248.8 111.6 264.6 117.4 264.6 117.4C263.4 118.4 270.8 122.4 270.8 122.4C288.201 121.4 298.801 132.2 298.801 132.2C309.601 148.8 309.801 140.6 309.801 140.6C312.601 131.2 300.801 110 300.801 110C301.201 108 309.401 114.6 309.401 114.6C310.801 112.6 311.601 118.4 311.601 118.4C311.801 120.8 315.601 128.8 315.601 128.8C318.401 141.8 322.001 134.4 322.001 134.4L326.601 143.8C328.001 146.4 322.001 154 322.001 154C321.801 156.8 322.601 156.6 317.001 164.2C311.401 171.8 314.801 176.2 314.801 176.2C313.401 182.8 322.201 182.4 322.201 182.4C324.801 184.6 328.201 184.6 328.201 184.6C330.001 186.6 332.401 186 332.401 186C334.001 182.2 340.201 184.2 340.201 184.2C341.601 181.8 349.801 181.4 349.801 181.4C350.801 178.8 351.201 177.2 354.601 176.6C358.001 176 333.401 133 333.401 133C339.801 132.2 331.601 119.8 331.601 119.8C329.401 113.2 340.801 127.8 343.001 129.2C345.201 130.6 346.201 132.8 344.601 132.6C343.001 132.4 341.201 134.6 342.601 134.8C344.001 135 357.001 150 360.401 160.2C363.801 170.4 369.801 174.4 376.001 180.4C382.201 186.4 381.401 210.6 381.401 210.6C381.001 219.4 387.001 230 387.001 230C389.001 233.8 384.801 252 384.801 252C382.801 254.2 384.201 255 384.201 255C385.201 256.2 392.001 269.4 392.001 269.4C390.201 269.2 393.801 272.8 393.801 272.8C399.001 278.8 392.601 275.8 392.601 275.8C386.601 274.2 393.601 284 393.601 284C394.801 285.8 385.801 281.2 385.801 281.2C376.601 280.6 388.201 287.8 388.201 287.8C396.801 295 385.401 290.6 385.401 290.6C380.801 288.8 384.001 295.6 384.001 295.6C387.201 297.2 404.401 304.2 404.401 304.2C404.801 308.001 401.801 313.001 401.801 313.001C402.201 317.001 400.001 320.401 400.001 320.401C398.801 328.601 398.201 329.401 398.201 329.401C394.001 329.601 386.601 343.401 386.601 343.401C384.801 346.001 374.601 358.001 374.601 358.001C372.601 365.001 354.601 357.801 354.601 357.801C348.001 361.201 350.001 357.801 350.001 357.801C349.601 355.601 354.401 349.601 354.401 349.601C361.401 347.001 358.801 336.201 358.801 336.201C362.801 334.801 351.601 332.001 351.801 330.801C352.001 329.601 357.801 328.201 357.801 328.201C365.801 326.201 361.401 323.801 361.401 323.801C360.801 319.801 363.801 314.201 363.801 314.201C375.401 313.401 363.801 297.2 363.801 297.2C353.001 289.6 352.001 283.8 352.001 283.8C364.601 275.6 356.401 263.2 356.601 259.6C356.801 256 358.001 234.4 358.001 234.4C356.001 228.2 353.001 214.6 353.001 214.6C355.201 209.4 362.601 196.8 362.601 196.8C365.401 192.6 374.201 187.8 372.001 184.8C369.801 181.8 362.001 183.6 362.001 183.6C354.201 182.2 354.801 187.4 354.801 187.4C353.201 188.4 352.401 193.4 352.401 193.4C351.68 201.333 342.801 207.6 342.801 207.6C331.601 213.8 340.801 217.8 340.801 217.8C346.801 224.4 337.001 224.6 337.001 224.6C326.001 222.8 334.201 233 334.201 233C345.001 245.8 342.001 248.6 342.001 248.6C331.801 249.6 344.401 258.8 344.401 258.8C344.401 258.8 343.601 256.8 343.801 258.6C344.001 260.4 347.001 264.6 347.801 266.6C348.601 268.6 344.601 268.8 344.601 268.8C345.201 278.4 329.801 274.2 329.801 274.2C329.801 274.2 329.801 274.2 328.201 274.4C326.601 274.6 315.401 273.8 309.601 271.6C303.801 269.4 297.001 269.4 297.001 269.4C297.001 269.4 293.001 271.2 285.4 271C277.8 270.8 269.8 273.6 269.8 273.6C265.4 273.2 274 268.8 274.2 269C274.4 269.2 280 263.6 272 264.2C250.203 265.835 239.4 255.6 239.4 255.6C237.4 254.2 234.8 251.4 234.8 251.4C224.8 249.4 236.2 263.8 236.2 263.8C237.4 265.2 236 266.2 236 266.2C235.2 264.6 227.4 259.2 227.4 259.2C224.589 258.227 223.226 256.893 220.895 254.407z"/> + </g> + <g style="fill: #4c0000"> + <path d="M197 242.8C197 242.8 208.6 248.4 211.2 251.2C213.8 254 227.8 265.4 227.8 265.4C227.8 265.4 222.4 263.4 219.8 261.6C217.2 259.8 206.4 251.6 206.4 251.6C206.4 251.6 202.6 245.6 197 242.8z"/> + </g> + <g style="fill: #99cc32"> + <path d="M138.991 211.603C139.328 211.455 138.804 208.743 138.6 208.2C137.578 205.474 128.6 204 128.6 204C128.373 205.365 128.318 206.961 128.424 208.599C128.424 208.599 133.292 214.118 138.991 211.603z"/> + </g> + <g style="fill: #659900"> + <path d="M138.991 211.403C138.542 211.561 138.976 208.669 138.8 208.2C137.778 205.474 128.6 203.9 128.6 203.9C128.373 205.265 128.318 206.861 128.424 208.499C128.424 208.499 132.692 213.618 138.991 211.403z"/> + </g> + <g style="fill: #000000"> + <path d="M134.6 211.546C133.975 211.546 133.469 210.406 133.469 209C133.469 207.595 133.975 206.455 134.6 206.455C135.225 206.455 135.732 207.595 135.732 209C135.732 210.406 135.225 211.546 134.6 211.546z"/> + </g> + <g style="fill: #000000"> + <path d="M134.6 209z"/> + </g> + <g style="fill: #000000"> + <path d="M89 309.601C89 309.601 83.4 319.601 108.2 313.601C108.2 313.601 122.2 312.401 124.6 310.001C125.8 310.801 134.166 313.734 137 314.401C143.8 316.001 152.2 306 152.2 306C152.2 306 156.8 295.5 159.6 295.5C162.4 295.5 159.2 297.1 159.2 297.1C159.2 297.1 152.6 307.201 153 308.801C153 308.801 147.8 328.801 131.8 329.601C131.8 329.601 115.65 330.551 117 336.401C117 336.401 125.8 334.001 128.2 336.401C128.2 336.401 139 336.001 131 342.401L124.2 354.001C124.2 354.001 124.34 357.919 114.2 354.401C104.4 351.001 94.1 338.101 94.1 338.101C94.1 338.101 78.15 323.551 89 309.601z"/> + </g> + <g style="fill: #e59999"> + <path d="M87.8 313.601C87.8 313.601 85.8 323.201 122.6 312.801C122.6 312.801 127 312.801 129.4 313.601C131.8 314.401 143.8 317.201 145.8 316.001C145.8 316.001 138.6 329.601 127 328.001C127 328.001 113.8 329.601 114.2 334.401C114.2 334.401 118.2 341.601 123 344.001C123 344.001 125.8 346.401 125.4 349.601C125 352.801 122.2 354.401 120.2 355.201C118.2 356.001 115 352.801 113.4 352.801C111.8 352.801 103.4 346.401 99 341.601C94.6 336.801 86.2 324.801 86.6 322.001C87 319.201 87.8 313.601 87.8 313.601z"/> + </g> + <g style="fill: #b26565"> + <path d="M91 331.051C93.6 335.001 96.8 339.201 99 341.601C103.4 346.401 111.8 352.801 113.4 352.801C115 352.801 118.2 356.001 120.2 355.201C122.2 354.401 125 352.801 125.4 349.601C125.8 346.401 123 344.001 123 344.001C119.934 342.468 117.194 338.976 115.615 336.653C115.615 336.653 115.8 339.201 110.6 338.401C105.4 337.601 100.2 334.801 98.6 331.601C97 328.401 94.6 326.001 96.2 329.601C97.8 333.201 100.2 336.801 101.8 337.201C103.4 337.601 103 338.801 100.6 338.401C98.2 338.001 95.4 337.601 91 332.401z"/> + </g> + <g style="fill: #992600"> + <path d="M88.4 310.001C88.4 310.001 90.2 296.4 91.4 292.4C91.4 292.4 90.6 285.6 93 281.4C95.4 277.2 97.4 271 100.4 265.6C103.4 260.2 103.6 256.2 107.6 254.6C111.6 253 117.6 244.4 120.4 243.4C123.2 242.4 123 243.2 123 243.2C123 243.2 129.8 228.4 143.4 232.4C143.4 232.4 127.2 229.6 143 220.2C143 220.2 138.2 221.3 141.5 214.3C143.701 209.632 143.2 216.4 132.2 228.2C132.2 228.2 127.2 236.8 122 239.8C116.8 242.8 104.8 249.8 103.6 253.6C102.4 257.4 99.2 263.2 97.2 264.8C95.2 266.4 92.4 270.6 92 274C92 274 90.8 278 89.4 279.2C88 280.4 87.8 283.6 87.8 285.6C87.8 287.6 85.8 290.4 86 292.8C86 292.8 86.8 311.801 86.4 313.801L88.4 310.001z"/> + </g> + <g style="fill: #ffffff"> + <path d="M79.8 314.601C79.8 314.601 77.8 313.201 73.4 319.201C73.4 319.201 80.7 352.201 80.7 353.601C80.7 353.601 81.8 351.501 80.5 344.301C79.2 337.101 78.3 324.401 78.3 324.401L79.8 314.601z"/> + </g> + <g style="fill: #992600"> + <path d="M101.4 254C101.4 254 83.8 257.2 84.2 286.4L83.4 311.201C83.4 311.201 82.2 285.6 81 284C79.8 282.4 83.8 271.2 80.6 277.2C80.6 277.2 66.6 291.2 74.6 312.401C74.6 312.401 76.1 315.701 73.1 311.101C73.1 311.101 68.5 298.5 69.6 292.1C69.6 292.1 69.8 289.9 71.7 287.1C71.7 287.1 80.3 275.4 83 273.1C83 273.1 84.8 258.7 100.2 253.5C100.2 253.5 105.9 251.2 101.4 254z"/> + </g> + <g style="fill: #000000"> + <path d="M240.8 187.8C241.46 187.446 241.451 186.476 242.031 186.303C243.18 185.959 243.344 184.892 243.862 184.108C244.735 182.789 244.928 181.256 245.51 179.765C245.782 179.065 245.809 178.11 245.496 177.45C244.322 174.969 243.62 172.52 242.178 170.094C241.91 169.644 241.648 168.85 241.447 168.252C240.984 166.868 239.727 165.877 238.867 164.557C238.579 164.116 239.104 163.191 238.388 163.107C237.491 163.002 236.042 162.422 235.809 163.448C235.221 166.035 236.232 168.558 237.2 171C236.418 171.692 236.752 172.613 236.904 173.38C237.614 176.986 236.416 180.338 235.655 183.812C235.632 183.916 235.974 184.114 235.946 184.176C234.724 186.862 233.272 189.307 231.453 191.688C230.695 192.68 229.823 193.596 229.326 194.659C228.958 195.446 228.55 196.412 228.8 197.4C225.365 200.18 223.115 204.025 220.504 207.871C220.042 208.551 220.333 209.76 220.884 210.029C221.697 210.427 222.653 209.403 223.123 208.557C223.512 207.859 223.865 207.209 224.356 206.566C224.489 206.391 224.31 205.972 224.445 205.851C227.078 203.504 228.747 200.568 231.2 198.2C233.15 197.871 234.687 196.873 236.435 195.86C236.743 195.681 237.267 195.93 237.557 195.735C239.31 194.558 239.308 192.522 239.414 190.612C239.464 189.728 239.66 188.411 240.8 187.8z"/> + </g> + <g style="fill: #000000"> + <path d="M231.959 183.334C232.083 183.257 231.928 182.834 232.037 182.618C232.199 182.294 232.602 182.106 232.764 181.782C232.873 181.566 232.71 181.186 232.846 181.044C235.179 178.597 235.436 175.573 234.4 172.6C235.424 171.98 235.485 170.718 235.06 169.871C234.207 168.171 234.014 166.245 233.039 164.702C232.237 163.433 230.659 162.189 229.288 163.492C228.867 163.892 228.546 164.679 228.824 165.391C228.888 165.554 229.173 165.7 229.146 165.782C229.039 166.106 228.493 166.33 228.487 166.602C228.457 168.098 227.503 169.609 228.133 170.938C228.905 172.567 229.724 174.424 230.4 176.2C229.166 178.316 230.199 180.765 228.446 182.642C228.31 182.788 228.319 183.174 228.441 183.376C228.733 183.862 229.139 184.268 229.625 184.56C229.827 184.681 230.175 184.683 230.375 184.559C230.953 184.197 231.351 183.71 231.959 183.334z"/> + </g> + <g style="fill: #000000"> + <path d="M294.771 173.023C296.16 174.815 296.45 177.61 294.401 179C294.951 182.309 298.302 180.33 300.401 179.8C300.292 179.412 300.519 179.068 300.802 179.063C301.859 179.048 302.539 178.016 303.601 178.2C304.035 176.643 305.673 175.941 306.317 174.561C308.043 170.866 307.452 166.593 304.868 163.347C304.666 163.093 304.883 162.576 304.759 162.214C304.003 160.003 301.935 159.688 300.001 159C298.824 155.125 298.163 151.094 296.401 147.4C294.787 147.15 294.089 145.411 292.752 144.691C291.419 143.972 290.851 145.551 290.892 146.597C290.899 146.802 291.351 147.026 291.181 147.391C291.105 147.555 290.845 147.666 290.845 147.8C290.846 147.935 291.067 148.066 291.201 148.2C290.283 149.02 288.86 149.497 288.565 150.642C287.611 154.352 290.184 157.477 291.852 160.678C292.443 161.813 291.707 163.084 290.947 164.292C290.509 164.987 290.617 166.114 290.893 166.97C291.645 169.301 293.236 171.04 294.771 173.023z"/> + </g> + <g style="fill: #000000"> + <path d="M257.611 191.409C256.124 193.26 252.712 195.829 255.629 197.757C255.823 197.886 256.193 197.89 256.366 197.756C258.387 196.191 260.39 195.288 262.826 194.706C262.95 194.677 263.224 195.144 263.593 194.983C265.206 194.28 267.216 194.338 268.4 193C272.167 193.224 275.732 192.108 279.123 190.8C280.284 190.352 281.554 189.793 282.755 189.291C284.131 188.715 285.335 187.787 286.447 186.646C286.58 186.51 286.934 186.6 287.201 186.6C287.161 185.737 288.123 185.61 288.37 184.988C288.462 184.756 288.312 184.36 288.445 184.258C290.583 182.628 291.503 180.61 290.334 178.233C290.049 177.655 289.8 177.037 289.234 176.561C288.149 175.65 287.047 176.504 286 176.2C285.841 176.828 285.112 176.656 284.726 176.854C283.867 177.293 282.534 176.708 281.675 177.146C280.313 177.841 279.072 178.01 277.65 178.387C277.338 178.469 276.56 178.373 276.4 179C276.266 178.866 276.118 178.632 276.012 178.654C274.104 179.05 272.844 179.264 271.543 180.956C271.44 181.089 270.998 180.91 270.839 181.045C269.882 181.853 269.477 183.087 268.376 183.759C268.175 183.882 267.823 183.714 267.629 183.843C266.983 184.274 266.616 184.915 265.974 185.362C265.645 185.591 265.245 185.266 265.277 185.01C265.522 183.063 266.175 181.276 265.6 179.4C267.677 176.88 270.194 174.931 272 172.2C272.015 170.034 272.707 167.888 272.594 165.811C272.584 165.618 272.296 164.885 272.17 164.538C271.858 163.684 272.764 162.618 271.92 161.894C270.516 160.691 269.224 161.567 268.4 163C266.562 163.39 264.496 164.083 262.918 162.849C261.911 162.062 261.333 161.156 260.534 160.1C259.549 158.798 259.884 157.362 259.954 155.798C259.96 155.67 259.645 155.534 259.645 155.4C259.646 155.265 259.866 155.134 260 155C259.294 154.374 259.019 153.316 258 153C258.305 151.908 257.629 151.024 256.758 150.722C254.763 150.031 253.086 151.943 251.194 152.016C250.68 152.035 250.213 150.997 249.564 150.672C249.132 150.456 248.428 150.423 248.066 150.689C247.378 151.193 246.789 151.307 246.031 151.512C244.414 151.948 243.136 153.042 241.656 153.897C240.171 154.754 239.216 156.191 238.136 157.511C237.195 158.663 237.059 161.077 238.479 161.577C240.322 162.227 241.626 159.524 243.592 159.85C243.904 159.901 244.11 160.212 244 160.6C244.389 160.709 244.607 160.48 244.8 160.2C245.658 161.219 246.822 161.556 247.76 162.429C248.73 163.333 250.476 162.915 251.491 163.912C253.02 165.414 252.461 168.095 254.4 169.4C253.814 170.713 253.207 171.99 252.872 173.417C252.59 174.623 253.584 175.82 254.795 175.729C256.053 175.635 256.315 174.876 256.8 173.8C257.067 174.067 257.536 174.364 257.495 174.58C257.038 176.967 256.011 178.96 255.553 181.391C255.494 181.708 255.189 181.91 254.8 181.8C254.332 185.949 250.28 188.343 247.735 191.508C247.332 192.01 247.328 193.259 247.737 193.662C249.14 195.049 251.1 193.503 252.8 193C253.013 191.794 253.872 190.852 255.204 190.908C255.46 190.918 255.695 190.376 256.019 190.246C256.367 190.108 256.869 190.332 257.155 190.134C258.884 188.939 260.292 187.833 262.03 186.644C262.222 186.513 262.566 186.672 262.782 186.564C263.107 186.402 263.294 186.015 263.617 185.83C263.965 185.63 264.207 185.92 264.4 186.2C263.754 186.549 263.75 187.506 263.168 187.708C262.393 187.976 261.832 188.489 261.158 188.936C260.866 189.129 260.207 188.881 260.103 189.06C259.505 190.088 258.321 190.526 257.611 191.409z"/> + </g> + <g style="fill: #000000"> + <path d="M202.2 142C202.2 142 192.962 139.128 181.8 164.8C181.8 164.8 179.4 170 177 172C174.6 174 163.4 177.6 161.4 181.6L151 197.6C151 197.6 165.8 181.6 169 179.2C169 179.2 177 170.8 173.8 177.6C173.8 177.6 159.8 188.4 161 197.6C161 197.6 155.4 212 154.6 214C154.6 214 170.6 182 173 180.8C175.4 179.6 176.6 179.6 175.4 183.2C174.2 186.8 173.8 203.2 171 205.2C171 205.2 179 184.8 178.2 181.6C178.2 181.6 181.4 178 183.8 183.2L182.6 199.2L187 211.2C187 211.2 184.6 200 186.2 184.4C186.2 184.4 184.2 174 188.2 179.6C192.2 185.2 201.8 191.2 201.8 196C201.8 196 196.6 178.4 187.4 173.6L183.4 179.6L182.2 177.6C182.2 177.6 178.6 176.8 183 170C187.4 163.2 187 162.4 187 162.4C187 162.4 193.4 169.6 195 169.6C195 169.6 208.2 162 209.4 186.4C209.4 186.4 216.2 172 207 165.2C207 165.2 192.2 163.2 193.4 158L200.6 145.6C204.2 140.4 202.6 143.2 202.6 143.2z"/> + </g> + <g style="fill: #000000"> + <path d="M182.2 158.4C182.2 158.4 169.4 158.4 166.2 163.6L159 173.2C159 173.2 176.2 163.2 180.2 162C184.2 160.8 182.2 158.4 182.2 158.4z"/> + </g> + <g style="fill: #000000"> + <path d="M142.2 164.8C142.2 164.8 140.2 166 139.8 168.8C139.4 171.6 137 172 137.8 174.8C138.6 177.6 140.6 180 140.6 176C140.6 172 142.2 170 143 168.8C143.8 167.6 145.4 163.2 142.2 164.8z"/> + </g> + <g style="fill: #000000"> + <path d="M133.4 226C133.4 226 125 222 121.8 218.4C118.6 214.8 119.052 219.966 114.2 219.6C108.353 219.159 109.4 203.2 109.4 203.2L105.4 210.8C105.4 210.8 104.2 225.2 112.2 222.8C116.107 221.628 117.4 223.2 115.8 224C114.2 224.8 121.4 225.2 118.6 226.8C115.8 228.4 130.2 223.2 127.8 233.6L133.4 226z"/> + </g> + <g style="fill: #000000"> + <path d="M120.8 240.4C120.8 240.4 105.4 244.8 101.8 235.2C101.8 235.2 97 237.6 99.2 240.6C101.4 243.6 102.6 244 102.6 244C102.6 244 108 245.2 107.4 246C106.8 246.8 104.4 250.2 104.4 250.2C104.4 250.2 114.6 244.2 120.8 240.4z"/> + </g> + <g style="fill: #ffffff"> + <path d="M349.201 318.601C348.774 320.735 347.103 321.536 345.201 322.201C343.284 321.243 340.686 318.137 338.801 320.201C338.327 319.721 337.548 319.661 337.204 318.999C336.739 318.101 337.011 317.055 336.669 316.257C336.124 314.985 335.415 313.619 335.601 312.201C337.407 311.489 338.002 309.583 337.528 307.82C337.459 307.563 337.03 307.366 337.23 307.017C337.416 306.694 337.734 306.467 338.001 306.2C337.866 306.335 337.721 306.568 337.61 306.548C337 306.442 337.124 305.805 337.254 305.418C337.839 303.672 339.853 303.408 341.201 304.6C341.457 304.035 341.966 304.229 342.401 304.2C342.351 303.621 342.759 303.094 342.957 302.674C343.475 301.576 345.104 302.682 345.901 302.07C346.977 301.245 348.04 300.546 349.118 301.149C350.927 302.162 352.636 303.374 353.835 305.115C354.41 305.949 354.65 307.23 354.592 308.188C354.554 308.835 353.173 308.483 352.83 309.412C352.185 311.16 354.016 311.679 354.772 313.017C354.97 313.366 354.706 313.67 354.391 313.768C353.98 313.896 353.196 313.707 353.334 314.16C354.306 317.353 351.55 318.031 349.201 318.601z"/> + </g> + <g style="fill: #ffffff"> + <path d="M339.6 338.201C339.593 336.463 337.992 334.707 339.201 333.001C339.336 333.135 339.467 333.356 339.601 333.356C339.736 333.356 339.867 333.135 340.001 333.001C341.496 335.217 345.148 336.145 345.006 338.991C344.984 339.438 343.897 340.356 344.801 341.001C342.988 342.349 342.933 344.719 342.001 346.601C340.763 346.315 339.551 345.952 338.401 345.401C338.753 343.915 338.636 342.231 339.456 340.911C339.89 340.213 339.603 339.134 339.6 338.201z"/> + </g> + <g style="fill: #cccccc"> + <path d="M173.4 329.201C173.4 329.201 156.542 339.337 170.6 324.001C179.4 314.401 189.4 308.801 189.4 308.801C189.4 308.801 199.8 304.4 203.4 303.2C207 302 222.2 296.8 225.4 296.4C228.6 296 238.2 292 245 296C251.8 300 259.8 304.4 259.8 304.4C259.8 304.4 243.4 296 239.8 298.4C236.2 300.8 229 300.4 223 303.6C223 303.6 208.2 308.001 205 310.001C201.8 312.001 191.4 323.601 189.8 322.801C188.2 322.001 190.2 321.601 191.4 318.801C192.6 316.001 190.6 314.401 182.6 320.801C174.6 327.201 173.4 329.201 173.4 329.201z"/> + </g> + <g style="fill: #000000"> + <path d="M180.805 323.234C180.805 323.234 182.215 310.194 190.693 311.859C190.693 311.859 198.919 307.689 201.641 305.721C201.641 305.721 209.78 304.019 211.09 303.402C229.569 294.702 244.288 299.221 244.835 298.101C245.381 296.982 265.006 304.099 268.615 308.185C269.006 308.628 258.384 302.588 248.686 300.697C240.413 299.083 218.811 300.944 207.905 306.48C204.932 307.989 195.987 313.773 193.456 313.662C190.925 313.55 180.805 323.234 180.805 323.234z"/> + </g> + <g style="fill: #cccccc"> + <path d="M177 348.801C177 348.801 161.8 346.401 178.6 344.801C178.6 344.801 196.6 342.801 200.6 337.601C200.6 337.601 214.2 328.401 217 328.001C219.8 327.601 249.8 320.401 250.2 318.001C250.6 315.601 256.2 315.601 257.8 316.401C259.4 317.201 258.6 318.401 255.8 319.201C253 320.001 221.8 336.401 215.4 337.601C209 338.801 197.4 346.401 192.6 347.601C187.8 348.801 177 348.801 177 348.801z"/> + </g> + <g style="fill: #000000"> + <path d="M196.52 341.403C196.52 341.403 187.938 340.574 196.539 339.755C196.539 339.755 205.355 336.331 207.403 333.668C207.403 333.668 214.367 328.957 215.8 328.753C217.234 328.548 231.194 324.861 231.399 323.633C231.604 322.404 265.67 309.823 270.09 313.013C273.001 315.114 263.1 313.437 253.466 317.847C252.111 318.467 218.258 333.054 214.981 333.668C211.704 334.283 205.765 338.174 203.307 338.788C200.85 339.403 196.52 341.403 196.52 341.403z"/> + </g> + <g style="fill: #000000"> + <path d="M188.6 343.601C188.6 343.601 193.8 343.201 192.6 344.801C191.4 346.401 189 345.601 189 345.601L188.6 343.601z"/> + </g> + <g style="fill: #000000"> + <path d="M181.4 345.201C181.4 345.201 186.6 344.801 185.4 346.401C184.2 348.001 181.8 347.201 181.8 347.201L181.4 345.201z"/> + </g> + <g style="fill: #000000"> + <path d="M171 346.801C171 346.801 176.2 346.401 175 348.001C173.8 349.601 171.4 348.801 171.4 348.801L171 346.801z"/> + </g> + <g style="fill: #000000"> + <path d="M163.4 347.601C163.4 347.601 168.6 347.201 167.4 348.801C166.2 350.401 163.8 349.601 163.8 349.601L163.4 347.601z"/> + </g> + <g style="fill: #000000"> + <path d="M201.8 308.001C201.8 308.001 206.2 308.001 205 309.601C203.8 311.201 200.6 310.801 200.6 310.801L201.8 308.001z"/> + </g> + <g style="fill: #000000"> + <path d="M191.8 313.601C191.8 313.601 198.306 311.46 195.8 314.801C194.6 316.401 192.2 315.601 192.2 315.601L191.8 313.601z"/> + </g> + <g style="fill: #000000"> + <path d="M180.6 318.401C180.6 318.401 185.8 318.001 184.6 319.601C183.4 321.201 181 320.401 181 320.401L180.6 318.401z"/> + </g> + <g style="fill: #000000"> + <path d="M173 324.401C173 324.401 178.2 324.001 177 325.601C175.8 327.201 173.4 326.401 173.4 326.401L173 324.401z"/> + </g> + <g style="fill: #000000"> + <path d="M166.2 329.201C166.2 329.201 171.4 328.801 170.2 330.401C169 332.001 166.6 331.201 166.6 331.201L166.2 329.201z"/> + </g> + <g style="fill: #000000"> + <path d="M205.282 335.598C205.282 335.598 212.203 335.066 210.606 337.195C209.009 339.325 205.814 338.26 205.814 338.26L205.282 335.598z"/> + </g> + <g style="fill: #000000"> + <path d="M215.682 330.798C215.682 330.798 222.603 330.266 221.006 332.395C219.409 334.525 216.214 333.46 216.214 333.46L215.682 330.798z"/> + </g> + <g style="fill: #000000"> + <path d="M226.482 326.398C226.482 326.398 233.403 325.866 231.806 327.995C230.209 330.125 227.014 329.06 227.014 329.06L226.482 326.398z"/> + </g> + <g style="fill: #000000"> + <path d="M236.882 321.598C236.882 321.598 243.803 321.066 242.206 323.195C240.609 325.325 237.414 324.26 237.414 324.26L236.882 321.598z"/> + </g> + <g style="fill: #000000"> + <path d="M209.282 303.598C209.282 303.598 216.203 303.066 214.606 305.195C213.009 307.325 209.014 307.06 209.014 307.06L209.282 303.598z"/> + </g> + <g style="fill: #000000"> + <path d="M219.282 300.398C219.282 300.398 226.203 299.866 224.606 301.995C223.009 304.125 218.614 303.86 218.614 303.86L219.282 300.398z"/> + </g> + <g style="fill: #000000"> + <path d="M196.6 340.401C196.6 340.401 201.8 340.001 200.6 341.601C199.4 343.201 197 342.401 197 342.401L196.6 340.401z"/> + </g> + <g style="fill: #992600"> + <path d="M123.4 241.2C123.4 241.2 119 250 118.6 253.2C118.6 253.2 119.4 244.4 120.6 242.4C121.8 240.4 123.4 241.2 123.4 241.2z"/> + </g> + <g style="fill: #992600"> + <path d="M105 255.2C105 255.2 101.8 269.6 102.2 272.4C102.2 272.4 101 260.8 101.4 259.6C101.8 258.4 105 255.2 105 255.2z"/> + </g> + <g style="fill: #cccccc"> + <path d="M125.8 180.6L125.6 183.8L123.4 184C123.4 184 137.6 196.6 138.2 204.2C138.2 204.2 139 196 125.8 180.6z"/> + </g> + <g style="fill: #000000"> + <path d="M129.784 181.865C129.353 181.449 129.572 180.704 129.164 180.444C128.355 179.928 130.462 179.871 130.234 179.155C129.851 177.949 130.038 177.928 129.916 176.652C129.859 176.054 130.447 174.514 130.832 174.074C132.278 172.422 130.954 169.49 132.594 167.939C132.898 167.65 133.274 167.098 133.559 166.68C134.218 165.717 135.402 165.229 136.352 164.401C136.67 164.125 136.469 163.298 137.038 163.39C137.752 163.505 138.993 163.375 138.948 164.216C138.835 166.336 137.506 168.056 136.226 169.724C136.677 170.428 136.219 171.063 135.935 171.62C134.6 174.24 134.789 177.081 134.615 179.921C134.61 180.006 134.303 180.084 134.311 180.137C134.664 182.472 135.248 184.671 136.127 186.9C136.493 187.83 136.964 188.725 137.114 189.652C137.225 190.338 137.328 191.171 136.92 191.876C138.955 194.766 137.646 197.417 138.815 200.948C139.022 201.573 140.714 203.487 140.251 203.326C137.738 202.455 137.626 202.057 137.449 201.304C137.303 200.681 136.973 199.304 136.736 198.702C136.672 198.538 136.501 196.654 136.423 196.532C134.91 194.15 136.268 194.326 134.898 191.968C133.47 191.288 132.504 190.184 131.381 189.022C131.183 188.818 132.326 188.094 132.145 187.881C131.053 186.592 129.9 185.825 130.236 184.332C130.391 183.642 130.528 182.585 129.784 181.865z"/> + </g> + <g style="fill: #000000"> + <path d="M126.2 183.6C126.2 183.6 126.6 190.4 129 192C131.4 193.6 130.2 192.8 127 191.6C123.8 190.4 125 189.6 125 189.6C125 189.6 122.2 190 124.6 192C127 194 130.6 196.4 129 196.4C127.4 196.4 119.8 192.4 119.8 189.6C119.8 186.8 118.8 182.7 118.8 182.7C118.8 182.7 119.9 181.9 124.7 182C124.7 182 126.1 182.7 126.2 183.6z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M125.4 202.2C125.4 202.2 116.88 199.409 98.4 202.8C98.4 202.8 107.431 200.722 126.2 203C136.5 204.25 125.4 202.2 125.4 202.2z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M127.498 202.129C127.498 202.129 119.252 198.611 100.547 200.392C100.547 200.392 109.725 199.103 128.226 202.995C138.38 205.131 127.498 202.129 127.498 202.129z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M129.286 202.222C129.286 202.222 121.324 198.101 102.539 198.486C102.539 198.486 111.787 197.882 129.948 203.14C139.914 206.025 129.286 202.222 129.286 202.222z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M130.556 202.445C130.556 202.445 123.732 198.138 106.858 197.04C106.858 197.04 115.197 197.21 131.078 203.319C139.794 206.672 130.556 202.445 130.556 202.445z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M245.84 212.961C245.84 212.961 244.91 213.605 245.124 212.424C245.339 211.243 273.547 198.073 277.161 198.323C277.161 198.323 246.913 211.529 245.84 212.961z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M242.446 213.6C242.446 213.6 241.57 214.315 241.691 213.121C241.812 211.927 268.899 196.582 272.521 196.548C272.521 196.548 243.404 212.089 242.446 213.6z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M239.16 214.975C239.16 214.975 238.332 215.747 238.374 214.547C238.416 213.348 258.233 197.851 268.045 195.977C268.045 195.977 250.015 204.104 239.16 214.975z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M236.284 216.838C236.284 216.838 235.539 217.532 235.577 216.453C235.615 215.373 253.449 201.426 262.28 199.74C262.28 199.74 246.054 207.054 236.284 216.838z"/> + </g> + <g style="fill: #cccccc"> + <path d="M204.6 364.801C204.6 364.801 189.4 362.401 206.2 360.801C206.2 360.801 224.2 358.801 228.2 353.601C228.2 353.601 241.8 344.401 244.6 344.001C247.4 343.601 263.8 340.001 264.2 337.601C264.6 335.201 270.6 332.801 272.2 333.601C273.8 334.401 273.8 343.601 271 344.401C268.2 345.201 249.4 352.401 243 353.601C236.6 354.801 225 362.401 220.2 363.601C215.4 364.801 204.6 364.801 204.6 364.801z"/> + </g> + <g style="fill: #000000"> + <path d="M277.6 327.401C277.6 327.401 274.6 329.001 273.4 331.601C273.4 331.601 267 342.201 252.8 345.401C252.8 345.401 229.8 354.401 222 356.401C222 356.401 208.6 361.401 201.2 360.601C201.2 360.601 194.2 360.801 200.4 362.401C200.4 362.401 220.6 360.401 224 358.601C224 358.601 239.6 353.401 242.6 350.801C245.6 348.201 263.8 343.201 266 341.201C268.2 339.201 278 330.801 277.6 327.401z"/> + </g> + <g style="fill: #000000"> + <path d="M218.882 358.911C218.882 358.911 224.111 358.685 222.958 360.234C221.805 361.784 219.357 360.91 219.357 360.91L218.882 358.911z"/> + </g> + <g style="fill: #000000"> + <path d="M211.68 360.263C211.68 360.263 216.908 360.037 215.756 361.586C214.603 363.136 212.155 362.263 212.155 362.263L211.68 360.263z"/> + </g> + <g style="fill: #000000"> + <path d="M201.251 361.511C201.251 361.511 206.48 361.284 205.327 362.834C204.174 364.383 201.726 363.51 201.726 363.51L201.251 361.511z"/> + </g> + <g style="fill: #000000"> + <path d="M193.617 362.055C193.617 362.055 198.846 361.829 197.693 363.378C196.54 364.928 194.092 364.054 194.092 364.054L193.617 362.055z"/> + </g> + <g style="fill: #000000"> + <path d="M235.415 351.513C235.415 351.513 242.375 351.212 240.84 353.274C239.306 355.336 236.047 354.174 236.047 354.174L235.415 351.513z"/> + </g> + <g style="fill: #000000"> + <path d="M245.73 347.088C245.73 347.088 251.689 343.787 251.155 348.849C250.885 351.405 246.362 349.749 246.362 349.749L245.73 347.088z"/> + </g> + <g style="fill: #000000"> + <path d="M254.862 344.274C254.862 344.274 262.021 340.573 260.287 346.035C259.509 348.485 255.493 346.935 255.493 346.935L254.862 344.274z"/> + </g> + <g style="fill: #000000"> + <path d="M264.376 339.449C264.376 339.449 268.735 334.548 269.801 341.21C270.207 343.748 265.008 342.11 265.008 342.11L264.376 339.449z"/> + </g> + <g style="fill: #000000"> + <path d="M226.834 355.997C226.834 355.997 232.062 355.77 230.91 357.32C229.757 358.869 227.308 357.996 227.308 357.996L226.834 355.997z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M262.434 234.603C262.434 234.603 261.708 235.268 261.707 234.197C261.707 233.127 279.191 219.863 288.034 218.479C288.034 218.479 271.935 225.208 262.434 234.603z"/> + </g> + <g style="fill: #000000"> + <path d="M265.4 298.4C265.4 298.4 287.401 320.801 296.601 324.401C296.601 324.401 305.801 335.601 301.801 361.601C301.801 361.601 298.601 369.201 295.401 348.401C295.401 348.401 298.601 323.201 287.401 339.201C287.401 339.201 279 329.301 285.4 329.601C285.4 329.601 288.601 331.601 289.001 330.001C289.401 328.401 281.4 314.801 264.2 300.4C247 286 265.4 298.4 265.4 298.4z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M207 337.201C207 337.201 206.8 335.401 208.6 336.201C210.4 337.001 304.601 343.201 336.201 367.201C336.201 367.201 291.001 344.001 207 337.201z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M217.4 332.801C217.4 332.801 217.2 331.001 219 331.801C220.8 332.601 357.401 331.601 381.001 364.001C381.001 364.001 359.001 338.801 217.4 332.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M229 328.801C229 328.801 228.8 327.001 230.6 327.801C232.4 328.601 405.801 315.601 429.401 348.001C429.401 348.001 419.801 322.401 229 328.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M239 324.001C239 324.001 238.8 322.201 240.6 323.001C242.4 323.801 364.601 285.2 388.201 317.601C388.201 317.601 374.801 293 239 324.001z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M181 346.801C181 346.801 180.8 345.001 182.6 345.801C184.4 346.601 202.2 348.801 204.2 387.601C204.2 387.601 197 345.601 181 346.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M172.2 348.401C172.2 348.401 172 346.601 173.8 347.401C175.6 348.201 189.8 343.601 187 382.401C187 382.401 188.2 347.201 172.2 348.401z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M164.2 348.801C164.2 348.801 164 347.001 165.8 347.801C167.6 348.601 183 349.201 170.6 371.601C170.6 371.601 180.2 347.601 164.2 348.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M211.526 304.465C211.526 304.465 211.082 306.464 212.631 305.247C228.699 292.622 261.141 233.72 316.826 228.086C316.826 228.086 278.518 215.976 211.526 304.465z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M222.726 302.665C222.726 302.665 221.363 301.472 223.231 300.847C225.099 300.222 337.541 227.72 376.826 235.686C376.826 235.686 349.719 228.176 222.726 302.665z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M201.885 308.767C201.885 308.767 201.376 310.366 203.087 309.39C212.062 304.27 215.677 247.059 259.254 245.804C259.254 245.804 226.843 231.09 201.885 308.767z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M181.962 319.793C181.962 319.793 180.885 321.079 182.838 320.825C193.084 319.493 214.489 278.222 258.928 283.301C258.928 283.301 226.962 268.955 181.962 319.793z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M193.2 313.667C193.2 313.667 192.389 315.136 194.258 314.511C204.057 311.237 217.141 266.625 261.729 263.078C261.729 263.078 227.603 255.135 193.2 313.667z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M174.922 324.912C174.922 324.912 174.049 325.954 175.631 325.748C183.93 324.669 201.268 291.24 237.264 295.354C237.264 295.354 211.371 283.734 174.922 324.912z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M167.323 330.821C167.323 330.821 166.318 331.866 167.909 331.748C172.077 331.439 202.715 298.36 221.183 313.862C221.183 313.862 209.168 295.139 167.323 330.821z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M236.855 298.898C236.855 298.898 235.654 297.543 237.586 297.158C239.518 296.774 360.221 239.061 398.184 251.927C398.184 251.927 372.243 241.053 236.855 298.898z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M203.4 363.201C203.4 363.201 203.2 361.401 205 362.201C206.8 363.001 222.2 363.601 209.8 386.001C209.8 386.001 219.4 362.001 203.4 363.201z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M213.8 361.601C213.8 361.601 213.6 359.801 215.4 360.601C217.2 361.401 235 363.601 237 402.401C237 402.401 229.8 360.401 213.8 361.601z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M220.6 360.001C220.6 360.001 220.4 358.201 222.2 359.001C224 359.801 248.6 363.201 272.2 395.601C272.2 395.601 236.6 358.801 220.6 360.001z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M228.225 357.972C228.225 357.972 227.788 356.214 229.678 356.768C231.568 357.322 252.002 355.423 290.099 389.599C290.099 389.599 243.924 354.656 228.225 357.972z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M238.625 353.572C238.625 353.572 238.188 351.814 240.078 352.368C241.968 352.922 276.802 357.423 328.499 392.399C328.499 392.399 254.324 350.256 238.625 353.572z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M198.2 342.001C198.2 342.001 198 340.201 199.8 341.001C201.6 341.801 255 344.401 285.4 371.201C285.4 371.201 250.499 346.426 198.2 342.001z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M188.2 346.001C188.2 346.001 188 344.201 189.8 345.001C191.6 345.801 216.2 349.201 239.8 381.601C239.8 381.601 204.2 344.801 188.2 346.001z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M249.503 348.962C249.503 348.962 248.938 347.241 250.864 347.655C252.79 348.068 287.86 350.004 341.981 381.098C341.981 381.098 264.317 346.704 249.503 348.962z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M257.903 346.562C257.903 346.562 257.338 344.841 259.264 345.255C261.19 345.668 296.26 347.604 350.381 378.698C350.381 378.698 273.317 343.904 257.903 346.562z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M267.503 341.562C267.503 341.562 266.938 339.841 268.864 340.255C270.79 340.668 313.86 345.004 403.582 379.298C403.582 379.298 282.917 338.904 267.503 341.562z"/> + </g> + <g style="fill: #000000"> + <path d="M156.2 348.401C156.2 348.401 161.4 348.001 160.2 349.601C159 351.201 156.6 350.401 156.6 350.401L156.2 348.401z"/> + </g> + <g style="fill: #000000"> + <path d="M187 362.401C187 362.401 192.2 362.001 191 363.601C189.8 365.201 187.4 364.401 187.4 364.401L187 362.401z"/> + </g> + <g style="fill: #000000"> + <path d="M178.2 362.001C178.2 362.001 183.4 361.601 182.2 363.201C181 364.801 178.6 364.001 178.6 364.001L178.2 362.001z"/> + </g> + <g style="fill: #000000"> + <path d="M82.831 350.182C82.831 350.182 87.876 351.505 86.218 352.624C84.561 353.744 82.554 352.202 82.554 352.202L82.831 350.182z"/> + </g> + <g style="fill: #000000"> + <path d="M84.831 340.582C84.831 340.582 89.876 341.905 88.218 343.024C86.561 344.144 84.554 342.602 84.554 342.602L84.831 340.582z"/> + </g> + <g style="fill: #000000"> + <path d="M77.631 336.182C77.631 336.182 82.676 337.505 81.018 338.624C79.361 339.744 77.354 338.202 77.354 338.202L77.631 336.182z"/> + </g> + <g style="fill: #cccccc"> + <path d="M157.4 411.201C157.4 411.201 155.8 411.201 151.8 413.201C149.8 413.201 138.6 416.801 133 426.801C133 426.801 145.4 417.201 157.4 411.201z"/> + </g> + <g style="fill: #cccccc"> + <path d="M245.116 503.847C245.257 504.105 245.312 504.525 245.604 504.542C246.262 504.582 247.495 504.883 247.37 504.247C246.522 499.941 245.648 495.004 241.515 493.197C240.876 492.918 239.434 493.331 239.36 494.215C239.233 495.739 239.116 497.088 239.425 498.554C239.725 499.975 241.883 499.985 242.8 498.601C243.736 500.273 244.168 502.116 245.116 503.847z"/> + </g> + <g style="fill: #cccccc"> + <path d="M234.038 508.581C234.786 509.994 234.659 511.853 236.074 512.416C236.814 512.71 238.664 511.735 238.246 510.661C237.444 508.6 237.056 506.361 235.667 504.55C235.467 504.288 235.707 503.755 235.547 503.427C234.953 502.207 233.808 501.472 232.4 501.801C231.285 504.004 232.433 506.133 233.955 507.842C234.091 507.994 233.925 508.37 234.038 508.581z"/> + </g> + <g style="fill: #cccccc"> + <path d="M194.436 503.391C194.328 503.014 194.29 502.551 194.455 502.23C194.986 501.197 195.779 500.075 195.442 499.053C195.094 497.997 193.978 498.179 193.328 498.748C192.193 499.742 192.144 501.568 191.453 502.927C191.257 503.313 191.308 503.886 190.867 504.277C190.393 504.698 189.953 506.222 190.049 506.793C190.102 507.106 189.919 517.014 190.141 516.751C190.76 516.018 193.81 506.284 193.879 505.392C193.936 504.661 194.668 504.196 194.436 503.391z"/> + </g> + <g style="fill: #cccccc"> + <path d="M168.798 496.599C171.432 494.1 174.222 491.139 173.78 487.427C173.664 486.451 171.889 486.978 171.702 487.824C170.9 491.449 168.861 494.11 166.293 496.502C164.097 498.549 162.235 504.893 162 505.401C165.697 500.145 167.954 497.399 168.798 496.599z"/> + </g> + <g style="fill: #cccccc"> + <path d="M155.224 490.635C155.747 490.265 155.445 489.774 155.662 489.442C156.615 487.984 157.916 486.738 157.934 485C157.937 484.723 157.559 484.414 157.224 484.638C156.947 484.822 156.605 484.952 156.497 485.082C154.467 487.531 153.067 490.202 151.624 493.014C151.441 493.371 150.297 497.862 150.61 497.973C150.849 498.058 152.569 493.877 152.779 493.763C154.042 493.077 154.054 491.462 155.224 490.635z"/> + </g> + <g style="fill: #cccccc"> + <path d="M171.957 510.179C172.401 509.31 173.977 508.108 173.864 507.219C173.746 506.291 174.214 504.848 173.302 505.536C172.045 506.484 168.596 507.833 168.326 513.641C168.3 514.212 171.274 511.519 171.957 510.179z"/> + </g> + <g style="fill: #cccccc"> + <path d="M186.4 493.001C186.8 492.333 187.508 492.806 187.967 492.543C188.615 492.171 189.226 491.613 189.518 490.964C190.488 488.815 192.257 486.995 192.4 484.601C190.909 483.196 190.23 485.236 189.6 486.201C188.277 484.554 187.278 486.428 185.978 486.947C185.908 486.975 185.695 486.628 185.62 486.655C184.443 487.095 183.763 488.176 182.765 488.957C182.594 489.091 182.189 488.911 182.042 489.047C181.39 489.65 180.417 489.975 180.137 490.657C179.027 493.364 175.887 495.459 174 503.001C174.381 503.91 178.512 496.359 178.999 495.661C179.835 494.465 179.953 497.322 181.229 496.656C181.28 496.629 181.466 496.867 181.6 497.001C181.794 496.721 182.012 496.492 182.4 496.601C182.4 496.201 182.266 495.645 182.467 495.486C183.704 494.509 183.62 493.441 184.4 492.201C184.858 492.99 185.919 492.271 186.4 493.001z"/> + </g> + <g style="fill: #cccccc"> + <path d="M246.2 547.401C246.2 547.401 253.6 527.001 249.2 515.801C249.2 515.801 260.6 537.401 256 548.601C256 548.601 255.6 538.201 251.6 533.201C251.6 533.201 247.6 546.001 246.2 547.401z"/> + </g> + <g style="fill: #cccccc"> + <path d="M231.4 544.801C231.4 544.801 236.8 536.001 228.8 517.601C228.8 517.601 228 538.001 221.2 549.001C221.2 549.001 235.4 528.801 231.4 544.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M221.4 542.801C221.4 542.801 221.2 522.801 221.6 519.801C221.6 519.801 217.8 536.401 207.6 546.001C207.6 546.001 222 534.001 221.4 542.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M211.8 510.801C211.8 510.801 217.8 524.401 207.8 542.801C207.8 542.801 214.2 530.601 209.4 523.601C209.4 523.601 212 520.201 211.8 510.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M192.6 542.401C192.6 542.401 191.6 526.801 193.4 524.601C193.4 524.601 193.6 518.201 193.2 517.201C193.2 517.201 197.2 511.001 197.4 518.401C197.4 518.401 198.8 526.201 201.6 530.801C201.6 530.801 205.2 536.201 205 542.601C205 542.601 195 512.401 192.6 542.401z"/> + </g> + <g style="fill: #cccccc"> + <path d="M189 514.801C189 514.801 182.4 525.601 180.6 544.601C180.6 544.601 179.2 538.401 183 524.001C183 524.001 187.2 508.601 189 514.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M167.2 534.601C167.2 534.601 172.2 529.201 173.6 524.201C173.6 524.201 177.2 508.401 170.8 517.001C170.8 517.001 171 525.001 162.8 532.401C162.8 532.401 167.6 530.001 167.2 534.601z"/> + </g> + <g style="fill: #cccccc"> + <path d="M161.4 529.601C161.4 529.601 164.8 512.201 165.6 511.401C165.6 511.401 167.4 508.001 164.6 511.201C164.6 511.201 155.8 530.401 151.8 537.001C151.8 537.001 159.8 527.801 161.4 529.601z"/> + </g> + <g style="fill: #cccccc"> + <path d="M155.6 513.001C155.6 513.001 167.2 490.601 145.4 516.401C145.4 516.401 156.4 506.601 155.6 513.001z"/> + </g> + <g style="fill: #cccccc"> + <path d="M140.2 498.401C140.2 498.401 145 479.601 147.6 479.801C147.6 479.801 155.8 470.801 149.2 481.401C149.2 481.401 143.2 491.001 143.8 500.801C143.8 500.801 143.2 491.201 140.2 498.401z"/> + </g> + <g style="fill: #cccccc"> + <path d="M470.5 487C470.5 487 458.5 477 456 473.5C456 473.5 469.5 492 469.5 499C469.5 499 472 491.5 470.5 487z"/> + </g> + <g style="fill: #cccccc"> + <path d="M476 465C476 465 455 450 451.5 442.5C451.5 442.5 478 472 478 476.5C478 476.5 478.5 467.5 476 465z"/> + </g> + <g style="fill: #cccccc"> + <path d="M493 311C493 311 481 303 479.5 305C479.5 305 490 311.5 492.5 320C492.5 320 491 311 493 311z"/> + </g> + <g style="fill: #cccccc"> + <path d="M501.5 391.5L484 379.5C484 379.5 503 396.5 503.5 400.5L501.5 391.5z"/> + </g> + <g style="stroke:#000000"> + <path d="M110.75 369L132.75 373.75"/> + </g> + <g style="stroke:#000000"> + <path d="M161 531C161 531 160.5 527.5 151.5 538"/> + </g> + <g style="stroke:#000000"> + <path d="M166.5 536C166.5 536 168.5 529.5 162 534"/> + </g> + <g style="stroke:#000000"> + <path d="M220.5 544.5C220.5 544.5 222 533.5 210.5 546.5"/> + </g> </svg> diff --git a/result/noent/xml1 b/result/noent/xml1 index 51553fc7..a197468d 100644 --- a/result/noent/xml1 +++ b/result/noent/xml1 @@ -5,7 +5,7 @@ (&amp;).</p>"> ]> <test> - <p>An ampersand (&) may be escaped +<p>An ampersand (&) may be escaped numerically (&#38;) or with a general entity (&amp;amp;).</p> </test> diff --git a/result/noent/xml2 b/result/noent/xml2 index f4865fcc..6c394543 100644 --- a/result/noent/xml2 +++ b/result/noent/xml2 @@ -1,8 +1,8 @@ <?xml version="1.0"?> <!DOCTYPE test [ +<!ELEMENT test (#PCDATA)> <!ENTITY % xx "%zz;"> <!ENTITY % zz '<!ENTITY tricky "error-prone" >'> <!ENTITY tricky "error-prone"> -<!ELEMENT test (#PCDATA)> ]> <test>This sample shows a error-prone method.</test> @@ -1,22 +1,19 @@ <?xml version="1.0"?> <RDF:RDF xmlns:RDF="http://www.w3.org/TR/WD-rdf-syntax#" p3p="http//www.w3.org/TR/1998/WD-P3P10-syntax#proposal.DTD"> - <PROP realm="http://www.CoolCatalog.com/catalogue/" entity="CoolCatalog" agreeID="94df1293a3e519bb" assurance="http://www.TrustUs.org"> - <USES> - <STATEMENT purp="2,3" recpnt="0" id="0" consq="a site with clothes you'd appreciate."> - <WITH> - <PREFIX name="User."> - <REF name="Name.First"/> - <REF name="Bdate.Year" optional="1"/> - <REF name="Gender"/> - </PREFIX> - </WITH> - </STATEMENT> - </USES> - <USES> - <STATEMENT action="read&write" purp="0" recpnt="0" id="1"> - <REF name="User.Shipping."/> - </STATEMENT> - </USES> - <DISCLOSURE discURI="http://www.CoolCatalog.com/PrivacyPractice.html" access="3" other="0,1"/> - </PROP> -</RDF:RDF> +<PROP realm="http://www.CoolCatalog.com/catalogue/" entity="CoolCatalog" agreeID="94df1293a3e519bb" assurance="http://www.TrustUs.org"> + <USES> + <STATEMENT purp="2,3" recpnt="0" id="0" consq="a site with clothes you'd appreciate."> + <WITH><PREFIX name="User."> + <REF name="Name.First"/> + <REF name="Bdate.Year" optional="1"/> + <REF name="Gender"/> + </PREFIX></WITH> + </STATEMENT> + </USES> + <USES> + <STATEMENT action="read&write" purp="0" recpnt="0" id="1"> + <REF name="User.Shipping."/> + </STATEMENT> + </USES> + <DISCLOSURE discURI="http://www.CoolCatalog.com/PrivacyPractice.html" access="3" other="0,1"/> +</PROP></RDF:RDF> diff --git a/result/pi.xml b/result/pi.xml index 27bed5b9..48c7ff04 100644 --- a/result/pi.xml +++ b/result/pi.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <doc> <?document-start doc?> - <empty/> +<empty/> <?document-end doc?> </doc> diff --git a/result/pi2.xml b/result/pi2.xml index acf76f95..710d51c9 100644 --- a/result/pi2.xml +++ b/result/pi2.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <?document-start doc?> <doc> - <empty/> +<empty/> </doc> <?document-end doc?> diff --git a/result/rdf2 b/result/rdf2 index fe803995..284946bf 100644 --- a/result/rdf2 +++ b/result/rdf2 @@ -11,11 +11,11 @@ <RPM:Packager>Till Bubeck <bubeck@delix.de>, Ngo Than <than@delix.de></RPM:Packager> <RPM:Group>Libraries</RPM:Group> <RPM:Summary>Bibliothek zur Ansteuerung von Terminals</RPM:Summary> - <RPM:Description>Diese Library stellt dem Programmierer vom Terminal unabhängige -Routinen zur Ansteuerung Ihres Bildschirms zur Verfügung, die + <RPM:Description>Diese Library stellt dem Programmierer vom Terminal unabhängige +Routinen zur Ansteuerung Ihres Bildschirms zur Verfügung, die speziell optimiert sind. -Diese Version ist die 'new curses' (ncurses) Variante und ist der -anerkannte Ersatz für die klassische Curses-Library, die nicht mehr +Diese Version ist die 'new curses' (ncurses) Variante und ist der +anerkannte Ersatz für die klassische Curses-Library, die nicht mehr weiterentwickelt wird.</RPM:Description> <RPM:Copyright>GPL</RPM:Copyright> <RPM:Sources>ncurses4-4.2-3.src.rpm</RPM:Sources> diff --git a/result/slashdot.rdf b/result/slashdot.rdf index 08d4922d..2fc1f07f 100644 --- a/result/slashdot.rdf +++ b/result/slashdot.rdf @@ -1,51 +1,63 @@ <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/"> + <channel> <title>Slashdot:News for Nerds. Stuff that Matters.</title> <link>http://slashdot.org/</link> <description>News for Nerds. Stuff that Matters</description> </channel> + <image> <title>Slashdot</title> <url>http://slashdot.org/images/slashdotlg.gif</url> <link>http://slashdot.org</link> </image> + <item> <title>100 Mbit/s on Fibre to the home</title> <link>http://slashdot.org/articles/99/06/06/1440211.shtml</link> </item> + <item> <title>Gimp 1.2 Preview</title> <link>http://slashdot.org/articles/99/06/06/1438246.shtml</link> </item> + <item> - <title>Sony's AIBO robot Sold Out</title> + <title>Sony's AIBO robot Sold Out</title> <link>http://slashdot.org/articles/99/06/06/1432256.shtml</link> </item> + <item> <title>Ask Slashdot: Another Word for "Hacker"?</title> <link>http://slashdot.org/askslashdot/99/06/05/1815225.shtml</link> </item> + <item> <title>Corel Linux FAQ</title> <link>http://slashdot.org/articles/99/06/05/1842218.shtml</link> </item> + <item> <title>Upside downsides MP3.COM.</title> <link>http://slashdot.org/articles/99/06/05/1558210.shtml</link> </item> + <item> <title>2 Terabits of Bandwidth</title> <link>http://slashdot.org/articles/99/06/05/1554258.shtml</link> </item> + <item> <title>Suppression of cold fusion research?</title> <link>http://slashdot.org/articles/99/06/04/2313200.shtml</link> </item> + <item> <title>California Gov. Halts Wage Info Sale</title> <link>http://slashdot.org/articles/99/06/04/235256.shtml</link> </item> + <item> <title>Red Hat Announces IPO</title> <link>http://slashdot.org/articles/99/06/04/0849207.shtml</link> diff --git a/result/slashdot.xml b/result/slashdot.xml index f52ca805..5521254c 100644 --- a/result/slashdot.xml +++ b/result/slashdot.xml @@ -1,17 +1,17 @@ <?xml version="1.0"?> <ultramode> - <story> + <story> <title>100 Mbit/s on Fibre to the home</title> <url>http://slashdot.org/articles/99/06/06/1440211.shtml</url> <time>1999-06-06 14:39:59</time> <author>CmdrTaco</author> - <department>wouldn't-it-be-nice</department> + <department>wouldn't-it-be-nice</department> <topic>internet</topic> <comments>20</comments> <section>articles</section> <image>topicinternet.jpg</image> </story> - <story> + <story> <title>Gimp 1.2 Preview</title> <url>http://slashdot.org/articles/99/06/06/1438246.shtml</url> <time>1999-06-06 14:38:40</time> @@ -22,8 +22,8 @@ <section>articles</section> <image>topicgimp.gif</image> </story> - <story> - <title>Sony's AIBO robot Sold Out</title> + <story> + <title>Sony's AIBO robot Sold Out</title> <url>http://slashdot.org/articles/99/06/06/1432256.shtml</url> <time>1999-06-06 14:32:51</time> <author>CmdrTaco</author> @@ -33,7 +33,7 @@ <section>articles</section> <image>topictech2.jpg</image> </story> - <story> + <story> <title>Ask Slashdot: Another Word for "Hacker"?</title> <url>http://slashdot.org/askslashdot/99/06/05/1815225.shtml</url> <time>1999-06-05 20:00:00</time> @@ -44,7 +44,7 @@ <section>askslashdot</section> <image>topicnews.gif</image> </story> - <story> + <story> <title>Corel Linux FAQ</title> <url>http://slashdot.org/articles/99/06/05/1842218.shtml</url> <time>1999-06-05 18:42:06</time> @@ -55,7 +55,7 @@ <section>articles</section> <image>topiccorel.gif</image> </story> - <story> + <story> <title>Upside downsides MP3.COM.</title> <url>http://slashdot.org/articles/99/06/05/1558210.shtml</url> <time>1999-06-05 15:56:45</time> @@ -66,7 +66,7 @@ <section>articles</section> <image>topicmusic.gif</image> </story> - <story> + <story> <title>2 Terabits of Bandwidth</title> <url>http://slashdot.org/articles/99/06/05/1554258.shtml</url> <time>1999-06-05 15:53:43</time> @@ -77,7 +77,7 @@ <section>articles</section> <image>topicinternet.jpg</image> </story> - <story> + <story> <title>Suppression of cold fusion research?</title> <url>http://slashdot.org/articles/99/06/04/2313200.shtml</url> <time>1999-06-04 23:12:29</time> @@ -88,7 +88,7 @@ <section>articles</section> <image>topicscience.gif</image> </story> - <story> + <story> <title>California Gov. Halts Wage Info Sale</title> <url>http://slashdot.org/articles/99/06/04/235256.shtml</url> <time>1999-06-04 23:05:34</time> @@ -99,7 +99,7 @@ <section>articles</section> <image>topicus.gif</image> </story> - <story> + <story> <title>Red Hat Announces IPO</title> <url>http://slashdot.org/articles/99/06/04/0849207.shtml</url> <time>1999-06-04 19:30:18</time> diff --git a/result/svg1 b/result/svg1 index 6802e5cd..359bd455 100644 --- a/result/svg1 +++ b/result/svg1 @@ -1,161 +1,161 @@ <?xml version="1.0" standalone="yes"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd"> <svg width="242px" height="383px"> - <g style="stroke: #000000"/> - <g style="fill: #f2cc99"> - <polyline verts=" 69,18 82,8 99,3 118,5 135,12 149,21 156,13 165,9 177,13 183,28 180,50 164,91 155,107 154,114 151,121 141,127 139,136 155,206 157,251 126,342 133,357 128,376 83,376 75,368 67,350 61,350 53,369 4,369 2,361 5,354 12,342 16,321 4,257 4,244 7,218 9,179 26,127 43,93 32,77 30,70 24,67 16,49 17,35 18,23 30,12 40,7 53,7 62,12 69,18 69,18 69,18"/> - </g> - <g style="fill: #e5b27f"> - <polyline verts=" 142,79 136,74 138,82 133,78 133,84 127,78 128,85 124,80 125,87 119,82 119,90 125,99 125,96 128,100 128,94 131,98 132,93 135,97 136,93 138,97 139,94 141,98 143,94 144,85 142,79 142,79 142,79"/> - </g> - <g style="fill: #eb8080"> - <polyline verts=" 127,101 132,100 137,99 144,101 143,105 135,110 127,101 127,101 127,101"/> - </g> - <g style="fill: #f2cc99"> - <polyline verts=" 178,229 157,248 139,296 126,349 137,356 158,357 183,342 212,332 235,288 235,261 228,252 212,250 188,251 178,229 178,229 178,229"/> - </g> - <g style="fill: #9c826b"> - <polyline verts=" 56,229 48,241 48,250 57,281 63,325 71,338 81,315 76,321 79,311 83,301 75,308 80,298 73,303 76,296 71,298 74,292 69,293 74,284 78,278 71,278 74,274 68,273 70,268 66,267 68,261 60,266 62,259 65,253 57,258 59,251 55,254 55,248 60,237 54,240 58,234 54,236 56,229 56,229 56,229"/> - <polyline verts=" 74,363 79,368 81,368 85,362 89,363 92,370 96,373 101,372 108,361 110,371 113,373 116,371 120,358 122,363 123,371 126,371 129,367 132,357 135,361 130,376 127,377 94,378 84,376 76,371 74,363 74,363 74,363"/> - <polyline verts=" 212,250 219,251 228,258 236,270 235,287 225,304 205,332 177,343 171,352 158,357 166,352 168,346 168,339 165,333 155,327 155,323 161,320 165,316 169,316 167,312 171,313 168,308 173,309 170,306 177,306 175,308 177,311 174,311 176,316 171,315 174,319 168,320 168,323 175,327 179,332 183,326 184,332 189,323 190,328 194,320 194,325 199,316 201,320 204,313 206,316 208,310 211,305 219,298 226,288 229,279 228,266 224,259 217,253 212,250 212,250 212,250"/> - <polyline verts=" 151,205 151,238 149,252 141,268 128,282 121,301 130,300 126,313 118,324 116,337 120,346 133,352 133,340 137,333 145,329 156,327 153,319 153,291 157,271 170,259 178,277 193,250 174,216 151,205 151,205 151,205"/> - <polyline verts=" 78,127 90,142 95,155 108,164 125,167 139,175 150,206 152,191 141,140 121,148 100,136 78,127 78,127 78,127"/> - <polyline verts=" 21,58 35,63 38,68 32,69 42,74 40,79 47,80 54,83 45,94 34,81 32,73 24,66 21,58 21,58 21,58"/> - <polyline verts=" 71,34 67,34 66,27 59,24 54,17 48,17 39,22 30,26 28,31 31,39 38,46 29,45 36,54 41,61 41,70 50,69 54,71 55,58 67,52 76,43 76,39 68,44 71,34 71,34 71,34"/> - <polyline verts=" 139,74 141,83 143,89 144,104 148,104 155,106 154,86 157,77 155,72 150,77 144,77 139,74 139,74 139,74"/> - <polyline verts=" 105,44 102,53 108,58 111,62 112,55 105,44 105,44 105,44"/> - <polyline verts=" 141,48 141,54 144,58 139,62 137,66 136,59 137,52 141,48 141,48 141,48"/> - <polyline verts=" 98,135 104,130 105,134 108,132 108,135 112,134 113,137 116,136 116,139 119,139 124,141 128,140 133,138 140,133 139,140 126,146 104,144 98,135 98,135 98,135"/> - <polyline verts=" 97,116 103,119 103,116 111,118 116,117 122,114 127,107 135,111 142,107 141,114 145,118 149,121 145,125 140,124 127,121 113,125 100,124 97,116 97,116 97,116"/> - <polyline verts=" 147,33 152,35 157,34 153,31 160,31 156,28 161,28 159,24 163,25 163,21 165,22 170,23 167,17 172,21 174,18 175,23 176,22 177,28 177,33 174,37 176,39 174,44 171,49 168,53 164,57 159,68 156,70 154,60 150,51 146,43 144,35 147,33 147,33 147,33"/> - <polyline verts=" 85,72 89,74 93,75 100,76 105,75 102,79 94,79 88,76 85,72 85,72 85,72"/> - <polyline verts=" 86,214 79,221 76,232 82,225 78,239 82,234 78,245 81,243 79,255 84,250 84,267 87,254 90,271 90,257 95,271 93,256 95,249 92,252 93,243 89,253 89,241 86,250 87,236 83,245 87,231 82,231 90,219 84,221 86,214 86,214 86,214"/> - </g> - <g style="fill: #ffcc7f"> - <polyline verts=" 93,68 96,72 100,73 106,72 108,66 105,63 100,62 93,68 93,68 93,68"/> - <polyline verts=" 144,64 142,68 142,73 146,74 150,73 154,64 149,62 144,64 144,64 144,64"/> - </g> - <g style="fill: #9c826b"> - <polyline verts=" 57,91 42,111 52,105 41,117 53,112 46,120 53,116 50,124 57,119 55,127 61,122 60,130 67,126 66,134 71,129 72,136 77,130 76,137 80,133 82,138 86,135 96,135 94,129 86,124 83,117 77,123 79,117 73,120 75,112 68,116 71,111 65,114 69,107 63,110 68,102 61,107 66,98 61,103 63,97 57,99 57,91 57,91 57,91"/> - <polyline verts=" 83,79 76,79 67,82 75,83 65,88 76,87 65,92 76,91 68,96 77,95 70,99 80,98 72,104 80,102 76,108 85,103 92,101 87,98 93,96 86,94 91,93 85,91 93,89 99,89 105,93 107,85 102,82 92,80 83,79 83,79 83,79"/> - <polyline verts=" 109,77 111,83 109,89 113,94 117,90 117,81 114,78 109,77 109,77 109,77"/> - <polyline verts=" 122,128 127,126 134,127 136,129 134,130 130,128 124,129 122,128 122,128 122,128"/> - <polyline verts=" 78,27 82,32 80,33 82,36 78,37 82,40 78,42 81,46 76,47 78,49 74,50 82,52 87,50 83,48 91,46 86,45 91,42 88,40 92,37 86,34 90,31 86,29 89,26 78,27 78,27 78,27"/> - <polyline verts=" 82,17 92,20 79,21 90,25 81,25 94,28 93,26 101,30 101,26 107,33 108,28 111,40 113,34 115,45 117,39 119,54 121,46 124,58 126,47 129,59 130,49 134,58 133,44 137,48 133,37 137,40 133,32 126,20 135,26 132,19 138,23 135,17 142,18 132,11 116,6 94,6 78,11 92,12 80,14 90,16 82,17 82,17 82,17"/> - <polyline verts=" 142,234 132,227 124,223 115,220 110,225 118,224 127,229 135,236 122,234 115,237 113,242 121,238 139,243 121,245 111,254 95,254 102,244 104,235 110,229 100,231 104,224 113,216 122,215 132,217 141,224 145,230 149,240 142,234 142,234 142,234"/> - <polyline verts=" 115,252 125,248 137,249 143,258 134,255 125,254 115,252 115,252 115,252"/> - <polyline verts=" 114,212 130,213 140,219 147,225 144,214 137,209 128,207 114,212 114,212 114,212"/> - <polyline verts=" 102,263 108,258 117,257 131,258 116,260 109,265 102,263 102,263 102,263"/> - <polyline verts=" 51,241 35,224 40,238 23,224 31,242 19,239 28,247 17,246 25,250 37,254 39,263 44,271 47,294 48,317 51,328 60,351 60,323 53,262 47,246 51,241 51,241 51,241"/> - <polyline verts=" 2,364 9,367 14,366 18,355 20,364 26,366 31,357 35,364 39,364 42,357 47,363 53,360 59,357 54,369 7,373 2,364 2,364 2,364"/> - <polyline verts=" 7,349 19,345 25,339 18,341 23,333 28,326 23,326 27,320 23,316 25,311 20,298 15,277 12,264 9,249 10,223 3,248 5,261 15,307 17,326 11,343 7,349 7,349 7,349"/> - <polyline verts=" 11,226 15,231 25,236 18,227 11,226 11,226 11,226"/> - <polyline verts=" 13,214 19,217 32,227 23,214 16,208 15,190 24,148 31,121 24,137 14,170 8,189 13,214 13,214 13,214"/> - <polyline verts=" 202,254 195,258 199,260 193,263 197,263 190,268 196,268 191,273 188,282 200,272 194,272 201,266 197,265 204,262 200,258 204,256 202,254 202,254 202,254"/> - </g> - <g style="fill: #845433"> - <polyline verts=" 151,213 165,212 179,225 189,246 187,262 179,275 176,263 177,247 171,233 163,230 165,251 157,264 146,298 145,321 133,326 143,285 154,260 153,240 151,213 151,213 151,213"/> - <polyline verts=" 91,132 95,145 97,154 104,148 107,155 109,150 111,158 115,152 118,159 120,153 125,161 126,155 133,164 132,154 137,163 137,152 142,163 147,186 152,192 148,167 141,143 124,145 105,143 91,132 91,132 91,132"/> - </g> - <g style="fill: #9c826b"> - <polyline verts=" 31,57 23,52 26,51 20,44 23,42 21,36 22,29 25,23 24,32 30,43 26,41 30,50 26,48 31,57 31,57 31,57"/> - <polyline verts=" 147,21 149,28 155,21 161,16 167,14 175,15 173,11 161,9 147,21 147,21 147,21"/> - <polyline verts=" 181,39 175,51 169,57 171,65 165,68 165,75 160,76 162,91 171,71 180,51 181,39 181,39 181,39"/> - <polyline verts=" 132,346 139,348 141,346 142,341 147,342 143,355 133,350 132,346 132,346 132,346"/> - <polyline verts=" 146,355 151,352 155,348 157,343 160,349 151,356 147,357 146,355 146,355 146,355"/> - <polyline verts=" 99,266 100,281 94,305 86,322 78,332 72,346 73,331 91,291 99,266 99,266 99,266"/> - <polyline verts=" 20,347 32,342 45,340 54,345 45,350 42,353 38,350 31,353 29,356 23,350 19,353 15,349 20,347 20,347 20,347"/> - <polyline verts=" 78,344 86,344 92,349 88,358 84,352 78,344 78,344 78,344"/> - <polyline verts=" 93,347 104,344 117,345 124,354 121,357 116,351 112,351 108,355 102,351 93,347 93,347 93,347"/> - </g> - <g style="fill: #000000"> - <polyline verts=" 105,12 111,18 113,24 113,29 119,34 116,23 112,16 105,12 105,12 105,12"/> - <polyline verts=" 122,27 125,34 127,43 128,34 125,29 122,27 122,27 122,27"/> - <polyline verts=" 115,13 122,19 122,15 113,10 115,13 115,13 115,13"/> - </g> - <g style="fill: #ffe5b2"> - <polyline verts=" 116,172 107,182 98,193 98,183 90,199 89,189 84,207 88,206 87,215 95,206 93,219 91,230 98,216 97,226 104,214 112,209 104,208 113,202 126,200 139,207 132,198 142,203 134,192 142,195 134,187 140,185 130,181 136,177 126,177 125,171 116,180 116,172 116,172 116,172"/> - <polyline verts=" 74,220 67,230 67,221 59,235 63,233 60,248 70,232 65,249 71,243 67,256 73,250 69,262 73,259 71,267 76,262 72,271 78,270 76,275 82,274 78,290 86,279 86,289 92,274 88,275 87,264 82,270 82,258 77,257 78,247 73,246 77,233 72,236 74,220 74,220 74,220"/> - <polyline verts=" 133,230 147,242 148,250 145,254 138,247 129,246 142,245 138,241 128,237 137,238 133,230 133,230 133,230"/> - <polyline verts=" 133,261 125,261 116,263 111,267 125,265 133,261 133,261 133,261"/> - <polyline verts=" 121,271 109,273 103,279 99,305 92,316 85,327 83,335 89,340 97,341 94,336 101,336 96,331 103,330 97,327 108,325 99,322 109,321 100,318 110,317 105,314 110,312 107,310 113,308 105,306 114,303 105,301 115,298 107,295 115,294 108,293 117,291 109,289 117,286 109,286 118,283 112,281 118,279 114,278 119,276 115,274 121,271 121,271 121,271"/> - <polyline verts=" 79,364 74,359 74,353 76,347 80,351 83,356 82,360 79,364 79,364 79,364"/> - <polyline verts=" 91,363 93,356 97,353 103,355 105,360 103,366 99,371 94,368 91,363 91,363 91,363"/> - <polyline verts=" 110,355 114,353 118,357 117,363 113,369 111,362 110,355 110,355 110,355"/> - <polyline verts=" 126,354 123,358 124,367 126,369 129,361 129,357 126,354 126,354 126,354"/> - <polyline verts=" 30,154 24,166 20,182 23,194 29,208 37,218 41,210 41,223 46,214 46,227 52,216 52,227 61,216 59,225 68,213 73,219 70,207 77,212 69,200 77,202 70,194 78,197 68,187 76,182 64,182 58,175 58,185 53,177 50,186 46,171 44,182 39,167 36,172 36,162 30,166 30,154 30,154 30,154"/> - <polyline verts=" 44,130 41,137 45,136 43,150 48,142 48,157 53,150 52,164 60,156 61,169 64,165 66,175 70,167 74,176 77,168 80,183 85,172 90,182 93,174 98,181 99,173 104,175 105,169 114,168 102,163 95,157 94,166 90,154 87,162 82,149 75,159 72,148 68,155 67,143 62,148 62,138 58,145 56,133 52,142 52,128 49,134 47,125 44,130 44,130 44,130"/> - <polyline verts=" 13,216 19,219 36,231 22,223 16,222 22,227 12,224 13,220 16,220 13,216 13,216 13,216"/> - <polyline verts=" 10,231 14,236 25,239 27,237 19,234 10,231 10,231 10,231"/> - <polyline verts=" 9,245 14,242 25,245 13,245 9,245 9,245 9,245"/> - <polyline verts=" 33,255 26,253 18,254 25,256 18,258 27,260 18,263 27,265 19,267 29,270 21,272 29,276 21,278 30,281 22,283 31,287 24,288 32,292 23,293 34,298 26,299 37,303 32,305 39,309 33,309 39,314 34,314 40,318 34,317 40,321 34,321 41,326 33,326 40,330 33,332 39,333 33,337 42,337 54,341 49,337 52,335 47,330 50,330 45,325 49,325 45,321 48,321 45,316 46,306 45,286 43,274 36,261 33,255 33,255 33,255"/> - <polyline verts=" 7,358 9,351 14,351 17,359 11,364 7,358 7,358 7,358"/> - <polyline verts=" 44,354 49,351 52,355 49,361 44,354 44,354 44,354"/> - <polyline verts=" 32,357 37,353 40,358 36,361 32,357 32,357 32,357"/> - <polyline verts=" 139,334 145,330 154,330 158,334 154,341 152,348 145,350 149,340 147,336 141,339 139,345 136,342 136,339 139,334 139,334 139,334"/> - <polyline verts=" 208,259 215,259 212,255 220,259 224,263 225,274 224,283 220,292 208,300 206,308 203,304 199,315 197,309 195,318 193,313 190,322 190,316 185,325 182,318 180,325 172,321 178,320 176,313 186,312 180,307 188,307 184,303 191,302 186,299 195,294 187,290 197,288 192,286 201,283 194,280 203,277 198,275 207,271 200,269 209,265 204,265 212,262 208,259 208,259 208,259"/> - <polyline verts=" 106,126 106,131 109,132 111,134 115,132 115,135 119,133 118,137 123,137 128,137 133,134 136,130 136,127 132,124 118,128 112,128 106,126 106,126 106,126"/> - <polyline verts=" 107,114 101,110 98,102 105,97 111,98 119,102 121,108 118,112 113,115 107,114 107,114 107,114"/> - <polyline verts=" 148,106 145,110 146,116 150,118 152,111 151,107 148,106 148,106 148,106"/> - <polyline verts=" 80,55 70,52 75,58 63,57 72,61 57,61 67,66 57,67 62,69 54,71 61,73 54,77 63,78 53,85 60,84 56,90 69,84 63,82 75,76 70,75 77,72 72,71 78,69 72,66 81,67 78,64 82,63 80,60 86,62 80,55 80,55 80,55"/> - <polyline verts=" 87,56 91,52 96,50 102,56 98,56 92,60 87,56 87,56 87,56"/> - <polyline verts=" 85,68 89,73 98,76 106,74 96,73 91,70 85,68 85,68 85,68"/> - <polyline verts=" 115,57 114,64 111,64 115,75 122,81 122,74 126,79 126,74 131,78 130,72 133,77 131,68 126,61 119,57 115,57 115,57 115,57"/> - <polyline verts=" 145,48 143,53 147,59 151,59 150,55 145,48 145,48 145,48"/> - <polyline verts=" 26,22 34,15 43,10 52,10 59,16 47,15 32,22 26,22 26,22 26,22"/> - <polyline verts=" 160,19 152,26 149,34 154,33 152,30 157,30 155,26 158,27 157,23 161,23 160,19 160,19 160,19"/> - </g> - <g style="fill: #000000"> - <polyline verts=" 98,117 105,122 109,122 105,117 113,120 121,120 130,112 128,108 123,103 123,99 128,101 132,106 135,109 142,105 142,101 145,101 145,91 148,101 145,105 136,112 135,116 143,124 148,120 150,122 142,128 133,122 121,125 112,126 103,125 100,129 96,124 98,117 98,117 98,117"/> - <polyline verts=" 146,118 152,118 152,115 149,115 146,118 146,118 146,118"/> - <polyline verts=" 148,112 154,111 154,109 149,109 148,112 148,112 148,112"/> - <polyline verts=" 106,112 108,115 114,116 118,114 106,112 106,112 106,112"/> - <polyline verts=" 108,108 111,110 116,110 119,108 108,108 108,108 108,108"/> - <polyline verts=" 106,104 109,105 117,106 115,104 106,104 106,104 106,104"/> - <polyline verts=" 50,25 41,26 34,33 39,43 49,58 36,51 47,68 55,69 54,59 61,57 74,46 60,52 67,42 57,48 61,40 54,45 60,36 59,29 48,38 52,30 47,32 50,25 50,25 50,25"/> - <polyline verts=" 147,34 152,41 155,49 161,53 157,47 164,47 158,43 168,44 159,40 164,37 169,37 164,33 169,34 165,28 170,30 170,25 173,29 175,27 176,32 173,36 175,39 172,42 172,46 168,49 170,55 162,57 158,63 155,58 153,50 149,46 147,34 147,34 147,34"/> - <polyline verts=" 155,71 159,80 157,93 157,102 155,108 150,101 149,93 154,101 152,91 151,83 155,79 155,71 155,71 155,71"/> - <polyline verts=" 112,78 115,81 114,91 112,87 113,82 112,78 112,78 112,78"/> - <polyline verts=" 78,28 64,17 58,11 47,9 36,10 28,16 21,26 18,41 20,51 23,61 33,65 28,68 37,74 36,81 43,87 48,90 43,100 40,98 39,90 31,80 30,72 22,71 17,61 14,46 16,28 23,17 33,9 45,6 54,6 65,12 78,28 78,28 78,28"/> - <polyline verts=" 67,18 76,9 87,5 101,2 118,3 135,8 149,20 149,26 144,19 132,12 121,9 105,7 89,8 76,14 70,20 67,18 67,18 67,18"/> - <polyline verts=" 56,98 48,106 56,103 47,112 56,110 52,115 57,113 52,121 62,115 58,123 65,119 63,125 69,121 68,127 74,125 74,129 79,128 83,132 94,135 93,129 85,127 81,122 76,126 75,121 71,124 71,117 66,121 66,117 62,117 64,112 60,113 60,110 57,111 61,105 57,107 60,101 55,102 56,98 56,98 56,98"/> - <polyline verts=" 101,132 103,138 106,134 106,139 112,136 111,142 115,139 114,143 119,142 125,145 131,142 135,138 140,134 140,129 143,135 145,149 150,171 149,184 145,165 141,150 136,147 132,151 131,149 126,152 125,150 121,152 117,148 111,152 110,148 105,149 104,145 98,150 96,138 94,132 94,130 98,132 101,132 101,132 101,132"/> - <polyline verts=" 41,94 32,110 23,132 12,163 6,190 7,217 5,236 3,247 9,230 12,211 12,185 18,160 26,134 35,110 43,99 41,94 41,94 41,94"/> - <polyline verts=" 32,246 41,250 50,257 52,267 53,295 53,323 59,350 54,363 51,365 44,366 42,360 40,372 54,372 59,366 62,353 71,352 75,335 73,330 66,318 68,302 64,294 67,288 63,286 63,279 59,275 58,267 56,262 50,247 42,235 44,246 32,236 35,244 32,246 32,246 32,246"/> - <polyline verts=" 134,324 146,320 159,322 173,327 179,337 179,349 172,355 158,357 170,350 174,343 170,333 163,328 152,326 134,329 134,324 134,324 134,324"/> - <polyline verts=" 173,339 183,334 184,338 191,329 194,332 199,323 202,325 206,318 209,320 213,309 221,303 228,296 232,289 234,279 233,269 230,262 225,256 219,253 208,252 198,252 210,249 223,250 232,257 237,265 238,277 238,291 232,305 221,323 218,335 212,342 200,349 178,348 173,339 173,339 173,339"/> - <polyline verts=" 165,296 158,301 156,310 156,323 162,324 159,318 162,308 162,304 165,296 165,296 165,296"/> - <polyline verts=" 99,252 105,244 107,234 115,228 121,228 131,235 122,233 113,235 109,246 121,239 133,243 121,243 110,251 99,252 99,252 99,252"/> - <polyline verts=" 117,252 124,247 134,249 136,253 126,252 117,252 117,252 117,252"/> - <polyline verts=" 117,218 132,224 144,233 140,225 132,219 117,218 117,218 117,218"/> - <polyline verts=" 122,212 134,214 143,221 141,213 132,210 122,212 122,212 122,212"/> - <polyline verts=" 69,352 70,363 76,373 86,378 97,379 108,379 120,377 128,378 132,373 135,361 133,358 132,366 127,375 121,374 121,362 119,367 117,374 110,376 110,362 107,357 106,371 104,375 97,376 90,375 90,368 86,362 83,364 86,369 85,373 78,370 73,362 71,351 69,352 69,352 69,352"/> - <polyline verts=" 100,360 96,363 99,369 102,364 100,360 100,360 100,360"/> - <polyline verts=" 115,360 112,363 114,369 117,364 115,360 115,360 115,360"/> - <polyline verts=" 127,362 125,364 126,369 128,365 127,362 127,362 127,362"/> - <polyline verts=" 5,255 7,276 11,304 15,320 13,334 6,348 2,353 0,363 5,372 12,374 25,372 38,372 44,369 42,367 36,368 31,369 30,360 27,368 20,370 16,361 15,368 10,369 3,366 3,359 6,352 11,348 17,331 19,316 12,291 9,274 5,255 5,255 5,255"/> - <polyline verts=" 10,358 7,362 10,366 11,362 10,358 10,358 10,358"/> - <polyline verts=" 25,357 22,360 24,366 27,360 25,357 25,357 25,357"/> - <polyline verts=" 37,357 34,361 36,365 38,361 37,357 37,357 37,357"/> - <polyline verts=" 49,356 46,359 47,364 50,360 49,356 49,356 49,356"/> - <polyline verts=" 130,101 132,102 135,101 139,102 143,103 142,101 137,100 133,100 130,101 130,101 130,101"/> - <polyline verts=" 106,48 105,52 108,56 109,52 106,48 106,48 106,48"/> - <polyline verts=" 139,52 139,56 140,60 142,58 141,56 139,52 139,52 139,52"/> - <polyline verts=" 25,349 29,351 30,355 33,350 37,348 42,351 45,347 49,345 44,343 36,345 25,349 25,349 25,349"/> - <polyline verts=" 98,347 105,351 107,354 109,349 115,349 120,353 118,349 113,346 104,346 98,347 98,347 98,347"/> - <polyline verts=" 83,348 87,352 87,357 89,351 87,348 83,348 83,348 83,348"/> - <polyline verts=" 155,107 163,107 170,107 186,108 175,109 155,109 155,107 155,107 155,107"/> - <polyline verts=" 153,114 162,113 175,112 192,114 173,114 154,115 153,114 153,114 153,114"/> - <polyline verts=" 152,118 164,120 180,123 197,129 169,123 151,120 152,118 152,118 152,118"/> - <polyline verts=" 68,109 87,106 107,106 106,108 88,108 68,109 68,109 68,109"/> - <polyline verts=" 105,111 95,112 79,114 71,116 85,115 102,113 105,111 105,111 105,111"/> - <polyline verts=" 108,101 98,99 87,99 78,99 93,100 105,102 108,101 108,101 108,101"/> - <polyline verts=" 85,63 91,63 97,60 104,60 108,62 111,69 112,75 110,74 108,71 103,73 106,69 105,65 103,64 103,67 102,70 99,70 97,66 94,67 97,72 88,67 84,66 85,63 85,63 85,63"/> - <polyline verts=" 140,74 141,66 144,61 150,61 156,62 153,70 150,73 152,65 150,65 151,68 149,71 146,71 144,66 143,70 143,74 140,74 140,74 140,74"/> - <polyline verts=" 146,20 156,11 163,9 172,9 178,14 182,18 184,32 182,42 182,52 177,58 176,67 171,76 165,90 157,105 160,92 164,85 168,78 167,73 173,66 172,62 175,59 174,55 177,53 180,46 181,29 179,21 173,13 166,11 159,13 153,18 148,23 146,20 146,20 146,20"/> - <polyline verts=" 150,187 148,211 150,233 153,247 148,267 135,283 125,299 136,292 131,313 122,328 122,345 129,352 133,359 133,367 137,359 148,356 140,350 131,347 129,340 132,332 140,328 137,322 140,304 154,265 157,244 155,223 161,220 175,229 186,247 185,260 176,275 178,287 185,277 188,261 196,253 189,236 174,213 150,187 150,187 150,187"/> - <polyline verts=" 147,338 142,341 143,345 141,354 147,343 147,338 147,338 147,338"/> - <polyline verts=" 157,342 156,349 150,356 157,353 163,346 162,342 157,342 157,342 157,342"/> - <polyline verts=" 99,265 96,284 92,299 73,339 73,333 87,300 99,265 99,265 99,265"/> - </g> -</svg> +<g style="stroke: #000000"> +</g> +<g style="fill: #f2cc99"> + <polyline verts=" 69,18 82,8 99,3 118,5 135,12 149,21 156,13 165,9 177,13 183,28 180,50 164,91 155,107 154,114 151,121 141,127 139,136 155,206 157,251 126,342 133,357 128,376 83,376 75,368 67,350 61,350 53,369 4,369 2,361 5,354 12,342 16,321 4,257 4,244 7,218 9,179 26,127 43,93 32,77 30,70 24,67 16,49 17,35 18,23 30,12 40,7 53,7 62,12 69,18 69,18 69,18"/> +</g> +<g style="fill: #e5b27f"> + <polyline verts=" 142,79 136,74 138,82 133,78 133,84 127,78 128,85 124,80 125,87 119,82 119,90 125,99 125,96 128,100 128,94 131,98 132,93 135,97 136,93 138,97 139,94 141,98 143,94 144,85 142,79 142,79 142,79"/> +</g> +<g style="fill: #eb8080"> + <polyline verts=" 127,101 132,100 137,99 144,101 143,105 135,110 127,101 127,101 127,101"/> +</g> +<g style="fill: #f2cc99"> + <polyline verts=" 178,229 157,248 139,296 126,349 137,356 158,357 183,342 212,332 235,288 235,261 228,252 212,250 188,251 178,229 178,229 178,229"/> +</g> +<g style="fill: #9c826b"> + <polyline verts=" 56,229 48,241 48,250 57,281 63,325 71,338 81,315 76,321 79,311 83,301 75,308 80,298 73,303 76,296 71,298 74,292 69,293 74,284 78,278 71,278 74,274 68,273 70,268 66,267 68,261 60,266 62,259 65,253 57,258 59,251 55,254 55,248 60,237 54,240 58,234 54,236 56,229 56,229 56,229"/> + <polyline verts=" 74,363 79,368 81,368 85,362 89,363 92,370 96,373 101,372 108,361 110,371 113,373 116,371 120,358 122,363 123,371 126,371 129,367 132,357 135,361 130,376 127,377 94,378 84,376 76,371 74,363 74,363 74,363"/> + <polyline verts=" 212,250 219,251 228,258 236,270 235,287 225,304 205,332 177,343 171,352 158,357 166,352 168,346 168,339 165,333 155,327 155,323 161,320 165,316 169,316 167,312 171,313 168,308 173,309 170,306 177,306 175,308 177,311 174,311 176,316 171,315 174,319 168,320 168,323 175,327 179,332 183,326 184,332 189,323 190,328 194,320 194,325 199,316 201,320 204,313 206,316 208,310 211,305 219,298 226,288 229,279 228,266 224,259 217,253 212,250 212,250 212,250"/> + <polyline verts=" 151,205 151,238 149,252 141,268 128,282 121,301 130,300 126,313 118,324 116,337 120,346 133,352 133,340 137,333 145,329 156,327 153,319 153,291 157,271 170,259 178,277 193,250 174,216 151,205 151,205 151,205"/> + <polyline verts=" 78,127 90,142 95,155 108,164 125,167 139,175 150,206 152,191 141,140 121,148 100,136 78,127 78,127 78,127"/> + <polyline verts=" 21,58 35,63 38,68 32,69 42,74 40,79 47,80 54,83 45,94 34,81 32,73 24,66 21,58 21,58 21,58"/> + <polyline verts=" 71,34 67,34 66,27 59,24 54,17 48,17 39,22 30,26 28,31 31,39 38,46 29,45 36,54 41,61 41,70 50,69 54,71 55,58 67,52 76,43 76,39 68,44 71,34 71,34 71,34"/> + <polyline verts=" 139,74 141,83 143,89 144,104 148,104 155,106 154,86 157,77 155,72 150,77 144,77 139,74 139,74 139,74"/> + <polyline verts=" 105,44 102,53 108,58 111,62 112,55 105,44 105,44 105,44"/> + <polyline verts=" 141,48 141,54 144,58 139,62 137,66 136,59 137,52 141,48 141,48 141,48"/> + <polyline verts=" 98,135 104,130 105,134 108,132 108,135 112,134 113,137 116,136 116,139 119,139 124,141 128,140 133,138 140,133 139,140 126,146 104,144 98,135 98,135 98,135"/> + <polyline verts=" 97,116 103,119 103,116 111,118 116,117 122,114 127,107 135,111 142,107 141,114 145,118 149,121 145,125 140,124 127,121 113,125 100,124 97,116 97,116 97,116"/> + <polyline verts=" 147,33 152,35 157,34 153,31 160,31 156,28 161,28 159,24 163,25 163,21 165,22 170,23 167,17 172,21 174,18 175,23 176,22 177,28 177,33 174,37 176,39 174,44 171,49 168,53 164,57 159,68 156,70 154,60 150,51 146,43 144,35 147,33 147,33 147,33"/> + <polyline verts=" 85,72 89,74 93,75 100,76 105,75 102,79 94,79 88,76 85,72 85,72 85,72"/> + <polyline verts=" 86,214 79,221 76,232 82,225 78,239 82,234 78,245 81,243 79,255 84,250 84,267 87,254 90,271 90,257 95,271 93,256 95,249 92,252 93,243 89,253 89,241 86,250 87,236 83,245 87,231 82,231 90,219 84,221 86,214 86,214 86,214"/> +</g> +<g style="fill: #ffcc7f"> + <polyline verts=" 93,68 96,72 100,73 106,72 108,66 105,63 100,62 93,68 93,68 93,68"/> + <polyline verts=" 144,64 142,68 142,73 146,74 150,73 154,64 149,62 144,64 144,64 144,64"/> +</g> +<g style="fill: #9c826b"> + <polyline verts=" 57,91 42,111 52,105 41,117 53,112 46,120 53,116 50,124 57,119 55,127 61,122 60,130 67,126 66,134 71,129 72,136 77,130 76,137 80,133 82,138 86,135 96,135 94,129 86,124 83,117 77,123 79,117 73,120 75,112 68,116 71,111 65,114 69,107 63,110 68,102 61,107 66,98 61,103 63,97 57,99 57,91 57,91 57,91"/> + <polyline verts=" 83,79 76,79 67,82 75,83 65,88 76,87 65,92 76,91 68,96 77,95 70,99 80,98 72,104 80,102 76,108 85,103 92,101 87,98 93,96 86,94 91,93 85,91 93,89 99,89 105,93 107,85 102,82 92,80 83,79 83,79 83,79"/> + <polyline verts=" 109,77 111,83 109,89 113,94 117,90 117,81 114,78 109,77 109,77 109,77"/> + <polyline verts=" 122,128 127,126 134,127 136,129 134,130 130,128 124,129 122,128 122,128 122,128"/> + <polyline verts=" 78,27 82,32 80,33 82,36 78,37 82,40 78,42 81,46 76,47 78,49 74,50 82,52 87,50 83,48 91,46 86,45 91,42 88,40 92,37 86,34 90,31 86,29 89,26 78,27 78,27 78,27"/> + <polyline verts=" 82,17 92,20 79,21 90,25 81,25 94,28 93,26 101,30 101,26 107,33 108,28 111,40 113,34 115,45 117,39 119,54 121,46 124,58 126,47 129,59 130,49 134,58 133,44 137,48 133,37 137,40 133,32 126,20 135,26 132,19 138,23 135,17 142,18 132,11 116,6 94,6 78,11 92,12 80,14 90,16 82,17 82,17 82,17"/> + <polyline verts=" 142,234 132,227 124,223 115,220 110,225 118,224 127,229 135,236 122,234 115,237 113,242 121,238 139,243 121,245 111,254 95,254 102,244 104,235 110,229 100,231 104,224 113,216 122,215 132,217 141,224 145,230 149,240 142,234 142,234 142,234"/> + <polyline verts=" 115,252 125,248 137,249 143,258 134,255 125,254 115,252 115,252 115,252"/> + <polyline verts=" 114,212 130,213 140,219 147,225 144,214 137,209 128,207 114,212 114,212 114,212"/> + <polyline verts=" 102,263 108,258 117,257 131,258 116,260 109,265 102,263 102,263 102,263"/> + <polyline verts=" 51,241 35,224 40,238 23,224 31,242 19,239 28,247 17,246 25,250 37,254 39,263 44,271 47,294 48,317 51,328 60,351 60,323 53,262 47,246 51,241 51,241 51,241"/> + <polyline verts=" 2,364 9,367 14,366 18,355 20,364 26,366 31,357 35,364 39,364 42,357 47,363 53,360 59,357 54,369 7,373 2,364 2,364 2,364"/> + <polyline verts=" 7,349 19,345 25,339 18,341 23,333 28,326 23,326 27,320 23,316 25,311 20,298 15,277 12,264 9,249 10,223 3,248 5,261 15,307 17,326 11,343 7,349 7,349 7,349"/> + <polyline verts=" 11,226 15,231 25,236 18,227 11,226 11,226 11,226"/> + <polyline verts=" 13,214 19,217 32,227 23,214 16,208 15,190 24,148 31,121 24,137 14,170 8,189 13,214 13,214 13,214"/> + <polyline verts=" 202,254 195,258 199,260 193,263 197,263 190,268 196,268 191,273 188,282 200,272 194,272 201,266 197,265 204,262 200,258 204,256 202,254 202,254 202,254"/> +</g> +<g style="fill: #845433"> + <polyline verts=" 151,213 165,212 179,225 189,246 187,262 179,275 176,263 177,247 171,233 163,230 165,251 157,264 146,298 145,321 133,326 143,285 154,260 153,240 151,213 151,213 151,213"/> + <polyline verts=" 91,132 95,145 97,154 104,148 107,155 109,150 111,158 115,152 118,159 120,153 125,161 126,155 133,164 132,154 137,163 137,152 142,163 147,186 152,192 148,167 141,143 124,145 105,143 91,132 91,132 91,132"/> +</g> +<g style="fill: #9c826b"> + <polyline verts=" 31,57 23,52 26,51 20,44 23,42 21,36 22,29 25,23 24,32 30,43 26,41 30,50 26,48 31,57 31,57 31,57"/> + <polyline verts=" 147,21 149,28 155,21 161,16 167,14 175,15 173,11 161,9 147,21 147,21 147,21"/> + <polyline verts=" 181,39 175,51 169,57 171,65 165,68 165,75 160,76 162,91 171,71 180,51 181,39 181,39 181,39"/> + <polyline verts=" 132,346 139,348 141,346 142,341 147,342 143,355 133,350 132,346 132,346 132,346"/> + <polyline verts=" 146,355 151,352 155,348 157,343 160,349 151,356 147,357 146,355 146,355 146,355"/> + <polyline verts=" 99,266 100,281 94,305 86,322 78,332 72,346 73,331 91,291 99,266 99,266 99,266"/> + <polyline verts=" 20,347 32,342 45,340 54,345 45,350 42,353 38,350 31,353 29,356 23,350 19,353 15,349 20,347 20,347 20,347"/> + <polyline verts=" 78,344 86,344 92,349 88,358 84,352 78,344 78,344 78,344"/> + <polyline verts=" 93,347 104,344 117,345 124,354 121,357 116,351 112,351 108,355 102,351 93,347 93,347 93,347"/> +</g> +<g style="fill: #000000"> + <polyline verts=" 105,12 111,18 113,24 113,29 119,34 116,23 112,16 105,12 105,12 105,12"/> + <polyline verts=" 122,27 125,34 127,43 128,34 125,29 122,27 122,27 122,27"/> + <polyline verts=" 115,13 122,19 122,15 113,10 115,13 115,13 115,13"/> +</g> +<g style="fill: #ffe5b2"> + <polyline verts=" 116,172 107,182 98,193 98,183 90,199 89,189 84,207 88,206 87,215 95,206 93,219 91,230 98,216 97,226 104,214 112,209 104,208 113,202 126,200 139,207 132,198 142,203 134,192 142,195 134,187 140,185 130,181 136,177 126,177 125,171 116,180 116,172 116,172 116,172"/> + <polyline verts=" 74,220 67,230 67,221 59,235 63,233 60,248 70,232 65,249 71,243 67,256 73,250 69,262 73,259 71,267 76,262 72,271 78,270 76,275 82,274 78,290 86,279 86,289 92,274 88,275 87,264 82,270 82,258 77,257 78,247 73,246 77,233 72,236 74,220 74,220 74,220"/> + <polyline verts=" 133,230 147,242 148,250 145,254 138,247 129,246 142,245 138,241 128,237 137,238 133,230 133,230 133,230"/> + <polyline verts=" 133,261 125,261 116,263 111,267 125,265 133,261 133,261 133,261"/> + <polyline verts=" 121,271 109,273 103,279 99,305 92,316 85,327 83,335 89,340 97,341 94,336 101,336 96,331 103,330 97,327 108,325 99,322 109,321 100,318 110,317 105,314 110,312 107,310 113,308 105,306 114,303 105,301 115,298 107,295 115,294 108,293 117,291 109,289 117,286 109,286 118,283 112,281 118,279 114,278 119,276 115,274 121,271 121,271 121,271"/> + <polyline verts=" 79,364 74,359 74,353 76,347 80,351 83,356 82,360 79,364 79,364 79,364"/> + <polyline verts=" 91,363 93,356 97,353 103,355 105,360 103,366 99,371 94,368 91,363 91,363 91,363"/> + <polyline verts=" 110,355 114,353 118,357 117,363 113,369 111,362 110,355 110,355 110,355"/> + <polyline verts=" 126,354 123,358 124,367 126,369 129,361 129,357 126,354 126,354 126,354"/> + <polyline verts=" 30,154 24,166 20,182 23,194 29,208 37,218 41,210 41,223 46,214 46,227 52,216 52,227 61,216 59,225 68,213 73,219 70,207 77,212 69,200 77,202 70,194 78,197 68,187 76,182 64,182 58,175 58,185 53,177 50,186 46,171 44,182 39,167 36,172 36,162 30,166 30,154 30,154 30,154"/> + <polyline verts=" 44,130 41,137 45,136 43,150 48,142 48,157 53,150 52,164 60,156 61,169 64,165 66,175 70,167 74,176 77,168 80,183 85,172 90,182 93,174 98,181 99,173 104,175 105,169 114,168 102,163 95,157 94,166 90,154 87,162 82,149 75,159 72,148 68,155 67,143 62,148 62,138 58,145 56,133 52,142 52,128 49,134 47,125 44,130 44,130 44,130"/> + <polyline verts=" 13,216 19,219 36,231 22,223 16,222 22,227 12,224 13,220 16,220 13,216 13,216 13,216"/> + <polyline verts=" 10,231 14,236 25,239 27,237 19,234 10,231 10,231 10,231"/> + <polyline verts=" 9,245 14,242 25,245 13,245 9,245 9,245 9,245"/> + <polyline verts=" 33,255 26,253 18,254 25,256 18,258 27,260 18,263 27,265 19,267 29,270 21,272 29,276 21,278 30,281 22,283 31,287 24,288 32,292 23,293 34,298 26,299 37,303 32,305 39,309 33,309 39,314 34,314 40,318 34,317 40,321 34,321 41,326 33,326 40,330 33,332 39,333 33,337 42,337 54,341 49,337 52,335 47,330 50,330 45,325 49,325 45,321 48,321 45,316 46,306 45,286 43,274 36,261 33,255 33,255 33,255"/> + <polyline verts=" 7,358 9,351 14,351 17,359 11,364 7,358 7,358 7,358"/> + <polyline verts=" 44,354 49,351 52,355 49,361 44,354 44,354 44,354"/> + <polyline verts=" 32,357 37,353 40,358 36,361 32,357 32,357 32,357"/> + <polyline verts=" 139,334 145,330 154,330 158,334 154,341 152,348 145,350 149,340 147,336 141,339 139,345 136,342 136,339 139,334 139,334 139,334"/> + <polyline verts=" 208,259 215,259 212,255 220,259 224,263 225,274 224,283 220,292 208,300 206,308 203,304 199,315 197,309 195,318 193,313 190,322 190,316 185,325 182,318 180,325 172,321 178,320 176,313 186,312 180,307 188,307 184,303 191,302 186,299 195,294 187,290 197,288 192,286 201,283 194,280 203,277 198,275 207,271 200,269 209,265 204,265 212,262 208,259 208,259 208,259"/> + <polyline verts=" 106,126 106,131 109,132 111,134 115,132 115,135 119,133 118,137 123,137 128,137 133,134 136,130 136,127 132,124 118,128 112,128 106,126 106,126 106,126"/> + <polyline verts=" 107,114 101,110 98,102 105,97 111,98 119,102 121,108 118,112 113,115 107,114 107,114 107,114"/> + <polyline verts=" 148,106 145,110 146,116 150,118 152,111 151,107 148,106 148,106 148,106"/> + <polyline verts=" 80,55 70,52 75,58 63,57 72,61 57,61 67,66 57,67 62,69 54,71 61,73 54,77 63,78 53,85 60,84 56,90 69,84 63,82 75,76 70,75 77,72 72,71 78,69 72,66 81,67 78,64 82,63 80,60 86,62 80,55 80,55 80,55"/> + <polyline verts=" 87,56 91,52 96,50 102,56 98,56 92,60 87,56 87,56 87,56"/> + <polyline verts=" 85,68 89,73 98,76 106,74 96,73 91,70 85,68 85,68 85,68"/> + <polyline verts=" 115,57 114,64 111,64 115,75 122,81 122,74 126,79 126,74 131,78 130,72 133,77 131,68 126,61 119,57 115,57 115,57 115,57"/> + <polyline verts=" 145,48 143,53 147,59 151,59 150,55 145,48 145,48 145,48"/> + <polyline verts=" 26,22 34,15 43,10 52,10 59,16 47,15 32,22 26,22 26,22 26,22"/> + <polyline verts=" 160,19 152,26 149,34 154,33 152,30 157,30 155,26 158,27 157,23 161,23 160,19 160,19 160,19"/> +</g> +<g style="fill: #000000"> + <polyline verts=" 98,117 105,122 109,122 105,117 113,120 121,120 130,112 128,108 123,103 123,99 128,101 132,106 135,109 142,105 142,101 145,101 145,91 148,101 145,105 136,112 135,116 143,124 148,120 150,122 142,128 133,122 121,125 112,126 103,125 100,129 96,124 98,117 98,117 98,117"/> + <polyline verts=" 146,118 152,118 152,115 149,115 146,118 146,118 146,118"/> + <polyline verts=" 148,112 154,111 154,109 149,109 148,112 148,112 148,112"/> + <polyline verts=" 106,112 108,115 114,116 118,114 106,112 106,112 106,112"/> + <polyline verts=" 108,108 111,110 116,110 119,108 108,108 108,108 108,108"/> + <polyline verts=" 106,104 109,105 117,106 115,104 106,104 106,104 106,104"/> + <polyline verts=" 50,25 41,26 34,33 39,43 49,58 36,51 47,68 55,69 54,59 61,57 74,46 60,52 67,42 57,48 61,40 54,45 60,36 59,29 48,38 52,30 47,32 50,25 50,25 50,25"/> + <polyline verts=" 147,34 152,41 155,49 161,53 157,47 164,47 158,43 168,44 159,40 164,37 169,37 164,33 169,34 165,28 170,30 170,25 173,29 175,27 176,32 173,36 175,39 172,42 172,46 168,49 170,55 162,57 158,63 155,58 153,50 149,46 147,34 147,34 147,34"/> + <polyline verts=" 155,71 159,80 157,93 157,102 155,108 150,101 149,93 154,101 152,91 151,83 155,79 155,71 155,71 155,71"/> + <polyline verts=" 112,78 115,81 114,91 112,87 113,82 112,78 112,78 112,78"/> + <polyline verts=" 78,28 64,17 58,11 47,9 36,10 28,16 21,26 18,41 20,51 23,61 33,65 28,68 37,74 36,81 43,87 48,90 43,100 40,98 39,90 31,80 30,72 22,71 17,61 14,46 16,28 23,17 33,9 45,6 54,6 65,12 78,28 78,28 78,28"/> + <polyline verts=" 67,18 76,9 87,5 101,2 118,3 135,8 149,20 149,26 144,19 132,12 121,9 105,7 89,8 76,14 70,20 67,18 67,18 67,18"/> + <polyline verts=" 56,98 48,106 56,103 47,112 56,110 52,115 57,113 52,121 62,115 58,123 65,119 63,125 69,121 68,127 74,125 74,129 79,128 83,132 94,135 93,129 85,127 81,122 76,126 75,121 71,124 71,117 66,121 66,117 62,117 64,112 60,113 60,110 57,111 61,105 57,107 60,101 55,102 56,98 56,98 56,98"/> + <polyline verts=" 101,132 103,138 106,134 106,139 112,136 111,142 115,139 114,143 119,142 125,145 131,142 135,138 140,134 140,129 143,135 145,149 150,171 149,184 145,165 141,150 136,147 132,151 131,149 126,152 125,150 121,152 117,148 111,152 110,148 105,149 104,145 98,150 96,138 94,132 94,130 98,132 101,132 101,132 101,132"/> + <polyline verts=" 41,94 32,110 23,132 12,163 6,190 7,217 5,236 3,247 9,230 12,211 12,185 18,160 26,134 35,110 43,99 41,94 41,94 41,94"/> + <polyline verts=" 32,246 41,250 50,257 52,267 53,295 53,323 59,350 54,363 51,365 44,366 42,360 40,372 54,372 59,366 62,353 71,352 75,335 73,330 66,318 68,302 64,294 67,288 63,286 63,279 59,275 58,267 56,262 50,247 42,235 44,246 32,236 35,244 32,246 32,246 32,246"/> + <polyline verts=" 134,324 146,320 159,322 173,327 179,337 179,349 172,355 158,357 170,350 174,343 170,333 163,328 152,326 134,329 134,324 134,324 134,324"/> + <polyline verts=" 173,339 183,334 184,338 191,329 194,332 199,323 202,325 206,318 209,320 213,309 221,303 228,296 232,289 234,279 233,269 230,262 225,256 219,253 208,252 198,252 210,249 223,250 232,257 237,265 238,277 238,291 232,305 221,323 218,335 212,342 200,349 178,348 173,339 173,339 173,339"/> + <polyline verts=" 165,296 158,301 156,310 156,323 162,324 159,318 162,308 162,304 165,296 165,296 165,296"/> + <polyline verts=" 99,252 105,244 107,234 115,228 121,228 131,235 122,233 113,235 109,246 121,239 133,243 121,243 110,251 99,252 99,252 99,252"/> + <polyline verts=" 117,252 124,247 134,249 136,253 126,252 117,252 117,252 117,252"/> + <polyline verts=" 117,218 132,224 144,233 140,225 132,219 117,218 117,218 117,218"/> + <polyline verts=" 122,212 134,214 143,221 141,213 132,210 122,212 122,212 122,212"/> + <polyline verts=" 69,352 70,363 76,373 86,378 97,379 108,379 120,377 128,378 132,373 135,361 133,358 132,366 127,375 121,374 121,362 119,367 117,374 110,376 110,362 107,357 106,371 104,375 97,376 90,375 90,368 86,362 83,364 86,369 85,373 78,370 73,362 71,351 69,352 69,352 69,352"/> + <polyline verts=" 100,360 96,363 99,369 102,364 100,360 100,360 100,360"/> + <polyline verts=" 115,360 112,363 114,369 117,364 115,360 115,360 115,360"/> + <polyline verts=" 127,362 125,364 126,369 128,365 127,362 127,362 127,362"/> + <polyline verts=" 5,255 7,276 11,304 15,320 13,334 6,348 2,353 0,363 5,372 12,374 25,372 38,372 44,369 42,367 36,368 31,369 30,360 27,368 20,370 16,361 15,368 10,369 3,366 3,359 6,352 11,348 17,331 19,316 12,291 9,274 5,255 5,255 5,255"/> + <polyline verts=" 10,358 7,362 10,366 11,362 10,358 10,358 10,358"/> + <polyline verts=" 25,357 22,360 24,366 27,360 25,357 25,357 25,357"/> + <polyline verts=" 37,357 34,361 36,365 38,361 37,357 37,357 37,357"/> + <polyline verts=" 49,356 46,359 47,364 50,360 49,356 49,356 49,356"/> + <polyline verts=" 130,101 132,102 135,101 139,102 143,103 142,101 137,100 133,100 130,101 130,101 130,101"/> + <polyline verts=" 106,48 105,52 108,56 109,52 106,48 106,48 106,48"/> + <polyline verts=" 139,52 139,56 140,60 142,58 141,56 139,52 139,52 139,52"/> + <polyline verts=" 25,349 29,351 30,355 33,350 37,348 42,351 45,347 49,345 44,343 36,345 25,349 25,349 25,349"/> + <polyline verts=" 98,347 105,351 107,354 109,349 115,349 120,353 118,349 113,346 104,346 98,347 98,347 98,347"/> + <polyline verts=" 83,348 87,352 87,357 89,351 87,348 83,348 83,348 83,348"/> + <polyline verts=" 155,107 163,107 170,107 186,108 175,109 155,109 155,107 155,107 155,107"/> + <polyline verts=" 153,114 162,113 175,112 192,114 173,114 154,115 153,114 153,114 153,114"/> + <polyline verts=" 152,118 164,120 180,123 197,129 169,123 151,120 152,118 152,118 152,118"/> + <polyline verts=" 68,109 87,106 107,106 106,108 88,108 68,109 68,109 68,109"/> + <polyline verts=" 105,111 95,112 79,114 71,116 85,115 102,113 105,111 105,111 105,111"/> + <polyline verts=" 108,101 98,99 87,99 78,99 93,100 105,102 108,101 108,101 108,101"/> + <polyline verts=" 85,63 91,63 97,60 104,60 108,62 111,69 112,75 110,74 108,71 103,73 106,69 105,65 103,64 103,67 102,70 99,70 97,66 94,67 97,72 88,67 84,66 85,63 85,63 85,63"/> + <polyline verts=" 140,74 141,66 144,61 150,61 156,62 153,70 150,73 152,65 150,65 151,68 149,71 146,71 144,66 143,70 143,74 140,74 140,74 140,74"/> + <polyline verts=" 146,20 156,11 163,9 172,9 178,14 182,18 184,32 182,42 182,52 177,58 176,67 171,76 165,90 157,105 160,92 164,85 168,78 167,73 173,66 172,62 175,59 174,55 177,53 180,46 181,29 179,21 173,13 166,11 159,13 153,18 148,23 146,20 146,20 146,20"/> + <polyline verts=" 150,187 148,211 150,233 153,247 148,267 135,283 125,299 136,292 131,313 122,328 122,345 129,352 133,359 133,367 137,359 148,356 140,350 131,347 129,340 132,332 140,328 137,322 140,304 154,265 157,244 155,223 161,220 175,229 186,247 185,260 176,275 178,287 185,277 188,261 196,253 189,236 174,213 150,187 150,187 150,187"/> + <polyline verts=" 147,338 142,341 143,345 141,354 147,343 147,338 147,338 147,338"/> + <polyline verts=" 157,342 156,349 150,356 157,353 163,346 162,342 157,342 157,342 157,342"/> + <polyline verts=" 99,265 96,284 92,299 73,339 73,333 87,300 99,265 99,265 99,265"/> +</g></svg> diff --git a/result/svg2 b/result/svg2 index 5e53829a..6c3990c8 100644 --- a/result/svg2 +++ b/result/svg2 @@ -1,54 +1,56 @@ <?xml version="1.0" standalone="yes"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd"> <svg width="268px" height="207px"> - <g style="stroke: #000000"> - <path d=" M 29 28 "/> - <path d=" L 19 74 "/> - </g> - <g style="stroke: #800040"> - <polyline verts=" 32,100 72,50 90,82 73,16 120,64 152,9 177,107"/> - </g> - <g style="stroke: #000000"/> - <g style="stroke: #0000ff"> - <rect x="30" y="101" width="51" height="33"/> - </g> - <g style="fill: #0000ff"> - <ellipse cx="182" cy="127" major="37" minor="31" angle="90"/> - </g> - <g style="fill: #ff0000"> - <polyline verts=" 78,180 76,151 131,149 136,182 135,182 134,183 127,185 117,186 109,192 104,194 98,199 96,200 95,201 94,202 92,202 85,202 70,200 54,199 47,198 46,197 45,197 37,195 26,193 17,187 9,181 8,181 7,176 6,175 6,173 6,172 6,170 8,164 8,163 8,162 9,162 10,162 11,162 13,162 20,162 26,162 27,162 28,162 30,162 30,163 31,163 32,164 34,166 35,166 36,167 36,168 37,169 38,169 39,169 41,170 43,170 45,170 47,170 49,170 50,168 50,161 50,160 50,159 47,162 78,180"/> - <g> - <desc> Java Font definition:Dialog 0</desc> - </g> - <g> - <desc> Java Font definition:Helvetica 0</desc> - </g> - </g> - <g style="stroke: #000000"> - <text x="188" y="36">this is text</text> - </g> - <g style="stroke: #000000"> - <g> - <desc> Java Font definition:Dialog 0</desc> - </g> - <g> - <desc> Java Font definition:Helvetica 700</desc> - </g> - </g> - <g style="stroke: #008080"> - <text x="176" y="85">sadfsadfsad</text> - </g> - <g style="stroke: #000000"/> - <g style="fill: #800040"> - <ellipse cx="208" cy="180" major="45" minor="31" angle="0"/> - </g> - <g style="stroke: #000000"/> - <g style="fill: #ffffff"> - <g> - <desc> Java Font definition:Dialog 700</desc> - </g> - <g> - <desc> Java Font definition:Dialog 700</desc> - </g> - </g> -</svg> +<g style="stroke: #000000"> + <path d=" M 29 28 "/> + <path d=" L 19 74 "/> +</g> +<g style="stroke: #800040"> + <polyline verts=" 32,100 72,50 90,82 73,16 120,64 152,9 177,107"/> +</g> +<g style="stroke: #000000"> +</g> +<g style="stroke: #0000ff"> + <rect x="30" y="101" width="51" height="33"/> +</g> +<g style="fill: #0000ff"> + <ellipse cx="182" cy="127" major="37" minor="31" angle="90"/> +</g> +<g style="fill: #ff0000"> + <polyline verts=" 78,180 76,151 131,149 136,182 135,182 134,183 127,185 117,186 109,192 104,194 98,199 96,200 95,201 94,202 92,202 85,202 70,200 54,199 47,198 46,197 45,197 37,195 26,193 17,187 9,181 8,181 7,176 6,175 6,173 6,172 6,170 8,164 8,163 8,162 9,162 10,162 11,162 13,162 20,162 26,162 27,162 28,162 30,162 30,163 31,163 32,164 34,166 35,166 36,167 36,168 37,169 38,169 39,169 41,170 43,170 45,170 47,170 49,170 50,168 50,161 50,160 50,159 47,162 78,180"/> + <g> + <desc> Java Font definition:Dialog 0</desc> + </g> + <g> + <desc> Java Font definition:Helvetica 0</desc> + </g> +</g> +<g style="stroke: #000000"> + <text x="188" y="36">this is text</text> +</g> +<g style="stroke: #000000"> + <g> + <desc> Java Font definition:Dialog 0</desc> + </g> + <g> + <desc> Java Font definition:Helvetica 700</desc> + </g> +</g> +<g style="stroke: #008080"> + <text x="176" y="85">sadfsadfsad</text> +</g> +<g style="stroke: #000000"> +</g> +<g style="fill: #800040"> + <ellipse cx="208" cy="180" major="45" minor="31" angle="0"/> +</g> +<g style="stroke: #000000"> +</g> +<g style="fill: #ffffff"> + <g> + <desc> Java Font definition:Dialog 700</desc> + </g> + <g> + <desc> Java Font definition:Dialog 700</desc> + </g> +</g></svg> diff --git a/result/svg3 b/result/svg3 index 35b9cd88..c4994b85 100644 --- a/result/svg3 +++ b/result/svg3 @@ -1,723 +1,723 @@ <?xml version="1.0"?> <svg> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M77.696 284.285C77.696 284.285 77.797 286.179 76.973 286.16C76.149 286.141 59.695 238.066 39.167 240.309C39.167 240.309 56.95 232.956 77.696 284.285z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M81.226 281.262C81.226 281.262 80.677 283.078 79.908 282.779C79.14 282.481 80.023 231.675 59.957 226.801C59.957 226.801 79.18 225.937 81.226 281.262z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M108.716 323.59C108.716 323.59 110.352 324.55 109.882 325.227C109.411 325.904 60.237 313.102 50.782 331.459C50.782 331.459 54.461 312.572 108.716 323.59z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M105.907 333.801C105.907 333.801 107.763 334.197 107.529 334.988C107.296 335.779 56.593 339.121 53.403 359.522C53.403 359.522 50.945 340.437 105.907 333.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M101.696 328.276C101.696 328.276 103.474 328.939 103.128 329.687C102.782 330.435 52.134 326.346 46.002 346.064C46.002 346.064 46.354 326.825 101.696 328.276z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M90.991 310.072C90.991 310.072 92.299 311.446 91.66 311.967C91.021 312.488 47.278 286.634 33.131 301.676C33.131 301.676 41.872 284.533 90.991 310.072z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M83.446 314.263C83.446 314.263 84.902 315.48 84.326 316.071C83.75 316.661 37.362 295.922 25.008 312.469C25.008 312.469 31.753 294.447 83.446 314.263z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M80.846 318.335C80.846 318.335 82.454 319.343 81.964 320.006C81.474 320.669 32.692 306.446 22.709 324.522C22.709 324.522 26.934 305.749 80.846 318.335z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M91.58 318.949C91.58 318.949 92.702 320.48 92.001 320.915C91.3 321.35 51.231 290.102 35.273 303.207C35.273 303.207 46.138 287.326 91.58 318.949z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M71.8 290C71.8 290 72.4 291.8 71.6 292C70.8 292.2 42.2 250.2 22.999 257.8C22.999 257.8 38.2 246 71.8 290z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M72.495 296.979C72.495 296.979 73.47 298.608 72.731 298.975C71.993 299.343 35.008 264.499 17.899 276.061C17.899 276.061 30.196 261.261 72.495 296.979z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> - <path d="M72.38 301.349C72.38 301.349 73.502 302.88 72.801 303.315C72.1 303.749 32.031 272.502 16.073 285.607C16.073 285.607 26.938 269.726 72.38 301.349z"/> - </g> - <g style="fill: #ffffff; stroke:#000000"> - <path d="M70.17 303.065C70.673 309.113 71.661 315.682 73.4 318.801C73.4 318.801 69.8 331.201 78.6 344.401C78.6 344.401 78.2 351.601 79.8 354.801C79.8 354.801 83.8 363.201 88.6 364.001C92.484 364.648 101.207 367.717 111.068 369.121C111.068 369.121 128.2 383.201 125 396.001C125 396.001 124.6 412.401 121 414.001C121 414.001 132.6 402.801 123 419.601L118.6 438.401C118.6 438.401 144.2 416.801 128.6 435.201L118.6 461.201C118.6 461.201 138.2 442.801 131 451.201L127.8 460.001C127.8 460.001 171 432.801 140.2 462.401C140.2 462.401 148.2 458.801 152.6 461.601C152.6 461.601 159.4 460.401 158.6 462.001C158.6 462.001 137.8 472.401 134.2 490.801C134.2 490.801 142.6 480.801 139.4 491.601L139.8 503.201C139.8 503.201 143.8 481.601 143.4 519.201C143.4 519.201 162.6 501.201 151 522.001L151 538.801C151 538.801 166.2 522.401 159.8 535.201C159.8 535.201 169.8 526.401 165.8 541.601C165.8 541.601 165 552.001 169.4 540.801C169.4 540.801 185.4 510.201 179.4 536.401C179.4 536.401 178.6 555.601 183.4 540.801C183.4 540.801 183.8 551.201 193 558.401C193 558.401 191.8 507.601 204.6 543.601L208.6 560.001C208.6 560.001 211.4 550.801 211 545.601C211 545.601 225.8 529.201 219 553.601C219 553.601 234.2 530.801 231 544.001C231 544.001 223.4 560.001 225 564.801C225 564.801 241.8 530.001 243 528.401C243 528.401 241 570.802 251.8 534.801C251.8 534.801 257.4 546.801 254.6 551.201C254.6 551.201 262.6 543.201 261.8 540.001C261.8 540.001 266.4 531.801 269.2 545.401C269.2 545.401 271 554.801 272.6 551.601C272.6 551.601 276.6 575.602 277.8 552.801C277.8 552.801 279.4 539.201 272.2 527.601C272.2 527.601 273 524.401 270.2 520.401C270.2 520.401 283.8 542.001 276.6 513.201C276.6 513.201 287.801 521.201 289.001 521.201C289.001 521.201 275.4 498.001 284.2 502.801C284.2 502.801 279 492.401 297.001 504.401C297.001 504.401 281 488.401 298.601 498.001C298.601 498.001 306.601 504.401 299.001 494.401C299.001 494.401 284.6 478.401 306.601 496.401C306.601 496.401 318.201 512.801 319.001 515.601C319.001 515.601 309.001 486.401 304.601 483.601C304.601 483.601 313.001 447.201 354.201 462.801C354.201 462.801 361.001 480.001 365.401 461.601C365.401 461.601 378.201 455.201 389.401 482.801C389.401 482.801 393.401 469.201 392.601 466.401C392.601 466.401 399.401 467.601 398.601 466.401C398.601 466.401 411.801 470.801 413.001 470.001C413.001 470.001 419.801 476.801 420.201 473.201C420.201 473.201 429.401 476.001 427.401 472.401C427.401 472.401 436.201 488.001 436.601 491.601L439.001 477.601L441.001 480.401C441.001 480.401 442.601 472.801 441.801 471.601C441.001 470.401 461.801 478.401 466.601 499.201L468.601 507.601C468.601 507.601 474.601 492.801 473.001 488.801C473.001 488.801 478.201 489.601 478.601 494.001C478.601 494.001 482.601 470.801 477.801 464.801C477.801 464.801 482.201 464.001 483.401 467.601L483.401 460.401C483.401 460.401 490.601 461.201 490.601 458.801C490.601 458.801 495.001 454.801 497.001 459.601C497.001 459.601 484.601 424.401 503.001 443.601C503.001 443.601 510.201 454.401 506.601 435.601C503.001 416.801 499.001 415.201 503.801 414.801C503.801 414.801 504.601 411.201 502.601 409.601C500.601 408.001 503.801 409.601 503.801 409.601C503.801 409.601 508.601 413.601 503.401 391.601C503.401 391.601 509.801 393.201 497.801 364.001C497.801 364.001 500.601 361.601 496.601 353.201C496.601 353.201 504.601 357.601 507.401 356.001C507.401 356.001 507.001 354.401 503.801 350.401C503.801 350.401 482.201 295.6 502.601 317.601C502.601 317.601 514.451 331.151 508.051 308.351C508.051 308.351 498.94 284.341 499.717 280.045L70.17 303.065z"/> - </g> - <g style="fill: #cc7226; stroke:#000000"> - <path d="M499.717 280.245C500.345 280.426 502.551 281.55 503.801 283.2C503.801 283.2 510.601 294 505.401 275.6C505.401 275.6 496.201 246.8 505.001 258C505.001 258 511.001 265.2 507.801 251.6C503.936 235.173 501.401 228.8 501.401 228.8C501.401 228.8 513.001 233.6 486.201 194L495.001 197.6C495.001 197.6 475.401 158 453.801 152.8L445.801 146.8C445.801 146.8 484.201 108.8 471.401 72C471.401 72 464.601 66.8 455.001 76C455.001 76 448.601 80.8 442.601 79.2C442.601 79.2 411.801 80.4 409.801 80.4C407.801 80.4 373.001 43.2 307.401 60.8C307.401 60.8 302.201 62.8 297.801 61.6C297.801 61.6 279.4 45.6 230.6 68.4C230.6 68.4 220.6 70.4 219 70.4C217.4 70.4 214.6 70.4 206.6 76.8C198.6 83.2 198.2 84 196.2 85.6C196.2 85.6 179.8 96.8 175 97.6C175 97.6 163.4 104 159 114L155.4 115.2C155.4 115.2 153.8 122.4 153.4 123.6C153.4 123.6 148.6 127.2 147.8 132.8C147.8 132.8 139 138.8 139.4 143.2C139.4 143.2 137.8 148.4 137 153.2C137 153.2 129.8 158 130.6 160.8C130.6 160.8 123 174.8 124.2 181.6C124.2 181.6 117.8 181.2 115 183.6C115 183.6 114.2 188.4 112.6 188.8C112.6 188.8 109.8 190 112.2 194C112.2 194 110.6 196.8 110.2 198.4C110.2 198.4 111 201.2 106.6 206.8C106.6 206.8 100.2 225.6 102.2 230.8C102.2 230.8 102.6 235.6 99.8 237.2C99.8 237.2 96.2 236.8 104.6 248.8C104.6 248.8 105.4 250 102.2 252.4C102.2 252.4 85 256 82.6 272.4C82.6 272.4 69 287.2 69 292.4C69 294.705 69.271 297.852 69.97 302.465C69.97 302.465 69.4 310.801 97 311.601C124.6 312.401 499.717 280.245 499.717 280.245z"/> - </g> - <g style="fill: #cc7226"> - <path d="M84.4 302.6C59.4 263.2 73.8 319.601 73.8 319.601C82.6 354.001 212.2 316.401 212.2 316.401C212.2 316.401 381.001 286 392.201 282C403.401 278 498.601 284.4 498.601 284.4L493.001 267.6C428.201 221.2 409.001 244.4 395.401 240.4C381.801 236.4 384.201 246 381.001 246.8C377.801 247.6 338.601 222.8 332.201 223.6C325.801 224.4 300.459 200.649 315.401 232.4C331.401 266.4 257 271.6 240.2 260.4C223.4 249.2 247.4 278.8 247.4 278.8C265.8 298.8 231.4 282 231.4 282C197 269.2 173 294.8 169.8 295.6C166.6 296.4 161.8 299.6 161 293.2C160.2 286.8 152.69 270.099 121 296.4C101 313.001 87.2 291 87.2 291L84.4 302.6z"/> - </g> - <g style="fill: #e87f3a"> - <path d="M333.51 225.346C327.11 226.146 301.743 202.407 316.71 234.146C333.31 269.346 258.31 273.346 241.51 262.146C224.709 250.946 248.71 280.546 248.71 280.546C267.11 300.546 232.709 283.746 232.709 283.746C198.309 270.946 174.309 296.546 171.109 297.346C167.909 298.146 163.109 301.346 162.309 294.946C161.509 288.546 154.13 272.012 122.309 298.146C101.073 315.492 87.582 294.037 87.582 294.037L84.382 304.146C59.382 264.346 74.454 322.655 74.454 322.655C83.255 357.056 213.509 318.146 213.509 318.146C213.509 318.146 382.31 287.746 393.51 283.746C404.71 279.746 499.038 286.073 499.038 286.073L493.51 268.764C428.71 222.364 410.31 246.146 396.71 242.146C383.11 238.146 385.51 247.746 382.31 248.546C379.11 249.346 339.91 224.546 333.51 225.346z"/> - </g> - <g style="fill: #ea8c4d"> - <path d="M334.819 227.091C328.419 227.891 303.685 203.862 318.019 235.891C334.219 272.092 259.619 275.092 242.819 263.892C226.019 252.692 250.019 282.292 250.019 282.292C268.419 302.292 234.019 285.492 234.019 285.492C199.619 272.692 175.618 298.292 172.418 299.092C169.218 299.892 164.418 303.092 163.618 296.692C162.818 290.292 155.57 273.925 123.618 299.892C101.145 317.983 87.964 297.074 87.964 297.074L84.364 305.692C60.564 266.692 75.109 325.71 75.109 325.71C83.909 360.11 214.819 319.892 214.819 319.892C214.819 319.892 383.619 289.492 394.819 285.492C406.019 281.492 499.474 287.746 499.474 287.746L494.02 269.928C429.219 223.528 411.619 247.891 398.019 243.891C384.419 239.891 386.819 249.491 383.619 250.292C380.419 251.092 341.219 226.291 334.819 227.091z"/> - </g> - <g style="fill: #ec9961"> - <path d="M336.128 228.837C329.728 229.637 304.999 205.605 319.328 237.637C336.128 275.193 260.394 276.482 244.128 265.637C227.328 254.437 251.328 284.037 251.328 284.037C269.728 304.037 235.328 287.237 235.328 287.237C200.928 274.437 176.928 300.037 173.728 300.837C170.528 301.637 165.728 304.837 164.928 298.437C164.128 292.037 157.011 275.839 124.927 301.637C101.218 320.474 88.345 300.11 88.345 300.11L84.345 307.237C62.545 270.437 75.764 328.765 75.764 328.765C84.564 363.165 216.128 321.637 216.128 321.637C216.128 321.637 384.928 291.237 396.129 287.237C407.329 283.237 499.911 289.419 499.911 289.419L494.529 271.092C429.729 224.691 412.929 249.637 399.329 245.637C385.728 241.637 388.128 251.237 384.928 252.037C381.728 252.837 342.528 228.037 336.128 228.837z"/> - </g> - <g style="fill: #eea575"> - <path d="M337.438 230.583C331.037 231.383 306.814 207.129 320.637 239.383C337.438 278.583 262.237 278.583 245.437 267.383C228.637 256.183 252.637 285.783 252.637 285.783C271.037 305.783 236.637 288.983 236.637 288.983C202.237 276.183 178.237 301.783 175.037 302.583C171.837 303.383 167.037 306.583 166.237 300.183C165.437 293.783 158.452 277.752 126.237 303.383C101.291 322.965 88.727 303.146 88.727 303.146L84.327 308.783C64.527 273.982 76.418 331.819 76.418 331.819C85.218 366.22 217.437 323.383 217.437 323.383C217.437 323.383 386.238 292.983 397.438 288.983C408.638 284.983 500.347 291.092 500.347 291.092L495.038 272.255C430.238 225.855 414.238 251.383 400.638 247.383C387.038 243.383 389.438 252.983 386.238 253.783C383.038 254.583 343.838 229.783 337.438 230.583z"/> - </g> - <g style="fill: #f1b288"> - <path d="M338.747 232.328C332.347 233.128 306.383 209.677 321.947 241.128C341.147 279.928 263.546 280.328 246.746 269.128C229.946 257.928 253.946 287.528 253.946 287.528C272.346 307.528 237.946 290.728 237.946 290.728C203.546 277.928 179.546 303.528 176.346 304.328C173.146 305.128 168.346 308.328 167.546 301.928C166.746 295.528 159.892 279.665 127.546 305.128C101.364 325.456 89.109 306.183 89.109 306.183L84.309 310.328C66.309 277.128 77.073 334.874 77.073 334.874C85.873 369.274 218.746 325.128 218.746 325.128C218.746 325.128 387.547 294.728 398.747 290.728C409.947 286.728 500.783 292.764 500.783 292.764L495.547 273.419C430.747 227.019 415.547 253.128 401.947 249.128C388.347 245.128 390.747 254.728 387.547 255.528C384.347 256.328 345.147 231.528 338.747 232.328z"/> - </g> - <g style="fill: #f3bf9c"> - <path d="M340.056 234.073C333.655 234.873 307.313 211.613 323.255 242.873C343.656 282.874 264.855 282.074 248.055 270.874C231.255 259.674 255.255 289.274 255.255 289.274C273.655 309.274 239.255 292.474 239.255 292.474C204.855 279.674 180.855 305.274 177.655 306.074C174.455 306.874 169.655 310.074 168.855 303.674C168.055 297.274 161.332 281.578 128.855 306.874C101.436 327.947 89.491 309.219 89.491 309.219L84.291 311.874C68.291 281.674 77.727 337.929 77.727 337.929C86.527 372.329 220.055 326.874 220.055 326.874C220.055 326.874 388.856 296.474 400.056 292.474C411.256 288.474 501.22 294.437 501.22 294.437L496.056 274.583C431.256 228.183 416.856 254.874 403.256 250.874C389.656 246.873 392.056 256.474 388.856 257.274C385.656 258.074 346.456 233.273 340.056 234.073z"/> - </g> - <g style="fill: #f5ccb0"> - <path d="M341.365 235.819C334.965 236.619 307.523 213.944 324.565 244.619C346.565 284.219 266.164 283.819 249.364 272.619C232.564 261.419 256.564 291.019 256.564 291.019C274.964 311.019 240.564 294.219 240.564 294.219C206.164 281.419 182.164 307.019 178.964 307.819C175.764 308.619 170.964 311.819 170.164 305.419C169.364 299.019 162.773 283.492 130.164 308.619C101.509 330.438 89.873 312.256 89.873 312.256L84.273 313.419C69.872 285.019 78.382 340.983 78.382 340.983C87.182 375.384 221.364 328.619 221.364 328.619C221.364 328.619 390.165 298.219 401.365 294.219C412.565 290.219 501.656 296.11 501.656 296.11L496.565 275.746C431.765 229.346 418.165 256.619 404.565 252.619C390.965 248.619 393.365 258.219 390.165 259.019C386.965 259.819 347.765 235.019 341.365 235.819z"/> - </g> - <g style="fill: #f8d8c4"> - <path d="M342.674 237.565C336.274 238.365 308.832 215.689 325.874 246.365C347.874 285.965 267.474 285.565 250.674 274.365C233.874 263.165 257.874 292.765 257.874 292.765C276.274 312.765 241.874 295.965 241.874 295.965C207.473 283.165 183.473 308.765 180.273 309.565C177.073 310.365 172.273 313.565 171.473 307.165C170.673 300.765 164.214 285.405 131.473 310.365C101.582 332.929 90.255 315.293 90.255 315.293L84.255 314.965C70.654 288.564 79.037 344.038 79.037 344.038C87.837 378.438 222.673 330.365 222.673 330.365C222.673 330.365 391.474 299.965 402.674 295.965C413.874 291.965 502.093 297.783 502.093 297.783L497.075 276.91C432.274 230.51 419.474 258.365 405.874 254.365C392.274 250.365 394.674 259.965 391.474 260.765C388.274 261.565 349.074 236.765 342.674 237.565z"/> - </g> - <g style="fill: #fae5d7"> - <path d="M343.983 239.31C337.583 240.11 310.529 217.223 327.183 248.11C349.183 288.91 268.783 287.31 251.983 276.11C235.183 264.91 259.183 294.51 259.183 294.51C277.583 314.51 243.183 297.71 243.183 297.71C208.783 284.91 184.783 310.51 181.583 311.31C178.382 312.11 173.582 315.31 172.782 308.91C171.982 302.51 165.654 287.318 132.782 312.11C101.655 335.42 90.637 318.329 90.637 318.329L84.236 316.51C71.236 292.51 79.691 347.093 79.691 347.093C88.491 381.493 223.983 332.11 223.983 332.11C223.983 332.11 392.783 301.71 403.983 297.71C415.183 293.71 502.529 299.456 502.529 299.456L497.583 278.074C432.783 231.673 420.783 260.11 407.183 256.11C393.583 252.11 395.983 261.71 392.783 262.51C389.583 263.31 350.383 238.51 343.983 239.31z"/> - </g> - <g style="fill: #fcf2eb"> - <path d="M345.292 241.055C338.892 241.855 312.917 218.411 328.492 249.855C349.692 292.656 270.092 289.056 253.292 277.856C236.492 266.656 260.492 296.256 260.492 296.256C278.892 316.256 244.492 299.456 244.492 299.456C210.092 286.656 186.092 312.256 182.892 313.056C179.692 313.856 174.892 317.056 174.092 310.656C173.292 304.256 167.095 289.232 134.092 313.856C101.727 337.911 91.018 321.365 91.018 321.365L84.218 318.056C71.418 294.856 80.346 350.147 80.346 350.147C89.146 384.547 225.292 333.856 225.292 333.856C225.292 333.856 394.093 303.456 405.293 299.456C416.493 295.456 502.965 301.128 502.965 301.128L498.093 279.237C433.292 232.837 422.093 261.856 408.493 257.856C394.893 253.855 397.293 263.456 394.093 264.256C390.892 265.056 351.692 240.255 345.292 241.055z"/> - </g> - <g style="fill: #ffffff"> - <path d="M84.2 319.601C71.4 297.6 81 353.201 81 353.201C89.8 387.601 226.6 335.601 226.6 335.601C226.6 335.601 395.401 305.2 406.601 301.2C417.801 297.2 503.401 302.8 503.401 302.8L498.601 280.4C433.801 234 423.401 263.6 409.801 259.6C396.201 255.6 398.601 265.2 395.401 266C392.201 266.8 353.001 242 346.601 242.8C340.201 243.6 314.981 219.793 329.801 251.6C352.028 299.307 269.041 289.227 254.6 279.6C237.8 268.4 261.8 298 261.8 298C280.2 318.001 245.8 301.2 245.8 301.2C211.4 288.4 187.4 314.001 184.2 314.801C181 315.601 176.2 318.801 175.4 312.401C174.6 306 168.535 291.144 135.4 315.601C101.8 340.401 91.4 324.401 91.4 324.401L84.2 319.601z"/> - </g> - <g style="fill: #000000"> - <path d="M125.8 349.601C125.8 349.601 118.6 361.201 139.4 374.401C139.4 374.401 140.8 375.801 122.8 371.601C122.8 371.601 116.6 369.601 115 359.201C115 359.201 110.2 354.801 105.4 349.201C100.6 343.601 125.8 349.601 125.8 349.601z"/> - </g> - <g style="fill: #cccccc"> - <path d="M265.8 302C265.8 302 283.498 328.821 282.9 333.601C281.6 344.001 281.4 353.601 284.6 357.601C287.801 361.601 296.601 394.801 296.601 394.801C296.601 394.801 296.201 396.001 308.601 358.001C308.601 358.001 320.201 342.001 300.201 323.601C300.201 323.601 265 294.8 265.8 302z"/> - </g> - <g style="fill: #000000"> - <path d="M145.8 376.401C145.8 376.401 157 383.601 142.6 414.801L149 412.401C149 412.401 148.2 423.601 145 426.001L152.2 422.801C152.2 422.801 157 430.801 153 435.601C153 435.601 169.8 443.601 169 450.001C169 450.001 175.4 442.001 171.4 435.601C167.4 429.201 160.2 433.201 161 414.801L152.2 418.001C152.2 418.001 157.8 409.201 157.8 402.801L149.8 405.201C149.8 405.201 165.269 378.623 154.6 377.201C148.6 376.401 145.8 376.401 145.8 376.401z"/> - </g> - <g style="fill: #cccccc"> - <path d="M178.2 393.201C178.2 393.201 181 388.801 178.2 389.601C175.4 390.401 144.2 405.201 138.2 414.801C138.2 414.801 172.6 390.401 178.2 393.201z"/> - </g> - <g style="fill: #cccccc"> - <path d="M188.6 401.201C188.6 401.201 191.4 396.801 188.6 397.601C185.8 398.401 154.6 413.201 148.6 422.801C148.6 422.801 183 398.401 188.6 401.201z"/> - </g> - <g style="fill: #cccccc"> - <path d="M201.8 386.001C201.8 386.001 204.6 381.601 201.8 382.401C199 383.201 167.8 398.001 161.8 407.601C161.8 407.601 196.2 383.201 201.8 386.001z"/> - </g> - <g style="fill: #cccccc"> - <path d="M178.6 429.601C178.6 429.601 178.6 423.601 175.8 424.401C173 425.201 137 442.801 131 452.401C131 452.401 173 426.801 178.6 429.601z"/> - </g> - <g style="fill: #cccccc"> - <path d="M179.8 418.801C179.8 418.801 181 414.001 178.2 414.801C176.2 414.801 149.8 426.401 143.8 436.001C143.8 436.001 173.4 414.401 179.8 418.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M165.4 466.401L155.4 474.001C155.4 474.001 165.8 466.401 169.4 467.601C169.4 467.601 162.6 478.801 161.8 484.001C161.8 484.001 172.2 471.201 177.8 471.601C177.8 471.601 185.4 472.001 185.4 482.801C185.4 482.801 191 472.401 194.2 472.801C194.2 472.801 195.4 479.201 194.2 486.001C194.2 486.001 198.2 478.401 202.2 480.001C202.2 480.001 208.6 478.001 207.8 489.601C207.8 489.601 207.8 500.001 207 502.801C207 502.801 212.6 476.401 215 476.001C215 476.001 223 474.801 227.8 483.601C227.8 483.601 223.8 476.001 228.6 478.001C228.6 478.001 239.4 479.601 242.6 486.401C242.6 486.401 235.8 474.401 241.4 477.601C241.4 477.601 248.2 477.601 249.4 484.001C249.4 484.001 257.8 505.201 259.8 506.801C259.8 506.801 252.2 485.201 253.8 485.201C253.8 485.201 251.8 473.201 257 488.001C257 488.001 253.8 474.001 259.4 474.801C265 475.601 269.4 485.601 277.8 483.201C277.8 483.201 287.401 488.801 289.401 419.601L165.4 466.401z"/> - </g> - <g style="fill: #000000"> - <path d="M170.2 373.601C170.2 373.601 185 367.601 225 373.601C225 373.601 232.2 374.001 239 365.201C245.8 356.401 272.6 349.201 279 351.201L288.601 357.601L289.401 358.801C289.401 358.801 301.801 369.201 302.201 376.801C302.601 384.401 287.801 432.401 278.2 448.401C268.6 464.401 259 476.801 239.8 474.401C239.8 474.401 219 470.401 193.4 474.401C193.4 474.401 164.2 472.801 161.4 464.801C158.6 456.801 172.6 441.601 172.6 441.601C172.6 441.601 177 433.201 175.8 418.801C174.6 404.401 175 376.401 170.2 373.601z"/> - </g> - <g style="fill: #e5668c"> - <path d="M192.2 375.601C200.6 394.001 171 459.201 171 459.201C169 460.801 183.66 466.846 193.8 464.401C204.746 461.763 245 466.001 245 466.001C268.6 450.401 281.4 406.001 281.4 406.001C281.4 406.001 291.801 382.001 274.2 378.801C256.6 375.601 192.2 375.601 192.2 375.601z"/> - </g> - <g style="fill: #b23259"> - <path d="M190.169 406.497C193.495 393.707 195.079 381.906 192.2 375.601C192.2 375.601 254.6 382.001 265.8 361.201C270.041 353.326 284.801 384.001 284.4 393.601C284.4 393.601 221.4 408.001 206.6 396.801L190.169 406.497z"/> - </g> - <g style="fill: #a5264c"> - <path d="M194.6 422.801C194.6 422.801 196.6 430.001 194.2 434.001C194.2 434.001 192.6 434.801 191.4 435.201C191.4 435.201 192.6 438.801 198.6 440.401C198.6 440.401 200.6 444.801 203 445.201C205.4 445.601 210.2 451.201 214.2 450.001C218.2 448.801 229.4 444.801 229.4 444.801C229.4 444.801 235 441.601 243.8 445.201C243.8 445.201 246.175 444.399 246.6 440.401C247.1 435.701 250.2 432.001 252.2 430.001C254.2 428.001 263.8 415.201 262.6 414.801C261.4 414.401 194.6 422.801 194.6 422.801z"/> - </g> - <g style="fill: #ff727f; stroke:#000000"> - <path d="M190.2 374.401C190.2 374.401 187.4 396.801 190.6 405.201C193.8 413.601 193 415.601 192.2 419.601C191.4 423.601 195.8 433.601 201.4 439.601L213.4 441.201C213.4 441.201 228.6 437.601 237.8 440.401C237.8 440.401 246.794 441.744 250.2 426.801C250.2 426.801 255 420.401 262.2 417.601C269.4 414.801 276.6 373.201 272.6 365.201C268.6 357.201 254.2 352.801 238.2 368.401C222.2 384.001 220.2 367.201 190.2 374.401z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M191.8 449.201C191.8 449.201 191 447.201 186.6 446.801C186.6 446.801 164.2 443.201 155.8 430.801C155.8 430.801 149 425.201 153.4 436.801C153.4 436.801 163.8 457.201 170.6 460.001C170.6 460.001 187 464.001 191.8 449.201z"/> - </g> - <g style="fill: #cc3f4c"> - <path d="M271.742 385.229C272.401 377.323 274.354 368.709 272.6 365.201C266.154 352.307 249.181 357.695 238.2 368.401C222.2 384.001 220.2 367.201 190.2 374.401C190.2 374.401 188.455 388.364 189.295 398.376C189.295 398.376 226.6 386.801 227.4 392.401C227.4 392.401 229 389.201 238.2 389.201C247.4 389.201 270.142 388.029 271.742 385.229z"/> - </g> - <g style="stroke:#a51926; stroke-width:2"> - <path d="M228.6 375.201C228.6 375.201 233.4 380.001 229.8 389.601C229.8 389.601 215.4 405.601 217.4 419.601"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M180.6 460.001C180.6 460.001 176.2 447.201 185 454.001C185 454.001 189.8 456.001 188.6 457.601C187.4 459.201 181.8 463.201 180.6 460.001z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M185.64 461.201C185.64 461.201 182.12 450.961 189.16 456.401C189.16 456.401 193.581 458.849 192.04 459.281C187.48 460.561 192.04 463.121 185.64 461.201z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M190.44 461.201C190.44 461.201 186.92 450.961 193.96 456.401C193.96 456.401 198.335 458.711 196.84 459.281C193.48 460.561 196.84 463.121 190.44 461.201z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M197.04 461.401C197.04 461.401 193.52 451.161 200.56 456.601C200.56 456.601 204.943 458.933 203.441 459.481C200.48 460.561 203.441 463.321 197.04 461.401z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M203.52 461.321C203.52 461.321 200 451.081 207.041 456.521C207.041 456.521 210.881 458.121 209.921 459.401C208.961 460.681 209.921 463.241 203.52 461.321z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M210.2 462.001C210.2 462.001 205.4 449.601 214.6 456.001C214.6 456.001 219.4 458.001 218.2 459.601C217 461.201 218.2 464.401 210.2 462.001z"/> - </g> - <g style="stroke:#a5264c; stroke-width:2"> - <path d="M181.8 444.801C181.8 444.801 195 442.001 201 445.201C201 445.201 207 446.401 208.2 446.001C209.4 445.601 212.6 445.201 212.6 445.201"/> - </g> - <g style="stroke:#a5264c; stroke-width:2"> - <path d="M215.8 453.601C215.8 453.601 227.8 440.001 239.8 444.401C246.816 446.974 245.8 443.601 246.6 440.801C247.4 438.001 247.6 433.801 252.6 430.801"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M233 437.601C233 437.601 229 426.801 226.2 439.601C223.4 452.401 220.2 456.001 218.6 458.801C218.6 458.801 218.6 464.001 227 463.601C227 463.601 237.8 463.201 238.2 460.401C238.6 457.601 237 446.001 233 437.601z"/> - </g> - <g style="stroke:#a5264c; stroke-width:2"> - <path d="M247 444.801C247 444.801 250.6 442.401 253 443.601"/> - </g> - <g style="stroke:#a5264c; stroke-width:2"> - <path d="M253.5 428.401C253.5 428.401 256.4 423.501 261.2 422.701"/> - </g> - <g style="fill: #b2b2b2"> - <path d="M174.2 465.201C174.2 465.201 192.2 468.401 196.6 466.801C196.6 466.801 205.4 466.801 197 468.801C197 468.801 184.2 468.801 176.2 467.601C176.2 467.601 164.6 462.001 174.2 465.201z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M188.2 372.001C188.2 372.001 205.8 372.001 207.8 372.801C207.8 372.801 215 403.601 211.4 411.201C211.4 411.201 210.2 414.001 207.4 408.401C207.4 408.401 189 375.601 185.8 373.601C182.6 371.601 187 372.001 188.2 372.001z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M111.1 369.301C111.1 369.301 120 371.001 132.6 373.601C132.6 373.601 137.4 396.001 140.6 400.801C143.8 405.601 140.2 405.601 136.6 402.801C133 400.001 118.2 386.001 116.2 381.601C114.2 377.201 111.1 369.301 111.1 369.301z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M132.961 373.818C132.961 373.818 138.761 375.366 139.77 377.581C140.778 379.795 138.568 383.092 138.568 383.092C138.568 383.092 137.568 386.397 136.366 384.235C135.164 382.072 132.292 374.412 132.961 373.818z"/> - </g> - <g style="fill: #000000"> - <path d="M133 373.601C133 373.601 136.6 378.801 140.2 378.801C143.8 378.801 144.182 378.388 147 379.001C151.6 380.001 151.2 378.001 157.8 379.201C160.44 379.681 163 378.801 165.8 380.001C168.6 381.201 171.8 380.401 173 378.401C174.2 376.401 179 372.201 179 372.201C179 372.201 166.2 374.001 163.4 374.801C163.4 374.801 141 376.001 133 373.601z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M177.6 373.801C177.6 373.801 171.15 377.301 170.75 379.701C170.35 382.101 176 385.801 176 385.801C176 385.801 178.75 390.401 179.35 388.001C179.95 385.601 178.4 374.201 177.6 373.801z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M140.115 379.265C140.115 379.265 147.122 390.453 147.339 379.242C147.339 379.242 147.896 377.984 146.136 377.962C140.061 377.886 141.582 373.784 140.115 379.265z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M147.293 379.514C147.293 379.514 155.214 390.701 154.578 379.421C154.578 379.421 154.585 379.089 152.832 378.936C148.085 378.522 148.43 374.004 147.293 379.514z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M154.506 379.522C154.506 379.522 162.466 390.15 161.797 380.484C161.797 380.484 161.916 379.251 160.262 378.95C156.37 378.244 156.159 374.995 154.506 379.522z"/> - </g> - <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> - <path d="M161.382 379.602C161.382 379.602 169.282 391.163 169.63 381.382C169.63 381.382 171.274 380.004 169.528 379.782C163.71 379.042 164.508 374.588 161.382 379.602z"/> - </g> - <g style="fill: #e5e5b2"> - <path d="M125.208 383.132L117.55 381.601C114.95 376.601 112.85 370.451 112.85 370.451C112.85 370.451 119.2 371.451 131.7 374.251C131.7 374.251 132.576 377.569 134.048 383.364L125.208 383.132z"/> - </g> - <g style="fill: #e5e5b2"> - <path d="M190.276 378.47C188.61 375.964 187.293 374.206 186.643 373.8C183.63 371.917 187.773 372.294 188.902 372.294C188.902 372.294 205.473 372.294 207.356 373.047C207.356 373.047 207.88 375.289 208.564 378.68C208.564 378.68 198.476 376.67 190.276 378.47z"/> - </g> - <g style="fill: #cc7226"> - <path d="M243.88 240.321C271.601 244.281 297.121 208.641 298.881 198.96C300.641 189.28 290.521 177.4 290.521 177.4C291.841 174.32 287.001 160.24 281.721 151C276.441 141.76 260.54 142.734 243 141.76C227.16 140.88 208.68 164.2 207.36 165.96C206.04 167.72 212.2 206.001 213.52 211.721C214.84 217.441 212.2 243.841 212.2 243.841C246.44 234.741 216.16 236.361 243.88 240.321z"/> - </g> - <g style="fill: #ea8e51"> - <path d="M208.088 166.608C206.792 168.336 212.84 205.921 214.136 211.537C215.432 217.153 212.84 243.073 212.84 243.073C245.512 234.193 216.728 235.729 243.944 239.617C271.161 243.505 296.217 208.513 297.945 199.008C299.673 189.504 289.737 177.84 289.737 177.84C291.033 174.816 286.281 160.992 281.097 151.92C275.913 142.848 260.302 143.805 243.08 142.848C227.528 141.984 209.384 164.88 208.088 166.608z"/> - </g> - <g style="fill: #efaa7c"> - <path d="M208.816 167.256C207.544 168.952 213.48 205.841 214.752 211.353C216.024 216.865 213.48 242.305 213.48 242.305C244.884 233.145 217.296 235.097 244.008 238.913C270.721 242.729 295.313 208.385 297.009 199.056C298.705 189.728 288.953 178.28 288.953 178.28C290.225 175.312 285.561 161.744 280.473 152.84C275.385 143.936 260.063 144.875 243.16 143.936C227.896 143.088 210.088 165.56 208.816 167.256z"/> - </g> - <g style="fill: #f4c6a8"> - <path d="M209.544 167.904C208.296 169.568 214.12 205.761 215.368 211.169C216.616 216.577 214.12 241.537 214.12 241.537C243.556 232.497 217.864 234.465 244.072 238.209C270.281 241.953 294.409 208.257 296.073 199.105C297.737 189.952 288.169 178.72 288.169 178.72C289.417 175.808 284.841 162.496 279.849 153.76C274.857 145.024 259.824 145.945 243.24 145.024C228.264 144.192 210.792 166.24 209.544 167.904z"/> - </g> - <g style="fill: #f9e2d3"> - <path d="M210.272 168.552C209.048 170.184 214.76 205.681 215.984 210.985C217.208 216.289 214.76 240.769 214.76 240.769C242.628 231.849 218.432 233.833 244.136 237.505C269.841 241.177 293.505 208.129 295.137 199.152C296.769 190.176 287.385 179.16 287.385 179.16C288.609 176.304 284.121 163.248 279.225 154.68C274.329 146.112 259.585 147.015 243.32 146.112C228.632 145.296 211.496 166.92 210.272 168.552z"/> - </g> - <g style="fill: #ffffff"> - <path d="M244.2 236.8C269.4 240.4 292.601 208 294.201 199.2C295.801 190.4 286.601 179.6 286.601 179.6C287.801 176.8 283.4 164 278.6 155.6C273.8 147.2 259.346 148.086 243.4 147.2C229 146.4 212.2 167.6 211 169.2C209.8 170.8 215.4 205.6 216.6 210.8C217.8 216 215.4 240 215.4 240C240.9 231.4 219 233.2 244.2 236.8z"/> - </g> - <g style="fill: #cccccc"> - <path d="M290.601 202.8C290.601 202.8 262.8 210.4 251.2 208.8C251.2 208.8 235.4 202.2 226.6 224C226.6 224 223 231.2 221 233.2C219 235.2 290.601 202.8 290.601 202.8z"/> - </g> - <g style="fill: #000000"> - <path d="M294.401 200.6C294.401 200.6 265.4 212.8 255.4 212.4C255.4 212.4 239 207.8 230.6 222.4C230.6 222.4 222.2 231.6 219 233.2C219 233.2 218.6 234.8 225 230.8L235.4 236C235.4 236 250.2 245.6 259.8 229.6C259.8 229.6 263.8 218.4 263.8 216.4C263.8 214.4 285 208.8 286.601 208.4C288.201 208 294.801 203.8 294.401 200.6z"/> - </g> - <g style="fill: #99cc32"> - <path d="M247 236.514C240.128 236.514 231.755 232.649 231.755 226.4C231.755 220.152 240.128 213.887 247 213.887C253.874 213.887 259.446 218.952 259.446 225.2C259.446 231.449 253.874 236.514 247 236.514z"/> - </g> - <g style="fill: #659900"> - <path d="M243.377 219.83C238.531 220.552 233.442 222.055 233.514 221.839C235.054 217.22 241.415 213.887 247 213.887C251.296 213.887 255.084 215.865 257.32 218.875C257.32 218.875 252.004 218.545 243.377 219.83z"/> - </g> - <g style="fill: #ffffff"> - <path d="M255.4 219.6C255.4 219.6 251 216.4 251 218.6C251 218.6 254.6 223 255.4 219.6z"/> - </g> - <g style="fill: #000000"> - <path d="M245.4 227.726C242.901 227.726 240.875 225.7 240.875 223.2C240.875 220.701 242.901 218.675 245.4 218.675C247.9 218.675 249.926 220.701 249.926 223.2C249.926 225.7 247.9 227.726 245.4 227.726z"/> - </g> - <g style="fill: #cc7226"> - <path d="M141.4 214.4C141.4 214.4 138.2 193.2 140.6 188.8C140.6 188.8 151.4 178.8 151 175.2C151 175.2 150.6 157.2 149.4 156.4C148.2 155.6 140.6 149.6 134.6 156C134.6 156 124.2 174 125 180.4L125 182.4C125 182.4 117.4 182 115.8 184C115.8 184 114.6 189.2 113.4 189.6C113.4 189.6 110.6 192 112.6 194.8C112.6 194.8 110.6 197.2 111 201.2L118.6 205.2C118.6 205.2 120.6 219.6 131.4 224.8C136.236 227.129 139.4 220.4 141.4 214.4z"/> - </g> - <g style="fill: #ffffff"> - <path d="M140.4 212.56C140.4 212.56 137.52 193.48 139.68 189.52C139.68 189.52 149.4 180.52 149.04 177.28C149.04 177.28 148.68 161.08 147.6 160.36C146.52 159.64 139.68 154.24 134.28 160C134.28 160 124.92 176.2 125.64 181.96L125.64 183.76C125.64 183.76 118.8 183.4 117.36 185.2C117.36 185.2 116.28 189.88 115.2 190.24C115.2 190.24 112.68 192.4 114.48 194.92C114.48 194.92 112.68 197.08 113.04 200.68L119.88 204.28C119.88 204.28 121.68 217.24 131.4 221.92C135.752 224.015 138.6 217.96 140.4 212.56z"/> - </g> - <g style="fill: #eb955c"> - <path d="M148.95 157.39C147.86 156.53 140.37 150.76 134.52 157C134.52 157 124.38 174.55 125.16 180.79L125.16 182.74C125.16 182.74 117.75 182.35 116.19 184.3C116.19 184.3 115.02 189.37 113.85 189.76C113.85 189.76 111.12 192.1 113.07 194.83C113.07 194.83 111.12 197.17 111.51 201.07L118.92 204.97C118.92 204.97 120.87 219.01 131.4 224.08C136.114 226.35 139.2 219.79 141.15 213.94C141.15 213.94 138.03 193.27 140.37 188.98C140.37 188.98 150.9 179.23 150.51 175.72C150.51 175.72 150.12 158.17 148.95 157.39z"/> - </g> - <g style="fill: #f2b892"> - <path d="M148.5 158.38C147.52 157.46 140.14 151.92 134.44 158C134.44 158 124.56 175.1 125.32 181.18L125.32 183.08C125.32 183.08 118.1 182.7 116.58 184.6C116.58 184.6 115.44 189.54 114.3 189.92C114.3 189.92 111.64 192.2 113.54 194.86C113.54 194.86 111.64 197.14 112.02 200.94L119.24 204.74C119.24 204.74 121.14 218.42 131.4 223.36C135.994 225.572 139 219.18 140.9 213.48C140.9 213.48 137.86 193.34 140.14 189.16C140.14 189.16 150.4 179.66 150.02 176.24C150.02 176.24 149.64 159.14 148.5 158.38z"/> - </g> - <g style="fill: #f8dcc8"> - <path d="M148.05 159.37C147.18 158.39 139.91 153.08 134.36 159C134.36 159 124.74 175.65 125.48 181.57L125.48 183.42C125.48 183.42 118.45 183.05 116.97 184.9C116.97 184.9 115.86 189.71 114.75 190.08C114.75 190.08 112.16 192.3 114.01 194.89C114.01 194.89 112.16 197.11 112.53 200.81L119.56 204.51C119.56 204.51 121.41 217.83 131.4 222.64C135.873 224.794 138.8 218.57 140.65 213.02C140.65 213.02 137.69 193.41 139.91 189.34C139.91 189.34 149.9 180.09 149.53 176.76C149.53 176.76 149.16 160.11 148.05 159.37z"/> - </g> - <g style="fill: #ffffff"> - <path d="M140.4 212.46C140.4 212.46 137.52 193.48 139.68 189.52C139.68 189.52 149.4 180.52 149.04 177.28C149.04 177.28 148.68 161.08 147.6 160.36C146.84 159.32 139.68 154.24 134.28 160C134.28 160 124.92 176.2 125.64 181.96L125.64 183.76C125.64 183.76 118.8 183.4 117.36 185.2C117.36 185.2 116.28 189.88 115.2 190.24C115.2 190.24 112.68 192.4 114.48 194.92C114.48 194.92 112.68 197.08 113.04 200.68L119.88 204.28C119.88 204.28 121.68 217.24 131.4 221.92C135.752 224.015 138.6 217.86 140.4 212.46z"/> - </g> - <g style="fill: #cccccc"> - <path d="M137.3 206.2C137.3 206.2 115.7 196 114.8 195.2C114.8 195.2 123.9 203.4 124.7 203.4C125.5 203.4 137.3 206.2 137.3 206.2z"/> - </g> - <g style="fill: #000000"> - <path d="M120.2 200C120.2 200 138.6 203.6 138.6 208C138.6 210.912 138.357 224.331 133 222.8C124.6 220.4 128.2 206 120.2 200z"/> - </g> - <g style="fill: #99cc32"> - <path d="M128.6 203.8C128.6 203.8 137.578 205.274 138.6 208C139.2 209.6 139.863 217.908 134.4 219C129.848 219.911 127.618 209.69 128.6 203.8z"/> - </g> - <g style="fill: #000000"> - <path d="M214.595 246.349C214.098 244.607 215.409 244.738 217.2 244.2C219.2 243.6 231.4 239.8 232.2 237.2C233 234.6 246.2 239 246.2 239C248 239.8 252.4 242.4 252.4 242.4C257.2 243.6 263.8 244 263.8 244C266.2 245 269.6 247.8 269.6 247.8C284.2 258 296.601 250.8 296.601 250.8C316.601 244.2 310.601 227 310.601 227C307.601 218 310.801 214.6 310.801 214.6C311.001 210.8 318.201 217.2 318.201 217.2C320.801 221.4 321.601 226.4 321.601 226.4C329.601 237.6 326.201 219.8 326.201 219.8C326.401 218.8 323.601 215.2 323.601 214C323.601 212.8 321.801 209.4 321.801 209.4C318.801 206 321.201 199 321.201 199C323.001 185.2 320.801 187 320.801 187C319.601 185.2 310.401 195.2 310.401 195.2C308.201 198.6 302.201 200.2 302.201 200.2C299.401 202 296.001 200.6 296.001 200.6C293.401 200.2 287.801 207.2 287.801 207.2C290.601 207 293.001 211.4 295.401 211.6C297.801 211.8 299.601 209.2 301.201 208.6C302.801 208 305.601 213.8 305.601 213.8C306.001 216.4 300.401 221.2 300.401 221.2C300.001 225.8 298.401 224.2 298.401 224.2C295.401 223.6 294.201 227.4 293.201 232C292.201 236.6 288.001 237 288.001 237C286.401 244.4 285.2 241.4 285.2 241.4C285 235.8 279 241.6 279 241.6C277.8 243.6 273.2 241.4 273.2 241.4C266.4 239.4 268.8 237.4 268.8 237.4C270.6 235.2 281.8 237.4 281.8 237.4C284 235.8 276 231.8 276 231.8C275.4 230 276.4 225.6 276.4 225.6C277.6 222.4 284.4 216.8 284.4 216.8C293.801 215.6 291.001 214 291.001 214C284.801 208.8 279 216.4 279 216.4C276.8 222.6 259.4 237.6 259.4 237.6C254.6 241 257.2 234.2 253.2 237.6C249.2 241 228.6 232 228.6 232C217.038 230.807 214.306 246.549 210.777 243.429C210.777 243.429 216.195 251.949 214.595 246.349z"/> - </g> - <g style="fill: #000000"> - <path d="M409.401 80C409.401 80 383.801 88 381.001 106.8C381.001 106.8 378.601 129.6 399.001 147.2C399.001 147.2 399.401 153.6 401.401 156.8C401.401 156.8 399.801 161.6 418.601 154L445.801 145.6C445.801 145.6 452.201 143.2 457.401 134.4C462.601 125.6 477.801 106.8 474.201 81.6C474.201 81.6 475.401 70.4 469.401 70C469.401 70 461.001 68.4 453.801 76C453.801 76 447.001 79.2 444.601 78.8L409.401 80z"/> - </g> - <g style="fill: #000000"> - <path d="M464.022 79.01C464.022 79.01 466.122 70.08 461.282 74.92C461.282 74.92 454.242 80.64 446.761 80.64C446.761 80.64 432.241 82.84 427.841 96.04C427.841 96.04 423.881 122.88 431.801 128.6C431.801 128.6 436.641 136.08 443.681 129.48C450.722 122.88 466.222 92.65 464.022 79.01z"/> - </g> - <g style="fill: #323232"> - <path d="M463.648 79.368C463.648 79.368 465.738 70.624 460.986 75.376C460.986 75.376 454.074 80.992 446.729 80.992C446.729 80.992 432.473 83.152 428.153 96.112C428.153 96.112 424.265 122.464 432.041 128.08C432.041 128.08 436.793 135.424 443.705 128.944C450.618 122.464 465.808 92.76 463.648 79.368z"/> - </g> - <g style="fill: #666666"> - <path d="M463.274 79.726C463.274 79.726 465.354 71.168 460.69 75.832C460.69 75.832 453.906 81.344 446.697 81.344C446.697 81.344 432.705 83.464 428.465 96.184C428.465 96.184 424.649 122.048 432.281 127.56C432.281 127.56 436.945 134.768 443.729 128.408C450.514 122.048 465.394 92.87 463.274 79.726z"/> - </g> - <g style="fill: #999999"> - <path d="M462.9 80.084C462.9 80.084 464.97 71.712 460.394 76.288C460.394 76.288 453.738 81.696 446.665 81.696C446.665 81.696 432.937 83.776 428.777 96.256C428.777 96.256 425.033 121.632 432.521 127.04C432.521 127.04 437.097 134.112 443.753 127.872C450.41 121.632 464.98 92.98 462.9 80.084z"/> - </g> - <g style="fill: #cccccc"> - <path d="M462.526 80.442C462.526 80.442 464.586 72.256 460.098 76.744C460.098 76.744 453.569 82.048 446.633 82.048C446.633 82.048 433.169 84.088 429.089 96.328C429.089 96.328 425.417 121.216 432.761 126.52C432.761 126.52 437.249 133.456 443.777 127.336C450.305 121.216 464.566 93.09 462.526 80.442z"/> - </g> - <g style="fill: #ffffff"> - <path d="M462.151 80.8C462.151 80.8 464.201 72.8 459.801 77.2C459.801 77.2 453.401 82.4 446.601 82.4C446.601 82.4 433.401 84.4 429.401 96.4C429.401 96.4 425.801 120.8 433.001 126C433.001 126 437.401 132.8 443.801 126.8C450.201 120.8 464.151 93.2 462.151 80.8z"/> - </g> - <g style="fill: #992600"> - <path d="M250.6 284C250.6 284 230.2 264.8 222.2 264C222.2 264 187.8 260 173 278C173 278 190.6 257.6 218.2 263.2C218.2 263.2 196.6 258.8 184.2 262C184.2 262 167.4 262 157.8 276L155 280.8C155 280.8 159 266 177.4 260C177.4 260 200.2 255.2 211 260C211 260 189.4 253.2 179.4 255.2C179.4 255.2 149 252.8 136.2 279.2C136.2 279.2 140.2 264.8 155 257.6C155 257.6 168.6 248.8 189 251.6C189 251.6 203.4 254.8 208.6 257.2C213.8 259.6 212.6 256.8 204.2 252C204.2 252 198.6 242 184.6 242.4C184.6 242.4 141.8 246 131.4 258C131.4 258 145 246.8 155.4 244C155.4 244 177.8 236 186.2 236.8C186.2 236.8 211 237.8 218.6 233.8C218.6 233.8 207.4 238.8 210.6 242C213.8 245.2 220.6 252.8 220.6 254C220.6 255.2 244.8 277.3 248.4 281.7L250.6 284z"/> - </g> - <g style="fill: #cccccc"> - <path d="M389 478C389 478 373.5 441.5 361 432C361 432 387 448 390.5 466C390.5 466 390.5 476 389 478z"/> - </g> - <g style="fill: #cccccc"> - <path d="M436 485.5C436 485.5 409.5 430.5 391 406.5C391 406.5 434.5 444 439.5 470.5L440 476L437 473.5C437 473.5 436.5 482.5 436 485.5z"/> - </g> - <g style="fill: #cccccc"> - <path d="M492.5 437C492.5 437 430 377.5 428.5 375C428.5 375 489 441 492 448.5C492 448.5 490 439.5 492.5 437z"/> - </g> - <g style="fill: #cccccc"> - <path d="M304 480.5C304 480.5 323.5 428.5 342.5 451C342.5 451 357.5 461 357 464C357 464 353 457.5 335 458C335 458 316 455 304 480.5z"/> - </g> - <g style="fill: #cccccc"> - <path d="M494.5 353C494.5 353 449.5 324.5 442 323C430.193 320.639 491.5 352 496.5 362.5C496.5 362.5 498.5 360 494.5 353z"/> - </g> - <g style="fill: #000000"> - <path d="M343.801 459.601C343.801 459.601 364.201 457.601 371.001 450.801L375.401 454.401L393.001 416.001L396.601 421.201C396.601 421.201 411.001 406.401 410.201 398.401C409.401 390.401 423.001 404.401 423.001 404.401C423.001 404.401 422.201 392.801 429.401 399.601C429.401 399.601 427.001 384.001 435.401 392.001C435.401 392.001 424.864 361.844 447.401 387.601C453.001 394.001 448.601 387.201 448.601 387.201C448.601 387.201 422.601 339.201 444.201 353.601C444.201 353.601 446.201 330.801 445.001 326.401C443.801 322.001 441.801 299.6 437.001 294.4C432.201 289.2 437.401 287.6 443.001 292.8C443.001 292.8 431.801 268.8 445.001 280.8C445.001 280.8 441.401 265.6 437.001 262.8C437.001 262.8 431.401 245.6 446.601 256.4C446.601 256.4 442.201 244 439.001 240.8C439.001 240.8 427.401 213.2 434.601 218L439.001 221.6C439.001 221.6 432.201 207.6 438.601 212C445.001 216.4 445.001 216 445.001 216C445.001 216 423.801 182.8 444.201 200.4C444.201 200.4 436.042 186.482 432.601 179.6C432.601 179.6 413.801 159.2 428.201 165.6L433.001 167.2C433.001 167.2 424.201 157.2 416.201 155.6C408.201 154 418.601 147.6 425.001 149.6C431.401 151.6 447.001 159.2 447.001 159.2C447.001 159.2 459.801 178 463.801 178.4C463.801 178.4 443.801 170.8 449.801 178.8C449.801 178.8 464.201 192.8 457.001 192.4C457.001 192.4 451.001 199.6 455.801 208.4C455.801 208.4 437.342 190.009 452.201 215.6L459.001 232C459.001 232 434.601 207.2 445.801 229.2C445.801 229.2 463.001 252.8 465.001 253.2C467.001 253.6 471.401 262.4 471.401 262.4L467.001 260.4L472.201 269.2C472.201 269.2 461.001 257.2 467.001 270.4L472.601 284.8C472.601 284.8 452.201 262.8 465.801 292.4C465.801 292.4 449.401 287.2 458.201 304.4C458.201 304.4 456.601 320.401 457.001 325.601C457.401 330.801 458.601 359.201 454.201 367.201C449.801 375.201 460.201 394.401 462.201 398.401C464.201 402.401 467.801 413.201 459.001 404.001C450.201 394.801 454.601 400.401 456.601 409.201C458.601 418.001 464.601 433.601 463.801 439.201C463.801 439.201 462.601 440.401 459.401 436.801C459.401 436.801 444.601 414.001 446.201 428.401C446.201 428.401 445.001 436.401 441.801 445.201C441.801 445.201 438.601 456.001 438.601 447.201C438.601 447.201 435.401 430.401 432.601 438.001C429.801 445.601 426.201 451.601 423.401 454.001C420.601 456.401 415.401 433.601 414.201 444.001C414.201 444.001 402.201 431.601 397.401 448.001L385.801 464.401C385.801 464.401 385.401 452.001 384.201 458.001C384.201 458.001 354.201 464.001 343.801 459.601z"/> - </g> - <g style="fill: #000000"> - <path d="M309.401 102.8C309.401 102.8 297.801 94.8 293.801 95.2C289.801 95.6 321.401 86.4 362.601 114C362.601 114 367.401 116.8 371.001 116.4C371.001 116.4 374.201 118.8 371.401 122.4C371.401 122.4 362.601 132 373.801 143.2C373.801 143.2 392.201 150 386.601 141.2C386.601 141.2 397.401 145.2 399.801 149.2C402.201 153.2 401.001 149.2 401.001 149.2C401.001 149.2 394.601 142 388.601 136.8C388.601 136.8 383.401 134.8 380.601 126.4C377.801 118 375.401 108 379.801 104.8C379.801 104.8 375.801 109.2 376.601 105.2C377.401 101.2 381.001 97.6 382.601 97.2C384.201 96.8 400.601 81 407.401 80.6C407.401 80.6 398.201 82 395.201 81C392.201 80 365.601 68.6 359.601 67.4C359.601 67.4 342.801 60.8 354.801 62.8C354.801 62.8 390.601 66.6 408.801 79.8C408.801 79.8 401.601 71.4 383.201 64.4C383.201 64.4 361.001 51.8 325.801 56.8C325.801 56.8 308.001 60 300.201 61.8C300.201 61.8 297.601 61.2 297.001 60.8C296.401 60.4 284.6 51.4 257 58.4C257 58.4 240 63 231.4 67.8C231.4 67.8 216.2 69 212.6 72.2C212.6 72.2 194 86.8 192 87.6C190 88.4 178.6 96 177.8 96.4C177.8 96.4 202.4 89.8 204.8 87.4C207.2 85 224.6 82.4 227 83.8C229.4 85.2 237.8 84.6 228.2 85.2C228.2 85.2 303.801 100 304.601 102C305.401 104 309.401 102.8 309.401 102.8z"/> - </g> - <g style="fill: #cc7226"> - <path d="M380.801 93.6C380.801 93.6 370.601 86.2 368.601 86.2C366.601 86.2 354.201 76 350.001 76.4C345.801 76.8 333.601 66.8 306.201 75C306.201 75 305.601 73 309.201 72.2C309.201 72.2 315.601 70 316.001 69.4C316.001 69.4 336.201 65.2 343.401 68.8C343.401 68.8 352.601 71.4 358.801 77.6C358.801 77.6 370.001 80.8 373.201 79.8C373.201 79.8 382.001 82 382.401 83.8C382.401 83.8 388.201 86.8 386.401 89.4C386.401 89.4 386.801 91 380.801 93.6z"/> - </g> - <g style="fill: #cc7226"> - <path d="M368.33 91.491C369.137 92.123 370.156 92.221 370.761 93.03C370.995 93.344 370.706 93.67 370.391 93.767C369.348 94.084 368.292 93.514 367.15 94.102C366.748 94.309 366.106 94.127 365.553 93.978C363.921 93.537 362.092 93.512 360.401 94.2C358.416 93.071 356.056 93.655 353.975 92.654C353.917 92.627 353.695 92.973 353.621 92.946C350.575 91.801 346.832 92.084 344.401 89.8C341.973 89.388 339.616 88.926 337.188 88.246C335.37 87.737 333.961 86.748 332.341 85.916C330.964 85.208 329.507 84.686 327.973 84.314C326.11 83.862 324.279 83.974 322.386 83.454C322.293 83.429 322.101 83.773 322.019 83.746C321.695 83.638 321.405 83.055 321.234 83.108C319.553 83.63 318.065 82.658 316.401 83C315.223 81.776 313.495 82.021 311.949 81.579C308.985 80.731 305.831 82.001 302.801 81C306.914 79.158 311.601 80.39 315.663 78.321C317.991 77.135 320.653 78.237 323.223 77.477C323.71 77.333 324.401 77.131 324.801 77.8C324.935 77.665 325.117 77.426 325.175 77.454C327.625 78.611 329.94 79.885 332.422 80.951C332.763 81.097 333.295 80.865 333.547 81.067C335.067 82.283 337.01 82.18 338.401 83.4C340.099 82.898 341.892 83.278 343.621 82.654C343.698 82.627 343.932 82.968 343.965 82.946C345.095 82.198 346.25 82.469 347.142 82.773C347.48 82.888 348.143 83.135 348.448 83.209C349.574 83.485 350.43 83.965 351.609 84.148C351.723 84.166 351.908 83.826 351.98 83.854C353.103 84.292 354.145 84.236 354.801 85.4C354.936 85.265 355.101 85.027 355.183 85.054C356.21 85.392 356.859 86.147 357.96 86.388C358.445 86.494 359.057 87.12 359.633 87.296C362.025 88.027 363.868 89.556 366.062 90.451C366.821 90.761 367.697 90.995 368.33 91.491z"/> - </g> - <g style="fill: #cc7226"> - <path d="M291.696 77.261C289.178 75.536 286.81 74.43 284.368 72.644C284.187 72.511 283.827 72.681 283.625 72.559C282.618 71.95 281.73 71.369 280.748 70.673C280.209 70.291 279.388 70.302 278.88 70.044C276.336 68.752 273.707 68.194 271.2 67C271.882 66.362 273.004 66.606 273.6 65.8C273.795 66.08 274.033 66.364 274.386 66.173C276.064 65.269 277.914 65.116 279.59 65.206C281.294 65.298 283.014 65.603 284.789 65.875C285.096 65.922 285.295 66.445 285.618 66.542C287.846 67.205 290.235 66.68 292.354 67.518C293.945 68.147 295.515 68.97 296.754 70.245C297.006 70.505 296.681 70.806 296.401 71C296.789 70.891 297.062 71.097 297.173 71.41C297.257 71.649 297.257 71.951 297.173 72.19C297.061 72.502 296.782 72.603 296.408 72.654C295.001 72.844 296.773 71.464 296.073 71.912C294.8 72.726 295.546 74.132 294.801 75.4C294.521 75.206 294.291 74.988 294.401 74.6C294.635 75.122 294.033 75.412 293.865 75.728C293.48 76.453 292.581 77.868 291.696 77.261z"/> - </g> - <g style="fill: #cc7226"> - <path d="M259.198 84.609C256.044 83.815 252.994 83.93 249.978 82.654C249.911 82.626 249.688 82.973 249.624 82.946C248.258 82.352 247.34 81.386 246.264 80.34C245.351 79.452 243.693 79.839 242.419 79.352C242.095 79.228 241.892 78.716 241.591 78.677C240.372 78.52 239.445 77.571 238.4 77C240.736 76.205 243.147 76.236 245.609 75.852C245.722 75.834 245.867 76.155 246 76.155C246.136 76.155 246.266 75.934 246.4 75.8C246.595 76.08 246.897 76.406 247.154 76.152C247.702 75.612 248.258 75.802 248.798 75.842C248.942 75.852 249.067 76.155 249.2 76.155C249.336 76.155 249.467 75.844 249.6 75.844C249.736 75.845 249.867 76.155 250 76.155C250.136 76.155 250.266 75.934 250.4 75.8C251.092 76.582 251.977 76.028 252.799 76.207C253.837 76.434 254.104 77.582 255.178 77.88C259.893 79.184 264.03 81.329 268.393 83.416C268.7 83.563 268.91 83.811 268.8 84.2C269.067 84.2 269.38 84.112 269.57 84.244C270.628 84.976 271.669 85.524 272.366 86.622C272.582 86.961 272.253 87.368 272.02 87.316C267.591 86.321 263.585 85.713 259.198 84.609z"/> - </g> - <g style="fill: #cc7226"> - <path d="M245.338 128.821C243.746 127.602 243.162 125.571 242.034 123.779C241.82 123.439 242.094 123.125 242.411 123.036C242.971 122.877 243.514 123.355 243.923 123.557C245.668 124.419 247.203 125.661 249.2 125.8C251.19 128.034 255.45 128.419 255.457 131.8C255.458 132.659 254.03 131.741 253.6 132.6C251.149 131.597 248.76 131.7 246.38 130.233C245.763 129.852 246.093 129.399 245.338 128.821z"/> - </g> - <g style="fill: #cc7226"> - <path d="M217.8 76.244C217.935 76.245 224.966 76.478 224.949 76.592C224.904 76.901 217.174 77.95 216.81 77.78C216.646 77.704 209.134 80.134 209 80C209.268 79.865 217.534 76.244 217.8 76.244z"/> - </g> - <g style="fill: #000000"> - <path d="M233.2 86C233.2 86 218.4 87.8 214 89C209.6 90.2 191 97.8 188 99.8C188 99.8 174.6 105.2 157.6 125.2C157.6 125.2 165.2 121.8 167.4 119C167.4 119 181 106.4 180.8 109C180.8 109 193 100.4 192.4 102.6C192.4 102.6 216.8 91.4 214.8 94.6C214.8 94.6 236.4 90 235.4 92C235.4 92 254.2 96.4 251.4 96.6C251.4 96.6 245.6 97.8 252 101.4C252 101.4 248.6 105.8 243.2 101.8C237.8 97.8 240.8 100 235.8 101C235.8 101 233.2 101.8 228.6 97.8C228.6 97.8 223 93.2 214.2 96.8C214.2 96.8 183.6 109.4 181.6 110C181.6 110 178 112.8 175.6 116.4C175.6 116.4 169.8 120.8 166.8 122.2C166.8 122.2 154 133.8 152.8 135.2C152.8 135.2 149.4 140.4 148.6 140.8C148.6 140.8 155 137 157 135C157 135 171 125 176.4 124.2C176.4 124.2 180.8 121.2 181.6 119.8C181.6 119.8 196 110.6 200.2 110.6C200.2 110.6 209.4 115.8 211.8 108.8C211.8 108.8 217.6 107 223.2 108.2C223.2 108.2 226.4 105.6 225.6 103.4C225.6 103.4 227.2 101.6 228.2 105.4C228.2 105.4 231.6 109 236.4 107C236.4 107 240.4 106.8 238.4 109.2C238.4 109.2 234 113 222.2 113.2C222.2 113.2 209.8 113.8 193.4 121.4C193.4 121.4 163.6 131.8 154.4 142.2C154.4 142.2 148 151 142.6 152.2C142.6 152.2 136.8 153 130.8 160.4C130.8 160.4 140.6 154.6 149.6 154.6C149.6 154.6 153.6 152.2 149.8 155.8C149.8 155.8 146.2 163.4 147.8 168.8C147.8 168.8 147.2 174 146.4 175.6C146.4 175.6 138.6 188.4 138.6 190.8C138.6 193.2 139.8 203 140.2 203.6C140.6 204.2 139.2 202 143 204.4C146.8 206.8 149.6 208.4 150.4 211.2C151.2 214 148.4 205.8 148.2 204C148 202.2 143.8 195 144.6 192.6C144.6 192.6 145.6 193.6 146.4 195C146.4 195 145.8 194.4 146.4 190.8C146.4 190.8 147.2 185.6 148.6 182.4C150 179.2 152 175.4 152.4 174.6C152.8 173.8 152.8 168 154.2 170.6L157.6 173.2C157.6 173.2 154.8 170.6 157 168.4C157 168.4 156 162.8 157.8 160.2C157.8 160.2 164.8 151.8 166.4 150.8C168 149.8 166.6 150.2 166.6 150.2C166.6 150.2 172.6 146 166.8 147.6C166.8 147.6 162.8 149.2 159.8 149.2C159.8 149.2 152.2 151.2 156.2 147C160.2 142.8 170.2 137.4 174 137.6L174.8 139.2L186 136.8L184.8 137.6C184.8 137.6 184.6 137.4 188.8 137C193 136.6 198.8 138 200.2 136.2C201.6 134.4 205 133.4 204.6 134.8C204.2 136.2 204 138.2 204 138.2C204 138.2 209 132.4 208.4 134.6C207.8 136.8 199.6 142 198.2 148.2L208.6 140L212.2 137C212.2 137 215.8 139.2 216 137.6C216.2 136 220.8 130.2 222 130.4C223.2 130.6 225.2 127.8 225 130.4C224.8 133 232.4 138.4 232.4 138.4C232.4 138.4 235.6 136.6 237 138C238.4 139.4 242.6 118.2 242.6 118.2L267.6 107.6L311.201 104.2L294.201 97.4L233.2 86z"/> - </g> - <g style="stroke:#4c0000; stroke-width:2"> - <path d="M251.4 285C251.4 285 236.4 268.2 228 265.6C228 265.6 214.6 258.8 190 266.6"/> - </g> - <g style="stroke:#4c0000; stroke-width:2"> - <path d="M224.8 264.2C224.8 264.2 199.6 256.2 184.2 260.4C184.2 260.4 165.8 262.4 157.4 276.2"/> - </g> - <g style="stroke:#4c0000; stroke-width:2"> - <path d="M221.2 263C221.2 263 204.2 255.8 189.4 253.6C189.4 253.6 172.8 251 156.2 258.2C156.2 258.2 144 264.2 138.6 274.4"/> - </g> - <g style="stroke:#4c0000; stroke-width:2"> - <path d="M222.2 263.4C222.2 263.4 206.8 252.4 205.8 251C205.8 251 198.8 240 185.8 239.6C185.8 239.6 164.4 240.4 147.2 248.4"/> - </g> - <g style="fill: #000000"> - <path d="M220.895 254.407C222.437 255.87 249.4 284.8 249.4 284.8C284.6 321.401 256.6 287.2 256.6 287.2C249 282.4 239.8 263.6 239.8 263.6C238.6 260.8 253.8 270.8 253.8 270.8C257.8 271.6 271.4 290.8 271.4 290.8C264.6 288.4 269.4 295.6 269.4 295.6C272.2 297.6 292.601 313.201 292.601 313.201C296.201 317.201 300.201 318.801 300.201 318.801C314.201 313.601 307.801 326.801 307.801 326.801C310.201 333.601 315.801 322.001 315.801 322.001C327.001 305.2 310.601 307.601 310.601 307.601C280.6 310.401 273.8 294.4 273.8 294.4C271.4 292 280.2 294.4 280.2 294.4C288.601 296.4 273 282 273 282C275.4 282 284.6 288.8 284.6 288.8C295.001 298 297.001 296 297.001 296C315.001 287.2 325.401 294.8 325.401 294.8C327.401 296.4 321.801 303.2 323.401 308.401C325.001 313.601 329.801 326.001 329.801 326.001C327.401 327.601 327.801 338.401 327.801 338.401C344.601 361.601 335.001 359.601 335.001 359.601C319.401 359.201 334.201 366.801 334.201 366.801C337.401 368.801 346.201 376.001 346.201 376.001C343.401 374.801 341.801 380.001 341.801 380.001C346.601 384.001 343.801 388.801 343.801 388.801C337.801 390.001 336.601 394.001 336.601 394.001C343.401 402.001 333.401 402.401 333.401 402.401C337.001 406.801 332.201 418.801 332.201 418.801C327.401 418.801 321.001 424.401 321.001 424.401C323.401 429.201 313.001 434.801 313.001 434.801C304.601 436.401 307.401 443.201 307.401 443.201C299.401 449.201 297.001 465.201 297.001 465.201C296.201 475.601 293.801 478.801 299.001 476.801C304.201 474.801 303.401 462.401 303.401 462.401C298.601 446.801 341.401 430.801 341.401 430.801C345.401 429.201 346.201 424.001 346.201 424.001C348.201 424.401 357.001 432.001 357.001 432.001C364.601 443.201 365.001 434.001 365.001 434.001C366.201 430.401 364.601 424.401 364.601 424.401C370.601 402.801 356.601 396.401 356.601 396.401C346.601 362.801 360.601 371.201 360.601 371.201C363.401 376.801 374.201 382.001 374.201 382.001L377.801 379.601C376.201 374.801 384.601 368.801 384.601 368.801C387.401 375.201 393.401 367.201 393.401 367.201C397.001 342.801 409.401 357.201 409.401 357.201C413.401 358.401 414.601 351.601 414.601 351.601C418.201 341.201 414.601 327.601 414.601 327.601C418.201 327.201 427.801 333.201 427.801 333.201C430.601 329.601 421.401 312.801 425.401 315.201C429.401 317.601 433.801 319.201 433.801 319.201C434.601 317.201 424.601 304.801 424.601 304.801C420.201 302 415.001 281.6 415.001 281.6C422.201 285.2 412.201 270 412.201 270C412.201 266.8 418.201 255.6 418.201 255.6C417.401 248.8 418.201 249.2 418.201 249.2C421.001 250.4 429.001 252 422.201 245.6C415.401 239.2 423.001 234.4 423.001 234.4C427.401 231.6 413.801 232 413.801 232C408.601 227.6 409.001 223.6 409.001 223.6C417.001 225.6 402.601 211.2 400.201 207.6C397.801 204 407.401 198.8 407.401 198.8C420.601 195.2 409.001 192 409.001 192C389.401 192.4 400.201 181.6 400.201 181.6C406.201 182 404.601 179.6 404.601 179.6C399.401 178.4 389.801 172 389.801 172C385.801 168.4 389.401 169.2 389.401 169.2C406.201 170.4 377.401 159.2 377.401 159.2C385.401 159.2 367.401 148.8 367.401 148.8C365.401 147.2 362.201 139.6 362.201 139.6C356.201 134.4 351.401 127.6 351.401 127.6C351.001 123.2 346.201 118.4 346.201 118.4C334.601 104.8 329.001 105.2 329.001 105.2C314.201 101.6 309.001 102.4 309.001 102.4L256.2 106.8C229.8 119.6 237.6 140.6 237.6 140.6C244 149 253.2 145.2 253.2 145.2C257.8 139 269.4 141.2 269.4 141.2C289.801 144.4 287.201 140.8 287.201 140.8C284.801 136.2 268.6 130 268.4 129.4C268.2 128.8 259.4 125.4 259.4 125.4C256.4 124.2 252 115 252 115C248.8 111.6 264.6 117.4 264.6 117.4C263.4 118.4 270.8 122.4 270.8 122.4C288.201 121.4 298.801 132.2 298.801 132.2C309.601 148.8 309.801 140.6 309.801 140.6C312.601 131.2 300.801 110 300.801 110C301.201 108 309.401 114.6 309.401 114.6C310.801 112.6 311.601 118.4 311.601 118.4C311.801 120.8 315.601 128.8 315.601 128.8C318.401 141.8 322.001 134.4 322.001 134.4L326.601 143.8C328.001 146.4 322.001 154 322.001 154C321.801 156.8 322.601 156.6 317.001 164.2C311.401 171.8 314.801 176.2 314.801 176.2C313.401 182.8 322.201 182.4 322.201 182.4C324.801 184.6 328.201 184.6 328.201 184.6C330.001 186.6 332.401 186 332.401 186C334.001 182.2 340.201 184.2 340.201 184.2C341.601 181.8 349.801 181.4 349.801 181.4C350.801 178.8 351.201 177.2 354.601 176.6C358.001 176 333.401 133 333.401 133C339.801 132.2 331.601 119.8 331.601 119.8C329.401 113.2 340.801 127.8 343.001 129.2C345.201 130.6 346.201 132.8 344.601 132.6C343.001 132.4 341.201 134.6 342.601 134.8C344.001 135 357.001 150 360.401 160.2C363.801 170.4 369.801 174.4 376.001 180.4C382.201 186.4 381.401 210.6 381.401 210.6C381.001 219.4 387.001 230 387.001 230C389.001 233.8 384.801 252 384.801 252C382.801 254.2 384.201 255 384.201 255C385.201 256.2 392.001 269.4 392.001 269.4C390.201 269.2 393.801 272.8 393.801 272.8C399.001 278.8 392.601 275.8 392.601 275.8C386.601 274.2 393.601 284 393.601 284C394.801 285.8 385.801 281.2 385.801 281.2C376.601 280.6 388.201 287.8 388.201 287.8C396.801 295 385.401 290.6 385.401 290.6C380.801 288.8 384.001 295.6 384.001 295.6C387.201 297.2 404.401 304.2 404.401 304.2C404.801 308.001 401.801 313.001 401.801 313.001C402.201 317.001 400.001 320.401 400.001 320.401C398.801 328.601 398.201 329.401 398.201 329.401C394.001 329.601 386.601 343.401 386.601 343.401C384.801 346.001 374.601 358.001 374.601 358.001C372.601 365.001 354.601 357.801 354.601 357.801C348.001 361.201 350.001 357.801 350.001 357.801C349.601 355.601 354.401 349.601 354.401 349.601C361.401 347.001 358.801 336.201 358.801 336.201C362.801 334.801 351.601 332.001 351.801 330.801C352.001 329.601 357.801 328.201 357.801 328.201C365.801 326.201 361.401 323.801 361.401 323.801C360.801 319.801 363.801 314.201 363.801 314.201C375.401 313.401 363.801 297.2 363.801 297.2C353.001 289.6 352.001 283.8 352.001 283.8C364.601 275.6 356.401 263.2 356.601 259.6C356.801 256 358.001 234.4 358.001 234.4C356.001 228.2 353.001 214.6 353.001 214.6C355.201 209.4 362.601 196.8 362.601 196.8C365.401 192.6 374.201 187.8 372.001 184.8C369.801 181.8 362.001 183.6 362.001 183.6C354.201 182.2 354.801 187.4 354.801 187.4C353.201 188.4 352.401 193.4 352.401 193.4C351.68 201.333 342.801 207.6 342.801 207.6C331.601 213.8 340.801 217.8 340.801 217.8C346.801 224.4 337.001 224.6 337.001 224.6C326.001 222.8 334.201 233 334.201 233C345.001 245.8 342.001 248.6 342.001 248.6C331.801 249.6 344.401 258.8 344.401 258.8C344.401 258.8 343.601 256.8 343.801 258.6C344.001 260.4 347.001 264.6 347.801 266.6C348.601 268.6 344.601 268.8 344.601 268.8C345.201 278.4 329.801 274.2 329.801 274.2C329.801 274.2 329.801 274.2 328.201 274.4C326.601 274.6 315.401 273.8 309.601 271.6C303.801 269.4 297.001 269.4 297.001 269.4C297.001 269.4 293.001 271.2 285.4 271C277.8 270.8 269.8 273.6 269.8 273.6C265.4 273.2 274 268.8 274.2 269C274.4 269.2 280 263.6 272 264.2C250.203 265.835 239.4 255.6 239.4 255.6C237.4 254.2 234.8 251.4 234.8 251.4C224.8 249.4 236.2 263.8 236.2 263.8C237.4 265.2 236 266.2 236 266.2C235.2 264.6 227.4 259.2 227.4 259.2C224.589 258.227 223.226 256.893 220.895 254.407z"/> - </g> - <g style="fill: #4c0000"> - <path d="M197 242.8C197 242.8 208.6 248.4 211.2 251.2C213.8 254 227.8 265.4 227.8 265.4C227.8 265.4 222.4 263.4 219.8 261.6C217.2 259.8 206.4 251.6 206.4 251.6C206.4 251.6 202.6 245.6 197 242.8z"/> - </g> - <g style="fill: #99cc32"> - <path d="M138.991 211.603C139.328 211.455 138.804 208.743 138.6 208.2C137.578 205.474 128.6 204 128.6 204C128.373 205.365 128.318 206.961 128.424 208.599C128.424 208.599 133.292 214.118 138.991 211.603z"/> - </g> - <g style="fill: #659900"> - <path d="M138.991 211.403C138.542 211.561 138.976 208.669 138.8 208.2C137.778 205.474 128.6 203.9 128.6 203.9C128.373 205.265 128.318 206.861 128.424 208.499C128.424 208.499 132.692 213.618 138.991 211.403z"/> - </g> - <g style="fill: #000000"> - <path d="M134.6 211.546C133.975 211.546 133.469 210.406 133.469 209C133.469 207.595 133.975 206.455 134.6 206.455C135.225 206.455 135.732 207.595 135.732 209C135.732 210.406 135.225 211.546 134.6 211.546z"/> - </g> - <g style="fill: #000000"> - <path d="M134.6 209z"/> - </g> - <g style="fill: #000000"> - <path d="M89 309.601C89 309.601 83.4 319.601 108.2 313.601C108.2 313.601 122.2 312.401 124.6 310.001C125.8 310.801 134.166 313.734 137 314.401C143.8 316.001 152.2 306 152.2 306C152.2 306 156.8 295.5 159.6 295.5C162.4 295.5 159.2 297.1 159.2 297.1C159.2 297.1 152.6 307.201 153 308.801C153 308.801 147.8 328.801 131.8 329.601C131.8 329.601 115.65 330.551 117 336.401C117 336.401 125.8 334.001 128.2 336.401C128.2 336.401 139 336.001 131 342.401L124.2 354.001C124.2 354.001 124.34 357.919 114.2 354.401C104.4 351.001 94.1 338.101 94.1 338.101C94.1 338.101 78.15 323.551 89 309.601z"/> - </g> - <g style="fill: #e59999"> - <path d="M87.8 313.601C87.8 313.601 85.8 323.201 122.6 312.801C122.6 312.801 127 312.801 129.4 313.601C131.8 314.401 143.8 317.201 145.8 316.001C145.8 316.001 138.6 329.601 127 328.001C127 328.001 113.8 329.601 114.2 334.401C114.2 334.401 118.2 341.601 123 344.001C123 344.001 125.8 346.401 125.4 349.601C125 352.801 122.2 354.401 120.2 355.201C118.2 356.001 115 352.801 113.4 352.801C111.8 352.801 103.4 346.401 99 341.601C94.6 336.801 86.2 324.801 86.6 322.001C87 319.201 87.8 313.601 87.8 313.601z"/> - </g> - <g style="fill: #b26565"> - <path d="M91 331.051C93.6 335.001 96.8 339.201 99 341.601C103.4 346.401 111.8 352.801 113.4 352.801C115 352.801 118.2 356.001 120.2 355.201C122.2 354.401 125 352.801 125.4 349.601C125.8 346.401 123 344.001 123 344.001C119.934 342.468 117.194 338.976 115.615 336.653C115.615 336.653 115.8 339.201 110.6 338.401C105.4 337.601 100.2 334.801 98.6 331.601C97 328.401 94.6 326.001 96.2 329.601C97.8 333.201 100.2 336.801 101.8 337.201C103.4 337.601 103 338.801 100.6 338.401C98.2 338.001 95.4 337.601 91 332.401z"/> - </g> - <g style="fill: #992600"> - <path d="M88.4 310.001C88.4 310.001 90.2 296.4 91.4 292.4C91.4 292.4 90.6 285.6 93 281.4C95.4 277.2 97.4 271 100.4 265.6C103.4 260.2 103.6 256.2 107.6 254.6C111.6 253 117.6 244.4 120.4 243.4C123.2 242.4 123 243.2 123 243.2C123 243.2 129.8 228.4 143.4 232.4C143.4 232.4 127.2 229.6 143 220.2C143 220.2 138.2 221.3 141.5 214.3C143.701 209.632 143.2 216.4 132.2 228.2C132.2 228.2 127.2 236.8 122 239.8C116.8 242.8 104.8 249.8 103.6 253.6C102.4 257.4 99.2 263.2 97.2 264.8C95.2 266.4 92.4 270.6 92 274C92 274 90.8 278 89.4 279.2C88 280.4 87.8 283.6 87.8 285.6C87.8 287.6 85.8 290.4 86 292.8C86 292.8 86.8 311.801 86.4 313.801L88.4 310.001z"/> - </g> - <g style="fill: #ffffff"> - <path d="M79.8 314.601C79.8 314.601 77.8 313.201 73.4 319.201C73.4 319.201 80.7 352.201 80.7 353.601C80.7 353.601 81.8 351.501 80.5 344.301C79.2 337.101 78.3 324.401 78.3 324.401L79.8 314.601z"/> - </g> - <g style="fill: #992600"> - <path d="M101.4 254C101.4 254 83.8 257.2 84.2 286.4L83.4 311.201C83.4 311.201 82.2 285.6 81 284C79.8 282.4 83.8 271.2 80.6 277.2C80.6 277.2 66.6 291.2 74.6 312.401C74.6 312.401 76.1 315.701 73.1 311.101C73.1 311.101 68.5 298.5 69.6 292.1C69.6 292.1 69.8 289.9 71.7 287.1C71.7 287.1 80.3 275.4 83 273.1C83 273.1 84.8 258.7 100.2 253.5C100.2 253.5 105.9 251.2 101.4 254z"/> - </g> - <g style="fill: #000000"> - <path d="M240.8 187.8C241.46 187.446 241.451 186.476 242.031 186.303C243.18 185.959 243.344 184.892 243.862 184.108C244.735 182.789 244.928 181.256 245.51 179.765C245.782 179.065 245.809 178.11 245.496 177.45C244.322 174.969 243.62 172.52 242.178 170.094C241.91 169.644 241.648 168.85 241.447 168.252C240.984 166.868 239.727 165.877 238.867 164.557C238.579 164.116 239.104 163.191 238.388 163.107C237.491 163.002 236.042 162.422 235.809 163.448C235.221 166.035 236.232 168.558 237.2 171C236.418 171.692 236.752 172.613 236.904 173.38C237.614 176.986 236.416 180.338 235.655 183.812C235.632 183.916 235.974 184.114 235.946 184.176C234.724 186.862 233.272 189.307 231.453 191.688C230.695 192.68 229.823 193.596 229.326 194.659C228.958 195.446 228.55 196.412 228.8 197.4C225.365 200.18 223.115 204.025 220.504 207.871C220.042 208.551 220.333 209.76 220.884 210.029C221.697 210.427 222.653 209.403 223.123 208.557C223.512 207.859 223.865 207.209 224.356 206.566C224.489 206.391 224.31 205.972 224.445 205.851C227.078 203.504 228.747 200.568 231.2 198.2C233.15 197.871 234.687 196.873 236.435 195.86C236.743 195.681 237.267 195.93 237.557 195.735C239.31 194.558 239.308 192.522 239.414 190.612C239.464 189.728 239.66 188.411 240.8 187.8z"/> - </g> - <g style="fill: #000000"> - <path d="M231.959 183.334C232.083 183.257 231.928 182.834 232.037 182.618C232.199 182.294 232.602 182.106 232.764 181.782C232.873 181.566 232.71 181.186 232.846 181.044C235.179 178.597 235.436 175.573 234.4 172.6C235.424 171.98 235.485 170.718 235.06 169.871C234.207 168.171 234.014 166.245 233.039 164.702C232.237 163.433 230.659 162.189 229.288 163.492C228.867 163.892 228.546 164.679 228.824 165.391C228.888 165.554 229.173 165.7 229.146 165.782C229.039 166.106 228.493 166.33 228.487 166.602C228.457 168.098 227.503 169.609 228.133 170.938C228.905 172.567 229.724 174.424 230.4 176.2C229.166 178.316 230.199 180.765 228.446 182.642C228.31 182.788 228.319 183.174 228.441 183.376C228.733 183.862 229.139 184.268 229.625 184.56C229.827 184.681 230.175 184.683 230.375 184.559C230.953 184.197 231.351 183.71 231.959 183.334z"/> - </g> - <g style="fill: #000000"> - <path d="M294.771 173.023C296.16 174.815 296.45 177.61 294.401 179C294.951 182.309 298.302 180.33 300.401 179.8C300.292 179.412 300.519 179.068 300.802 179.063C301.859 179.048 302.539 178.016 303.601 178.2C304.035 176.643 305.673 175.941 306.317 174.561C308.043 170.866 307.452 166.593 304.868 163.347C304.666 163.093 304.883 162.576 304.759 162.214C304.003 160.003 301.935 159.688 300.001 159C298.824 155.125 298.163 151.094 296.401 147.4C294.787 147.15 294.089 145.411 292.752 144.691C291.419 143.972 290.851 145.551 290.892 146.597C290.899 146.802 291.351 147.026 291.181 147.391C291.105 147.555 290.845 147.666 290.845 147.8C290.846 147.935 291.067 148.066 291.201 148.2C290.283 149.02 288.86 149.497 288.565 150.642C287.611 154.352 290.184 157.477 291.852 160.678C292.443 161.813 291.707 163.084 290.947 164.292C290.509 164.987 290.617 166.114 290.893 166.97C291.645 169.301 293.236 171.04 294.771 173.023z"/> - </g> - <g style="fill: #000000"> - <path d="M257.611 191.409C256.124 193.26 252.712 195.829 255.629 197.757C255.823 197.886 256.193 197.89 256.366 197.756C258.387 196.191 260.39 195.288 262.826 194.706C262.95 194.677 263.224 195.144 263.593 194.983C265.206 194.28 267.216 194.338 268.4 193C272.167 193.224 275.732 192.108 279.123 190.8C280.284 190.352 281.554 189.793 282.755 189.291C284.131 188.715 285.335 187.787 286.447 186.646C286.58 186.51 286.934 186.6 287.201 186.6C287.161 185.737 288.123 185.61 288.37 184.988C288.462 184.756 288.312 184.36 288.445 184.258C290.583 182.628 291.503 180.61 290.334 178.233C290.049 177.655 289.8 177.037 289.234 176.561C288.149 175.65 287.047 176.504 286 176.2C285.841 176.828 285.112 176.656 284.726 176.854C283.867 177.293 282.534 176.708 281.675 177.146C280.313 177.841 279.072 178.01 277.65 178.387C277.338 178.469 276.56 178.373 276.4 179C276.266 178.866 276.118 178.632 276.012 178.654C274.104 179.05 272.844 179.264 271.543 180.956C271.44 181.089 270.998 180.91 270.839 181.045C269.882 181.853 269.477 183.087 268.376 183.759C268.175 183.882 267.823 183.714 267.629 183.843C266.983 184.274 266.616 184.915 265.974 185.362C265.645 185.591 265.245 185.266 265.277 185.01C265.522 183.063 266.175 181.276 265.6 179.4C267.677 176.88 270.194 174.931 272 172.2C272.015 170.034 272.707 167.888 272.594 165.811C272.584 165.618 272.296 164.885 272.17 164.538C271.858 163.684 272.764 162.618 271.92 161.894C270.516 160.691 269.224 161.567 268.4 163C266.562 163.39 264.496 164.083 262.918 162.849C261.911 162.062 261.333 161.156 260.534 160.1C259.549 158.798 259.884 157.362 259.954 155.798C259.96 155.67 259.645 155.534 259.645 155.4C259.646 155.265 259.866 155.134 260 155C259.294 154.374 259.019 153.316 258 153C258.305 151.908 257.629 151.024 256.758 150.722C254.763 150.031 253.086 151.943 251.194 152.016C250.68 152.035 250.213 150.997 249.564 150.672C249.132 150.456 248.428 150.423 248.066 150.689C247.378 151.193 246.789 151.307 246.031 151.512C244.414 151.948 243.136 153.042 241.656 153.897C240.171 154.754 239.216 156.191 238.136 157.511C237.195 158.663 237.059 161.077 238.479 161.577C240.322 162.227 241.626 159.524 243.592 159.85C243.904 159.901 244.11 160.212 244 160.6C244.389 160.709 244.607 160.48 244.8 160.2C245.658 161.219 246.822 161.556 247.76 162.429C248.73 163.333 250.476 162.915 251.491 163.912C253.02 165.414 252.461 168.095 254.4 169.4C253.814 170.713 253.207 171.99 252.872 173.417C252.59 174.623 253.584 175.82 254.795 175.729C256.053 175.635 256.315 174.876 256.8 173.8C257.067 174.067 257.536 174.364 257.495 174.58C257.038 176.967 256.011 178.96 255.553 181.391C255.494 181.708 255.189 181.91 254.8 181.8C254.332 185.949 250.28 188.343 247.735 191.508C247.332 192.01 247.328 193.259 247.737 193.662C249.14 195.049 251.1 193.503 252.8 193C253.013 191.794 253.872 190.852 255.204 190.908C255.46 190.918 255.695 190.376 256.019 190.246C256.367 190.108 256.869 190.332 257.155 190.134C258.884 188.939 260.292 187.833 262.03 186.644C262.222 186.513 262.566 186.672 262.782 186.564C263.107 186.402 263.294 186.015 263.617 185.83C263.965 185.63 264.207 185.92 264.4 186.2C263.754 186.549 263.75 187.506 263.168 187.708C262.393 187.976 261.832 188.489 261.158 188.936C260.866 189.129 260.207 188.881 260.103 189.06C259.505 190.088 258.321 190.526 257.611 191.409z"/> - </g> - <g style="fill: #000000"> - <path d="M202.2 142C202.2 142 192.962 139.128 181.8 164.8C181.8 164.8 179.4 170 177 172C174.6 174 163.4 177.6 161.4 181.6L151 197.6C151 197.6 165.8 181.6 169 179.2C169 179.2 177 170.8 173.8 177.6C173.8 177.6 159.8 188.4 161 197.6C161 197.6 155.4 212 154.6 214C154.6 214 170.6 182 173 180.8C175.4 179.6 176.6 179.6 175.4 183.2C174.2 186.8 173.8 203.2 171 205.2C171 205.2 179 184.8 178.2 181.6C178.2 181.6 181.4 178 183.8 183.2L182.6 199.2L187 211.2C187 211.2 184.6 200 186.2 184.4C186.2 184.4 184.2 174 188.2 179.6C192.2 185.2 201.8 191.2 201.8 196C201.8 196 196.6 178.4 187.4 173.6L183.4 179.6L182.2 177.6C182.2 177.6 178.6 176.8 183 170C187.4 163.2 187 162.4 187 162.4C187 162.4 193.4 169.6 195 169.6C195 169.6 208.2 162 209.4 186.4C209.4 186.4 216.2 172 207 165.2C207 165.2 192.2 163.2 193.4 158L200.6 145.6C204.2 140.4 202.6 143.2 202.6 143.2z"/> - </g> - <g style="fill: #000000"> - <path d="M182.2 158.4C182.2 158.4 169.4 158.4 166.2 163.6L159 173.2C159 173.2 176.2 163.2 180.2 162C184.2 160.8 182.2 158.4 182.2 158.4z"/> - </g> - <g style="fill: #000000"> - <path d="M142.2 164.8C142.2 164.8 140.2 166 139.8 168.8C139.4 171.6 137 172 137.8 174.8C138.6 177.6 140.6 180 140.6 176C140.6 172 142.2 170 143 168.8C143.8 167.6 145.4 163.2 142.2 164.8z"/> - </g> - <g style="fill: #000000"> - <path d="M133.4 226C133.4 226 125 222 121.8 218.4C118.6 214.8 119.052 219.966 114.2 219.6C108.353 219.159 109.4 203.2 109.4 203.2L105.4 210.8C105.4 210.8 104.2 225.2 112.2 222.8C116.107 221.628 117.4 223.2 115.8 224C114.2 224.8 121.4 225.2 118.6 226.8C115.8 228.4 130.2 223.2 127.8 233.6L133.4 226z"/> - </g> - <g style="fill: #000000"> - <path d="M120.8 240.4C120.8 240.4 105.4 244.8 101.8 235.2C101.8 235.2 97 237.6 99.2 240.6C101.4 243.6 102.6 244 102.6 244C102.6 244 108 245.2 107.4 246C106.8 246.8 104.4 250.2 104.4 250.2C104.4 250.2 114.6 244.2 120.8 240.4z"/> - </g> - <g style="fill: #ffffff"> - <path d="M349.201 318.601C348.774 320.735 347.103 321.536 345.201 322.201C343.284 321.243 340.686 318.137 338.801 320.201C338.327 319.721 337.548 319.661 337.204 318.999C336.739 318.101 337.011 317.055 336.669 316.257C336.124 314.985 335.415 313.619 335.601 312.201C337.407 311.489 338.002 309.583 337.528 307.82C337.459 307.563 337.03 307.366 337.23 307.017C337.416 306.694 337.734 306.467 338.001 306.2C337.866 306.335 337.721 306.568 337.61 306.548C337 306.442 337.124 305.805 337.254 305.418C337.839 303.672 339.853 303.408 341.201 304.6C341.457 304.035 341.966 304.229 342.401 304.2C342.351 303.621 342.759 303.094 342.957 302.674C343.475 301.576 345.104 302.682 345.901 302.07C346.977 301.245 348.04 300.546 349.118 301.149C350.927 302.162 352.636 303.374 353.835 305.115C354.41 305.949 354.65 307.23 354.592 308.188C354.554 308.835 353.173 308.483 352.83 309.412C352.185 311.16 354.016 311.679 354.772 313.017C354.97 313.366 354.706 313.67 354.391 313.768C353.98 313.896 353.196 313.707 353.334 314.16C354.306 317.353 351.55 318.031 349.201 318.601z"/> - </g> - <g style="fill: #ffffff"> - <path d="M339.6 338.201C339.593 336.463 337.992 334.707 339.201 333.001C339.336 333.135 339.467 333.356 339.601 333.356C339.736 333.356 339.867 333.135 340.001 333.001C341.496 335.217 345.148 336.145 345.006 338.991C344.984 339.438 343.897 340.356 344.801 341.001C342.988 342.349 342.933 344.719 342.001 346.601C340.763 346.315 339.551 345.952 338.401 345.401C338.753 343.915 338.636 342.231 339.456 340.911C339.89 340.213 339.603 339.134 339.6 338.201z"/> - </g> - <g style="fill: #cccccc"> - <path d="M173.4 329.201C173.4 329.201 156.542 339.337 170.6 324.001C179.4 314.401 189.4 308.801 189.4 308.801C189.4 308.801 199.8 304.4 203.4 303.2C207 302 222.2 296.8 225.4 296.4C228.6 296 238.2 292 245 296C251.8 300 259.8 304.4 259.8 304.4C259.8 304.4 243.4 296 239.8 298.4C236.2 300.8 229 300.4 223 303.6C223 303.6 208.2 308.001 205 310.001C201.8 312.001 191.4 323.601 189.8 322.801C188.2 322.001 190.2 321.601 191.4 318.801C192.6 316.001 190.6 314.401 182.6 320.801C174.6 327.201 173.4 329.201 173.4 329.201z"/> - </g> - <g style="fill: #000000"> - <path d="M180.805 323.234C180.805 323.234 182.215 310.194 190.693 311.859C190.693 311.859 198.919 307.689 201.641 305.721C201.641 305.721 209.78 304.019 211.09 303.402C229.569 294.702 244.288 299.221 244.835 298.101C245.381 296.982 265.006 304.099 268.615 308.185C269.006 308.628 258.384 302.588 248.686 300.697C240.413 299.083 218.811 300.944 207.905 306.48C204.932 307.989 195.987 313.773 193.456 313.662C190.925 313.55 180.805 323.234 180.805 323.234z"/> - </g> - <g style="fill: #cccccc"> - <path d="M177 348.801C177 348.801 161.8 346.401 178.6 344.801C178.6 344.801 196.6 342.801 200.6 337.601C200.6 337.601 214.2 328.401 217 328.001C219.8 327.601 249.8 320.401 250.2 318.001C250.6 315.601 256.2 315.601 257.8 316.401C259.4 317.201 258.6 318.401 255.8 319.201C253 320.001 221.8 336.401 215.4 337.601C209 338.801 197.4 346.401 192.6 347.601C187.8 348.801 177 348.801 177 348.801z"/> - </g> - <g style="fill: #000000"> - <path d="M196.52 341.403C196.52 341.403 187.938 340.574 196.539 339.755C196.539 339.755 205.355 336.331 207.403 333.668C207.403 333.668 214.367 328.957 215.8 328.753C217.234 328.548 231.194 324.861 231.399 323.633C231.604 322.404 265.67 309.823 270.09 313.013C273.001 315.114 263.1 313.437 253.466 317.847C252.111 318.467 218.258 333.054 214.981 333.668C211.704 334.283 205.765 338.174 203.307 338.788C200.85 339.403 196.52 341.403 196.52 341.403z"/> - </g> - <g style="fill: #000000"> - <path d="M188.6 343.601C188.6 343.601 193.8 343.201 192.6 344.801C191.4 346.401 189 345.601 189 345.601L188.6 343.601z"/> - </g> - <g style="fill: #000000"> - <path d="M181.4 345.201C181.4 345.201 186.6 344.801 185.4 346.401C184.2 348.001 181.8 347.201 181.8 347.201L181.4 345.201z"/> - </g> - <g style="fill: #000000"> - <path d="M171 346.801C171 346.801 176.2 346.401 175 348.001C173.8 349.601 171.4 348.801 171.4 348.801L171 346.801z"/> - </g> - <g style="fill: #000000"> - <path d="M163.4 347.601C163.4 347.601 168.6 347.201 167.4 348.801C166.2 350.401 163.8 349.601 163.8 349.601L163.4 347.601z"/> - </g> - <g style="fill: #000000"> - <path d="M201.8 308.001C201.8 308.001 206.2 308.001 205 309.601C203.8 311.201 200.6 310.801 200.6 310.801L201.8 308.001z"/> - </g> - <g style="fill: #000000"> - <path d="M191.8 313.601C191.8 313.601 198.306 311.46 195.8 314.801C194.6 316.401 192.2 315.601 192.2 315.601L191.8 313.601z"/> - </g> - <g style="fill: #000000"> - <path d="M180.6 318.401C180.6 318.401 185.8 318.001 184.6 319.601C183.4 321.201 181 320.401 181 320.401L180.6 318.401z"/> - </g> - <g style="fill: #000000"> - <path d="M173 324.401C173 324.401 178.2 324.001 177 325.601C175.8 327.201 173.4 326.401 173.4 326.401L173 324.401z"/> - </g> - <g style="fill: #000000"> - <path d="M166.2 329.201C166.2 329.201 171.4 328.801 170.2 330.401C169 332.001 166.6 331.201 166.6 331.201L166.2 329.201z"/> - </g> - <g style="fill: #000000"> - <path d="M205.282 335.598C205.282 335.598 212.203 335.066 210.606 337.195C209.009 339.325 205.814 338.26 205.814 338.26L205.282 335.598z"/> - </g> - <g style="fill: #000000"> - <path d="M215.682 330.798C215.682 330.798 222.603 330.266 221.006 332.395C219.409 334.525 216.214 333.46 216.214 333.46L215.682 330.798z"/> - </g> - <g style="fill: #000000"> - <path d="M226.482 326.398C226.482 326.398 233.403 325.866 231.806 327.995C230.209 330.125 227.014 329.06 227.014 329.06L226.482 326.398z"/> - </g> - <g style="fill: #000000"> - <path d="M236.882 321.598C236.882 321.598 243.803 321.066 242.206 323.195C240.609 325.325 237.414 324.26 237.414 324.26L236.882 321.598z"/> - </g> - <g style="fill: #000000"> - <path d="M209.282 303.598C209.282 303.598 216.203 303.066 214.606 305.195C213.009 307.325 209.014 307.06 209.014 307.06L209.282 303.598z"/> - </g> - <g style="fill: #000000"> - <path d="M219.282 300.398C219.282 300.398 226.203 299.866 224.606 301.995C223.009 304.125 218.614 303.86 218.614 303.86L219.282 300.398z"/> - </g> - <g style="fill: #000000"> - <path d="M196.6 340.401C196.6 340.401 201.8 340.001 200.6 341.601C199.4 343.201 197 342.401 197 342.401L196.6 340.401z"/> - </g> - <g style="fill: #992600"> - <path d="M123.4 241.2C123.4 241.2 119 250 118.6 253.2C118.6 253.2 119.4 244.4 120.6 242.4C121.8 240.4 123.4 241.2 123.4 241.2z"/> - </g> - <g style="fill: #992600"> - <path d="M105 255.2C105 255.2 101.8 269.6 102.2 272.4C102.2 272.4 101 260.8 101.4 259.6C101.8 258.4 105 255.2 105 255.2z"/> - </g> - <g style="fill: #cccccc"> - <path d="M125.8 180.6L125.6 183.8L123.4 184C123.4 184 137.6 196.6 138.2 204.2C138.2 204.2 139 196 125.8 180.6z"/> - </g> - <g style="fill: #000000"> - <path d="M129.784 181.865C129.353 181.449 129.572 180.704 129.164 180.444C128.355 179.928 130.462 179.871 130.234 179.155C129.851 177.949 130.038 177.928 129.916 176.652C129.859 176.054 130.447 174.514 130.832 174.074C132.278 172.422 130.954 169.49 132.594 167.939C132.898 167.65 133.274 167.098 133.559 166.68C134.218 165.717 135.402 165.229 136.352 164.401C136.67 164.125 136.469 163.298 137.038 163.39C137.752 163.505 138.993 163.375 138.948 164.216C138.835 166.336 137.506 168.056 136.226 169.724C136.677 170.428 136.219 171.063 135.935 171.62C134.6 174.24 134.789 177.081 134.615 179.921C134.61 180.006 134.303 180.084 134.311 180.137C134.664 182.472 135.248 184.671 136.127 186.9C136.493 187.83 136.964 188.725 137.114 189.652C137.225 190.338 137.328 191.171 136.92 191.876C138.955 194.766 137.646 197.417 138.815 200.948C139.022 201.573 140.714 203.487 140.251 203.326C137.738 202.455 137.626 202.057 137.449 201.304C137.303 200.681 136.973 199.304 136.736 198.702C136.672 198.538 136.501 196.654 136.423 196.532C134.91 194.15 136.268 194.326 134.898 191.968C133.47 191.288 132.504 190.184 131.381 189.022C131.183 188.818 132.326 188.094 132.145 187.881C131.053 186.592 129.9 185.825 130.236 184.332C130.391 183.642 130.528 182.585 129.784 181.865z"/> - </g> - <g style="fill: #000000"> - <path d="M126.2 183.6C126.2 183.6 126.6 190.4 129 192C131.4 193.6 130.2 192.8 127 191.6C123.8 190.4 125 189.6 125 189.6C125 189.6 122.2 190 124.6 192C127 194 130.6 196.4 129 196.4C127.4 196.4 119.8 192.4 119.8 189.6C119.8 186.8 118.8 182.7 118.8 182.7C118.8 182.7 119.9 181.9 124.7 182C124.7 182 126.1 182.7 126.2 183.6z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M125.4 202.2C125.4 202.2 116.88 199.409 98.4 202.8C98.4 202.8 107.431 200.722 126.2 203C136.5 204.25 125.4 202.2 125.4 202.2z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M127.498 202.129C127.498 202.129 119.252 198.611 100.547 200.392C100.547 200.392 109.725 199.103 128.226 202.995C138.38 205.131 127.498 202.129 127.498 202.129z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M129.286 202.222C129.286 202.222 121.324 198.101 102.539 198.486C102.539 198.486 111.787 197.882 129.948 203.14C139.914 206.025 129.286 202.222 129.286 202.222z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M130.556 202.445C130.556 202.445 123.732 198.138 106.858 197.04C106.858 197.04 115.197 197.21 131.078 203.319C139.794 206.672 130.556 202.445 130.556 202.445z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M245.84 212.961C245.84 212.961 244.91 213.605 245.124 212.424C245.339 211.243 273.547 198.073 277.161 198.323C277.161 198.323 246.913 211.529 245.84 212.961z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M242.446 213.6C242.446 213.6 241.57 214.315 241.691 213.121C241.812 211.927 268.899 196.582 272.521 196.548C272.521 196.548 243.404 212.089 242.446 213.6z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M239.16 214.975C239.16 214.975 238.332 215.747 238.374 214.547C238.416 213.348 258.233 197.851 268.045 195.977C268.045 195.977 250.015 204.104 239.16 214.975z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M236.284 216.838C236.284 216.838 235.539 217.532 235.577 216.453C235.615 215.373 253.449 201.426 262.28 199.74C262.28 199.74 246.054 207.054 236.284 216.838z"/> - </g> - <g style="fill: #cccccc"> - <path d="M204.6 364.801C204.6 364.801 189.4 362.401 206.2 360.801C206.2 360.801 224.2 358.801 228.2 353.601C228.2 353.601 241.8 344.401 244.6 344.001C247.4 343.601 263.8 340.001 264.2 337.601C264.6 335.201 270.6 332.801 272.2 333.601C273.8 334.401 273.8 343.601 271 344.401C268.2 345.201 249.4 352.401 243 353.601C236.6 354.801 225 362.401 220.2 363.601C215.4 364.801 204.6 364.801 204.6 364.801z"/> - </g> - <g style="fill: #000000"> - <path d="M277.6 327.401C277.6 327.401 274.6 329.001 273.4 331.601C273.4 331.601 267 342.201 252.8 345.401C252.8 345.401 229.8 354.401 222 356.401C222 356.401 208.6 361.401 201.2 360.601C201.2 360.601 194.2 360.801 200.4 362.401C200.4 362.401 220.6 360.401 224 358.601C224 358.601 239.6 353.401 242.6 350.801C245.6 348.201 263.8 343.201 266 341.201C268.2 339.201 278 330.801 277.6 327.401z"/> - </g> - <g style="fill: #000000"> - <path d="M218.882 358.911C218.882 358.911 224.111 358.685 222.958 360.234C221.805 361.784 219.357 360.91 219.357 360.91L218.882 358.911z"/> - </g> - <g style="fill: #000000"> - <path d="M211.68 360.263C211.68 360.263 216.908 360.037 215.756 361.586C214.603 363.136 212.155 362.263 212.155 362.263L211.68 360.263z"/> - </g> - <g style="fill: #000000"> - <path d="M201.251 361.511C201.251 361.511 206.48 361.284 205.327 362.834C204.174 364.383 201.726 363.51 201.726 363.51L201.251 361.511z"/> - </g> - <g style="fill: #000000"> - <path d="M193.617 362.055C193.617 362.055 198.846 361.829 197.693 363.378C196.54 364.928 194.092 364.054 194.092 364.054L193.617 362.055z"/> - </g> - <g style="fill: #000000"> - <path d="M235.415 351.513C235.415 351.513 242.375 351.212 240.84 353.274C239.306 355.336 236.047 354.174 236.047 354.174L235.415 351.513z"/> - </g> - <g style="fill: #000000"> - <path d="M245.73 347.088C245.73 347.088 251.689 343.787 251.155 348.849C250.885 351.405 246.362 349.749 246.362 349.749L245.73 347.088z"/> - </g> - <g style="fill: #000000"> - <path d="M254.862 344.274C254.862 344.274 262.021 340.573 260.287 346.035C259.509 348.485 255.493 346.935 255.493 346.935L254.862 344.274z"/> - </g> - <g style="fill: #000000"> - <path d="M264.376 339.449C264.376 339.449 268.735 334.548 269.801 341.21C270.207 343.748 265.008 342.11 265.008 342.11L264.376 339.449z"/> - </g> - <g style="fill: #000000"> - <path d="M226.834 355.997C226.834 355.997 232.062 355.77 230.91 357.32C229.757 358.869 227.308 357.996 227.308 357.996L226.834 355.997z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M262.434 234.603C262.434 234.603 261.708 235.268 261.707 234.197C261.707 233.127 279.191 219.863 288.034 218.479C288.034 218.479 271.935 225.208 262.434 234.603z"/> - </g> - <g style="fill: #000000"> - <path d="M265.4 298.4C265.4 298.4 287.401 320.801 296.601 324.401C296.601 324.401 305.801 335.601 301.801 361.601C301.801 361.601 298.601 369.201 295.401 348.401C295.401 348.401 298.601 323.201 287.401 339.201C287.401 339.201 279 329.301 285.4 329.601C285.4 329.601 288.601 331.601 289.001 330.001C289.401 328.401 281.4 314.801 264.2 300.4C247 286 265.4 298.4 265.4 298.4z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M207 337.201C207 337.201 206.8 335.401 208.6 336.201C210.4 337.001 304.601 343.201 336.201 367.201C336.201 367.201 291.001 344.001 207 337.201z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M217.4 332.801C217.4 332.801 217.2 331.001 219 331.801C220.8 332.601 357.401 331.601 381.001 364.001C381.001 364.001 359.001 338.801 217.4 332.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M229 328.801C229 328.801 228.8 327.001 230.6 327.801C232.4 328.601 405.801 315.601 429.401 348.001C429.401 348.001 419.801 322.401 229 328.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M239 324.001C239 324.001 238.8 322.201 240.6 323.001C242.4 323.801 364.601 285.2 388.201 317.601C388.201 317.601 374.801 293 239 324.001z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M181 346.801C181 346.801 180.8 345.001 182.6 345.801C184.4 346.601 202.2 348.801 204.2 387.601C204.2 387.601 197 345.601 181 346.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M172.2 348.401C172.2 348.401 172 346.601 173.8 347.401C175.6 348.201 189.8 343.601 187 382.401C187 382.401 188.2 347.201 172.2 348.401z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M164.2 348.801C164.2 348.801 164 347.001 165.8 347.801C167.6 348.601 183 349.201 170.6 371.601C170.6 371.601 180.2 347.601 164.2 348.801z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M211.526 304.465C211.526 304.465 211.082 306.464 212.631 305.247C228.699 292.622 261.141 233.72 316.826 228.086C316.826 228.086 278.518 215.976 211.526 304.465z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M222.726 302.665C222.726 302.665 221.363 301.472 223.231 300.847C225.099 300.222 337.541 227.72 376.826 235.686C376.826 235.686 349.719 228.176 222.726 302.665z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M201.885 308.767C201.885 308.767 201.376 310.366 203.087 309.39C212.062 304.27 215.677 247.059 259.254 245.804C259.254 245.804 226.843 231.09 201.885 308.767z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M181.962 319.793C181.962 319.793 180.885 321.079 182.838 320.825C193.084 319.493 214.489 278.222 258.928 283.301C258.928 283.301 226.962 268.955 181.962 319.793z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M193.2 313.667C193.2 313.667 192.389 315.136 194.258 314.511C204.057 311.237 217.141 266.625 261.729 263.078C261.729 263.078 227.603 255.135 193.2 313.667z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M174.922 324.912C174.922 324.912 174.049 325.954 175.631 325.748C183.93 324.669 201.268 291.24 237.264 295.354C237.264 295.354 211.371 283.734 174.922 324.912z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M167.323 330.821C167.323 330.821 166.318 331.866 167.909 331.748C172.077 331.439 202.715 298.36 221.183 313.862C221.183 313.862 209.168 295.139 167.323 330.821z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M236.855 298.898C236.855 298.898 235.654 297.543 237.586 297.158C239.518 296.774 360.221 239.061 398.184 251.927C398.184 251.927 372.243 241.053 236.855 298.898z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M203.4 363.201C203.4 363.201 203.2 361.401 205 362.201C206.8 363.001 222.2 363.601 209.8 386.001C209.8 386.001 219.4 362.001 203.4 363.201z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M213.8 361.601C213.8 361.601 213.6 359.801 215.4 360.601C217.2 361.401 235 363.601 237 402.401C237 402.401 229.8 360.401 213.8 361.601z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M220.6 360.001C220.6 360.001 220.4 358.201 222.2 359.001C224 359.801 248.6 363.201 272.2 395.601C272.2 395.601 236.6 358.801 220.6 360.001z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M228.225 357.972C228.225 357.972 227.788 356.214 229.678 356.768C231.568 357.322 252.002 355.423 290.099 389.599C290.099 389.599 243.924 354.656 228.225 357.972z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M238.625 353.572C238.625 353.572 238.188 351.814 240.078 352.368C241.968 352.922 276.802 357.423 328.499 392.399C328.499 392.399 254.324 350.256 238.625 353.572z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M198.2 342.001C198.2 342.001 198 340.201 199.8 341.001C201.6 341.801 255 344.401 285.4 371.201C285.4 371.201 250.499 346.426 198.2 342.001z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M188.2 346.001C188.2 346.001 188 344.201 189.8 345.001C191.6 345.801 216.2 349.201 239.8 381.601C239.8 381.601 204.2 344.801 188.2 346.001z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M249.503 348.962C249.503 348.962 248.938 347.241 250.864 347.655C252.79 348.068 287.86 350.004 341.981 381.098C341.981 381.098 264.317 346.704 249.503 348.962z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M257.903 346.562C257.903 346.562 257.338 344.841 259.264 345.255C261.19 345.668 296.26 347.604 350.381 378.698C350.381 378.698 273.317 343.904 257.903 346.562z"/> - </g> - <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> - <path d="M267.503 341.562C267.503 341.562 266.938 339.841 268.864 340.255C270.79 340.668 313.86 345.004 403.582 379.298C403.582 379.298 282.917 338.904 267.503 341.562z"/> - </g> - <g style="fill: #000000"> - <path d="M156.2 348.401C156.2 348.401 161.4 348.001 160.2 349.601C159 351.201 156.6 350.401 156.6 350.401L156.2 348.401z"/> - </g> - <g style="fill: #000000"> - <path d="M187 362.401C187 362.401 192.2 362.001 191 363.601C189.8 365.201 187.4 364.401 187.4 364.401L187 362.401z"/> - </g> - <g style="fill: #000000"> - <path d="M178.2 362.001C178.2 362.001 183.4 361.601 182.2 363.201C181 364.801 178.6 364.001 178.6 364.001L178.2 362.001z"/> - </g> - <g style="fill: #000000"> - <path d="M82.831 350.182C82.831 350.182 87.876 351.505 86.218 352.624C84.561 353.744 82.554 352.202 82.554 352.202L82.831 350.182z"/> - </g> - <g style="fill: #000000"> - <path d="M84.831 340.582C84.831 340.582 89.876 341.905 88.218 343.024C86.561 344.144 84.554 342.602 84.554 342.602L84.831 340.582z"/> - </g> - <g style="fill: #000000"> - <path d="M77.631 336.182C77.631 336.182 82.676 337.505 81.018 338.624C79.361 339.744 77.354 338.202 77.354 338.202L77.631 336.182z"/> - </g> - <g style="fill: #cccccc"> - <path d="M157.4 411.201C157.4 411.201 155.8 411.201 151.8 413.201C149.8 413.201 138.6 416.801 133 426.801C133 426.801 145.4 417.201 157.4 411.201z"/> - </g> - <g style="fill: #cccccc"> - <path d="M245.116 503.847C245.257 504.105 245.312 504.525 245.604 504.542C246.262 504.582 247.495 504.883 247.37 504.247C246.522 499.941 245.648 495.004 241.515 493.197C240.876 492.918 239.434 493.331 239.36 494.215C239.233 495.739 239.116 497.088 239.425 498.554C239.725 499.975 241.883 499.985 242.8 498.601C243.736 500.273 244.168 502.116 245.116 503.847z"/> - </g> - <g style="fill: #cccccc"> - <path d="M234.038 508.581C234.786 509.994 234.659 511.853 236.074 512.416C236.814 512.71 238.664 511.735 238.246 510.661C237.444 508.6 237.056 506.361 235.667 504.55C235.467 504.288 235.707 503.755 235.547 503.427C234.953 502.207 233.808 501.472 232.4 501.801C231.285 504.004 232.433 506.133 233.955 507.842C234.091 507.994 233.925 508.37 234.038 508.581z"/> - </g> - <g style="fill: #cccccc"> - <path d="M194.436 503.391C194.328 503.014 194.29 502.551 194.455 502.23C194.986 501.197 195.779 500.075 195.442 499.053C195.094 497.997 193.978 498.179 193.328 498.748C192.193 499.742 192.144 501.568 191.453 502.927C191.257 503.313 191.308 503.886 190.867 504.277C190.393 504.698 189.953 506.222 190.049 506.793C190.102 507.106 189.919 517.014 190.141 516.751C190.76 516.018 193.81 506.284 193.879 505.392C193.936 504.661 194.668 504.196 194.436 503.391z"/> - </g> - <g style="fill: #cccccc"> - <path d="M168.798 496.599C171.432 494.1 174.222 491.139 173.78 487.427C173.664 486.451 171.889 486.978 171.702 487.824C170.9 491.449 168.861 494.11 166.293 496.502C164.097 498.549 162.235 504.893 162 505.401C165.697 500.145 167.954 497.399 168.798 496.599z"/> - </g> - <g style="fill: #cccccc"> - <path d="M155.224 490.635C155.747 490.265 155.445 489.774 155.662 489.442C156.615 487.984 157.916 486.738 157.934 485C157.937 484.723 157.559 484.414 157.224 484.638C156.947 484.822 156.605 484.952 156.497 485.082C154.467 487.531 153.067 490.202 151.624 493.014C151.441 493.371 150.297 497.862 150.61 497.973C150.849 498.058 152.569 493.877 152.779 493.763C154.042 493.077 154.054 491.462 155.224 490.635z"/> - </g> - <g style="fill: #cccccc"> - <path d="M171.957 510.179C172.401 509.31 173.977 508.108 173.864 507.219C173.746 506.291 174.214 504.848 173.302 505.536C172.045 506.484 168.596 507.833 168.326 513.641C168.3 514.212 171.274 511.519 171.957 510.179z"/> - </g> - <g style="fill: #cccccc"> - <path d="M186.4 493.001C186.8 492.333 187.508 492.806 187.967 492.543C188.615 492.171 189.226 491.613 189.518 490.964C190.488 488.815 192.257 486.995 192.4 484.601C190.909 483.196 190.23 485.236 189.6 486.201C188.277 484.554 187.278 486.428 185.978 486.947C185.908 486.975 185.695 486.628 185.62 486.655C184.443 487.095 183.763 488.176 182.765 488.957C182.594 489.091 182.189 488.911 182.042 489.047C181.39 489.65 180.417 489.975 180.137 490.657C179.027 493.364 175.887 495.459 174 503.001C174.381 503.91 178.512 496.359 178.999 495.661C179.835 494.465 179.953 497.322 181.229 496.656C181.28 496.629 181.466 496.867 181.6 497.001C181.794 496.721 182.012 496.492 182.4 496.601C182.4 496.201 182.266 495.645 182.467 495.486C183.704 494.509 183.62 493.441 184.4 492.201C184.858 492.99 185.919 492.271 186.4 493.001z"/> - </g> - <g style="fill: #cccccc"> - <path d="M246.2 547.401C246.2 547.401 253.6 527.001 249.2 515.801C249.2 515.801 260.6 537.401 256 548.601C256 548.601 255.6 538.201 251.6 533.201C251.6 533.201 247.6 546.001 246.2 547.401z"/> - </g> - <g style="fill: #cccccc"> - <path d="M231.4 544.801C231.4 544.801 236.8 536.001 228.8 517.601C228.8 517.601 228 538.001 221.2 549.001C221.2 549.001 235.4 528.801 231.4 544.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M221.4 542.801C221.4 542.801 221.2 522.801 221.6 519.801C221.6 519.801 217.8 536.401 207.6 546.001C207.6 546.001 222 534.001 221.4 542.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M211.8 510.801C211.8 510.801 217.8 524.401 207.8 542.801C207.8 542.801 214.2 530.601 209.4 523.601C209.4 523.601 212 520.201 211.8 510.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M192.6 542.401C192.6 542.401 191.6 526.801 193.4 524.601C193.4 524.601 193.6 518.201 193.2 517.201C193.2 517.201 197.2 511.001 197.4 518.401C197.4 518.401 198.8 526.201 201.6 530.801C201.6 530.801 205.2 536.201 205 542.601C205 542.601 195 512.401 192.6 542.401z"/> - </g> - <g style="fill: #cccccc"> - <path d="M189 514.801C189 514.801 182.4 525.601 180.6 544.601C180.6 544.601 179.2 538.401 183 524.001C183 524.001 187.2 508.601 189 514.801z"/> - </g> - <g style="fill: #cccccc"> - <path d="M167.2 534.601C167.2 534.601 172.2 529.201 173.6 524.201C173.6 524.201 177.2 508.401 170.8 517.001C170.8 517.001 171 525.001 162.8 532.401C162.8 532.401 167.6 530.001 167.2 534.601z"/> - </g> - <g style="fill: #cccccc"> - <path d="M161.4 529.601C161.4 529.601 164.8 512.201 165.6 511.401C165.6 511.401 167.4 508.001 164.6 511.201C164.6 511.201 155.8 530.401 151.8 537.001C151.8 537.001 159.8 527.801 161.4 529.601z"/> - </g> - <g style="fill: #cccccc"> - <path d="M155.6 513.001C155.6 513.001 167.2 490.601 145.4 516.401C145.4 516.401 156.4 506.601 155.6 513.001z"/> - </g> - <g style="fill: #cccccc"> - <path d="M140.2 498.401C140.2 498.401 145 479.601 147.6 479.801C147.6 479.801 155.8 470.801 149.2 481.401C149.2 481.401 143.2 491.001 143.8 500.801C143.8 500.801 143.2 491.201 140.2 498.401z"/> - </g> - <g style="fill: #cccccc"> - <path d="M470.5 487C470.5 487 458.5 477 456 473.5C456 473.5 469.5 492 469.5 499C469.5 499 472 491.5 470.5 487z"/> - </g> - <g style="fill: #cccccc"> - <path d="M476 465C476 465 455 450 451.5 442.5C451.5 442.5 478 472 478 476.5C478 476.5 478.5 467.5 476 465z"/> - </g> - <g style="fill: #cccccc"> - <path d="M493 311C493 311 481 303 479.5 305C479.5 305 490 311.5 492.5 320C492.5 320 491 311 493 311z"/> - </g> - <g style="fill: #cccccc"> - <path d="M501.5 391.5L484 379.5C484 379.5 503 396.5 503.5 400.5L501.5 391.5z"/> - </g> - <g style="stroke:#000000"> - <path d="M110.75 369L132.75 373.75"/> - </g> - <g style="stroke:#000000"> - <path d="M161 531C161 531 160.5 527.5 151.5 538"/> - </g> - <g style="stroke:#000000"> - <path d="M166.5 536C166.5 536 168.5 529.5 162 534"/> - </g> - <g style="stroke:#000000"> - <path d="M220.5 544.5C220.5 544.5 222 533.5 210.5 546.5"/> - </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M77.696 284.285C77.696 284.285 77.797 286.179 76.973 286.16C76.149 286.141 59.695 238.066 39.167 240.309C39.167 240.309 56.95 232.956 77.696 284.285z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M81.226 281.262C81.226 281.262 80.677 283.078 79.908 282.779C79.14 282.481 80.023 231.675 59.957 226.801C59.957 226.801 79.18 225.937 81.226 281.262z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M108.716 323.59C108.716 323.59 110.352 324.55 109.882 325.227C109.411 325.904 60.237 313.102 50.782 331.459C50.782 331.459 54.461 312.572 108.716 323.59z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M105.907 333.801C105.907 333.801 107.763 334.197 107.529 334.988C107.296 335.779 56.593 339.121 53.403 359.522C53.403 359.522 50.945 340.437 105.907 333.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M101.696 328.276C101.696 328.276 103.474 328.939 103.128 329.687C102.782 330.435 52.134 326.346 46.002 346.064C46.002 346.064 46.354 326.825 101.696 328.276z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M90.991 310.072C90.991 310.072 92.299 311.446 91.66 311.967C91.021 312.488 47.278 286.634 33.131 301.676C33.131 301.676 41.872 284.533 90.991 310.072z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M83.446 314.263C83.446 314.263 84.902 315.48 84.326 316.071C83.75 316.661 37.362 295.922 25.008 312.469C25.008 312.469 31.753 294.447 83.446 314.263z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M80.846 318.335C80.846 318.335 82.454 319.343 81.964 320.006C81.474 320.669 32.692 306.446 22.709 324.522C22.709 324.522 26.934 305.749 80.846 318.335z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M91.58 318.949C91.58 318.949 92.702 320.48 92.001 320.915C91.3 321.35 51.231 290.102 35.273 303.207C35.273 303.207 46.138 287.326 91.58 318.949z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M71.8 290C71.8 290 72.4 291.8 71.6 292C70.8 292.2 42.2 250.2 22.999 257.8C22.999 257.8 38.2 246 71.8 290z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M72.495 296.979C72.495 296.979 73.47 298.608 72.731 298.975C71.993 299.343 35.008 264.499 17.899 276.061C17.899 276.061 30.196 261.261 72.495 296.979z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.172"> + <path d="M72.38 301.349C72.38 301.349 73.502 302.88 72.801 303.315C72.1 303.749 32.031 272.502 16.073 285.607C16.073 285.607 26.938 269.726 72.38 301.349z"/> + </g> + <g style="fill: #ffffff; stroke:#000000"> + <path d="M70.17 303.065C70.673 309.113 71.661 315.682 73.4 318.801C73.4 318.801 69.8 331.201 78.6 344.401C78.6 344.401 78.2 351.601 79.8 354.801C79.8 354.801 83.8 363.201 88.6 364.001C92.484 364.648 101.207 367.717 111.068 369.121C111.068 369.121 128.2 383.201 125 396.001C125 396.001 124.6 412.401 121 414.001C121 414.001 132.6 402.801 123 419.601L118.6 438.401C118.6 438.401 144.2 416.801 128.6 435.201L118.6 461.201C118.6 461.201 138.2 442.801 131 451.201L127.8 460.001C127.8 460.001 171 432.801 140.2 462.401C140.2 462.401 148.2 458.801 152.6 461.601C152.6 461.601 159.4 460.401 158.6 462.001C158.6 462.001 137.8 472.401 134.2 490.801C134.2 490.801 142.6 480.801 139.4 491.601L139.8 503.201C139.8 503.201 143.8 481.601 143.4 519.201C143.4 519.201 162.6 501.201 151 522.001L151 538.801C151 538.801 166.2 522.401 159.8 535.201C159.8 535.201 169.8 526.401 165.8 541.601C165.8 541.601 165 552.001 169.4 540.801C169.4 540.801 185.4 510.201 179.4 536.401C179.4 536.401 178.6 555.601 183.4 540.801C183.4 540.801 183.8 551.201 193 558.401C193 558.401 191.8 507.601 204.6 543.601L208.6 560.001C208.6 560.001 211.4 550.801 211 545.601C211 545.601 225.8 529.201 219 553.601C219 553.601 234.2 530.801 231 544.001C231 544.001 223.4 560.001 225 564.801C225 564.801 241.8 530.001 243 528.401C243 528.401 241 570.802 251.8 534.801C251.8 534.801 257.4 546.801 254.6 551.201C254.6 551.201 262.6 543.201 261.8 540.001C261.8 540.001 266.4 531.801 269.2 545.401C269.2 545.401 271 554.801 272.6 551.601C272.6 551.601 276.6 575.602 277.8 552.801C277.8 552.801 279.4 539.201 272.2 527.601C272.2 527.601 273 524.401 270.2 520.401C270.2 520.401 283.8 542.001 276.6 513.201C276.6 513.201 287.801 521.201 289.001 521.201C289.001 521.201 275.4 498.001 284.2 502.801C284.2 502.801 279 492.401 297.001 504.401C297.001 504.401 281 488.401 298.601 498.001C298.601 498.001 306.601 504.401 299.001 494.401C299.001 494.401 284.6 478.401 306.601 496.401C306.601 496.401 318.201 512.801 319.001 515.601C319.001 515.601 309.001 486.401 304.601 483.601C304.601 483.601 313.001 447.201 354.201 462.801C354.201 462.801 361.001 480.001 365.401 461.601C365.401 461.601 378.201 455.201 389.401 482.801C389.401 482.801 393.401 469.201 392.601 466.401C392.601 466.401 399.401 467.601 398.601 466.401C398.601 466.401 411.801 470.801 413.001 470.001C413.001 470.001 419.801 476.801 420.201 473.201C420.201 473.201 429.401 476.001 427.401 472.401C427.401 472.401 436.201 488.001 436.601 491.601L439.001 477.601L441.001 480.401C441.001 480.401 442.601 472.801 441.801 471.601C441.001 470.401 461.801 478.401 466.601 499.201L468.601 507.601C468.601 507.601 474.601 492.801 473.001 488.801C473.001 488.801 478.201 489.601 478.601 494.001C478.601 494.001 482.601 470.801 477.801 464.801C477.801 464.801 482.201 464.001 483.401 467.601L483.401 460.401C483.401 460.401 490.601 461.201 490.601 458.801C490.601 458.801 495.001 454.801 497.001 459.601C497.001 459.601 484.601 424.401 503.001 443.601C503.001 443.601 510.201 454.401 506.601 435.601C503.001 416.801 499.001 415.201 503.801 414.801C503.801 414.801 504.601 411.201 502.601 409.601C500.601 408.001 503.801 409.601 503.801 409.601C503.801 409.601 508.601 413.601 503.401 391.601C503.401 391.601 509.801 393.201 497.801 364.001C497.801 364.001 500.601 361.601 496.601 353.201C496.601 353.201 504.601 357.601 507.401 356.001C507.401 356.001 507.001 354.401 503.801 350.401C503.801 350.401 482.201 295.6 502.601 317.601C502.601 317.601 514.451 331.151 508.051 308.351C508.051 308.351 498.94 284.341 499.717 280.045L70.17 303.065z"/> + </g> + <g style="fill: #cc7226; stroke:#000000"> + <path d="M499.717 280.245C500.345 280.426 502.551 281.55 503.801 283.2C503.801 283.2 510.601 294 505.401 275.6C505.401 275.6 496.201 246.8 505.001 258C505.001 258 511.001 265.2 507.801 251.6C503.936 235.173 501.401 228.8 501.401 228.8C501.401 228.8 513.001 233.6 486.201 194L495.001 197.6C495.001 197.6 475.401 158 453.801 152.8L445.801 146.8C445.801 146.8 484.201 108.8 471.401 72C471.401 72 464.601 66.8 455.001 76C455.001 76 448.601 80.8 442.601 79.2C442.601 79.2 411.801 80.4 409.801 80.4C407.801 80.4 373.001 43.2 307.401 60.8C307.401 60.8 302.201 62.8 297.801 61.6C297.801 61.6 279.4 45.6 230.6 68.4C230.6 68.4 220.6 70.4 219 70.4C217.4 70.4 214.6 70.4 206.6 76.8C198.6 83.2 198.2 84 196.2 85.6C196.2 85.6 179.8 96.8 175 97.6C175 97.6 163.4 104 159 114L155.4 115.2C155.4 115.2 153.8 122.4 153.4 123.6C153.4 123.6 148.6 127.2 147.8 132.8C147.8 132.8 139 138.8 139.4 143.2C139.4 143.2 137.8 148.4 137 153.2C137 153.2 129.8 158 130.6 160.8C130.6 160.8 123 174.8 124.2 181.6C124.2 181.6 117.8 181.2 115 183.6C115 183.6 114.2 188.4 112.6 188.8C112.6 188.8 109.8 190 112.2 194C112.2 194 110.6 196.8 110.2 198.4C110.2 198.4 111 201.2 106.6 206.8C106.6 206.8 100.2 225.6 102.2 230.8C102.2 230.8 102.6 235.6 99.8 237.2C99.8 237.2 96.2 236.8 104.6 248.8C104.6 248.8 105.4 250 102.2 252.4C102.2 252.4 85 256 82.6 272.4C82.6 272.4 69 287.2 69 292.4C69 294.705 69.271 297.852 69.97 302.465C69.97 302.465 69.4 310.801 97 311.601C124.6 312.401 499.717 280.245 499.717 280.245z"/> + </g> + <g style="fill: #cc7226"> + <path d="M84.4 302.6C59.4 263.2 73.8 319.601 73.8 319.601C82.6 354.001 212.2 316.401 212.2 316.401C212.2 316.401 381.001 286 392.201 282C403.401 278 498.601 284.4 498.601 284.4L493.001 267.6C428.201 221.2 409.001 244.4 395.401 240.4C381.801 236.4 384.201 246 381.001 246.8C377.801 247.6 338.601 222.8 332.201 223.6C325.801 224.4 300.459 200.649 315.401 232.4C331.401 266.4 257 271.6 240.2 260.4C223.4 249.2 247.4 278.8 247.4 278.8C265.8 298.8 231.4 282 231.4 282C197 269.2 173 294.8 169.8 295.6C166.6 296.4 161.8 299.6 161 293.2C160.2 286.8 152.69 270.099 121 296.4C101 313.001 87.2 291 87.2 291L84.4 302.6z"/> + </g> + <g style="fill: #e87f3a"> + <path d="M333.51 225.346C327.11 226.146 301.743 202.407 316.71 234.146C333.31 269.346 258.31 273.346 241.51 262.146C224.709 250.946 248.71 280.546 248.71 280.546C267.11 300.546 232.709 283.746 232.709 283.746C198.309 270.946 174.309 296.546 171.109 297.346C167.909 298.146 163.109 301.346 162.309 294.946C161.509 288.546 154.13 272.012 122.309 298.146C101.073 315.492 87.582 294.037 87.582 294.037L84.382 304.146C59.382 264.346 74.454 322.655 74.454 322.655C83.255 357.056 213.509 318.146 213.509 318.146C213.509 318.146 382.31 287.746 393.51 283.746C404.71 279.746 499.038 286.073 499.038 286.073L493.51 268.764C428.71 222.364 410.31 246.146 396.71 242.146C383.11 238.146 385.51 247.746 382.31 248.546C379.11 249.346 339.91 224.546 333.51 225.346z"/> + </g> + <g style="fill: #ea8c4d"> + <path d="M334.819 227.091C328.419 227.891 303.685 203.862 318.019 235.891C334.219 272.092 259.619 275.092 242.819 263.892C226.019 252.692 250.019 282.292 250.019 282.292C268.419 302.292 234.019 285.492 234.019 285.492C199.619 272.692 175.618 298.292 172.418 299.092C169.218 299.892 164.418 303.092 163.618 296.692C162.818 290.292 155.57 273.925 123.618 299.892C101.145 317.983 87.964 297.074 87.964 297.074L84.364 305.692C60.564 266.692 75.109 325.71 75.109 325.71C83.909 360.11 214.819 319.892 214.819 319.892C214.819 319.892 383.619 289.492 394.819 285.492C406.019 281.492 499.474 287.746 499.474 287.746L494.02 269.928C429.219 223.528 411.619 247.891 398.019 243.891C384.419 239.891 386.819 249.491 383.619 250.292C380.419 251.092 341.219 226.291 334.819 227.091z"/> + </g> + <g style="fill: #ec9961"> + <path d="M336.128 228.837C329.728 229.637 304.999 205.605 319.328 237.637C336.128 275.193 260.394 276.482 244.128 265.637C227.328 254.437 251.328 284.037 251.328 284.037C269.728 304.037 235.328 287.237 235.328 287.237C200.928 274.437 176.928 300.037 173.728 300.837C170.528 301.637 165.728 304.837 164.928 298.437C164.128 292.037 157.011 275.839 124.927 301.637C101.218 320.474 88.345 300.11 88.345 300.11L84.345 307.237C62.545 270.437 75.764 328.765 75.764 328.765C84.564 363.165 216.128 321.637 216.128 321.637C216.128 321.637 384.928 291.237 396.129 287.237C407.329 283.237 499.911 289.419 499.911 289.419L494.529 271.092C429.729 224.691 412.929 249.637 399.329 245.637C385.728 241.637 388.128 251.237 384.928 252.037C381.728 252.837 342.528 228.037 336.128 228.837z"/> + </g> + <g style="fill: #eea575"> + <path d="M337.438 230.583C331.037 231.383 306.814 207.129 320.637 239.383C337.438 278.583 262.237 278.583 245.437 267.383C228.637 256.183 252.637 285.783 252.637 285.783C271.037 305.783 236.637 288.983 236.637 288.983C202.237 276.183 178.237 301.783 175.037 302.583C171.837 303.383 167.037 306.583 166.237 300.183C165.437 293.783 158.452 277.752 126.237 303.383C101.291 322.965 88.727 303.146 88.727 303.146L84.327 308.783C64.527 273.982 76.418 331.819 76.418 331.819C85.218 366.22 217.437 323.383 217.437 323.383C217.437 323.383 386.238 292.983 397.438 288.983C408.638 284.983 500.347 291.092 500.347 291.092L495.038 272.255C430.238 225.855 414.238 251.383 400.638 247.383C387.038 243.383 389.438 252.983 386.238 253.783C383.038 254.583 343.838 229.783 337.438 230.583z"/> + </g> + <g style="fill: #f1b288"> + <path d="M338.747 232.328C332.347 233.128 306.383 209.677 321.947 241.128C341.147 279.928 263.546 280.328 246.746 269.128C229.946 257.928 253.946 287.528 253.946 287.528C272.346 307.528 237.946 290.728 237.946 290.728C203.546 277.928 179.546 303.528 176.346 304.328C173.146 305.128 168.346 308.328 167.546 301.928C166.746 295.528 159.892 279.665 127.546 305.128C101.364 325.456 89.109 306.183 89.109 306.183L84.309 310.328C66.309 277.128 77.073 334.874 77.073 334.874C85.873 369.274 218.746 325.128 218.746 325.128C218.746 325.128 387.547 294.728 398.747 290.728C409.947 286.728 500.783 292.764 500.783 292.764L495.547 273.419C430.747 227.019 415.547 253.128 401.947 249.128C388.347 245.128 390.747 254.728 387.547 255.528C384.347 256.328 345.147 231.528 338.747 232.328z"/> + </g> + <g style="fill: #f3bf9c"> + <path d="M340.056 234.073C333.655 234.873 307.313 211.613 323.255 242.873C343.656 282.874 264.855 282.074 248.055 270.874C231.255 259.674 255.255 289.274 255.255 289.274C273.655 309.274 239.255 292.474 239.255 292.474C204.855 279.674 180.855 305.274 177.655 306.074C174.455 306.874 169.655 310.074 168.855 303.674C168.055 297.274 161.332 281.578 128.855 306.874C101.436 327.947 89.491 309.219 89.491 309.219L84.291 311.874C68.291 281.674 77.727 337.929 77.727 337.929C86.527 372.329 220.055 326.874 220.055 326.874C220.055 326.874 388.856 296.474 400.056 292.474C411.256 288.474 501.22 294.437 501.22 294.437L496.056 274.583C431.256 228.183 416.856 254.874 403.256 250.874C389.656 246.873 392.056 256.474 388.856 257.274C385.656 258.074 346.456 233.273 340.056 234.073z"/> + </g> + <g style="fill: #f5ccb0"> + <path d="M341.365 235.819C334.965 236.619 307.523 213.944 324.565 244.619C346.565 284.219 266.164 283.819 249.364 272.619C232.564 261.419 256.564 291.019 256.564 291.019C274.964 311.019 240.564 294.219 240.564 294.219C206.164 281.419 182.164 307.019 178.964 307.819C175.764 308.619 170.964 311.819 170.164 305.419C169.364 299.019 162.773 283.492 130.164 308.619C101.509 330.438 89.873 312.256 89.873 312.256L84.273 313.419C69.872 285.019 78.382 340.983 78.382 340.983C87.182 375.384 221.364 328.619 221.364 328.619C221.364 328.619 390.165 298.219 401.365 294.219C412.565 290.219 501.656 296.11 501.656 296.11L496.565 275.746C431.765 229.346 418.165 256.619 404.565 252.619C390.965 248.619 393.365 258.219 390.165 259.019C386.965 259.819 347.765 235.019 341.365 235.819z"/> + </g> + <g style="fill: #f8d8c4"> + <path d="M342.674 237.565C336.274 238.365 308.832 215.689 325.874 246.365C347.874 285.965 267.474 285.565 250.674 274.365C233.874 263.165 257.874 292.765 257.874 292.765C276.274 312.765 241.874 295.965 241.874 295.965C207.473 283.165 183.473 308.765 180.273 309.565C177.073 310.365 172.273 313.565 171.473 307.165C170.673 300.765 164.214 285.405 131.473 310.365C101.582 332.929 90.255 315.293 90.255 315.293L84.255 314.965C70.654 288.564 79.037 344.038 79.037 344.038C87.837 378.438 222.673 330.365 222.673 330.365C222.673 330.365 391.474 299.965 402.674 295.965C413.874 291.965 502.093 297.783 502.093 297.783L497.075 276.91C432.274 230.51 419.474 258.365 405.874 254.365C392.274 250.365 394.674 259.965 391.474 260.765C388.274 261.565 349.074 236.765 342.674 237.565z"/> + </g> + <g style="fill: #fae5d7"> + <path d="M343.983 239.31C337.583 240.11 310.529 217.223 327.183 248.11C349.183 288.91 268.783 287.31 251.983 276.11C235.183 264.91 259.183 294.51 259.183 294.51C277.583 314.51 243.183 297.71 243.183 297.71C208.783 284.91 184.783 310.51 181.583 311.31C178.382 312.11 173.582 315.31 172.782 308.91C171.982 302.51 165.654 287.318 132.782 312.11C101.655 335.42 90.637 318.329 90.637 318.329L84.236 316.51C71.236 292.51 79.691 347.093 79.691 347.093C88.491 381.493 223.983 332.11 223.983 332.11C223.983 332.11 392.783 301.71 403.983 297.71C415.183 293.71 502.529 299.456 502.529 299.456L497.583 278.074C432.783 231.673 420.783 260.11 407.183 256.11C393.583 252.11 395.983 261.71 392.783 262.51C389.583 263.31 350.383 238.51 343.983 239.31z"/> + </g> + <g style="fill: #fcf2eb"> + <path d="M345.292 241.055C338.892 241.855 312.917 218.411 328.492 249.855C349.692 292.656 270.092 289.056 253.292 277.856C236.492 266.656 260.492 296.256 260.492 296.256C278.892 316.256 244.492 299.456 244.492 299.456C210.092 286.656 186.092 312.256 182.892 313.056C179.692 313.856 174.892 317.056 174.092 310.656C173.292 304.256 167.095 289.232 134.092 313.856C101.727 337.911 91.018 321.365 91.018 321.365L84.218 318.056C71.418 294.856 80.346 350.147 80.346 350.147C89.146 384.547 225.292 333.856 225.292 333.856C225.292 333.856 394.093 303.456 405.293 299.456C416.493 295.456 502.965 301.128 502.965 301.128L498.093 279.237C433.292 232.837 422.093 261.856 408.493 257.856C394.893 253.855 397.293 263.456 394.093 264.256C390.892 265.056 351.692 240.255 345.292 241.055z"/> + </g> + <g style="fill: #ffffff"> + <path d="M84.2 319.601C71.4 297.6 81 353.201 81 353.201C89.8 387.601 226.6 335.601 226.6 335.601C226.6 335.601 395.401 305.2 406.601 301.2C417.801 297.2 503.401 302.8 503.401 302.8L498.601 280.4C433.801 234 423.401 263.6 409.801 259.6C396.201 255.6 398.601 265.2 395.401 266C392.201 266.8 353.001 242 346.601 242.8C340.201 243.6 314.981 219.793 329.801 251.6C352.028 299.307 269.041 289.227 254.6 279.6C237.8 268.4 261.8 298 261.8 298C280.2 318.001 245.8 301.2 245.8 301.2C211.4 288.4 187.4 314.001 184.2 314.801C181 315.601 176.2 318.801 175.4 312.401C174.6 306 168.535 291.144 135.4 315.601C101.8 340.401 91.4 324.401 91.4 324.401L84.2 319.601z"/> + </g> + <g style="fill: #000000"> + <path d="M125.8 349.601C125.8 349.601 118.6 361.201 139.4 374.401C139.4 374.401 140.8 375.801 122.8 371.601C122.8 371.601 116.6 369.601 115 359.201C115 359.201 110.2 354.801 105.4 349.201C100.6 343.601 125.8 349.601 125.8 349.601z"/> + </g> + <g style="fill: #cccccc"> + <path d="M265.8 302C265.8 302 283.498 328.821 282.9 333.601C281.6 344.001 281.4 353.601 284.6 357.601C287.801 361.601 296.601 394.801 296.601 394.801C296.601 394.801 296.201 396.001 308.601 358.001C308.601 358.001 320.201 342.001 300.201 323.601C300.201 323.601 265 294.8 265.8 302z"/> + </g> + <g style="fill: #000000"> + <path d="M145.8 376.401C145.8 376.401 157 383.601 142.6 414.801L149 412.401C149 412.401 148.2 423.601 145 426.001L152.2 422.801C152.2 422.801 157 430.801 153 435.601C153 435.601 169.8 443.601 169 450.001C169 450.001 175.4 442.001 171.4 435.601C167.4 429.201 160.2 433.201 161 414.801L152.2 418.001C152.2 418.001 157.8 409.201 157.8 402.801L149.8 405.201C149.8 405.201 165.269 378.623 154.6 377.201C148.6 376.401 145.8 376.401 145.8 376.401z"/> + </g> + <g style="fill: #cccccc"> + <path d="M178.2 393.201C178.2 393.201 181 388.801 178.2 389.601C175.4 390.401 144.2 405.201 138.2 414.801C138.2 414.801 172.6 390.401 178.2 393.201z"/> + </g> + <g style="fill: #cccccc"> + <path d="M188.6 401.201C188.6 401.201 191.4 396.801 188.6 397.601C185.8 398.401 154.6 413.201 148.6 422.801C148.6 422.801 183 398.401 188.6 401.201z"/> + </g> + <g style="fill: #cccccc"> + <path d="M201.8 386.001C201.8 386.001 204.6 381.601 201.8 382.401C199 383.201 167.8 398.001 161.8 407.601C161.8 407.601 196.2 383.201 201.8 386.001z"/> + </g> + <g style="fill: #cccccc"> + <path d="M178.6 429.601C178.6 429.601 178.6 423.601 175.8 424.401C173 425.201 137 442.801 131 452.401C131 452.401 173 426.801 178.6 429.601z"/> + </g> + <g style="fill: #cccccc"> + <path d="M179.8 418.801C179.8 418.801 181 414.001 178.2 414.801C176.2 414.801 149.8 426.401 143.8 436.001C143.8 436.001 173.4 414.401 179.8 418.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M165.4 466.401L155.4 474.001C155.4 474.001 165.8 466.401 169.4 467.601C169.4 467.601 162.6 478.801 161.8 484.001C161.8 484.001 172.2 471.201 177.8 471.601C177.8 471.601 185.4 472.001 185.4 482.801C185.4 482.801 191 472.401 194.2 472.801C194.2 472.801 195.4 479.201 194.2 486.001C194.2 486.001 198.2 478.401 202.2 480.001C202.2 480.001 208.6 478.001 207.8 489.601C207.8 489.601 207.8 500.001 207 502.801C207 502.801 212.6 476.401 215 476.001C215 476.001 223 474.801 227.8 483.601C227.8 483.601 223.8 476.001 228.6 478.001C228.6 478.001 239.4 479.601 242.6 486.401C242.6 486.401 235.8 474.401 241.4 477.601C241.4 477.601 248.2 477.601 249.4 484.001C249.4 484.001 257.8 505.201 259.8 506.801C259.8 506.801 252.2 485.201 253.8 485.201C253.8 485.201 251.8 473.201 257 488.001C257 488.001 253.8 474.001 259.4 474.801C265 475.601 269.4 485.601 277.8 483.201C277.8 483.201 287.401 488.801 289.401 419.601L165.4 466.401z"/> + </g> + <g style="fill: #000000"> + <path d="M170.2 373.601C170.2 373.601 185 367.601 225 373.601C225 373.601 232.2 374.001 239 365.201C245.8 356.401 272.6 349.201 279 351.201L288.601 357.601L289.401 358.801C289.401 358.801 301.801 369.201 302.201 376.801C302.601 384.401 287.801 432.401 278.2 448.401C268.6 464.401 259 476.801 239.8 474.401C239.8 474.401 219 470.401 193.4 474.401C193.4 474.401 164.2 472.801 161.4 464.801C158.6 456.801 172.6 441.601 172.6 441.601C172.6 441.601 177 433.201 175.8 418.801C174.6 404.401 175 376.401 170.2 373.601z"/> + </g> + <g style="fill: #e5668c"> + <path d="M192.2 375.601C200.6 394.001 171 459.201 171 459.201C169 460.801 183.66 466.846 193.8 464.401C204.746 461.763 245 466.001 245 466.001C268.6 450.401 281.4 406.001 281.4 406.001C281.4 406.001 291.801 382.001 274.2 378.801C256.6 375.601 192.2 375.601 192.2 375.601z"/> + </g> + <g style="fill: #b23259"> + <path d="M190.169 406.497C193.495 393.707 195.079 381.906 192.2 375.601C192.2 375.601 254.6 382.001 265.8 361.201C270.041 353.326 284.801 384.001 284.4 393.601C284.4 393.601 221.4 408.001 206.6 396.801L190.169 406.497z"/> + </g> + <g style="fill: #a5264c"> + <path d="M194.6 422.801C194.6 422.801 196.6 430.001 194.2 434.001C194.2 434.001 192.6 434.801 191.4 435.201C191.4 435.201 192.6 438.801 198.6 440.401C198.6 440.401 200.6 444.801 203 445.201C205.4 445.601 210.2 451.201 214.2 450.001C218.2 448.801 229.4 444.801 229.4 444.801C229.4 444.801 235 441.601 243.8 445.201C243.8 445.201 246.175 444.399 246.6 440.401C247.1 435.701 250.2 432.001 252.2 430.001C254.2 428.001 263.8 415.201 262.6 414.801C261.4 414.401 194.6 422.801 194.6 422.801z"/> + </g> + <g style="fill: #ff727f; stroke:#000000"> + <path d="M190.2 374.401C190.2 374.401 187.4 396.801 190.6 405.201C193.8 413.601 193 415.601 192.2 419.601C191.4 423.601 195.8 433.601 201.4 439.601L213.4 441.201C213.4 441.201 228.6 437.601 237.8 440.401C237.8 440.401 246.794 441.744 250.2 426.801C250.2 426.801 255 420.401 262.2 417.601C269.4 414.801 276.6 373.201 272.6 365.201C268.6 357.201 254.2 352.801 238.2 368.401C222.2 384.001 220.2 367.201 190.2 374.401z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M191.8 449.201C191.8 449.201 191 447.201 186.6 446.801C186.6 446.801 164.2 443.201 155.8 430.801C155.8 430.801 149 425.201 153.4 436.801C153.4 436.801 163.8 457.201 170.6 460.001C170.6 460.001 187 464.001 191.8 449.201z"/> + </g> + <g style="fill: #cc3f4c"> + <path d="M271.742 385.229C272.401 377.323 274.354 368.709 272.6 365.201C266.154 352.307 249.181 357.695 238.2 368.401C222.2 384.001 220.2 367.201 190.2 374.401C190.2 374.401 188.455 388.364 189.295 398.376C189.295 398.376 226.6 386.801 227.4 392.401C227.4 392.401 229 389.201 238.2 389.201C247.4 389.201 270.142 388.029 271.742 385.229z"/> + </g> + <g style="stroke:#a51926; stroke-width:2"> + <path d="M228.6 375.201C228.6 375.201 233.4 380.001 229.8 389.601C229.8 389.601 215.4 405.601 217.4 419.601"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M180.6 460.001C180.6 460.001 176.2 447.201 185 454.001C185 454.001 189.8 456.001 188.6 457.601C187.4 459.201 181.8 463.201 180.6 460.001z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M185.64 461.201C185.64 461.201 182.12 450.961 189.16 456.401C189.16 456.401 193.581 458.849 192.04 459.281C187.48 460.561 192.04 463.121 185.64 461.201z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M190.44 461.201C190.44 461.201 186.92 450.961 193.96 456.401C193.96 456.401 198.335 458.711 196.84 459.281C193.48 460.561 196.84 463.121 190.44 461.201z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M197.04 461.401C197.04 461.401 193.52 451.161 200.56 456.601C200.56 456.601 204.943 458.933 203.441 459.481C200.48 460.561 203.441 463.321 197.04 461.401z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M203.52 461.321C203.52 461.321 200 451.081 207.041 456.521C207.041 456.521 210.881 458.121 209.921 459.401C208.961 460.681 209.921 463.241 203.52 461.321z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M210.2 462.001C210.2 462.001 205.4 449.601 214.6 456.001C214.6 456.001 219.4 458.001 218.2 459.601C217 461.201 218.2 464.401 210.2 462.001z"/> + </g> + <g style="stroke:#a5264c; stroke-width:2"> + <path d="M181.8 444.801C181.8 444.801 195 442.001 201 445.201C201 445.201 207 446.401 208.2 446.001C209.4 445.601 212.6 445.201 212.6 445.201"/> + </g> + <g style="stroke:#a5264c; stroke-width:2"> + <path d="M215.8 453.601C215.8 453.601 227.8 440.001 239.8 444.401C246.816 446.974 245.8 443.601 246.6 440.801C247.4 438.001 247.6 433.801 252.6 430.801"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M233 437.601C233 437.601 229 426.801 226.2 439.601C223.4 452.401 220.2 456.001 218.6 458.801C218.6 458.801 218.6 464.001 227 463.601C227 463.601 237.8 463.201 238.2 460.401C238.6 457.601 237 446.001 233 437.601z"/> + </g> + <g style="stroke:#a5264c; stroke-width:2"> + <path d="M247 444.801C247 444.801 250.6 442.401 253 443.601"/> + </g> + <g style="stroke:#a5264c; stroke-width:2"> + <path d="M253.5 428.401C253.5 428.401 256.4 423.501 261.2 422.701"/> + </g> + <g style="fill: #b2b2b2"> + <path d="M174.2 465.201C174.2 465.201 192.2 468.401 196.6 466.801C196.6 466.801 205.4 466.801 197 468.801C197 468.801 184.2 468.801 176.2 467.601C176.2 467.601 164.6 462.001 174.2 465.201z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M188.2 372.001C188.2 372.001 205.8 372.001 207.8 372.801C207.8 372.801 215 403.601 211.4 411.201C211.4 411.201 210.2 414.001 207.4 408.401C207.4 408.401 189 375.601 185.8 373.601C182.6 371.601 187 372.001 188.2 372.001z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M111.1 369.301C111.1 369.301 120 371.001 132.6 373.601C132.6 373.601 137.4 396.001 140.6 400.801C143.8 405.601 140.2 405.601 136.6 402.801C133 400.001 118.2 386.001 116.2 381.601C114.2 377.201 111.1 369.301 111.1 369.301z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M132.961 373.818C132.961 373.818 138.761 375.366 139.77 377.581C140.778 379.795 138.568 383.092 138.568 383.092C138.568 383.092 137.568 386.397 136.366 384.235C135.164 382.072 132.292 374.412 132.961 373.818z"/> + </g> + <g style="fill: #000000"> + <path d="M133 373.601C133 373.601 136.6 378.801 140.2 378.801C143.8 378.801 144.182 378.388 147 379.001C151.6 380.001 151.2 378.001 157.8 379.201C160.44 379.681 163 378.801 165.8 380.001C168.6 381.201 171.8 380.401 173 378.401C174.2 376.401 179 372.201 179 372.201C179 372.201 166.2 374.001 163.4 374.801C163.4 374.801 141 376.001 133 373.601z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M177.6 373.801C177.6 373.801 171.15 377.301 170.75 379.701C170.35 382.101 176 385.801 176 385.801C176 385.801 178.75 390.401 179.35 388.001C179.95 385.601 178.4 374.201 177.6 373.801z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M140.115 379.265C140.115 379.265 147.122 390.453 147.339 379.242C147.339 379.242 147.896 377.984 146.136 377.962C140.061 377.886 141.582 373.784 140.115 379.265z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M147.293 379.514C147.293 379.514 155.214 390.701 154.578 379.421C154.578 379.421 154.585 379.089 152.832 378.936C148.085 378.522 148.43 374.004 147.293 379.514z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M154.506 379.522C154.506 379.522 162.466 390.15 161.797 380.484C161.797 380.484 161.916 379.251 160.262 378.95C156.37 378.244 156.159 374.995 154.506 379.522z"/> + </g> + <g style="fill: #ffffcc; stroke:#000000; stroke-width:0.5"> + <path d="M161.382 379.602C161.382 379.602 169.282 391.163 169.63 381.382C169.63 381.382 171.274 380.004 169.528 379.782C163.71 379.042 164.508 374.588 161.382 379.602z"/> + </g> + <g style="fill: #e5e5b2"> + <path d="M125.208 383.132L117.55 381.601C114.95 376.601 112.85 370.451 112.85 370.451C112.85 370.451 119.2 371.451 131.7 374.251C131.7 374.251 132.576 377.569 134.048 383.364L125.208 383.132z"/> + </g> + <g style="fill: #e5e5b2"> + <path d="M190.276 378.47C188.61 375.964 187.293 374.206 186.643 373.8C183.63 371.917 187.773 372.294 188.902 372.294C188.902 372.294 205.473 372.294 207.356 373.047C207.356 373.047 207.88 375.289 208.564 378.68C208.564 378.68 198.476 376.67 190.276 378.47z"/> + </g> + <g style="fill: #cc7226"> + <path d="M243.88 240.321C271.601 244.281 297.121 208.641 298.881 198.96C300.641 189.28 290.521 177.4 290.521 177.4C291.841 174.32 287.001 160.24 281.721 151C276.441 141.76 260.54 142.734 243 141.76C227.16 140.88 208.68 164.2 207.36 165.96C206.04 167.72 212.2 206.001 213.52 211.721C214.84 217.441 212.2 243.841 212.2 243.841C246.44 234.741 216.16 236.361 243.88 240.321z"/> + </g> + <g style="fill: #ea8e51"> + <path d="M208.088 166.608C206.792 168.336 212.84 205.921 214.136 211.537C215.432 217.153 212.84 243.073 212.84 243.073C245.512 234.193 216.728 235.729 243.944 239.617C271.161 243.505 296.217 208.513 297.945 199.008C299.673 189.504 289.737 177.84 289.737 177.84C291.033 174.816 286.281 160.992 281.097 151.92C275.913 142.848 260.302 143.805 243.08 142.848C227.528 141.984 209.384 164.88 208.088 166.608z"/> + </g> + <g style="fill: #efaa7c"> + <path d="M208.816 167.256C207.544 168.952 213.48 205.841 214.752 211.353C216.024 216.865 213.48 242.305 213.48 242.305C244.884 233.145 217.296 235.097 244.008 238.913C270.721 242.729 295.313 208.385 297.009 199.056C298.705 189.728 288.953 178.28 288.953 178.28C290.225 175.312 285.561 161.744 280.473 152.84C275.385 143.936 260.063 144.875 243.16 143.936C227.896 143.088 210.088 165.56 208.816 167.256z"/> + </g> + <g style="fill: #f4c6a8"> + <path d="M209.544 167.904C208.296 169.568 214.12 205.761 215.368 211.169C216.616 216.577 214.12 241.537 214.12 241.537C243.556 232.497 217.864 234.465 244.072 238.209C270.281 241.953 294.409 208.257 296.073 199.105C297.737 189.952 288.169 178.72 288.169 178.72C289.417 175.808 284.841 162.496 279.849 153.76C274.857 145.024 259.824 145.945 243.24 145.024C228.264 144.192 210.792 166.24 209.544 167.904z"/> + </g> + <g style="fill: #f9e2d3"> + <path d="M210.272 168.552C209.048 170.184 214.76 205.681 215.984 210.985C217.208 216.289 214.76 240.769 214.76 240.769C242.628 231.849 218.432 233.833 244.136 237.505C269.841 241.177 293.505 208.129 295.137 199.152C296.769 190.176 287.385 179.16 287.385 179.16C288.609 176.304 284.121 163.248 279.225 154.68C274.329 146.112 259.585 147.015 243.32 146.112C228.632 145.296 211.496 166.92 210.272 168.552z"/> + </g> + <g style="fill: #ffffff"> + <path d="M244.2 236.8C269.4 240.4 292.601 208 294.201 199.2C295.801 190.4 286.601 179.6 286.601 179.6C287.801 176.8 283.4 164 278.6 155.6C273.8 147.2 259.346 148.086 243.4 147.2C229 146.4 212.2 167.6 211 169.2C209.8 170.8 215.4 205.6 216.6 210.8C217.8 216 215.4 240 215.4 240C240.9 231.4 219 233.2 244.2 236.8z"/> + </g> + <g style="fill: #cccccc"> + <path d="M290.601 202.8C290.601 202.8 262.8 210.4 251.2 208.8C251.2 208.8 235.4 202.2 226.6 224C226.6 224 223 231.2 221 233.2C219 235.2 290.601 202.8 290.601 202.8z"/> + </g> + <g style="fill: #000000"> + <path d="M294.401 200.6C294.401 200.6 265.4 212.8 255.4 212.4C255.4 212.4 239 207.8 230.6 222.4C230.6 222.4 222.2 231.6 219 233.2C219 233.2 218.6 234.8 225 230.8L235.4 236C235.4 236 250.2 245.6 259.8 229.6C259.8 229.6 263.8 218.4 263.8 216.4C263.8 214.4 285 208.8 286.601 208.4C288.201 208 294.801 203.8 294.401 200.6z"/> + </g> + <g style="fill: #99cc32"> + <path d="M247 236.514C240.128 236.514 231.755 232.649 231.755 226.4C231.755 220.152 240.128 213.887 247 213.887C253.874 213.887 259.446 218.952 259.446 225.2C259.446 231.449 253.874 236.514 247 236.514z"/> + </g> + <g style="fill: #659900"> + <path d="M243.377 219.83C238.531 220.552 233.442 222.055 233.514 221.839C235.054 217.22 241.415 213.887 247 213.887C251.296 213.887 255.084 215.865 257.32 218.875C257.32 218.875 252.004 218.545 243.377 219.83z"/> + </g> + <g style="fill: #ffffff"> + <path d="M255.4 219.6C255.4 219.6 251 216.4 251 218.6C251 218.6 254.6 223 255.4 219.6z"/> + </g> + <g style="fill: #000000"> + <path d="M245.4 227.726C242.901 227.726 240.875 225.7 240.875 223.2C240.875 220.701 242.901 218.675 245.4 218.675C247.9 218.675 249.926 220.701 249.926 223.2C249.926 225.7 247.9 227.726 245.4 227.726z"/> + </g> + <g style="fill: #cc7226"> + <path d="M141.4 214.4C141.4 214.4 138.2 193.2 140.6 188.8C140.6 188.8 151.4 178.8 151 175.2C151 175.2 150.6 157.2 149.4 156.4C148.2 155.6 140.6 149.6 134.6 156C134.6 156 124.2 174 125 180.4L125 182.4C125 182.4 117.4 182 115.8 184C115.8 184 114.6 189.2 113.4 189.6C113.4 189.6 110.6 192 112.6 194.8C112.6 194.8 110.6 197.2 111 201.2L118.6 205.2C118.6 205.2 120.6 219.6 131.4 224.8C136.236 227.129 139.4 220.4 141.4 214.4z"/> + </g> + <g style="fill: #ffffff"> + <path d="M140.4 212.56C140.4 212.56 137.52 193.48 139.68 189.52C139.68 189.52 149.4 180.52 149.04 177.28C149.04 177.28 148.68 161.08 147.6 160.36C146.52 159.64 139.68 154.24 134.28 160C134.28 160 124.92 176.2 125.64 181.96L125.64 183.76C125.64 183.76 118.8 183.4 117.36 185.2C117.36 185.2 116.28 189.88 115.2 190.24C115.2 190.24 112.68 192.4 114.48 194.92C114.48 194.92 112.68 197.08 113.04 200.68L119.88 204.28C119.88 204.28 121.68 217.24 131.4 221.92C135.752 224.015 138.6 217.96 140.4 212.56z"/> + </g> + <g style="fill: #eb955c"> + <path d="M148.95 157.39C147.86 156.53 140.37 150.76 134.52 157C134.52 157 124.38 174.55 125.16 180.79L125.16 182.74C125.16 182.74 117.75 182.35 116.19 184.3C116.19 184.3 115.02 189.37 113.85 189.76C113.85 189.76 111.12 192.1 113.07 194.83C113.07 194.83 111.12 197.17 111.51 201.07L118.92 204.97C118.92 204.97 120.87 219.01 131.4 224.08C136.114 226.35 139.2 219.79 141.15 213.94C141.15 213.94 138.03 193.27 140.37 188.98C140.37 188.98 150.9 179.23 150.51 175.72C150.51 175.72 150.12 158.17 148.95 157.39z"/> + </g> + <g style="fill: #f2b892"> + <path d="M148.5 158.38C147.52 157.46 140.14 151.92 134.44 158C134.44 158 124.56 175.1 125.32 181.18L125.32 183.08C125.32 183.08 118.1 182.7 116.58 184.6C116.58 184.6 115.44 189.54 114.3 189.92C114.3 189.92 111.64 192.2 113.54 194.86C113.54 194.86 111.64 197.14 112.02 200.94L119.24 204.74C119.24 204.74 121.14 218.42 131.4 223.36C135.994 225.572 139 219.18 140.9 213.48C140.9 213.48 137.86 193.34 140.14 189.16C140.14 189.16 150.4 179.66 150.02 176.24C150.02 176.24 149.64 159.14 148.5 158.38z"/> + </g> + <g style="fill: #f8dcc8"> + <path d="M148.05 159.37C147.18 158.39 139.91 153.08 134.36 159C134.36 159 124.74 175.65 125.48 181.57L125.48 183.42C125.48 183.42 118.45 183.05 116.97 184.9C116.97 184.9 115.86 189.71 114.75 190.08C114.75 190.08 112.16 192.3 114.01 194.89C114.01 194.89 112.16 197.11 112.53 200.81L119.56 204.51C119.56 204.51 121.41 217.83 131.4 222.64C135.873 224.794 138.8 218.57 140.65 213.02C140.65 213.02 137.69 193.41 139.91 189.34C139.91 189.34 149.9 180.09 149.53 176.76C149.53 176.76 149.16 160.11 148.05 159.37z"/> + </g> + <g style="fill: #ffffff"> + <path d="M140.4 212.46C140.4 212.46 137.52 193.48 139.68 189.52C139.68 189.52 149.4 180.52 149.04 177.28C149.04 177.28 148.68 161.08 147.6 160.36C146.84 159.32 139.68 154.24 134.28 160C134.28 160 124.92 176.2 125.64 181.96L125.64 183.76C125.64 183.76 118.8 183.4 117.36 185.2C117.36 185.2 116.28 189.88 115.2 190.24C115.2 190.24 112.68 192.4 114.48 194.92C114.48 194.92 112.68 197.08 113.04 200.68L119.88 204.28C119.88 204.28 121.68 217.24 131.4 221.92C135.752 224.015 138.6 217.86 140.4 212.46z"/> + </g> + <g style="fill: #cccccc"> + <path d="M137.3 206.2C137.3 206.2 115.7 196 114.8 195.2C114.8 195.2 123.9 203.4 124.7 203.4C125.5 203.4 137.3 206.2 137.3 206.2z"/> + </g> + <g style="fill: #000000"> + <path d="M120.2 200C120.2 200 138.6 203.6 138.6 208C138.6 210.912 138.357 224.331 133 222.8C124.6 220.4 128.2 206 120.2 200z"/> + </g> + <g style="fill: #99cc32"> + <path d="M128.6 203.8C128.6 203.8 137.578 205.274 138.6 208C139.2 209.6 139.863 217.908 134.4 219C129.848 219.911 127.618 209.69 128.6 203.8z"/> + </g> + <g style="fill: #000000"> + <path d="M214.595 246.349C214.098 244.607 215.409 244.738 217.2 244.2C219.2 243.6 231.4 239.8 232.2 237.2C233 234.6 246.2 239 246.2 239C248 239.8 252.4 242.4 252.4 242.4C257.2 243.6 263.8 244 263.8 244C266.2 245 269.6 247.8 269.6 247.8C284.2 258 296.601 250.8 296.601 250.8C316.601 244.2 310.601 227 310.601 227C307.601 218 310.801 214.6 310.801 214.6C311.001 210.8 318.201 217.2 318.201 217.2C320.801 221.4 321.601 226.4 321.601 226.4C329.601 237.6 326.201 219.8 326.201 219.8C326.401 218.8 323.601 215.2 323.601 214C323.601 212.8 321.801 209.4 321.801 209.4C318.801 206 321.201 199 321.201 199C323.001 185.2 320.801 187 320.801 187C319.601 185.2 310.401 195.2 310.401 195.2C308.201 198.6 302.201 200.2 302.201 200.2C299.401 202 296.001 200.6 296.001 200.6C293.401 200.2 287.801 207.2 287.801 207.2C290.601 207 293.001 211.4 295.401 211.6C297.801 211.8 299.601 209.2 301.201 208.6C302.801 208 305.601 213.8 305.601 213.8C306.001 216.4 300.401 221.2 300.401 221.2C300.001 225.8 298.401 224.2 298.401 224.2C295.401 223.6 294.201 227.4 293.201 232C292.201 236.6 288.001 237 288.001 237C286.401 244.4 285.2 241.4 285.2 241.4C285 235.8 279 241.6 279 241.6C277.8 243.6 273.2 241.4 273.2 241.4C266.4 239.4 268.8 237.4 268.8 237.4C270.6 235.2 281.8 237.4 281.8 237.4C284 235.8 276 231.8 276 231.8C275.4 230 276.4 225.6 276.4 225.6C277.6 222.4 284.4 216.8 284.4 216.8C293.801 215.6 291.001 214 291.001 214C284.801 208.8 279 216.4 279 216.4C276.8 222.6 259.4 237.6 259.4 237.6C254.6 241 257.2 234.2 253.2 237.6C249.2 241 228.6 232 228.6 232C217.038 230.807 214.306 246.549 210.777 243.429C210.777 243.429 216.195 251.949 214.595 246.349z"/> + </g> + <g style="fill: #000000"> + <path d="M409.401 80C409.401 80 383.801 88 381.001 106.8C381.001 106.8 378.601 129.6 399.001 147.2C399.001 147.2 399.401 153.6 401.401 156.8C401.401 156.8 399.801 161.6 418.601 154L445.801 145.6C445.801 145.6 452.201 143.2 457.401 134.4C462.601 125.6 477.801 106.8 474.201 81.6C474.201 81.6 475.401 70.4 469.401 70C469.401 70 461.001 68.4 453.801 76C453.801 76 447.001 79.2 444.601 78.8L409.401 80z"/> + </g> + <g style="fill: #000000"> + <path d="M464.022 79.01C464.022 79.01 466.122 70.08 461.282 74.92C461.282 74.92 454.242 80.64 446.761 80.64C446.761 80.64 432.241 82.84 427.841 96.04C427.841 96.04 423.881 122.88 431.801 128.6C431.801 128.6 436.641 136.08 443.681 129.48C450.722 122.88 466.222 92.65 464.022 79.01z"/> + </g> + <g style="fill: #323232"> + <path d="M463.648 79.368C463.648 79.368 465.738 70.624 460.986 75.376C460.986 75.376 454.074 80.992 446.729 80.992C446.729 80.992 432.473 83.152 428.153 96.112C428.153 96.112 424.265 122.464 432.041 128.08C432.041 128.08 436.793 135.424 443.705 128.944C450.618 122.464 465.808 92.76 463.648 79.368z"/> + </g> + <g style="fill: #666666"> + <path d="M463.274 79.726C463.274 79.726 465.354 71.168 460.69 75.832C460.69 75.832 453.906 81.344 446.697 81.344C446.697 81.344 432.705 83.464 428.465 96.184C428.465 96.184 424.649 122.048 432.281 127.56C432.281 127.56 436.945 134.768 443.729 128.408C450.514 122.048 465.394 92.87 463.274 79.726z"/> + </g> + <g style="fill: #999999"> + <path d="M462.9 80.084C462.9 80.084 464.97 71.712 460.394 76.288C460.394 76.288 453.738 81.696 446.665 81.696C446.665 81.696 432.937 83.776 428.777 96.256C428.777 96.256 425.033 121.632 432.521 127.04C432.521 127.04 437.097 134.112 443.753 127.872C450.41 121.632 464.98 92.98 462.9 80.084z"/> + </g> + <g style="fill: #cccccc"> + <path d="M462.526 80.442C462.526 80.442 464.586 72.256 460.098 76.744C460.098 76.744 453.569 82.048 446.633 82.048C446.633 82.048 433.169 84.088 429.089 96.328C429.089 96.328 425.417 121.216 432.761 126.52C432.761 126.52 437.249 133.456 443.777 127.336C450.305 121.216 464.566 93.09 462.526 80.442z"/> + </g> + <g style="fill: #ffffff"> + <path d="M462.151 80.8C462.151 80.8 464.201 72.8 459.801 77.2C459.801 77.2 453.401 82.4 446.601 82.4C446.601 82.4 433.401 84.4 429.401 96.4C429.401 96.4 425.801 120.8 433.001 126C433.001 126 437.401 132.8 443.801 126.8C450.201 120.8 464.151 93.2 462.151 80.8z"/> + </g> + <g style="fill: #992600"> + <path d="M250.6 284C250.6 284 230.2 264.8 222.2 264C222.2 264 187.8 260 173 278C173 278 190.6 257.6 218.2 263.2C218.2 263.2 196.6 258.8 184.2 262C184.2 262 167.4 262 157.8 276L155 280.8C155 280.8 159 266 177.4 260C177.4 260 200.2 255.2 211 260C211 260 189.4 253.2 179.4 255.2C179.4 255.2 149 252.8 136.2 279.2C136.2 279.2 140.2 264.8 155 257.6C155 257.6 168.6 248.8 189 251.6C189 251.6 203.4 254.8 208.6 257.2C213.8 259.6 212.6 256.8 204.2 252C204.2 252 198.6 242 184.6 242.4C184.6 242.4 141.8 246 131.4 258C131.4 258 145 246.8 155.4 244C155.4 244 177.8 236 186.2 236.8C186.2 236.8 211 237.8 218.6 233.8C218.6 233.8 207.4 238.8 210.6 242C213.8 245.2 220.6 252.8 220.6 254C220.6 255.2 244.8 277.3 248.4 281.7L250.6 284z"/> + </g> + <g style="fill: #cccccc"> + <path d="M389 478C389 478 373.5 441.5 361 432C361 432 387 448 390.5 466C390.5 466 390.5 476 389 478z"/> + </g> + <g style="fill: #cccccc"> + <path d="M436 485.5C436 485.5 409.5 430.5 391 406.5C391 406.5 434.5 444 439.5 470.5L440 476L437 473.5C437 473.5 436.5 482.5 436 485.5z"/> + </g> + <g style="fill: #cccccc"> + <path d="M492.5 437C492.5 437 430 377.5 428.5 375C428.5 375 489 441 492 448.5C492 448.5 490 439.5 492.5 437z"/> + </g> + <g style="fill: #cccccc"> + <path d="M304 480.5C304 480.5 323.5 428.5 342.5 451C342.5 451 357.5 461 357 464C357 464 353 457.5 335 458C335 458 316 455 304 480.5z"/> + </g> + <g style="fill: #cccccc"> + <path d="M494.5 353C494.5 353 449.5 324.5 442 323C430.193 320.639 491.5 352 496.5 362.5C496.5 362.5 498.5 360 494.5 353z"/> + </g> + <g style="fill: #000000"> + <path d="M343.801 459.601C343.801 459.601 364.201 457.601 371.001 450.801L375.401 454.401L393.001 416.001L396.601 421.201C396.601 421.201 411.001 406.401 410.201 398.401C409.401 390.401 423.001 404.401 423.001 404.401C423.001 404.401 422.201 392.801 429.401 399.601C429.401 399.601 427.001 384.001 435.401 392.001C435.401 392.001 424.864 361.844 447.401 387.601C453.001 394.001 448.601 387.201 448.601 387.201C448.601 387.201 422.601 339.201 444.201 353.601C444.201 353.601 446.201 330.801 445.001 326.401C443.801 322.001 441.801 299.6 437.001 294.4C432.201 289.2 437.401 287.6 443.001 292.8C443.001 292.8 431.801 268.8 445.001 280.8C445.001 280.8 441.401 265.6 437.001 262.8C437.001 262.8 431.401 245.6 446.601 256.4C446.601 256.4 442.201 244 439.001 240.8C439.001 240.8 427.401 213.2 434.601 218L439.001 221.6C439.001 221.6 432.201 207.6 438.601 212C445.001 216.4 445.001 216 445.001 216C445.001 216 423.801 182.8 444.201 200.4C444.201 200.4 436.042 186.482 432.601 179.6C432.601 179.6 413.801 159.2 428.201 165.6L433.001 167.2C433.001 167.2 424.201 157.2 416.201 155.6C408.201 154 418.601 147.6 425.001 149.6C431.401 151.6 447.001 159.2 447.001 159.2C447.001 159.2 459.801 178 463.801 178.4C463.801 178.4 443.801 170.8 449.801 178.8C449.801 178.8 464.201 192.8 457.001 192.4C457.001 192.4 451.001 199.6 455.801 208.4C455.801 208.4 437.342 190.009 452.201 215.6L459.001 232C459.001 232 434.601 207.2 445.801 229.2C445.801 229.2 463.001 252.8 465.001 253.2C467.001 253.6 471.401 262.4 471.401 262.4L467.001 260.4L472.201 269.2C472.201 269.2 461.001 257.2 467.001 270.4L472.601 284.8C472.601 284.8 452.201 262.8 465.801 292.4C465.801 292.4 449.401 287.2 458.201 304.4C458.201 304.4 456.601 320.401 457.001 325.601C457.401 330.801 458.601 359.201 454.201 367.201C449.801 375.201 460.201 394.401 462.201 398.401C464.201 402.401 467.801 413.201 459.001 404.001C450.201 394.801 454.601 400.401 456.601 409.201C458.601 418.001 464.601 433.601 463.801 439.201C463.801 439.201 462.601 440.401 459.401 436.801C459.401 436.801 444.601 414.001 446.201 428.401C446.201 428.401 445.001 436.401 441.801 445.201C441.801 445.201 438.601 456.001 438.601 447.201C438.601 447.201 435.401 430.401 432.601 438.001C429.801 445.601 426.201 451.601 423.401 454.001C420.601 456.401 415.401 433.601 414.201 444.001C414.201 444.001 402.201 431.601 397.401 448.001L385.801 464.401C385.801 464.401 385.401 452.001 384.201 458.001C384.201 458.001 354.201 464.001 343.801 459.601z"/> + </g> + <g style="fill: #000000"> + <path d="M309.401 102.8C309.401 102.8 297.801 94.8 293.801 95.2C289.801 95.6 321.401 86.4 362.601 114C362.601 114 367.401 116.8 371.001 116.4C371.001 116.4 374.201 118.8 371.401 122.4C371.401 122.4 362.601 132 373.801 143.2C373.801 143.2 392.201 150 386.601 141.2C386.601 141.2 397.401 145.2 399.801 149.2C402.201 153.2 401.001 149.2 401.001 149.2C401.001 149.2 394.601 142 388.601 136.8C388.601 136.8 383.401 134.8 380.601 126.4C377.801 118 375.401 108 379.801 104.8C379.801 104.8 375.801 109.2 376.601 105.2C377.401 101.2 381.001 97.6 382.601 97.2C384.201 96.8 400.601 81 407.401 80.6C407.401 80.6 398.201 82 395.201 81C392.201 80 365.601 68.6 359.601 67.4C359.601 67.4 342.801 60.8 354.801 62.8C354.801 62.8 390.601 66.6 408.801 79.8C408.801 79.8 401.601 71.4 383.201 64.4C383.201 64.4 361.001 51.8 325.801 56.8C325.801 56.8 308.001 60 300.201 61.8C300.201 61.8 297.601 61.2 297.001 60.8C296.401 60.4 284.6 51.4 257 58.4C257 58.4 240 63 231.4 67.8C231.4 67.8 216.2 69 212.6 72.2C212.6 72.2 194 86.8 192 87.6C190 88.4 178.6 96 177.8 96.4C177.8 96.4 202.4 89.8 204.8 87.4C207.2 85 224.6 82.4 227 83.8C229.4 85.2 237.8 84.6 228.2 85.2C228.2 85.2 303.801 100 304.601 102C305.401 104 309.401 102.8 309.401 102.8z"/> + </g> + <g style="fill: #cc7226"> + <path d="M380.801 93.6C380.801 93.6 370.601 86.2 368.601 86.2C366.601 86.2 354.201 76 350.001 76.4C345.801 76.8 333.601 66.8 306.201 75C306.201 75 305.601 73 309.201 72.2C309.201 72.2 315.601 70 316.001 69.4C316.001 69.4 336.201 65.2 343.401 68.8C343.401 68.8 352.601 71.4 358.801 77.6C358.801 77.6 370.001 80.8 373.201 79.8C373.201 79.8 382.001 82 382.401 83.8C382.401 83.8 388.201 86.8 386.401 89.4C386.401 89.4 386.801 91 380.801 93.6z"/> + </g> + <g style="fill: #cc7226"> + <path d="M368.33 91.491C369.137 92.123 370.156 92.221 370.761 93.03C370.995 93.344 370.706 93.67 370.391 93.767C369.348 94.084 368.292 93.514 367.15 94.102C366.748 94.309 366.106 94.127 365.553 93.978C363.921 93.537 362.092 93.512 360.401 94.2C358.416 93.071 356.056 93.655 353.975 92.654C353.917 92.627 353.695 92.973 353.621 92.946C350.575 91.801 346.832 92.084 344.401 89.8C341.973 89.388 339.616 88.926 337.188 88.246C335.37 87.737 333.961 86.748 332.341 85.916C330.964 85.208 329.507 84.686 327.973 84.314C326.11 83.862 324.279 83.974 322.386 83.454C322.293 83.429 322.101 83.773 322.019 83.746C321.695 83.638 321.405 83.055 321.234 83.108C319.553 83.63 318.065 82.658 316.401 83C315.223 81.776 313.495 82.021 311.949 81.579C308.985 80.731 305.831 82.001 302.801 81C306.914 79.158 311.601 80.39 315.663 78.321C317.991 77.135 320.653 78.237 323.223 77.477C323.71 77.333 324.401 77.131 324.801 77.8C324.935 77.665 325.117 77.426 325.175 77.454C327.625 78.611 329.94 79.885 332.422 80.951C332.763 81.097 333.295 80.865 333.547 81.067C335.067 82.283 337.01 82.18 338.401 83.4C340.099 82.898 341.892 83.278 343.621 82.654C343.698 82.627 343.932 82.968 343.965 82.946C345.095 82.198 346.25 82.469 347.142 82.773C347.48 82.888 348.143 83.135 348.448 83.209C349.574 83.485 350.43 83.965 351.609 84.148C351.723 84.166 351.908 83.826 351.98 83.854C353.103 84.292 354.145 84.236 354.801 85.4C354.936 85.265 355.101 85.027 355.183 85.054C356.21 85.392 356.859 86.147 357.96 86.388C358.445 86.494 359.057 87.12 359.633 87.296C362.025 88.027 363.868 89.556 366.062 90.451C366.821 90.761 367.697 90.995 368.33 91.491z"/> + </g> + <g style="fill: #cc7226"> + <path d="M291.696 77.261C289.178 75.536 286.81 74.43 284.368 72.644C284.187 72.511 283.827 72.681 283.625 72.559C282.618 71.95 281.73 71.369 280.748 70.673C280.209 70.291 279.388 70.302 278.88 70.044C276.336 68.752 273.707 68.194 271.2 67C271.882 66.362 273.004 66.606 273.6 65.8C273.795 66.08 274.033 66.364 274.386 66.173C276.064 65.269 277.914 65.116 279.59 65.206C281.294 65.298 283.014 65.603 284.789 65.875C285.096 65.922 285.295 66.445 285.618 66.542C287.846 67.205 290.235 66.68 292.354 67.518C293.945 68.147 295.515 68.97 296.754 70.245C297.006 70.505 296.681 70.806 296.401 71C296.789 70.891 297.062 71.097 297.173 71.41C297.257 71.649 297.257 71.951 297.173 72.19C297.061 72.502 296.782 72.603 296.408 72.654C295.001 72.844 296.773 71.464 296.073 71.912C294.8 72.726 295.546 74.132 294.801 75.4C294.521 75.206 294.291 74.988 294.401 74.6C294.635 75.122 294.033 75.412 293.865 75.728C293.48 76.453 292.581 77.868 291.696 77.261z"/> + </g> + <g style="fill: #cc7226"> + <path d="M259.198 84.609C256.044 83.815 252.994 83.93 249.978 82.654C249.911 82.626 249.688 82.973 249.624 82.946C248.258 82.352 247.34 81.386 246.264 80.34C245.351 79.452 243.693 79.839 242.419 79.352C242.095 79.228 241.892 78.716 241.591 78.677C240.372 78.52 239.445 77.571 238.4 77C240.736 76.205 243.147 76.236 245.609 75.852C245.722 75.834 245.867 76.155 246 76.155C246.136 76.155 246.266 75.934 246.4 75.8C246.595 76.08 246.897 76.406 247.154 76.152C247.702 75.612 248.258 75.802 248.798 75.842C248.942 75.852 249.067 76.155 249.2 76.155C249.336 76.155 249.467 75.844 249.6 75.844C249.736 75.845 249.867 76.155 250 76.155C250.136 76.155 250.266 75.934 250.4 75.8C251.092 76.582 251.977 76.028 252.799 76.207C253.837 76.434 254.104 77.582 255.178 77.88C259.893 79.184 264.03 81.329 268.393 83.416C268.7 83.563 268.91 83.811 268.8 84.2C269.067 84.2 269.38 84.112 269.57 84.244C270.628 84.976 271.669 85.524 272.366 86.622C272.582 86.961 272.253 87.368 272.02 87.316C267.591 86.321 263.585 85.713 259.198 84.609z"/> + </g> + <g style="fill: #cc7226"> + <path d="M245.338 128.821C243.746 127.602 243.162 125.571 242.034 123.779C241.82 123.439 242.094 123.125 242.411 123.036C242.971 122.877 243.514 123.355 243.923 123.557C245.668 124.419 247.203 125.661 249.2 125.8C251.19 128.034 255.45 128.419 255.457 131.8C255.458 132.659 254.03 131.741 253.6 132.6C251.149 131.597 248.76 131.7 246.38 130.233C245.763 129.852 246.093 129.399 245.338 128.821z"/> + </g> + <g style="fill: #cc7226"> + <path d="M217.8 76.244C217.935 76.245 224.966 76.478 224.949 76.592C224.904 76.901 217.174 77.95 216.81 77.78C216.646 77.704 209.134 80.134 209 80C209.268 79.865 217.534 76.244 217.8 76.244z"/> + </g> + <g style="fill: #000000"> + <path d="M233.2 86C233.2 86 218.4 87.8 214 89C209.6 90.2 191 97.8 188 99.8C188 99.8 174.6 105.2 157.6 125.2C157.6 125.2 165.2 121.8 167.4 119C167.4 119 181 106.4 180.8 109C180.8 109 193 100.4 192.4 102.6C192.4 102.6 216.8 91.4 214.8 94.6C214.8 94.6 236.4 90 235.4 92C235.4 92 254.2 96.4 251.4 96.6C251.4 96.6 245.6 97.8 252 101.4C252 101.4 248.6 105.8 243.2 101.8C237.8 97.8 240.8 100 235.8 101C235.8 101 233.2 101.8 228.6 97.8C228.6 97.8 223 93.2 214.2 96.8C214.2 96.8 183.6 109.4 181.6 110C181.6 110 178 112.8 175.6 116.4C175.6 116.4 169.8 120.8 166.8 122.2C166.8 122.2 154 133.8 152.8 135.2C152.8 135.2 149.4 140.4 148.6 140.8C148.6 140.8 155 137 157 135C157 135 171 125 176.4 124.2C176.4 124.2 180.8 121.2 181.6 119.8C181.6 119.8 196 110.6 200.2 110.6C200.2 110.6 209.4 115.8 211.8 108.8C211.8 108.8 217.6 107 223.2 108.2C223.2 108.2 226.4 105.6 225.6 103.4C225.6 103.4 227.2 101.6 228.2 105.4C228.2 105.4 231.6 109 236.4 107C236.4 107 240.4 106.8 238.4 109.2C238.4 109.2 234 113 222.2 113.2C222.2 113.2 209.8 113.8 193.4 121.4C193.4 121.4 163.6 131.8 154.4 142.2C154.4 142.2 148 151 142.6 152.2C142.6 152.2 136.8 153 130.8 160.4C130.8 160.4 140.6 154.6 149.6 154.6C149.6 154.6 153.6 152.2 149.8 155.8C149.8 155.8 146.2 163.4 147.8 168.8C147.8 168.8 147.2 174 146.4 175.6C146.4 175.6 138.6 188.4 138.6 190.8C138.6 193.2 139.8 203 140.2 203.6C140.6 204.2 139.2 202 143 204.4C146.8 206.8 149.6 208.4 150.4 211.2C151.2 214 148.4 205.8 148.2 204C148 202.2 143.8 195 144.6 192.6C144.6 192.6 145.6 193.6 146.4 195C146.4 195 145.8 194.4 146.4 190.8C146.4 190.8 147.2 185.6 148.6 182.4C150 179.2 152 175.4 152.4 174.6C152.8 173.8 152.8 168 154.2 170.6L157.6 173.2C157.6 173.2 154.8 170.6 157 168.4C157 168.4 156 162.8 157.8 160.2C157.8 160.2 164.8 151.8 166.4 150.8C168 149.8 166.6 150.2 166.6 150.2C166.6 150.2 172.6 146 166.8 147.6C166.8 147.6 162.8 149.2 159.8 149.2C159.8 149.2 152.2 151.2 156.2 147C160.2 142.8 170.2 137.4 174 137.6L174.8 139.2L186 136.8L184.8 137.6C184.8 137.6 184.6 137.4 188.8 137C193 136.6 198.8 138 200.2 136.2C201.6 134.4 205 133.4 204.6 134.8C204.2 136.2 204 138.2 204 138.2C204 138.2 209 132.4 208.4 134.6C207.8 136.8 199.6 142 198.2 148.2L208.6 140L212.2 137C212.2 137 215.8 139.2 216 137.6C216.2 136 220.8 130.2 222 130.4C223.2 130.6 225.2 127.8 225 130.4C224.8 133 232.4 138.4 232.4 138.4C232.4 138.4 235.6 136.6 237 138C238.4 139.4 242.6 118.2 242.6 118.2L267.6 107.6L311.201 104.2L294.201 97.4L233.2 86z"/> + </g> + <g style="stroke:#4c0000; stroke-width:2"> + <path d="M251.4 285C251.4 285 236.4 268.2 228 265.6C228 265.6 214.6 258.8 190 266.6"/> + </g> + <g style="stroke:#4c0000; stroke-width:2"> + <path d="M224.8 264.2C224.8 264.2 199.6 256.2 184.2 260.4C184.2 260.4 165.8 262.4 157.4 276.2"/> + </g> + <g style="stroke:#4c0000; stroke-width:2"> + <path d="M221.2 263C221.2 263 204.2 255.8 189.4 253.6C189.4 253.6 172.8 251 156.2 258.2C156.2 258.2 144 264.2 138.6 274.4"/> + </g> + <g style="stroke:#4c0000; stroke-width:2"> + <path d="M222.2 263.4C222.2 263.4 206.8 252.4 205.8 251C205.8 251 198.8 240 185.8 239.6C185.8 239.6 164.4 240.4 147.2 248.4"/> + </g> + <g style="fill: #000000"> + <path d="M220.895 254.407C222.437 255.87 249.4 284.8 249.4 284.8C284.6 321.401 256.6 287.2 256.6 287.2C249 282.4 239.8 263.6 239.8 263.6C238.6 260.8 253.8 270.8 253.8 270.8C257.8 271.6 271.4 290.8 271.4 290.8C264.6 288.4 269.4 295.6 269.4 295.6C272.2 297.6 292.601 313.201 292.601 313.201C296.201 317.201 300.201 318.801 300.201 318.801C314.201 313.601 307.801 326.801 307.801 326.801C310.201 333.601 315.801 322.001 315.801 322.001C327.001 305.2 310.601 307.601 310.601 307.601C280.6 310.401 273.8 294.4 273.8 294.4C271.4 292 280.2 294.4 280.2 294.4C288.601 296.4 273 282 273 282C275.4 282 284.6 288.8 284.6 288.8C295.001 298 297.001 296 297.001 296C315.001 287.2 325.401 294.8 325.401 294.8C327.401 296.4 321.801 303.2 323.401 308.401C325.001 313.601 329.801 326.001 329.801 326.001C327.401 327.601 327.801 338.401 327.801 338.401C344.601 361.601 335.001 359.601 335.001 359.601C319.401 359.201 334.201 366.801 334.201 366.801C337.401 368.801 346.201 376.001 346.201 376.001C343.401 374.801 341.801 380.001 341.801 380.001C346.601 384.001 343.801 388.801 343.801 388.801C337.801 390.001 336.601 394.001 336.601 394.001C343.401 402.001 333.401 402.401 333.401 402.401C337.001 406.801 332.201 418.801 332.201 418.801C327.401 418.801 321.001 424.401 321.001 424.401C323.401 429.201 313.001 434.801 313.001 434.801C304.601 436.401 307.401 443.201 307.401 443.201C299.401 449.201 297.001 465.201 297.001 465.201C296.201 475.601 293.801 478.801 299.001 476.801C304.201 474.801 303.401 462.401 303.401 462.401C298.601 446.801 341.401 430.801 341.401 430.801C345.401 429.201 346.201 424.001 346.201 424.001C348.201 424.401 357.001 432.001 357.001 432.001C364.601 443.201 365.001 434.001 365.001 434.001C366.201 430.401 364.601 424.401 364.601 424.401C370.601 402.801 356.601 396.401 356.601 396.401C346.601 362.801 360.601 371.201 360.601 371.201C363.401 376.801 374.201 382.001 374.201 382.001L377.801 379.601C376.201 374.801 384.601 368.801 384.601 368.801C387.401 375.201 393.401 367.201 393.401 367.201C397.001 342.801 409.401 357.201 409.401 357.201C413.401 358.401 414.601 351.601 414.601 351.601C418.201 341.201 414.601 327.601 414.601 327.601C418.201 327.201 427.801 333.201 427.801 333.201C430.601 329.601 421.401 312.801 425.401 315.201C429.401 317.601 433.801 319.201 433.801 319.201C434.601 317.201 424.601 304.801 424.601 304.801C420.201 302 415.001 281.6 415.001 281.6C422.201 285.2 412.201 270 412.201 270C412.201 266.8 418.201 255.6 418.201 255.6C417.401 248.8 418.201 249.2 418.201 249.2C421.001 250.4 429.001 252 422.201 245.6C415.401 239.2 423.001 234.4 423.001 234.4C427.401 231.6 413.801 232 413.801 232C408.601 227.6 409.001 223.6 409.001 223.6C417.001 225.6 402.601 211.2 400.201 207.6C397.801 204 407.401 198.8 407.401 198.8C420.601 195.2 409.001 192 409.001 192C389.401 192.4 400.201 181.6 400.201 181.6C406.201 182 404.601 179.6 404.601 179.6C399.401 178.4 389.801 172 389.801 172C385.801 168.4 389.401 169.2 389.401 169.2C406.201 170.4 377.401 159.2 377.401 159.2C385.401 159.2 367.401 148.8 367.401 148.8C365.401 147.2 362.201 139.6 362.201 139.6C356.201 134.4 351.401 127.6 351.401 127.6C351.001 123.2 346.201 118.4 346.201 118.4C334.601 104.8 329.001 105.2 329.001 105.2C314.201 101.6 309.001 102.4 309.001 102.4L256.2 106.8C229.8 119.6 237.6 140.6 237.6 140.6C244 149 253.2 145.2 253.2 145.2C257.8 139 269.4 141.2 269.4 141.2C289.801 144.4 287.201 140.8 287.201 140.8C284.801 136.2 268.6 130 268.4 129.4C268.2 128.8 259.4 125.4 259.4 125.4C256.4 124.2 252 115 252 115C248.8 111.6 264.6 117.4 264.6 117.4C263.4 118.4 270.8 122.4 270.8 122.4C288.201 121.4 298.801 132.2 298.801 132.2C309.601 148.8 309.801 140.6 309.801 140.6C312.601 131.2 300.801 110 300.801 110C301.201 108 309.401 114.6 309.401 114.6C310.801 112.6 311.601 118.4 311.601 118.4C311.801 120.8 315.601 128.8 315.601 128.8C318.401 141.8 322.001 134.4 322.001 134.4L326.601 143.8C328.001 146.4 322.001 154 322.001 154C321.801 156.8 322.601 156.6 317.001 164.2C311.401 171.8 314.801 176.2 314.801 176.2C313.401 182.8 322.201 182.4 322.201 182.4C324.801 184.6 328.201 184.6 328.201 184.6C330.001 186.6 332.401 186 332.401 186C334.001 182.2 340.201 184.2 340.201 184.2C341.601 181.8 349.801 181.4 349.801 181.4C350.801 178.8 351.201 177.2 354.601 176.6C358.001 176 333.401 133 333.401 133C339.801 132.2 331.601 119.8 331.601 119.8C329.401 113.2 340.801 127.8 343.001 129.2C345.201 130.6 346.201 132.8 344.601 132.6C343.001 132.4 341.201 134.6 342.601 134.8C344.001 135 357.001 150 360.401 160.2C363.801 170.4 369.801 174.4 376.001 180.4C382.201 186.4 381.401 210.6 381.401 210.6C381.001 219.4 387.001 230 387.001 230C389.001 233.8 384.801 252 384.801 252C382.801 254.2 384.201 255 384.201 255C385.201 256.2 392.001 269.4 392.001 269.4C390.201 269.2 393.801 272.8 393.801 272.8C399.001 278.8 392.601 275.8 392.601 275.8C386.601 274.2 393.601 284 393.601 284C394.801 285.8 385.801 281.2 385.801 281.2C376.601 280.6 388.201 287.8 388.201 287.8C396.801 295 385.401 290.6 385.401 290.6C380.801 288.8 384.001 295.6 384.001 295.6C387.201 297.2 404.401 304.2 404.401 304.2C404.801 308.001 401.801 313.001 401.801 313.001C402.201 317.001 400.001 320.401 400.001 320.401C398.801 328.601 398.201 329.401 398.201 329.401C394.001 329.601 386.601 343.401 386.601 343.401C384.801 346.001 374.601 358.001 374.601 358.001C372.601 365.001 354.601 357.801 354.601 357.801C348.001 361.201 350.001 357.801 350.001 357.801C349.601 355.601 354.401 349.601 354.401 349.601C361.401 347.001 358.801 336.201 358.801 336.201C362.801 334.801 351.601 332.001 351.801 330.801C352.001 329.601 357.801 328.201 357.801 328.201C365.801 326.201 361.401 323.801 361.401 323.801C360.801 319.801 363.801 314.201 363.801 314.201C375.401 313.401 363.801 297.2 363.801 297.2C353.001 289.6 352.001 283.8 352.001 283.8C364.601 275.6 356.401 263.2 356.601 259.6C356.801 256 358.001 234.4 358.001 234.4C356.001 228.2 353.001 214.6 353.001 214.6C355.201 209.4 362.601 196.8 362.601 196.8C365.401 192.6 374.201 187.8 372.001 184.8C369.801 181.8 362.001 183.6 362.001 183.6C354.201 182.2 354.801 187.4 354.801 187.4C353.201 188.4 352.401 193.4 352.401 193.4C351.68 201.333 342.801 207.6 342.801 207.6C331.601 213.8 340.801 217.8 340.801 217.8C346.801 224.4 337.001 224.6 337.001 224.6C326.001 222.8 334.201 233 334.201 233C345.001 245.8 342.001 248.6 342.001 248.6C331.801 249.6 344.401 258.8 344.401 258.8C344.401 258.8 343.601 256.8 343.801 258.6C344.001 260.4 347.001 264.6 347.801 266.6C348.601 268.6 344.601 268.8 344.601 268.8C345.201 278.4 329.801 274.2 329.801 274.2C329.801 274.2 329.801 274.2 328.201 274.4C326.601 274.6 315.401 273.8 309.601 271.6C303.801 269.4 297.001 269.4 297.001 269.4C297.001 269.4 293.001 271.2 285.4 271C277.8 270.8 269.8 273.6 269.8 273.6C265.4 273.2 274 268.8 274.2 269C274.4 269.2 280 263.6 272 264.2C250.203 265.835 239.4 255.6 239.4 255.6C237.4 254.2 234.8 251.4 234.8 251.4C224.8 249.4 236.2 263.8 236.2 263.8C237.4 265.2 236 266.2 236 266.2C235.2 264.6 227.4 259.2 227.4 259.2C224.589 258.227 223.226 256.893 220.895 254.407z"/> + </g> + <g style="fill: #4c0000"> + <path d="M197 242.8C197 242.8 208.6 248.4 211.2 251.2C213.8 254 227.8 265.4 227.8 265.4C227.8 265.4 222.4 263.4 219.8 261.6C217.2 259.8 206.4 251.6 206.4 251.6C206.4 251.6 202.6 245.6 197 242.8z"/> + </g> + <g style="fill: #99cc32"> + <path d="M138.991 211.603C139.328 211.455 138.804 208.743 138.6 208.2C137.578 205.474 128.6 204 128.6 204C128.373 205.365 128.318 206.961 128.424 208.599C128.424 208.599 133.292 214.118 138.991 211.603z"/> + </g> + <g style="fill: #659900"> + <path d="M138.991 211.403C138.542 211.561 138.976 208.669 138.8 208.2C137.778 205.474 128.6 203.9 128.6 203.9C128.373 205.265 128.318 206.861 128.424 208.499C128.424 208.499 132.692 213.618 138.991 211.403z"/> + </g> + <g style="fill: #000000"> + <path d="M134.6 211.546C133.975 211.546 133.469 210.406 133.469 209C133.469 207.595 133.975 206.455 134.6 206.455C135.225 206.455 135.732 207.595 135.732 209C135.732 210.406 135.225 211.546 134.6 211.546z"/> + </g> + <g style="fill: #000000"> + <path d="M134.6 209z"/> + </g> + <g style="fill: #000000"> + <path d="M89 309.601C89 309.601 83.4 319.601 108.2 313.601C108.2 313.601 122.2 312.401 124.6 310.001C125.8 310.801 134.166 313.734 137 314.401C143.8 316.001 152.2 306 152.2 306C152.2 306 156.8 295.5 159.6 295.5C162.4 295.5 159.2 297.1 159.2 297.1C159.2 297.1 152.6 307.201 153 308.801C153 308.801 147.8 328.801 131.8 329.601C131.8 329.601 115.65 330.551 117 336.401C117 336.401 125.8 334.001 128.2 336.401C128.2 336.401 139 336.001 131 342.401L124.2 354.001C124.2 354.001 124.34 357.919 114.2 354.401C104.4 351.001 94.1 338.101 94.1 338.101C94.1 338.101 78.15 323.551 89 309.601z"/> + </g> + <g style="fill: #e59999"> + <path d="M87.8 313.601C87.8 313.601 85.8 323.201 122.6 312.801C122.6 312.801 127 312.801 129.4 313.601C131.8 314.401 143.8 317.201 145.8 316.001C145.8 316.001 138.6 329.601 127 328.001C127 328.001 113.8 329.601 114.2 334.401C114.2 334.401 118.2 341.601 123 344.001C123 344.001 125.8 346.401 125.4 349.601C125 352.801 122.2 354.401 120.2 355.201C118.2 356.001 115 352.801 113.4 352.801C111.8 352.801 103.4 346.401 99 341.601C94.6 336.801 86.2 324.801 86.6 322.001C87 319.201 87.8 313.601 87.8 313.601z"/> + </g> + <g style="fill: #b26565"> + <path d="M91 331.051C93.6 335.001 96.8 339.201 99 341.601C103.4 346.401 111.8 352.801 113.4 352.801C115 352.801 118.2 356.001 120.2 355.201C122.2 354.401 125 352.801 125.4 349.601C125.8 346.401 123 344.001 123 344.001C119.934 342.468 117.194 338.976 115.615 336.653C115.615 336.653 115.8 339.201 110.6 338.401C105.4 337.601 100.2 334.801 98.6 331.601C97 328.401 94.6 326.001 96.2 329.601C97.8 333.201 100.2 336.801 101.8 337.201C103.4 337.601 103 338.801 100.6 338.401C98.2 338.001 95.4 337.601 91 332.401z"/> + </g> + <g style="fill: #992600"> + <path d="M88.4 310.001C88.4 310.001 90.2 296.4 91.4 292.4C91.4 292.4 90.6 285.6 93 281.4C95.4 277.2 97.4 271 100.4 265.6C103.4 260.2 103.6 256.2 107.6 254.6C111.6 253 117.6 244.4 120.4 243.4C123.2 242.4 123 243.2 123 243.2C123 243.2 129.8 228.4 143.4 232.4C143.4 232.4 127.2 229.6 143 220.2C143 220.2 138.2 221.3 141.5 214.3C143.701 209.632 143.2 216.4 132.2 228.2C132.2 228.2 127.2 236.8 122 239.8C116.8 242.8 104.8 249.8 103.6 253.6C102.4 257.4 99.2 263.2 97.2 264.8C95.2 266.4 92.4 270.6 92 274C92 274 90.8 278 89.4 279.2C88 280.4 87.8 283.6 87.8 285.6C87.8 287.6 85.8 290.4 86 292.8C86 292.8 86.8 311.801 86.4 313.801L88.4 310.001z"/> + </g> + <g style="fill: #ffffff"> + <path d="M79.8 314.601C79.8 314.601 77.8 313.201 73.4 319.201C73.4 319.201 80.7 352.201 80.7 353.601C80.7 353.601 81.8 351.501 80.5 344.301C79.2 337.101 78.3 324.401 78.3 324.401L79.8 314.601z"/> + </g> + <g style="fill: #992600"> + <path d="M101.4 254C101.4 254 83.8 257.2 84.2 286.4L83.4 311.201C83.4 311.201 82.2 285.6 81 284C79.8 282.4 83.8 271.2 80.6 277.2C80.6 277.2 66.6 291.2 74.6 312.401C74.6 312.401 76.1 315.701 73.1 311.101C73.1 311.101 68.5 298.5 69.6 292.1C69.6 292.1 69.8 289.9 71.7 287.1C71.7 287.1 80.3 275.4 83 273.1C83 273.1 84.8 258.7 100.2 253.5C100.2 253.5 105.9 251.2 101.4 254z"/> + </g> + <g style="fill: #000000"> + <path d="M240.8 187.8C241.46 187.446 241.451 186.476 242.031 186.303C243.18 185.959 243.344 184.892 243.862 184.108C244.735 182.789 244.928 181.256 245.51 179.765C245.782 179.065 245.809 178.11 245.496 177.45C244.322 174.969 243.62 172.52 242.178 170.094C241.91 169.644 241.648 168.85 241.447 168.252C240.984 166.868 239.727 165.877 238.867 164.557C238.579 164.116 239.104 163.191 238.388 163.107C237.491 163.002 236.042 162.422 235.809 163.448C235.221 166.035 236.232 168.558 237.2 171C236.418 171.692 236.752 172.613 236.904 173.38C237.614 176.986 236.416 180.338 235.655 183.812C235.632 183.916 235.974 184.114 235.946 184.176C234.724 186.862 233.272 189.307 231.453 191.688C230.695 192.68 229.823 193.596 229.326 194.659C228.958 195.446 228.55 196.412 228.8 197.4C225.365 200.18 223.115 204.025 220.504 207.871C220.042 208.551 220.333 209.76 220.884 210.029C221.697 210.427 222.653 209.403 223.123 208.557C223.512 207.859 223.865 207.209 224.356 206.566C224.489 206.391 224.31 205.972 224.445 205.851C227.078 203.504 228.747 200.568 231.2 198.2C233.15 197.871 234.687 196.873 236.435 195.86C236.743 195.681 237.267 195.93 237.557 195.735C239.31 194.558 239.308 192.522 239.414 190.612C239.464 189.728 239.66 188.411 240.8 187.8z"/> + </g> + <g style="fill: #000000"> + <path d="M231.959 183.334C232.083 183.257 231.928 182.834 232.037 182.618C232.199 182.294 232.602 182.106 232.764 181.782C232.873 181.566 232.71 181.186 232.846 181.044C235.179 178.597 235.436 175.573 234.4 172.6C235.424 171.98 235.485 170.718 235.06 169.871C234.207 168.171 234.014 166.245 233.039 164.702C232.237 163.433 230.659 162.189 229.288 163.492C228.867 163.892 228.546 164.679 228.824 165.391C228.888 165.554 229.173 165.7 229.146 165.782C229.039 166.106 228.493 166.33 228.487 166.602C228.457 168.098 227.503 169.609 228.133 170.938C228.905 172.567 229.724 174.424 230.4 176.2C229.166 178.316 230.199 180.765 228.446 182.642C228.31 182.788 228.319 183.174 228.441 183.376C228.733 183.862 229.139 184.268 229.625 184.56C229.827 184.681 230.175 184.683 230.375 184.559C230.953 184.197 231.351 183.71 231.959 183.334z"/> + </g> + <g style="fill: #000000"> + <path d="M294.771 173.023C296.16 174.815 296.45 177.61 294.401 179C294.951 182.309 298.302 180.33 300.401 179.8C300.292 179.412 300.519 179.068 300.802 179.063C301.859 179.048 302.539 178.016 303.601 178.2C304.035 176.643 305.673 175.941 306.317 174.561C308.043 170.866 307.452 166.593 304.868 163.347C304.666 163.093 304.883 162.576 304.759 162.214C304.003 160.003 301.935 159.688 300.001 159C298.824 155.125 298.163 151.094 296.401 147.4C294.787 147.15 294.089 145.411 292.752 144.691C291.419 143.972 290.851 145.551 290.892 146.597C290.899 146.802 291.351 147.026 291.181 147.391C291.105 147.555 290.845 147.666 290.845 147.8C290.846 147.935 291.067 148.066 291.201 148.2C290.283 149.02 288.86 149.497 288.565 150.642C287.611 154.352 290.184 157.477 291.852 160.678C292.443 161.813 291.707 163.084 290.947 164.292C290.509 164.987 290.617 166.114 290.893 166.97C291.645 169.301 293.236 171.04 294.771 173.023z"/> + </g> + <g style="fill: #000000"> + <path d="M257.611 191.409C256.124 193.26 252.712 195.829 255.629 197.757C255.823 197.886 256.193 197.89 256.366 197.756C258.387 196.191 260.39 195.288 262.826 194.706C262.95 194.677 263.224 195.144 263.593 194.983C265.206 194.28 267.216 194.338 268.4 193C272.167 193.224 275.732 192.108 279.123 190.8C280.284 190.352 281.554 189.793 282.755 189.291C284.131 188.715 285.335 187.787 286.447 186.646C286.58 186.51 286.934 186.6 287.201 186.6C287.161 185.737 288.123 185.61 288.37 184.988C288.462 184.756 288.312 184.36 288.445 184.258C290.583 182.628 291.503 180.61 290.334 178.233C290.049 177.655 289.8 177.037 289.234 176.561C288.149 175.65 287.047 176.504 286 176.2C285.841 176.828 285.112 176.656 284.726 176.854C283.867 177.293 282.534 176.708 281.675 177.146C280.313 177.841 279.072 178.01 277.65 178.387C277.338 178.469 276.56 178.373 276.4 179C276.266 178.866 276.118 178.632 276.012 178.654C274.104 179.05 272.844 179.264 271.543 180.956C271.44 181.089 270.998 180.91 270.839 181.045C269.882 181.853 269.477 183.087 268.376 183.759C268.175 183.882 267.823 183.714 267.629 183.843C266.983 184.274 266.616 184.915 265.974 185.362C265.645 185.591 265.245 185.266 265.277 185.01C265.522 183.063 266.175 181.276 265.6 179.4C267.677 176.88 270.194 174.931 272 172.2C272.015 170.034 272.707 167.888 272.594 165.811C272.584 165.618 272.296 164.885 272.17 164.538C271.858 163.684 272.764 162.618 271.92 161.894C270.516 160.691 269.224 161.567 268.4 163C266.562 163.39 264.496 164.083 262.918 162.849C261.911 162.062 261.333 161.156 260.534 160.1C259.549 158.798 259.884 157.362 259.954 155.798C259.96 155.67 259.645 155.534 259.645 155.4C259.646 155.265 259.866 155.134 260 155C259.294 154.374 259.019 153.316 258 153C258.305 151.908 257.629 151.024 256.758 150.722C254.763 150.031 253.086 151.943 251.194 152.016C250.68 152.035 250.213 150.997 249.564 150.672C249.132 150.456 248.428 150.423 248.066 150.689C247.378 151.193 246.789 151.307 246.031 151.512C244.414 151.948 243.136 153.042 241.656 153.897C240.171 154.754 239.216 156.191 238.136 157.511C237.195 158.663 237.059 161.077 238.479 161.577C240.322 162.227 241.626 159.524 243.592 159.85C243.904 159.901 244.11 160.212 244 160.6C244.389 160.709 244.607 160.48 244.8 160.2C245.658 161.219 246.822 161.556 247.76 162.429C248.73 163.333 250.476 162.915 251.491 163.912C253.02 165.414 252.461 168.095 254.4 169.4C253.814 170.713 253.207 171.99 252.872 173.417C252.59 174.623 253.584 175.82 254.795 175.729C256.053 175.635 256.315 174.876 256.8 173.8C257.067 174.067 257.536 174.364 257.495 174.58C257.038 176.967 256.011 178.96 255.553 181.391C255.494 181.708 255.189 181.91 254.8 181.8C254.332 185.949 250.28 188.343 247.735 191.508C247.332 192.01 247.328 193.259 247.737 193.662C249.14 195.049 251.1 193.503 252.8 193C253.013 191.794 253.872 190.852 255.204 190.908C255.46 190.918 255.695 190.376 256.019 190.246C256.367 190.108 256.869 190.332 257.155 190.134C258.884 188.939 260.292 187.833 262.03 186.644C262.222 186.513 262.566 186.672 262.782 186.564C263.107 186.402 263.294 186.015 263.617 185.83C263.965 185.63 264.207 185.92 264.4 186.2C263.754 186.549 263.75 187.506 263.168 187.708C262.393 187.976 261.832 188.489 261.158 188.936C260.866 189.129 260.207 188.881 260.103 189.06C259.505 190.088 258.321 190.526 257.611 191.409z"/> + </g> + <g style="fill: #000000"> + <path d="M202.2 142C202.2 142 192.962 139.128 181.8 164.8C181.8 164.8 179.4 170 177 172C174.6 174 163.4 177.6 161.4 181.6L151 197.6C151 197.6 165.8 181.6 169 179.2C169 179.2 177 170.8 173.8 177.6C173.8 177.6 159.8 188.4 161 197.6C161 197.6 155.4 212 154.6 214C154.6 214 170.6 182 173 180.8C175.4 179.6 176.6 179.6 175.4 183.2C174.2 186.8 173.8 203.2 171 205.2C171 205.2 179 184.8 178.2 181.6C178.2 181.6 181.4 178 183.8 183.2L182.6 199.2L187 211.2C187 211.2 184.6 200 186.2 184.4C186.2 184.4 184.2 174 188.2 179.6C192.2 185.2 201.8 191.2 201.8 196C201.8 196 196.6 178.4 187.4 173.6L183.4 179.6L182.2 177.6C182.2 177.6 178.6 176.8 183 170C187.4 163.2 187 162.4 187 162.4C187 162.4 193.4 169.6 195 169.6C195 169.6 208.2 162 209.4 186.4C209.4 186.4 216.2 172 207 165.2C207 165.2 192.2 163.2 193.4 158L200.6 145.6C204.2 140.4 202.6 143.2 202.6 143.2z"/> + </g> + <g style="fill: #000000"> + <path d="M182.2 158.4C182.2 158.4 169.4 158.4 166.2 163.6L159 173.2C159 173.2 176.2 163.2 180.2 162C184.2 160.8 182.2 158.4 182.2 158.4z"/> + </g> + <g style="fill: #000000"> + <path d="M142.2 164.8C142.2 164.8 140.2 166 139.8 168.8C139.4 171.6 137 172 137.8 174.8C138.6 177.6 140.6 180 140.6 176C140.6 172 142.2 170 143 168.8C143.8 167.6 145.4 163.2 142.2 164.8z"/> + </g> + <g style="fill: #000000"> + <path d="M133.4 226C133.4 226 125 222 121.8 218.4C118.6 214.8 119.052 219.966 114.2 219.6C108.353 219.159 109.4 203.2 109.4 203.2L105.4 210.8C105.4 210.8 104.2 225.2 112.2 222.8C116.107 221.628 117.4 223.2 115.8 224C114.2 224.8 121.4 225.2 118.6 226.8C115.8 228.4 130.2 223.2 127.8 233.6L133.4 226z"/> + </g> + <g style="fill: #000000"> + <path d="M120.8 240.4C120.8 240.4 105.4 244.8 101.8 235.2C101.8 235.2 97 237.6 99.2 240.6C101.4 243.6 102.6 244 102.6 244C102.6 244 108 245.2 107.4 246C106.8 246.8 104.4 250.2 104.4 250.2C104.4 250.2 114.6 244.2 120.8 240.4z"/> + </g> + <g style="fill: #ffffff"> + <path d="M349.201 318.601C348.774 320.735 347.103 321.536 345.201 322.201C343.284 321.243 340.686 318.137 338.801 320.201C338.327 319.721 337.548 319.661 337.204 318.999C336.739 318.101 337.011 317.055 336.669 316.257C336.124 314.985 335.415 313.619 335.601 312.201C337.407 311.489 338.002 309.583 337.528 307.82C337.459 307.563 337.03 307.366 337.23 307.017C337.416 306.694 337.734 306.467 338.001 306.2C337.866 306.335 337.721 306.568 337.61 306.548C337 306.442 337.124 305.805 337.254 305.418C337.839 303.672 339.853 303.408 341.201 304.6C341.457 304.035 341.966 304.229 342.401 304.2C342.351 303.621 342.759 303.094 342.957 302.674C343.475 301.576 345.104 302.682 345.901 302.07C346.977 301.245 348.04 300.546 349.118 301.149C350.927 302.162 352.636 303.374 353.835 305.115C354.41 305.949 354.65 307.23 354.592 308.188C354.554 308.835 353.173 308.483 352.83 309.412C352.185 311.16 354.016 311.679 354.772 313.017C354.97 313.366 354.706 313.67 354.391 313.768C353.98 313.896 353.196 313.707 353.334 314.16C354.306 317.353 351.55 318.031 349.201 318.601z"/> + </g> + <g style="fill: #ffffff"> + <path d="M339.6 338.201C339.593 336.463 337.992 334.707 339.201 333.001C339.336 333.135 339.467 333.356 339.601 333.356C339.736 333.356 339.867 333.135 340.001 333.001C341.496 335.217 345.148 336.145 345.006 338.991C344.984 339.438 343.897 340.356 344.801 341.001C342.988 342.349 342.933 344.719 342.001 346.601C340.763 346.315 339.551 345.952 338.401 345.401C338.753 343.915 338.636 342.231 339.456 340.911C339.89 340.213 339.603 339.134 339.6 338.201z"/> + </g> + <g style="fill: #cccccc"> + <path d="M173.4 329.201C173.4 329.201 156.542 339.337 170.6 324.001C179.4 314.401 189.4 308.801 189.4 308.801C189.4 308.801 199.8 304.4 203.4 303.2C207 302 222.2 296.8 225.4 296.4C228.6 296 238.2 292 245 296C251.8 300 259.8 304.4 259.8 304.4C259.8 304.4 243.4 296 239.8 298.4C236.2 300.8 229 300.4 223 303.6C223 303.6 208.2 308.001 205 310.001C201.8 312.001 191.4 323.601 189.8 322.801C188.2 322.001 190.2 321.601 191.4 318.801C192.6 316.001 190.6 314.401 182.6 320.801C174.6 327.201 173.4 329.201 173.4 329.201z"/> + </g> + <g style="fill: #000000"> + <path d="M180.805 323.234C180.805 323.234 182.215 310.194 190.693 311.859C190.693 311.859 198.919 307.689 201.641 305.721C201.641 305.721 209.78 304.019 211.09 303.402C229.569 294.702 244.288 299.221 244.835 298.101C245.381 296.982 265.006 304.099 268.615 308.185C269.006 308.628 258.384 302.588 248.686 300.697C240.413 299.083 218.811 300.944 207.905 306.48C204.932 307.989 195.987 313.773 193.456 313.662C190.925 313.55 180.805 323.234 180.805 323.234z"/> + </g> + <g style="fill: #cccccc"> + <path d="M177 348.801C177 348.801 161.8 346.401 178.6 344.801C178.6 344.801 196.6 342.801 200.6 337.601C200.6 337.601 214.2 328.401 217 328.001C219.8 327.601 249.8 320.401 250.2 318.001C250.6 315.601 256.2 315.601 257.8 316.401C259.4 317.201 258.6 318.401 255.8 319.201C253 320.001 221.8 336.401 215.4 337.601C209 338.801 197.4 346.401 192.6 347.601C187.8 348.801 177 348.801 177 348.801z"/> + </g> + <g style="fill: #000000"> + <path d="M196.52 341.403C196.52 341.403 187.938 340.574 196.539 339.755C196.539 339.755 205.355 336.331 207.403 333.668C207.403 333.668 214.367 328.957 215.8 328.753C217.234 328.548 231.194 324.861 231.399 323.633C231.604 322.404 265.67 309.823 270.09 313.013C273.001 315.114 263.1 313.437 253.466 317.847C252.111 318.467 218.258 333.054 214.981 333.668C211.704 334.283 205.765 338.174 203.307 338.788C200.85 339.403 196.52 341.403 196.52 341.403z"/> + </g> + <g style="fill: #000000"> + <path d="M188.6 343.601C188.6 343.601 193.8 343.201 192.6 344.801C191.4 346.401 189 345.601 189 345.601L188.6 343.601z"/> + </g> + <g style="fill: #000000"> + <path d="M181.4 345.201C181.4 345.201 186.6 344.801 185.4 346.401C184.2 348.001 181.8 347.201 181.8 347.201L181.4 345.201z"/> + </g> + <g style="fill: #000000"> + <path d="M171 346.801C171 346.801 176.2 346.401 175 348.001C173.8 349.601 171.4 348.801 171.4 348.801L171 346.801z"/> + </g> + <g style="fill: #000000"> + <path d="M163.4 347.601C163.4 347.601 168.6 347.201 167.4 348.801C166.2 350.401 163.8 349.601 163.8 349.601L163.4 347.601z"/> + </g> + <g style="fill: #000000"> + <path d="M201.8 308.001C201.8 308.001 206.2 308.001 205 309.601C203.8 311.201 200.6 310.801 200.6 310.801L201.8 308.001z"/> + </g> + <g style="fill: #000000"> + <path d="M191.8 313.601C191.8 313.601 198.306 311.46 195.8 314.801C194.6 316.401 192.2 315.601 192.2 315.601L191.8 313.601z"/> + </g> + <g style="fill: #000000"> + <path d="M180.6 318.401C180.6 318.401 185.8 318.001 184.6 319.601C183.4 321.201 181 320.401 181 320.401L180.6 318.401z"/> + </g> + <g style="fill: #000000"> + <path d="M173 324.401C173 324.401 178.2 324.001 177 325.601C175.8 327.201 173.4 326.401 173.4 326.401L173 324.401z"/> + </g> + <g style="fill: #000000"> + <path d="M166.2 329.201C166.2 329.201 171.4 328.801 170.2 330.401C169 332.001 166.6 331.201 166.6 331.201L166.2 329.201z"/> + </g> + <g style="fill: #000000"> + <path d="M205.282 335.598C205.282 335.598 212.203 335.066 210.606 337.195C209.009 339.325 205.814 338.26 205.814 338.26L205.282 335.598z"/> + </g> + <g style="fill: #000000"> + <path d="M215.682 330.798C215.682 330.798 222.603 330.266 221.006 332.395C219.409 334.525 216.214 333.46 216.214 333.46L215.682 330.798z"/> + </g> + <g style="fill: #000000"> + <path d="M226.482 326.398C226.482 326.398 233.403 325.866 231.806 327.995C230.209 330.125 227.014 329.06 227.014 329.06L226.482 326.398z"/> + </g> + <g style="fill: #000000"> + <path d="M236.882 321.598C236.882 321.598 243.803 321.066 242.206 323.195C240.609 325.325 237.414 324.26 237.414 324.26L236.882 321.598z"/> + </g> + <g style="fill: #000000"> + <path d="M209.282 303.598C209.282 303.598 216.203 303.066 214.606 305.195C213.009 307.325 209.014 307.06 209.014 307.06L209.282 303.598z"/> + </g> + <g style="fill: #000000"> + <path d="M219.282 300.398C219.282 300.398 226.203 299.866 224.606 301.995C223.009 304.125 218.614 303.86 218.614 303.86L219.282 300.398z"/> + </g> + <g style="fill: #000000"> + <path d="M196.6 340.401C196.6 340.401 201.8 340.001 200.6 341.601C199.4 343.201 197 342.401 197 342.401L196.6 340.401z"/> + </g> + <g style="fill: #992600"> + <path d="M123.4 241.2C123.4 241.2 119 250 118.6 253.2C118.6 253.2 119.4 244.4 120.6 242.4C121.8 240.4 123.4 241.2 123.4 241.2z"/> + </g> + <g style="fill: #992600"> + <path d="M105 255.2C105 255.2 101.8 269.6 102.2 272.4C102.2 272.4 101 260.8 101.4 259.6C101.8 258.4 105 255.2 105 255.2z"/> + </g> + <g style="fill: #cccccc"> + <path d="M125.8 180.6L125.6 183.8L123.4 184C123.4 184 137.6 196.6 138.2 204.2C138.2 204.2 139 196 125.8 180.6z"/> + </g> + <g style="fill: #000000"> + <path d="M129.784 181.865C129.353 181.449 129.572 180.704 129.164 180.444C128.355 179.928 130.462 179.871 130.234 179.155C129.851 177.949 130.038 177.928 129.916 176.652C129.859 176.054 130.447 174.514 130.832 174.074C132.278 172.422 130.954 169.49 132.594 167.939C132.898 167.65 133.274 167.098 133.559 166.68C134.218 165.717 135.402 165.229 136.352 164.401C136.67 164.125 136.469 163.298 137.038 163.39C137.752 163.505 138.993 163.375 138.948 164.216C138.835 166.336 137.506 168.056 136.226 169.724C136.677 170.428 136.219 171.063 135.935 171.62C134.6 174.24 134.789 177.081 134.615 179.921C134.61 180.006 134.303 180.084 134.311 180.137C134.664 182.472 135.248 184.671 136.127 186.9C136.493 187.83 136.964 188.725 137.114 189.652C137.225 190.338 137.328 191.171 136.92 191.876C138.955 194.766 137.646 197.417 138.815 200.948C139.022 201.573 140.714 203.487 140.251 203.326C137.738 202.455 137.626 202.057 137.449 201.304C137.303 200.681 136.973 199.304 136.736 198.702C136.672 198.538 136.501 196.654 136.423 196.532C134.91 194.15 136.268 194.326 134.898 191.968C133.47 191.288 132.504 190.184 131.381 189.022C131.183 188.818 132.326 188.094 132.145 187.881C131.053 186.592 129.9 185.825 130.236 184.332C130.391 183.642 130.528 182.585 129.784 181.865z"/> + </g> + <g style="fill: #000000"> + <path d="M126.2 183.6C126.2 183.6 126.6 190.4 129 192C131.4 193.6 130.2 192.8 127 191.6C123.8 190.4 125 189.6 125 189.6C125 189.6 122.2 190 124.6 192C127 194 130.6 196.4 129 196.4C127.4 196.4 119.8 192.4 119.8 189.6C119.8 186.8 118.8 182.7 118.8 182.7C118.8 182.7 119.9 181.9 124.7 182C124.7 182 126.1 182.7 126.2 183.6z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M125.4 202.2C125.4 202.2 116.88 199.409 98.4 202.8C98.4 202.8 107.431 200.722 126.2 203C136.5 204.25 125.4 202.2 125.4 202.2z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M127.498 202.129C127.498 202.129 119.252 198.611 100.547 200.392C100.547 200.392 109.725 199.103 128.226 202.995C138.38 205.131 127.498 202.129 127.498 202.129z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M129.286 202.222C129.286 202.222 121.324 198.101 102.539 198.486C102.539 198.486 111.787 197.882 129.948 203.14C139.914 206.025 129.286 202.222 129.286 202.222z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M130.556 202.445C130.556 202.445 123.732 198.138 106.858 197.04C106.858 197.04 115.197 197.21 131.078 203.319C139.794 206.672 130.556 202.445 130.556 202.445z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M245.84 212.961C245.84 212.961 244.91 213.605 245.124 212.424C245.339 211.243 273.547 198.073 277.161 198.323C277.161 198.323 246.913 211.529 245.84 212.961z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M242.446 213.6C242.446 213.6 241.57 214.315 241.691 213.121C241.812 211.927 268.899 196.582 272.521 196.548C272.521 196.548 243.404 212.089 242.446 213.6z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M239.16 214.975C239.16 214.975 238.332 215.747 238.374 214.547C238.416 213.348 258.233 197.851 268.045 195.977C268.045 195.977 250.015 204.104 239.16 214.975z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M236.284 216.838C236.284 216.838 235.539 217.532 235.577 216.453C235.615 215.373 253.449 201.426 262.28 199.74C262.28 199.74 246.054 207.054 236.284 216.838z"/> + </g> + <g style="fill: #cccccc"> + <path d="M204.6 364.801C204.6 364.801 189.4 362.401 206.2 360.801C206.2 360.801 224.2 358.801 228.2 353.601C228.2 353.601 241.8 344.401 244.6 344.001C247.4 343.601 263.8 340.001 264.2 337.601C264.6 335.201 270.6 332.801 272.2 333.601C273.8 334.401 273.8 343.601 271 344.401C268.2 345.201 249.4 352.401 243 353.601C236.6 354.801 225 362.401 220.2 363.601C215.4 364.801 204.6 364.801 204.6 364.801z"/> + </g> + <g style="fill: #000000"> + <path d="M277.6 327.401C277.6 327.401 274.6 329.001 273.4 331.601C273.4 331.601 267 342.201 252.8 345.401C252.8 345.401 229.8 354.401 222 356.401C222 356.401 208.6 361.401 201.2 360.601C201.2 360.601 194.2 360.801 200.4 362.401C200.4 362.401 220.6 360.401 224 358.601C224 358.601 239.6 353.401 242.6 350.801C245.6 348.201 263.8 343.201 266 341.201C268.2 339.201 278 330.801 277.6 327.401z"/> + </g> + <g style="fill: #000000"> + <path d="M218.882 358.911C218.882 358.911 224.111 358.685 222.958 360.234C221.805 361.784 219.357 360.91 219.357 360.91L218.882 358.911z"/> + </g> + <g style="fill: #000000"> + <path d="M211.68 360.263C211.68 360.263 216.908 360.037 215.756 361.586C214.603 363.136 212.155 362.263 212.155 362.263L211.68 360.263z"/> + </g> + <g style="fill: #000000"> + <path d="M201.251 361.511C201.251 361.511 206.48 361.284 205.327 362.834C204.174 364.383 201.726 363.51 201.726 363.51L201.251 361.511z"/> + </g> + <g style="fill: #000000"> + <path d="M193.617 362.055C193.617 362.055 198.846 361.829 197.693 363.378C196.54 364.928 194.092 364.054 194.092 364.054L193.617 362.055z"/> + </g> + <g style="fill: #000000"> + <path d="M235.415 351.513C235.415 351.513 242.375 351.212 240.84 353.274C239.306 355.336 236.047 354.174 236.047 354.174L235.415 351.513z"/> + </g> + <g style="fill: #000000"> + <path d="M245.73 347.088C245.73 347.088 251.689 343.787 251.155 348.849C250.885 351.405 246.362 349.749 246.362 349.749L245.73 347.088z"/> + </g> + <g style="fill: #000000"> + <path d="M254.862 344.274C254.862 344.274 262.021 340.573 260.287 346.035C259.509 348.485 255.493 346.935 255.493 346.935L254.862 344.274z"/> + </g> + <g style="fill: #000000"> + <path d="M264.376 339.449C264.376 339.449 268.735 334.548 269.801 341.21C270.207 343.748 265.008 342.11 265.008 342.11L264.376 339.449z"/> + </g> + <g style="fill: #000000"> + <path d="M226.834 355.997C226.834 355.997 232.062 355.77 230.91 357.32C229.757 358.869 227.308 357.996 227.308 357.996L226.834 355.997z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M262.434 234.603C262.434 234.603 261.708 235.268 261.707 234.197C261.707 233.127 279.191 219.863 288.034 218.479C288.034 218.479 271.935 225.208 262.434 234.603z"/> + </g> + <g style="fill: #000000"> + <path d="M265.4 298.4C265.4 298.4 287.401 320.801 296.601 324.401C296.601 324.401 305.801 335.601 301.801 361.601C301.801 361.601 298.601 369.201 295.401 348.401C295.401 348.401 298.601 323.201 287.401 339.201C287.401 339.201 279 329.301 285.4 329.601C285.4 329.601 288.601 331.601 289.001 330.001C289.401 328.401 281.4 314.801 264.2 300.4C247 286 265.4 298.4 265.4 298.4z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M207 337.201C207 337.201 206.8 335.401 208.6 336.201C210.4 337.001 304.601 343.201 336.201 367.201C336.201 367.201 291.001 344.001 207 337.201z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M217.4 332.801C217.4 332.801 217.2 331.001 219 331.801C220.8 332.601 357.401 331.601 381.001 364.001C381.001 364.001 359.001 338.801 217.4 332.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M229 328.801C229 328.801 228.8 327.001 230.6 327.801C232.4 328.601 405.801 315.601 429.401 348.001C429.401 348.001 419.801 322.401 229 328.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M239 324.001C239 324.001 238.8 322.201 240.6 323.001C242.4 323.801 364.601 285.2 388.201 317.601C388.201 317.601 374.801 293 239 324.001z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M181 346.801C181 346.801 180.8 345.001 182.6 345.801C184.4 346.601 202.2 348.801 204.2 387.601C204.2 387.601 197 345.601 181 346.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M172.2 348.401C172.2 348.401 172 346.601 173.8 347.401C175.6 348.201 189.8 343.601 187 382.401C187 382.401 188.2 347.201 172.2 348.401z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M164.2 348.801C164.2 348.801 164 347.001 165.8 347.801C167.6 348.601 183 349.201 170.6 371.601C170.6 371.601 180.2 347.601 164.2 348.801z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M211.526 304.465C211.526 304.465 211.082 306.464 212.631 305.247C228.699 292.622 261.141 233.72 316.826 228.086C316.826 228.086 278.518 215.976 211.526 304.465z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M222.726 302.665C222.726 302.665 221.363 301.472 223.231 300.847C225.099 300.222 337.541 227.72 376.826 235.686C376.826 235.686 349.719 228.176 222.726 302.665z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M201.885 308.767C201.885 308.767 201.376 310.366 203.087 309.39C212.062 304.27 215.677 247.059 259.254 245.804C259.254 245.804 226.843 231.09 201.885 308.767z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M181.962 319.793C181.962 319.793 180.885 321.079 182.838 320.825C193.084 319.493 214.489 278.222 258.928 283.301C258.928 283.301 226.962 268.955 181.962 319.793z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M193.2 313.667C193.2 313.667 192.389 315.136 194.258 314.511C204.057 311.237 217.141 266.625 261.729 263.078C261.729 263.078 227.603 255.135 193.2 313.667z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M174.922 324.912C174.922 324.912 174.049 325.954 175.631 325.748C183.93 324.669 201.268 291.24 237.264 295.354C237.264 295.354 211.371 283.734 174.922 324.912z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M167.323 330.821C167.323 330.821 166.318 331.866 167.909 331.748C172.077 331.439 202.715 298.36 221.183 313.862C221.183 313.862 209.168 295.139 167.323 330.821z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M236.855 298.898C236.855 298.898 235.654 297.543 237.586 297.158C239.518 296.774 360.221 239.061 398.184 251.927C398.184 251.927 372.243 241.053 236.855 298.898z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M203.4 363.201C203.4 363.201 203.2 361.401 205 362.201C206.8 363.001 222.2 363.601 209.8 386.001C209.8 386.001 219.4 362.001 203.4 363.201z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M213.8 361.601C213.8 361.601 213.6 359.801 215.4 360.601C217.2 361.401 235 363.601 237 402.401C237 402.401 229.8 360.401 213.8 361.601z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M220.6 360.001C220.6 360.001 220.4 358.201 222.2 359.001C224 359.801 248.6 363.201 272.2 395.601C272.2 395.601 236.6 358.801 220.6 360.001z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M228.225 357.972C228.225 357.972 227.788 356.214 229.678 356.768C231.568 357.322 252.002 355.423 290.099 389.599C290.099 389.599 243.924 354.656 228.225 357.972z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M238.625 353.572C238.625 353.572 238.188 351.814 240.078 352.368C241.968 352.922 276.802 357.423 328.499 392.399C328.499 392.399 254.324 350.256 238.625 353.572z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M198.2 342.001C198.2 342.001 198 340.201 199.8 341.001C201.6 341.801 255 344.401 285.4 371.201C285.4 371.201 250.499 346.426 198.2 342.001z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M188.2 346.001C188.2 346.001 188 344.201 189.8 345.001C191.6 345.801 216.2 349.201 239.8 381.601C239.8 381.601 204.2 344.801 188.2 346.001z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M249.503 348.962C249.503 348.962 248.938 347.241 250.864 347.655C252.79 348.068 287.86 350.004 341.981 381.098C341.981 381.098 264.317 346.704 249.503 348.962z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M257.903 346.562C257.903 346.562 257.338 344.841 259.264 345.255C261.19 345.668 296.26 347.604 350.381 378.698C350.381 378.698 273.317 343.904 257.903 346.562z"/> + </g> + <g style="fill: #ffffff; stroke:#000000; stroke-width:0.1"> + <path d="M267.503 341.562C267.503 341.562 266.938 339.841 268.864 340.255C270.79 340.668 313.86 345.004 403.582 379.298C403.582 379.298 282.917 338.904 267.503 341.562z"/> + </g> + <g style="fill: #000000"> + <path d="M156.2 348.401C156.2 348.401 161.4 348.001 160.2 349.601C159 351.201 156.6 350.401 156.6 350.401L156.2 348.401z"/> + </g> + <g style="fill: #000000"> + <path d="M187 362.401C187 362.401 192.2 362.001 191 363.601C189.8 365.201 187.4 364.401 187.4 364.401L187 362.401z"/> + </g> + <g style="fill: #000000"> + <path d="M178.2 362.001C178.2 362.001 183.4 361.601 182.2 363.201C181 364.801 178.6 364.001 178.6 364.001L178.2 362.001z"/> + </g> + <g style="fill: #000000"> + <path d="M82.831 350.182C82.831 350.182 87.876 351.505 86.218 352.624C84.561 353.744 82.554 352.202 82.554 352.202L82.831 350.182z"/> + </g> + <g style="fill: #000000"> + <path d="M84.831 340.582C84.831 340.582 89.876 341.905 88.218 343.024C86.561 344.144 84.554 342.602 84.554 342.602L84.831 340.582z"/> + </g> + <g style="fill: #000000"> + <path d="M77.631 336.182C77.631 336.182 82.676 337.505 81.018 338.624C79.361 339.744 77.354 338.202 77.354 338.202L77.631 336.182z"/> + </g> + <g style="fill: #cccccc"> + <path d="M157.4 411.201C157.4 411.201 155.8 411.201 151.8 413.201C149.8 413.201 138.6 416.801 133 426.801C133 426.801 145.4 417.201 157.4 411.201z"/> + </g> + <g style="fill: #cccccc"> + <path d="M245.116 503.847C245.257 504.105 245.312 504.525 245.604 504.542C246.262 504.582 247.495 504.883 247.37 504.247C246.522 499.941 245.648 495.004 241.515 493.197C240.876 492.918 239.434 493.331 239.36 494.215C239.233 495.739 239.116 497.088 239.425 498.554C239.725 499.975 241.883 499.985 242.8 498.601C243.736 500.273 244.168 502.116 245.116 503.847z"/> + </g> + <g style="fill: #cccccc"> + <path d="M234.038 508.581C234.786 509.994 234.659 511.853 236.074 512.416C236.814 512.71 238.664 511.735 238.246 510.661C237.444 508.6 237.056 506.361 235.667 504.55C235.467 504.288 235.707 503.755 235.547 503.427C234.953 502.207 233.808 501.472 232.4 501.801C231.285 504.004 232.433 506.133 233.955 507.842C234.091 507.994 233.925 508.37 234.038 508.581z"/> + </g> + <g style="fill: #cccccc"> + <path d="M194.436 503.391C194.328 503.014 194.29 502.551 194.455 502.23C194.986 501.197 195.779 500.075 195.442 499.053C195.094 497.997 193.978 498.179 193.328 498.748C192.193 499.742 192.144 501.568 191.453 502.927C191.257 503.313 191.308 503.886 190.867 504.277C190.393 504.698 189.953 506.222 190.049 506.793C190.102 507.106 189.919 517.014 190.141 516.751C190.76 516.018 193.81 506.284 193.879 505.392C193.936 504.661 194.668 504.196 194.436 503.391z"/> + </g> + <g style="fill: #cccccc"> + <path d="M168.798 496.599C171.432 494.1 174.222 491.139 173.78 487.427C173.664 486.451 171.889 486.978 171.702 487.824C170.9 491.449 168.861 494.11 166.293 496.502C164.097 498.549 162.235 504.893 162 505.401C165.697 500.145 167.954 497.399 168.798 496.599z"/> + </g> + <g style="fill: #cccccc"> + <path d="M155.224 490.635C155.747 490.265 155.445 489.774 155.662 489.442C156.615 487.984 157.916 486.738 157.934 485C157.937 484.723 157.559 484.414 157.224 484.638C156.947 484.822 156.605 484.952 156.497 485.082C154.467 487.531 153.067 490.202 151.624 493.014C151.441 493.371 150.297 497.862 150.61 497.973C150.849 498.058 152.569 493.877 152.779 493.763C154.042 493.077 154.054 491.462 155.224 490.635z"/> + </g> + <g style="fill: #cccccc"> + <path d="M171.957 510.179C172.401 509.31 173.977 508.108 173.864 507.219C173.746 506.291 174.214 504.848 173.302 505.536C172.045 506.484 168.596 507.833 168.326 513.641C168.3 514.212 171.274 511.519 171.957 510.179z"/> + </g> + <g style="fill: #cccccc"> + <path d="M186.4 493.001C186.8 492.333 187.508 492.806 187.967 492.543C188.615 492.171 189.226 491.613 189.518 490.964C190.488 488.815 192.257 486.995 192.4 484.601C190.909 483.196 190.23 485.236 189.6 486.201C188.277 484.554 187.278 486.428 185.978 486.947C185.908 486.975 185.695 486.628 185.62 486.655C184.443 487.095 183.763 488.176 182.765 488.957C182.594 489.091 182.189 488.911 182.042 489.047C181.39 489.65 180.417 489.975 180.137 490.657C179.027 493.364 175.887 495.459 174 503.001C174.381 503.91 178.512 496.359 178.999 495.661C179.835 494.465 179.953 497.322 181.229 496.656C181.28 496.629 181.466 496.867 181.6 497.001C181.794 496.721 182.012 496.492 182.4 496.601C182.4 496.201 182.266 495.645 182.467 495.486C183.704 494.509 183.62 493.441 184.4 492.201C184.858 492.99 185.919 492.271 186.4 493.001z"/> + </g> + <g style="fill: #cccccc"> + <path d="M246.2 547.401C246.2 547.401 253.6 527.001 249.2 515.801C249.2 515.801 260.6 537.401 256 548.601C256 548.601 255.6 538.201 251.6 533.201C251.6 533.201 247.6 546.001 246.2 547.401z"/> + </g> + <g style="fill: #cccccc"> + <path d="M231.4 544.801C231.4 544.801 236.8 536.001 228.8 517.601C228.8 517.601 228 538.001 221.2 549.001C221.2 549.001 235.4 528.801 231.4 544.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M221.4 542.801C221.4 542.801 221.2 522.801 221.6 519.801C221.6 519.801 217.8 536.401 207.6 546.001C207.6 546.001 222 534.001 221.4 542.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M211.8 510.801C211.8 510.801 217.8 524.401 207.8 542.801C207.8 542.801 214.2 530.601 209.4 523.601C209.4 523.601 212 520.201 211.8 510.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M192.6 542.401C192.6 542.401 191.6 526.801 193.4 524.601C193.4 524.601 193.6 518.201 193.2 517.201C193.2 517.201 197.2 511.001 197.4 518.401C197.4 518.401 198.8 526.201 201.6 530.801C201.6 530.801 205.2 536.201 205 542.601C205 542.601 195 512.401 192.6 542.401z"/> + </g> + <g style="fill: #cccccc"> + <path d="M189 514.801C189 514.801 182.4 525.601 180.6 544.601C180.6 544.601 179.2 538.401 183 524.001C183 524.001 187.2 508.601 189 514.801z"/> + </g> + <g style="fill: #cccccc"> + <path d="M167.2 534.601C167.2 534.601 172.2 529.201 173.6 524.201C173.6 524.201 177.2 508.401 170.8 517.001C170.8 517.001 171 525.001 162.8 532.401C162.8 532.401 167.6 530.001 167.2 534.601z"/> + </g> + <g style="fill: #cccccc"> + <path d="M161.4 529.601C161.4 529.601 164.8 512.201 165.6 511.401C165.6 511.401 167.4 508.001 164.6 511.201C164.6 511.201 155.8 530.401 151.8 537.001C151.8 537.001 159.8 527.801 161.4 529.601z"/> + </g> + <g style="fill: #cccccc"> + <path d="M155.6 513.001C155.6 513.001 167.2 490.601 145.4 516.401C145.4 516.401 156.4 506.601 155.6 513.001z"/> + </g> + <g style="fill: #cccccc"> + <path d="M140.2 498.401C140.2 498.401 145 479.601 147.6 479.801C147.6 479.801 155.8 470.801 149.2 481.401C149.2 481.401 143.2 491.001 143.8 500.801C143.8 500.801 143.2 491.201 140.2 498.401z"/> + </g> + <g style="fill: #cccccc"> + <path d="M470.5 487C470.5 487 458.5 477 456 473.5C456 473.5 469.5 492 469.5 499C469.5 499 472 491.5 470.5 487z"/> + </g> + <g style="fill: #cccccc"> + <path d="M476 465C476 465 455 450 451.5 442.5C451.5 442.5 478 472 478 476.5C478 476.5 478.5 467.5 476 465z"/> + </g> + <g style="fill: #cccccc"> + <path d="M493 311C493 311 481 303 479.5 305C479.5 305 490 311.5 492.5 320C492.5 320 491 311 493 311z"/> + </g> + <g style="fill: #cccccc"> + <path d="M501.5 391.5L484 379.5C484 379.5 503 396.5 503.5 400.5L501.5 391.5z"/> + </g> + <g style="stroke:#000000"> + <path d="M110.75 369L132.75 373.75"/> + </g> + <g style="stroke:#000000"> + <path d="M161 531C161 531 160.5 527.5 151.5 538"/> + </g> + <g style="stroke:#000000"> + <path d="M166.5 536C166.5 536 168.5 529.5 162 534"/> + </g> + <g style="stroke:#000000"> + <path d="M220.5 544.5C220.5 544.5 222 533.5 210.5 546.5"/> + </g> </svg> diff --git a/result/valid/REC-xml-19980210.xml b/result/valid/REC-xml-19980210.xml index 7f70749f..a27855db 100644 --- a/result/valid/REC-xml-19980210.xml +++ b/result/valid/REC-xml-19980210.xml @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> <!DOCTYPE spec SYSTEM "dtds/spec.dtd" [ -<!ENTITY XML.version "1.0"> +<!-- LAST TOUCHED BY: Tim Bray, 8 February 1997 --><!-- The words 'FINAL EDIT' in comments mark places where changes +need to be made after approval of the document by the ERB, before +publication. --><!ENTITY XML.version "1.0"> <!ENTITY doc.date "10 February 1998"> <!ENTITY iso6.doc.date "19980210"> <!ENTITY w3c.doc.date "02-Feb-1998"> @@ -15,58 +17,51 @@ <!ENTITY br "\n"> <!ENTITY cellback "#c0d9c0"> <!ENTITY mdash "--"> -<!ENTITY com "--"> +<!-- —, but nsgmls doesn't grok hex --><!ENTITY com "--"> <!ENTITY como "--"> <!ENTITY comc "--"> <!ENTITY hcro "&#x"> -<!ENTITY nbsp " "> +<!-- <!ENTITY nbsp " "> --><!ENTITY nbsp " "> <!ENTITY magicents "<code>amp</code>, <code>lt</code>, <code>gt</code>, <code>apos</code>, <code>quot</code>"> -<!ENTITY doc.audience "public review and discussion"> +<!-- audience and distribution status: for use at publication time --><!ENTITY doc.audience "public review and discussion"> <!ENTITY doc.distribution "may be distributed freely, as long as all text and legal notices remain intact"> ]> -<!-- LAST TOUCHED BY: Tim Bray, 8 February 1997 --> -<!-- The words 'FINAL EDIT' in comments mark places where changes -need to be made after approval of the document by the ERB, before -publication. --> -<!-- —, but nsgmls doesn't grok hex --> -<!-- <!ENTITY nbsp " "> --> -<!-- audience and distribution status: for use at publication time --> <!-- for Panorama *--> <?VERBATIM "eg" ?> <spec> - <header> - <title>Extensible Markup Language (XML) 1.0</title> - <version/> - <w3c-designation>REC-xml-&iso6.doc.date;</w3c-designation> - <w3c-doctype>W3C Recommendation</w3c-doctype> - <pubdate> - <day>&draft.day;</day> - <month>&draft.month;</month> - <year>&draft.year;</year> - </pubdate> - <publoc> - <loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;"> +<header> +<title>Extensible Markup Language (XML) 1.0</title> +<version/> +<w3c-designation>REC-xml-&iso6.doc.date;</w3c-designation> +<w3c-doctype>W3C Recommendation</w3c-doctype> +<pubdate> +<day>&draft.day;</day> +<month>&draft.month;</month> +<year>&draft.year;</year> +</pubdate> +<publoc> +<loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;"> http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;</loc> - <loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml"> +<loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml"> http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml</loc> - <loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html"> +<loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html"> http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html</loc> - <loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf"> +<loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf"> http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf</loc> - <loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps"> +<loc href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps"> http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps</loc> - </publoc> - <latestloc> - <loc href="http://www.w3.org/TR/REC-xml"> +</publoc> +<latestloc> +<loc href="http://www.w3.org/TR/REC-xml"> http://www.w3.org/TR/REC-xml</loc> - </latestloc> - <prevlocs> - <loc href="http://www.w3.org/TR/PR-xml-971208"> +</latestloc> +<prevlocs> +<loc href="http://www.w3.org/TR/PR-xml-971208"> http://www.w3.org/TR/PR-xml-971208</loc> <!-- <loc href='http://www.w3.org/TR/WD-xml-961114'> @@ -79,43 +74,43 @@ http://www.w3.org/TR/WD-xml-lang-970630</loc> http://www.w3.org/TR/WD-xml-970807</loc> <loc href='http://www.w3.org/TR/WD-xml-971117'> http://www.w3.org/TR/WD-xml-971117</loc>--> - </prevlocs> - <authlist> - <author> - <name>Tim Bray</name> - <affiliation>Textuality and Netscape</affiliation> - <email href="mailto:tbray@textuality.com">tbray@textuality.com</email> - </author> - <author> - <name>Jean Paoli</name> - <affiliation>Microsoft</affiliation> - <email href="mailto:jeanpa@microsoft.com">jeanpa@microsoft.com</email> - </author> - <author> - <name>C. M. Sperberg-McQueen</name> - <affiliation>University of Illinois at Chicago</affiliation> - <email href="mailto:cmsmcq@uic.edu">cmsmcq@uic.edu</email> - </author> - </authlist> - <abstract> - <p>The Extensible Markup Language (XML) is a subset of +</prevlocs> +<authlist> +<author> +<name>Tim Bray</name> +<affiliation>Textuality and Netscape</affiliation> +<email href="mailto:tbray@textuality.com">tbray@textuality.com</email> +</author> +<author> +<name>Jean Paoli</name> +<affiliation>Microsoft</affiliation> +<email href="mailto:jeanpa@microsoft.com">jeanpa@microsoft.com</email> +</author> +<author> +<name>C. M. Sperberg-McQueen</name> +<affiliation>University of Illinois at Chicago</affiliation> +<email href="mailto:cmsmcq@uic.edu">cmsmcq@uic.edu</email> +</author> +</authlist> +<abstract> +<p>The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.</p> - </abstract> - <status> - <p>This document has been reviewed by W3C Members and +</abstract> +<status> +<p>This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited -as a normative reference from another document. W3C's +as a normative reference from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.</p> - <p> +<p> This document specifies a syntax created by subsetting an existing, widely used international text processing standard (Standard Generalized Markup Language, ISO 8879:1986(E) as amended and @@ -124,55 +119,55 @@ XML Activity, details of which can be found at <loc href="http://www.w3.org/XML" current W3C Recommendations and other technical documents can be found at <loc href="http://www.w3.org/TR">http://www.w3.org/TR</loc>. </p> - <p>This specification uses the term URI, which is defined by <bibref ref="Berners-Lee"/>, a work in progress expected to update <bibref ref="RFC1738"/> and <bibref ref="RFC1808"/>. +<p>This specification uses the term URI, which is defined by <bibref ref="Berners-Lee"/>, a work in progress expected to update <bibref ref="RFC1738"/> and <bibref ref="RFC1808"/>. </p> - <p>The list of known errors in this specification is +<p>The list of known errors in this specification is available at <loc href="http://www.w3.org/XML/xml-19980210-errata">http://www.w3.org/XML/xml-19980210-errata</loc>.</p> - <p>Please report errors in this document to +<p>Please report errors in this document to <loc href="mailto:xml-editor@w3.org">xml-editor@w3.org</loc>. </p> - </status> - <pubstmt> - <p>Chicago, Vancouver, Mountain View, et al.: +</status> +<pubstmt> +<p>Chicago, Vancouver, Mountain View, et al.: World-Wide Web Consortium, XML Working Group, 1996, 1997.</p> - </pubstmt> - <sourcedesc> - <p>Created in electronic form.</p> - </sourcedesc> - <langusage> - <language id="EN">English</language> - <language id="ebnf">Extended Backus-Naur Form (formal grammar)</language> - </langusage> - <revisiondesc> - <slist> - <sitem>1997-12-03 : CMSMcQ : yet further changes</sitem> - <sitem>1997-12-02 : TB : further changes (see TB to XML WG, +</pubstmt> +<sourcedesc> +<p>Created in electronic form.</p> +</sourcedesc> +<langusage> +<language id="EN">English</language> +<language id="ebnf">Extended Backus-Naur Form (formal grammar)</language> +</langusage> +<revisiondesc> +<slist> +<sitem>1997-12-03 : CMSMcQ : yet further changes</sitem> +<sitem>1997-12-02 : TB : further changes (see TB to XML WG, 2 December 1997)</sitem> - <sitem>1997-12-02 : CMSMcQ : deal with as many corrections and +<sitem>1997-12-02 : CMSMcQ : deal with as many corrections and comments from the proofreaders as possible: entify hard-coded document date in pubdate element, change expansion of entity WebSGML, update status description as per Dan Connolly (am not sure about refernece to Berners-Lee et al.), -add 'The' to abstract as per WG decision, +add 'The' to abstract as per WG decision, move Relationship to Existing Standards to back matter and combine with References, re-order back matter so normative appendices come first, re-tag back matter so informative appendices are tagged informdiv1, -remove XXX XXX from list of 'normative' specs in prose, +remove XXX XXX from list of 'normative' specs in prose, move some references from Other References to Normative References, add RFC 1738, 1808, and 2141 to Other References (they are not normative since we do not require the processor to enforce any rules based on them), -add reference to 'Fielding draft' (Berners-Lee et al.), +add reference to 'Fielding draft' (Berners-Lee et al.), move notation section to end of body, drop URIchar non-terminal and use SkipLit instead, -lose stray reference to defunct nonterminal 'markupdecls', -move reference to Aho et al. into appendix (Tim's right), +lose stray reference to defunct nonterminal 'markupdecls', +move reference to Aho et al. into appendix (Tim's right), add prose note saying that hash marks and fragment identifiers are NOT part of the URI formally speaking, and are NOT legal in -system identifiers (processor 'may' signal an error). +system identifiers (processor 'may' signal an error). Work through: Tim Bray reacting to James Clark, Tim Bray on his own, @@ -180,12 +175,12 @@ Eve Maler, NOT DONE YET: change binary / text to unparsed / parsed. -handle James's suggestion about < in attriubte values +handle James's suggestion about < in attriubte values uppercase hex characters, namechar list, </sitem> - <sitem>1997-12-01 : JB : add some column-width parameters</sitem> - <sitem>1997-12-01 : CMSMcQ : begin round of changes to incorporate +<sitem>1997-12-01 : JB : add some column-width parameters</sitem> +<sitem>1997-12-01 : CMSMcQ : begin round of changes to incorporate recent WG decisions and other corrections: binding sources of character encoding info (27 Aug / 3 Sept), correct wording of Faust quotation (restore dropped line), @@ -193,7 +188,7 @@ drop SDD from EncodingDecl, change text at version number 1.0, drop misleading (wrong!) sentence about ignorables and extenders, modify definition of PCData to make bar on msc grammatical, -change grammar's handling of internal subset (drop non-terminal markupdecls), +change grammar's handling of internal subset (drop non-terminal markupdecls), change definition of includeSect to allow conditional sections, add integral-declaration constraint on internal subset, drop misleading / dangerous sentence about relationship of @@ -203,18 +198,18 @@ add rule about space normalization in public identifiers, add description of how to generate our name-space rules from Unicode character database (needs further work!). </sitem> - <sitem>1997-10-08 : TB : Removed %-constructs again, new rules +<sitem>1997-10-08 : TB : Removed %-constructs again, new rules for PE appearance.</sitem> - <sitem>1997-10-01 : TB : Case-sensitive markup; cleaned up +<sitem>1997-10-01 : TB : Case-sensitive markup; cleaned up element-type defs, lotsa little edits for style</sitem> - <sitem>1997-09-25 : TB : Change to elm's new DTD, with +<sitem>1997-09-25 : TB : Change to elm's new DTD, with substantial detail cleanup as a side-effect</sitem> - <sitem>1997-07-24 : CMSMcQ : correct error (lost *) in definition +<sitem>1997-07-24 : CMSMcQ : correct error (lost *) in definition of ignoreSectContents (thanks to Makoto Murata)</sitem> - <sitem>Allow all empty elements to have end-tags, consistent with +<sitem>Allow all empty elements to have end-tags, consistent with SGML TC (as per JJC).</sitem> - <sitem>1997-07-23 : CMSMcQ : pre-emptive strike on pending corrections: -introduce the term 'empty-element tag', note that all empty elements +<sitem>1997-07-23 : CMSMcQ : pre-emptive strike on pending corrections: +introduce the term 'empty-element tag', note that all empty elements may use it, and elements declared EMPTY must use it. Add WFC requiring encoding decl to come first in an entity. Redefine notations to point to PIs as well as binary entities. @@ -223,21 +218,21 @@ examples with Byte Order Mark. Add content model as a term and clarify that it applies to both mixed and element content. </sitem> - <sitem>1997-06-30 : CMSMcQ : change date, some cosmetic changes, +<sitem>1997-06-30 : CMSMcQ : change date, some cosmetic changes, changes to productions for choice, seq, Mixed, NotationType, -Enumeration. Follow James Clark's suggestion and prohibit +Enumeration. Follow James Clark's suggestion and prohibit conditional sections in internal subset. TO DO: simplify -production for ignored sections as a result, since we don't -need to worry about parsers which don't expand PErefs finding +production for ignored sections as a result, since we don't +need to worry about parsers which don't expand PErefs finding a conditional section.</sitem> - <sitem>1997-06-29 : TB : various edits</sitem> - <sitem>1997-06-29 : CMSMcQ : further changes: +<sitem>1997-06-29 : TB : various edits</sitem> +<sitem>1997-06-29 : CMSMcQ : further changes: Suppress old FINAL EDIT comments and some dead material. -Revise occurrences of % in grammar to exploit Henry Thompson's pun, +Revise occurrences of % in grammar to exploit Henry Thompson's pun, especially markupdecl and attdef. Remove RMD requirement relating to element content (?). </sitem> - <sitem>1997-06-28 : CMSMcQ : Various changes for 1 July draft: +<sitem>1997-06-28 : CMSMcQ : Various changes for 1 July draft: Add text for draconian error handling (introduce the term Fatal Error). RE deleta est (changing wording from @@ -248,44 +243,44 @@ Add colon as name character. Change def of %operator. Change standard definitions of lt, gt, amp. Strip leading zeros from #x00nn forms.</sitem> - <sitem>1997-04-02 : CMSMcQ : final corrections of editorial errors -found in last night's proofreading. Reverse course once more on -well-formed: Webster's Second hyphenates it, and that's enough +<sitem>1997-04-02 : CMSMcQ : final corrections of editorial errors +found in last night's proofreading. Reverse course once more on +well-formed: Webster's Second hyphenates it, and that's enough for me.</sitem> - <sitem>1997-04-01 : CMSMcQ : corrections from JJC, EM, HT, and self</sitem> - <sitem>1997-03-31 : Tim Bray : many changes</sitem> - <sitem>1997-03-29 : CMSMcQ : some Henry Thompson (on entity handling), +<sitem>1997-04-01 : CMSMcQ : corrections from JJC, EM, HT, and self</sitem> +<sitem>1997-03-31 : Tim Bray : many changes</sitem> +<sitem>1997-03-29 : CMSMcQ : some Henry Thompson (on entity handling), some Charles Goldfarb, some ERB decisions (PE handling in miscellaneous declarations. Changed Ident element to accept def attribute. Allow normalization of Unicode characters. move def of systemliteral into section on literals.</sitem> - <sitem>1997-03-28 : CMSMcQ : make as many corrections as possible, from +<sitem>1997-03-28 : CMSMcQ : make as many corrections as possible, from Terry Allen, Norbert Mikula, James Clark, Jon Bosak, Henry Thompson, Paul Grosso, and self. Among other things: give in on "well formed" (Terry is right), tentatively rename QuotedCData as AttValue and Literal as EntityValue to be more informative, since attribute values are the <emph>only</emph> place QuotedCData was used, and -vice versa for entity text and Literal. (I'd call it Entity Text, +vice versa for entity text and Literal. (I'd call it Entity Text, but 8879 uses that name for both internal and external entities.)</sitem> - <sitem>1997-03-26 : CMSMcQ : resynch the two forks of this draft, reapply -my changes dated 03-20 and 03-21. Normalize old 'may not' to 'must not' -except in the one case where it meant 'may or may not'.</sitem> - <sitem>1997-03-21 : TB : massive changes on plane flight from Chicago +<sitem>1997-03-26 : CMSMcQ : resynch the two forks of this draft, reapply +my changes dated 03-20 and 03-21. Normalize old 'may not' to 'must not' +except in the one case where it meant 'may or may not'.</sitem> +<sitem>1997-03-21 : TB : massive changes on plane flight from Chicago to Vancouver</sitem> - <sitem>1997-03-21 : CMSMcQ : correct as many reported errors as possible. +<sitem>1997-03-21 : CMSMcQ : correct as many reported errors as possible. </sitem> - <sitem>1997-03-20 : CMSMcQ : correct typos listed in CMSMcQ hand copy of spec.</sitem> - <sitem>1997-03-20 : CMSMcQ : cosmetic changes preparatory to revision for +<sitem>1997-03-20 : CMSMcQ : correct typos listed in CMSMcQ hand copy of spec.</sitem> +<sitem>1997-03-20 : CMSMcQ : cosmetic changes preparatory to revision for WWW conference April 1997: restore some of the internal entity references (e.g. to docdate, etc.), change character xA0 to &nbsp; and define nbsp as &#160;, and refill a lot of paragraphs for legibility.</sitem> - <sitem>1996-11-12 : CMSMcQ : revise using Tim's edits: +<sitem>1996-11-12 : CMSMcQ : revise using Tim's edits: Add list type of NUMBERED and change most lists either to BULLETS or to NUMBERED. Suppress QuotedNames, Names (not used). Correct trivial-grammar doc type decl. -Rename 'marked section' as 'CDATA section' passim. +Rename 'marked section' as 'CDATA section' passim. Also edits from James Clark: Define the set of characters from which [^abc] subtracts. Charref should use just [0-9] not Digit. @@ -293,9 +288,9 @@ Location info needs cleaner treatment: remove? (ERB question). One example of a PI has wrong pic. Clarify discussion of encoding names. -Encoding failure should lead to unspecified results; don't +Encoding failure should lead to unspecified results; don't prescribe error recovery. -Don't require exposure of entity boundaries. +Don't require exposure of entity boundaries. Ignore white space in element content. Reserve entity names of the form u-NNNN. Clarify relative URLs. @@ -303,33 +298,33 @@ And some of my own: Correct productions for content model: model cannot consist of a name, so "elements ::= cp" is no good. </sitem> - <sitem>1996-11-11 : CMSMcQ : revise for style. +<sitem>1996-11-11 : CMSMcQ : revise for style. Add new rhs to entity declaration, for parameter entities.</sitem> - <sitem>1996-11-10 : CMSMcQ : revise for style. +<sitem>1996-11-10 : CMSMcQ : revise for style. Fix / complete section on names, characters. Add sections on parameter entities, conditional sections. Still to do: Add compatibility note on deterministic content models. Finish stylistic revision.</sitem> - <sitem>1996-10-31 : TB : Add Entity Handling section</sitem> - <sitem>1996-10-30 : TB : Clean up term & termdef. Slip in +<sitem>1996-10-31 : TB : Add Entity Handling section</sitem> +<sitem>1996-10-30 : TB : Clean up term & termdef. Slip in ERB decision re EMPTY.</sitem> - <sitem>1996-10-28 : TB : Change DTD. Implement some of Michael's +<sitem>1996-10-28 : TB : Change DTD. Implement some of Michael's suggestions. Change comments back to //. Introduce language for XML namespace reservation. Add section on white-space handling. Lots more cleanup.</sitem> - <sitem>1996-10-24 : CMSMcQ : quick tweaks, implement some ERB +<sitem>1996-10-24 : CMSMcQ : quick tweaks, implement some ERB decisions. Characters are not integers. Comments are /* */ not //. Add bibliographic refs to 10646, HyTime, Unicode. -Rename old Cdata as MsData since it's <emph>only</emph> seen +Rename old Cdata as MsData since it's <emph>only</emph> seen in marked sections. Call them attribute-value pairs not name-value pairs, except once. Internal subset is optional, needs -'?'. Implied attributes should be signaled to the app, not +'?'. Implied attributes should be signaled to the app, not have values supplied by processor.</sitem> - <sitem>1996-10-16 : TB : track down & excise all DSD references; +<sitem>1996-10-16 : TB : track down & excise all DSD references; introduce some EBNF for entity declarations.</sitem> - <sitem>1996-10-?? : TB : consistency check, fix up scraps so +<sitem>1996-10-?? : TB : consistency check, fix up scraps so they all parse, get formatter working, correct a few productions.</sitem> - <sitem>1996-10-10/11 : CMSMcQ : various maintenance, stylistic, and +<sitem>1996-10-10/11 : CMSMcQ : various maintenance, stylistic, and organizational changes: Replace a few literals with xmlpio and pic entities, to make them consistent and ensure we can change pic @@ -340,33 +335,33 @@ Move old 2.2 XML Processors and Apps into intro. Mention comments, PIs, and marked sections in discussion of delimiter escaping. Streamline discussion of doctype decl syntax. -Drop old section of 'PI syntax' for doctype decl, and add +Drop old section of 'PI syntax' for doctype decl, and add section on partial-DTD summary PIs to end of Logical Structures section. -Revise DSD syntax section to use Tim's subset-in-a-PI +Revise DSD syntax section to use Tim's subset-in-a-PI mechanism.</sitem> - <sitem>1996-10-10 : TB : eliminate name recognizers (and more?)</sitem> - <sitem>1996-10-09 : CMSMcQ : revise for style, consistency through 2.3 +<sitem>1996-10-10 : TB : eliminate name recognizers (and more?)</sitem> +<sitem>1996-10-09 : CMSMcQ : revise for style, consistency through 2.3 (Characters)</sitem> - <sitem>1996-10-09 : CMSMcQ : re-unite everything for convenience, +<sitem>1996-10-09 : CMSMcQ : re-unite everything for convenience, at least temporarily, and revise quickly</sitem> - <sitem>1996-10-08 : TB : first major homogenization pass</sitem> - <sitem>1996-10-08 : TB : turn "current" attribute on div type into +<sitem>1996-10-08 : TB : first major homogenization pass</sitem> +<sitem>1996-10-08 : TB : turn "current" attribute on div type into CDATA</sitem> - <sitem>1996-10-02 : TB : remould into skeleton + entities</sitem> - <sitem>1996-09-30 : CMSMcQ : add a few more sections prior to exchange +<sitem>1996-10-02 : TB : remould into skeleton + entities</sitem> +<sitem>1996-09-30 : CMSMcQ : add a few more sections prior to exchange with Tim.</sitem> - <sitem>1996-09-20 : CMSMcQ : finish transcribing notes.</sitem> - <sitem>1996-09-19 : CMSMcQ : begin transcribing notes for draft.</sitem> - <sitem>1996-09-13 : CMSMcQ : made outline from notes of 09-06, +<sitem>1996-09-20 : CMSMcQ : finish transcribing notes.</sitem> +<sitem>1996-09-19 : CMSMcQ : begin transcribing notes for draft.</sitem> +<sitem>1996-09-13 : CMSMcQ : made outline from notes of 09-06, do some housekeeping</sitem> - </slist> - </revisiondesc> - </header> - <body> - <div1 id="sec-intro"> - <head>Introduction</head> - <p>Extensible Markup Language, abbreviated XML, describes a class of +</slist> +</revisiondesc> +</header> +<body> +<div1 id="sec-intro"> +<head>Introduction</head> +<p>Extensible Markup Language, abbreviated XML, describes a class of data objects called <termref def="dt-xml-doc">XML documents</termref> and partially describes the behavior of computer programs which process them. XML is an application profile or @@ -375,40 +370,40 @@ Language <bibref ref="ISO8879"/>. By construction, XML documents are conforming SGML documents. </p> - <p>XML documents are made up of storage units called <termref def="dt-entity">entities</termref>, which contain either parsed +<p>XML documents are made up of storage units called <termref def="dt-entity">entities</termref>, which contain either parsed or unparsed data. Parsed data is made up of <termref def="dt-character">characters</termref>, some of which form <termref def="dt-chardata">character data</termref>, and some of which form <termref def="dt-markup">markup</termref>. -Markup encodes a description of the document's storage layout and +Markup encodes a description of the document's storage layout and logical structure. XML provides a mechanism to impose constraints on the storage layout and logical structure.</p> - <p><termdef id="dt-xml-proc" term="XML Processor">A software module +<p><termdef id="dt-xml-proc" term="XML Processor">A software module called an <term>XML processor</term> is used to read XML documents and provide access to their content and structure.</termdef> <termdef id="dt-app" term="Application">It is assumed that an XML processor is doing its work on behalf of another module, called the <term>application</term>.</termdef> This specification describes the required behavior of an XML processor in terms of how it must read XML data and the information it must provide to the application.</p> - <div2 id="sec-origin-goals"> - <head>Origin and Goals</head> - <p>XML was developed by an XML Working Group (originally known as the +<div2 id="sec-origin-goals"> +<head>Origin and Goals</head> +<p>XML was developed by an XML Working Group (originally known as the SGML Editorial Review Board) formed under the auspices of the World Wide Web Consortium (W3C) in 1996. It was chaired by Jon Bosak of Sun Microsystems with the active participation of an XML Special Interest Group (previously known as the SGML Working Group) also organized by the W3C. The membership of the XML Working Group is given -in an appendix. Dan Connolly served as the WG's contact with the W3C. +in an appendix. Dan Connolly served as the WG's contact with the W3C. </p> - <p>The design goals for XML are:<olist><item><p>XML shall be straightforwardly usable over the +<p>The design goals for XML are:<olist><item><p>XML shall be straightforwardly usable over the Internet.</p></item><item><p>XML shall support a wide variety of applications.</p></item><item><p>XML shall be compatible with SGML.</p></item><item><p>It shall be easy to write programs which process XML documents.</p></item><item><p>The number of optional features in XML is to be kept to the absolute minimum, ideally zero.</p></item><item><p>XML documents should be human-legible and reasonably clear.</p></item><item><p>The XML design should be prepared quickly.</p></item><item><p>The design of XML shall be formal and concise.</p></item><item><p>XML documents shall be easy to create.</p></item><item><p>Terseness in XML markup is of minimal importance.</p></item></olist> </p> - <p>This specification, +<p>This specification, together with associated standards (Unicode and ISO/IEC 10646 for characters, Internet RFC 1766 for language identification tags, @@ -417,13 +412,13 @@ ISO 3166 for country name codes), provides all the information necessary to understand XML Version &XML.version; and construct computer programs to process it.</p> - <p>This version of the XML specification +<p>This version of the XML specification <!-- is for &doc.audience;.--> &doc.distribution;.</p> - </div2> - <div2 id="sec-terminology"> - <head>Terminology</head> - <p>The terminology used to describe XML documents is defined in the body of +</div2> +<div2 id="sec-terminology"> +<head>Terminology</head> +<p>The terminology used to describe XML documents is defined in the body of this specification. The terms defined in the following list are used in building those definitions and in describing the actions of an XML processor: @@ -447,7 +442,7 @@ the processor may make unprocessed data from the document (with intermingled character data and markup) available to the application. Once a fatal error is detected, however, the processor must not continue normal processing (i.e., it must not -continue to pass character data and information about the document's +continue to pass character data and information about the document's logical structure to the application in the normal way). </termdef></p></def></gitem><gitem><label>at user option</label><def><p>Conforming software may or must (depending on the modal verb in the sentence) behave as described; if it does, it must @@ -483,13 +478,13 @@ documents can be processed by the existing installed base of SGML processors which predate the &WebSGML;.</termdef></p></def></gitem></glist> </p> - </div2> - </div1> +</div2> +</div1> <!-- &Docs; --> - <div1 id="sec-documents"> - <head>Documents</head> - <p> - <termdef id="dt-xml-doc" term="XML Document"> +<div1 id="sec-documents"> +<head>Documents</head> +<p> +<termdef id="dt-xml-doc" term="XML Document"> A data object is an <term>XML document</term> if it is <termref def="dt-wellformed">well-formed</termref>, as @@ -497,8 +492,8 @@ defined in this specification. A well-formed XML document may in addition be <termref def="dt-valid">valid</termref> if it meets certain further constraints.</termdef> - </p> - <p>Each XML document has both a logical and a physical structure. +</p> +<p>Each XML document has both a logical and a physical structure. Physically, the document is composed of units called <termref def="dt-entity">entities</termref>. An entity may <termref def="dt-entref">refer</termref> to other entities to cause their inclusion in the document. A document begins in a "root" or <termref def="dt-docent">document entity</termref>. Logically, the document is composed of declarations, elements, @@ -510,9 +505,9 @@ markup. The logical and physical structures must nest properly, as described in <specref ref="wf-entities"/>. </p> - <div2 id="sec-well-formed"> - <head>Well-Formed XML Documents</head> - <p><termdef id="dt-wellformed" term="Well-Formed"> +<div2 id="sec-well-formed"> +<head>Well-Formed XML Documents</head> +<p><termdef id="dt-wellformed" term="Well-Formed"> A textual object is a well-formed XML document if:</termdef> <olist><item><p>Taken as a whole, it @@ -520,12 +515,12 @@ matches the production labeled <nt def="NT-document">document</nt>.</p></item><i meets all the well-formedness constraints given in this specification.</p></item><item><p>Each of the <termref def="dt-parsedent">parsed entities</termref> which is referenced directly or indirectly within the document is <titleref href="wf-entities">well-formed</titleref>.</p></item></olist></p> - <p> +<p> <scrap lang="ebnf" id="document"><head>Document</head><prod id="NT-document"><lhs>document</lhs><rhs><nt def="NT-prolog">prolog</nt> <nt def="NT-element">element</nt> <nt def="NT-Misc">Misc</nt>*</rhs></prod></scrap> </p> - <p>Matching the <nt def="NT-document">document</nt> production +<p>Matching the <nt def="NT-document">document</nt> production implies that: <olist><item><p>It contains one or more <termref def="dt-element">elements</termref>.</p></item><!--* N.B. some readers (notably JC) find the following @@ -544,8 +539,8 @@ simply stated, the elements, delimited by start- and end-tags, nest properly within each other. </p></item></olist> </p> - <p> - <termdef id="dt-parentchild" term="Parent/Child">As a consequence +<p> +<termdef id="dt-parentchild" term="Parent/Child">As a consequence of this, for each non-root element <code>C</code> in the document, there is one other element <code>P</code> @@ -556,11 +551,11 @@ the content of any other element that is in the content of <code>P</code> is referred to as the <term>parent</term> of <code>C</code>, and <code>C</code> as a <term>child</term> of <code>P</code>.</termdef> - </p> - </div2> - <div2 id="charsets"> - <head>Characters</head> - <p><termdef id="dt-text" term="Text">A parsed entity contains +</p> +</div2> +<div2 id="charsets"> +<head>Characters</head> +<p><termdef id="dt-text" term="Text">A parsed entity contains <term>text</term>, a sequence of <termref def="dt-character">characters</termref>, which may represent markup or character data.</termdef> @@ -576,7 +571,7 @@ of <bibref ref="Unicode"/>, is discouraged. | [#x10000-#x10FFFF]</rhs><com>any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.</com></prod></prodgroup></scrap> </p> - <p>The mechanism for encoding character code points into bit patterns may +<p>The mechanism for encoding character code points into bit patterns may vary from entity to entity. All XML processors must accept the UTF-8 and UTF-16 encodings of 10646; the mechanisms for signaling which of the two is in use, or for bringing other encodings into play, are @@ -588,32 +583,32 @@ discussed later, in <specref ref="charencoding"/>. equivalent of its UCS-4 code value. </p>--> - </div2> - <div2 id="sec-common-syn"> - <head>Common Syntactic Constructs</head> - <p>This section defines some symbols used widely in the grammar.</p> - <p><nt def="NT-S">S</nt> (white space) consists of one or more space (#x20) +</div2> +<div2 id="sec-common-syn"> +<head>Common Syntactic Constructs</head> +<p>This section defines some symbols used widely in the grammar.</p> +<p><nt def="NT-S">S</nt> (white space) consists of one or more space (#x20) characters, carriage returns, line feeds, or tabs. <scrap lang="ebnf" id="white"><head>White Space</head><prodgroup pcw2="4" pcw4="17.5" pcw5="11"><prod id="NT-S"><lhs>S</lhs><rhs>(#x20 | #x9 | #xD | #xA)+</rhs></prod></prodgroup></scrap></p> - <p>Characters are classified for convenience as letters, digits, or other +<p>Characters are classified for convenience as letters, digits, or other characters. Letters consist of an alphabetic or syllabic base character possibly followed by one or more combining characters, or of an ideographic character. Full definitions of the specific characters in each class are given in <specref ref="CharClasses"/>.</p> - <p><termdef id="dt-name" term="Name">A <term>Name</term> is a token +<p><termdef id="dt-name" term="Name">A <term>Name</term> is a token beginning with a letter or one of a few punctuation characters, and continuing with letters, digits, hyphens, underscores, colons, or full stops, together known as name characters.</termdef> Names beginning with the string "<code>xml</code>", or any string -which would match <code>(('X'|'x') ('M'|'m') ('L'|'l'))</code>, are +which would match <code>(('X'|'x') ('M'|'m') ('L'|'l'))</code>, are reserved for standardization in this or future versions of this specification. </p> - <note> - <p>The colon character within XML names is reserved for experimentation with +<note> +<p>The colon character within XML names is reserved for experimentation with name spaces. Its meaning is expected to be standardized at some future point, at which point those documents @@ -623,19 +618,19 @@ adopted for XML will in fact use the colon as a name-space delimiter.) In practice, this means that authors should not use the colon in XML names except as part of name-space experiments, but that XML processors should accept the colon as a name character.</p> - </note> - <p>An +</note> +<p>An <nt def="NT-Nmtoken">Nmtoken</nt> (name token) is any mixture of name characters. <scrap lang="ebnf"><head>Names and Tokens</head><prod id="NT-NameChar"><lhs>NameChar</lhs><rhs><nt def="NT-Letter">Letter</nt> | <nt def="NT-Digit">Digit</nt> -| '.' | '-' | '_' | ':' +| '.' | '-' | '_' | ':' | <nt def="NT-CombiningChar">CombiningChar</nt> -| <nt def="NT-Extender">Extender</nt></rhs></prod><prod id="NT-Name"><lhs>Name</lhs><rhs>(<nt def="NT-Letter">Letter</nt> | '_' | ':') +| <nt def="NT-Extender">Extender</nt></rhs></prod><prod id="NT-Name"><lhs>Name</lhs><rhs>(<nt def="NT-Letter">Letter</nt> | '_' | ':') (<nt def="NT-NameChar">NameChar</nt>)*</rhs></prod><prod id="NT-Names"><lhs>Names</lhs><rhs><nt def="NT-Name">Name</nt> (<nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt>)*</rhs></prod><prod id="NT-Nmtoken"><lhs>Nmtoken</lhs><rhs>(<nt def="NT-NameChar">NameChar</nt>)+</rhs></prod><prod id="NT-Nmtokens"><lhs>Nmtokens</lhs><rhs><nt def="NT-Nmtoken">Nmtoken</nt> (<nt def="NT-S">S</nt> <nt def="NT-Nmtoken">Nmtoken</nt>)*</rhs></prod></scrap> </p> - <p>Literal data is any quoted string not containing +<p>Literal data is any quoted string not containing the quotation mark used as a delimiter for that string. Literals are used for specifying the content of internal entities @@ -645,35 +640,35 @@ and external identifiers (<nt def="NT-SystemLiteral">SystemLiteral</nt>). Note that a <nt def="NT-SystemLiteral">SystemLiteral</nt> can be parsed without scanning for markup. -<scrap lang="ebnf"><head>Literals</head><prod id="NT-EntityValue"><lhs>EntityValue</lhs><rhs>'"' +<scrap lang="ebnf"><head>Literals</head><prod id="NT-EntityValue"><lhs>EntityValue</lhs><rhs>'"' ([^%&"] | <nt def="NT-PEReference">PEReference</nt> | <nt def="NT-Reference">Reference</nt>)* -'"' +'"' </rhs><rhs>| -"'" -([^%&'] +"'" +([^%&'] | <nt def="NT-PEReference">PEReference</nt> | <nt def="NT-Reference">Reference</nt>)* -"'"</rhs></prod><prod id="NT-AttValue"><lhs>AttValue</lhs><rhs>'"' +"'"</rhs></prod><prod id="NT-AttValue"><lhs>AttValue</lhs><rhs>'"' ([^<&"] | <nt def="NT-Reference">Reference</nt>)* -'"' +'"' </rhs><rhs>| -"'" -([^<&'] +"'" +([^<&'] | <nt def="NT-Reference">Reference</nt>)* -"'"</rhs></prod><prod id="NT-SystemLiteral"><lhs>SystemLiteral</lhs><rhs>('"' [^"]* '"') | ("'" [^']* "'") -</rhs></prod><prod id="NT-PubidLiteral"><lhs>PubidLiteral</lhs><rhs>'"' <nt def="NT-PubidChar">PubidChar</nt>* -'"' -| "'" (<nt def="NT-PubidChar">PubidChar</nt> - "'")* "'"</rhs></prod><prod id="NT-PubidChar"><lhs>PubidChar</lhs><rhs>#x20 | #xD | #xA +"'"</rhs></prod><prod id="NT-SystemLiteral"><lhs>SystemLiteral</lhs><rhs>('"' [^"]* '"') | ("'" [^']* "'") +</rhs></prod><prod id="NT-PubidLiteral"><lhs>PubidLiteral</lhs><rhs>'"' <nt def="NT-PubidChar">PubidChar</nt>* +'"' +| "'" (<nt def="NT-PubidChar">PubidChar</nt> - "'")* "'"</rhs></prod><prod id="NT-PubidChar"><lhs>PubidChar</lhs><rhs>#x20 | #xD | #xA | [a-zA-Z0-9] -| [-'()+,./:=?;!*#@$_%]</rhs></prod></scrap> +| [-'()+,./:=?;!*#@$_%]</rhs></prod></scrap> </p> - </div2> - <div2 id="syntax"> - <head>Character Data and Markup</head> - <p><termref def="dt-text">Text</termref> consists of intermingled +</div2> +<div2 id="syntax"> +<head>Character Data and Markup</head> +<p><termref def="dt-text">Text</termref> consists of intermingled <termref def="dt-chardata">character data</termref> and markup. <termdef id="dt-markup" term="Markup"><term>Markup</term> takes the form of @@ -688,12 +683,12 @@ data</termref> and markup. <termref def="dt-pi">processing instructions</termref>. </termdef> </p> - <p> - <termdef id="dt-chardata" term="Character Data">All text that is not markup +<p> +<termdef id="dt-chardata" term="Character Data">All text that is not markup constitutes the <term>character data</term> of the document.</termdef> - </p> - <p>The ampersand character (&) and the left angle bracket (<) +</p> +<p>The ampersand character (&) and the left angle bracket (<) may appear in their literal form <emph>only</emph> when used as markup delimiters, or within a <termref def="dt-comment">comment</termref>, a <termref def="dt-pi">processing instruction</termref>, @@ -720,59 +715,59 @@ in content, when that string is not marking the end of a <termref def="dt-cdsection">CDATA section</termref>. </p> - <p> +<p> In the content of elements, character data is any string of characters which does not contain the start-delimiter of any markup. In a CDATA section, character data is any string of characters not including the CDATA-section-close delimiter, "<code>]]></code>".</p> - <p> +<p> To allow attribute values to contain both single and double quotes, the -apostrophe or single-quote character (') may be represented as +apostrophe or single-quote character (') may be represented as "<code>&apos;</code>", and the double-quote character (") as "<code>&quot;</code>". -<scrap lang="ebnf"><head>Character Data</head><prod id="NT-CharData"><lhs>CharData</lhs><rhs>[^<&]* - ([^<&]* ']]>' [^<&]*)</rhs></prod></scrap> +<scrap lang="ebnf"><head>Character Data</head><prod id="NT-CharData"><lhs>CharData</lhs><rhs>[^<&]* - ([^<&]* ']]>' [^<&]*)</rhs></prod></scrap> </p> - </div2> - <div2 id="sec-comments"> - <head>Comments</head> - <p> - <termdef id="dt-comment" term="Comment"><term>Comments</term> may +</div2> +<div2 id="sec-comments"> +<head>Comments</head> +<p> +<termdef id="dt-comment" term="Comment"><term>Comments</term> may appear anywhere in a document outside other <termref def="dt-markup">markup</termref>; in addition, they may appear within the document type declaration at places allowed by the grammar. -They are not part of the document's <termref def="dt-chardata">character +They are not part of the document's <termref def="dt-chardata">character data</termref>; an XML processor may, but need not, make it possible for an application to retrieve the text of comments. <termref def="dt-compat">For compatibility</termref>, the string "<code>--</code>" (double-hyphen) must not occur within comments. -<scrap lang="ebnf"><head>Comments</head><prod id="NT-Comment"><lhs>Comment</lhs><rhs>'<!--' -((<nt def="NT-Char">Char</nt> - '-') -| ('-' (<nt def="NT-Char">Char</nt> - '-')))* -'-->'</rhs></prod></scrap> +<scrap lang="ebnf"><head>Comments</head><prod id="NT-Comment"><lhs>Comment</lhs><rhs>'<!--' +((<nt def="NT-Char">Char</nt> - '-') +| ('-' (<nt def="NT-Char">Char</nt> - '-')))* +'-->'</rhs></prod></scrap> </termdef> - </p> - <p>An example of a comment: +</p> +<p>An example of a comment: <eg><!&como; declarations for <head> & <body> &comc;></eg> </p> - </div2> - <div2 id="sec-pi"> - <head>Processing Instructions</head> - <p><termdef id="dt-pi" term="Processing instruction"><term>Processing +</div2> +<div2 id="sec-pi"> +<head>Processing Instructions</head> +<p><termdef id="dt-pi" term="Processing instruction"><term>Processing instructions</term> (PIs) allow documents to contain instructions for applications. -<scrap lang="ebnf"><head>Processing Instructions</head><prod id="NT-PI"><lhs>PI</lhs><rhs>'<?' <nt def="NT-PITarget">PITarget</nt> +<scrap lang="ebnf"><head>Processing Instructions</head><prod id="NT-PI"><lhs>PI</lhs><rhs>'<?' <nt def="NT-PITarget">PITarget</nt> (<nt def="NT-S">S</nt> (<nt def="NT-Char">Char</nt>* - (<nt def="NT-Char">Char</nt>* &pic; <nt def="NT-Char">Char</nt>*)))? &pic;</rhs></prod><prod id="NT-PITarget"><lhs>PITarget</lhs><rhs><nt def="NT-Name">Name</nt> - -(('X' | 'x') ('M' | 'm') ('L' | 'l'))</rhs></prod></scrap></termdef> -PIs are not part of the document's <termref def="dt-chardata">character +(('X' | 'x') ('M' | 'm') ('L' | 'l'))</rhs></prod></scrap></termdef> +PIs are not part of the document's <termref def="dt-chardata">character data</termref>, but must be passed through to the application. The PI begins with a target (<nt def="NT-PITarget">PITarget</nt>) used to identify the application to which the instruction is directed. @@ -784,10 +779,10 @@ XML <termref def="dt-notation">Notation</termref> mechanism may be used for formal declaration of PI targets. </p> - </div2> - <div2 id="sec-cdata-sect"> - <head>CDATA Sections</head> - <p><termdef id="dt-cdsection" term="CDATA Section"><term>CDATA sections</term> +</div2> +<div2 id="sec-cdata-sect"> +<head>CDATA Sections</head> +<p><termdef id="dt-cdsection" term="CDATA Section"><term>CDATA sections</term> may occur anywhere character data may occur; they are used to escape blocks of text containing characters which would @@ -796,9 +791,9 @@ string "<code><![CDATA[</code>" and end with the string "<code>]]></code>": <scrap lang="ebnf"><head>CDATA Sections</head><prod id="NT-CDSect"><lhs>CDSect</lhs><rhs><nt def="NT-CDStart">CDStart</nt> <nt def="NT-CData">CData</nt> -<nt def="NT-CDEnd">CDEnd</nt></rhs></prod><prod id="NT-CDStart"><lhs>CDStart</lhs><rhs>'<![CDATA['</rhs></prod><prod id="NT-CData"><lhs>CData</lhs><rhs>(<nt def="NT-Char">Char</nt>* - -(<nt def="NT-Char">Char</nt>* ']]>' <nt def="NT-Char">Char</nt>*)) -</rhs></prod><prod id="NT-CDEnd"><lhs>CDEnd</lhs><rhs>']]>'</rhs></prod></scrap> +<nt def="NT-CDEnd">CDEnd</nt></rhs></prod><prod id="NT-CDStart"><lhs>CDStart</lhs><rhs>'<![CDATA['</rhs></prod><prod id="NT-CData"><lhs>CData</lhs><rhs>(<nt def="NT-Char">Char</nt>* - +(<nt def="NT-Char">Char</nt>* ']]>' <nt def="NT-Char">Char</nt>*)) +</rhs></prod><prod id="NT-CDEnd"><lhs>CDEnd</lhs><rhs>']]>'</rhs></prod></scrap> Within a CDATA section, only the <nt def="NT-CDEnd">CDEnd</nt> string is recognized as markup, so that left angle brackets and ampersands may occur in @@ -806,16 +801,16 @@ their literal form; they need not (and cannot) be escaped using "<code>&lt;</code>" and "<code>&amp;</code>". CDATA sections cannot nest.</termdef> </p> - <p>An example of a CDATA section, in which "<code><greeting></code>" and +<p>An example of a CDATA section, in which "<code><greeting></code>" and "<code></greeting></code>" are recognized as <termref def="dt-chardata">character data</termref>, not <termref def="dt-markup">markup</termref>: <eg><![CDATA[<greeting>Hello, world!</greeting>]]></eg> </p> - </div2> - <div2 id="sec-prolog-dtd"> - <head>Prolog and Document Type Declaration</head> - <p><termdef id="dt-xmldecl" term="XML Declaration">XML documents +</div2> +<div2 id="sec-prolog-dtd"> +<head>Prolog and Document Type Declaration</head> +<p><termdef id="dt-xmldecl" term="XML Declaration">XML documents may, and should, begin with an <term>XML declaration</term> which specifies the version of @@ -829,7 +824,7 @@ and so is this: <eg><![CDATA[<greeting>Hello, world!</greeting> ]]></eg> </p> - <p>The version number "<code>1.0</code>" should be used to indicate +<p>The version number "<code>1.0</code>" should be used to indicate conformance to this version of this specification; it is an error for a document to use the value "<code>1.0</code>" if it does not conform to this version of this specification. @@ -845,7 +840,7 @@ it become necessary. Processors may signal an error if they receive documents labeled with versions they do not support. </p> - <p>The function of the markup in an XML document is to describe its +<p>The function of the markup in an XML document is to describe its storage and logical structure and to associate attribute-value pairs with its logical structures. XML provides a mechanism, the <termref def="dt-doctype">document type declaration</termref>, to define constraints on the logical structure and to support the use of @@ -855,7 +850,7 @@ predefined storage units. <term>valid</term> if it has an associated document type declaration and if the document complies with the constraints expressed in it.</termdef></p> - <p>The document type declaration must appear before +<p>The document type declaration must appear before the first <termref def="dt-element">element</termref> in the document. <scrap lang="ebnf" id="xmldoc"><head>Prolog</head><prodgroup pcw2="6" pcw4="17.5" pcw5="9"><prod id="NT-prolog"><lhs>prolog</lhs><rhs><nt def="NT-XMLDecl">XMLDecl</nt>? <nt def="NT-Misc">Misc</nt>* @@ -865,11 +860,11 @@ the first <termref def="dt-element">element</termref> in the document. <nt def="NT-EncodingDecl">EncodingDecl</nt>? <nt def="NT-SDDecl">SDDecl</nt>? <nt def="NT-S">S</nt>? -&pic;</rhs></prod><prod id="NT-VersionInfo"><lhs>VersionInfo</lhs><rhs><nt def="NT-S">S</nt> 'version' <nt def="NT-Eq">Eq</nt> -(' <nt def="NT-VersionNum">VersionNum</nt> ' -| " <nt def="NT-VersionNum">VersionNum</nt> ")</rhs></prod><prod id="NT-Eq"><lhs>Eq</lhs><rhs><nt def="NT-S">S</nt>? '=' <nt def="NT-S">S</nt>?</rhs></prod><prod id="NT-VersionNum"><lhs>VersionNum</lhs><rhs>([a-zA-Z0-9_.:] | '-')+</rhs></prod><prod id="NT-Misc"><lhs>Misc</lhs><rhs><nt def="NT-Comment">Comment</nt> | <nt def="NT-PI">PI</nt> | +&pic;</rhs></prod><prod id="NT-VersionInfo"><lhs>VersionInfo</lhs><rhs><nt def="NT-S">S</nt> 'version' <nt def="NT-Eq">Eq</nt> +(' <nt def="NT-VersionNum">VersionNum</nt> ' +| " <nt def="NT-VersionNum">VersionNum</nt> ")</rhs></prod><prod id="NT-Eq"><lhs>Eq</lhs><rhs><nt def="NT-S">S</nt>? '=' <nt def="NT-S">S</nt>?</rhs></prod><prod id="NT-VersionNum"><lhs>VersionNum</lhs><rhs>([a-zA-Z0-9_.:] | '-')+</rhs></prod><prod id="NT-Misc"><lhs>Misc</lhs><rhs><nt def="NT-Comment">Comment</nt> | <nt def="NT-PI">PI</nt> | <nt def="NT-S">S</nt></rhs></prod></prodgroup></scrap></p> - <p><termdef id="dt-doctype" term="Document Type Declaration">The XML +<p><termdef id="dt-doctype" term="Document Type Declaration">The XML <term>document type declaration</term> contains or points to <termref def="dt-markupdecl">markup declarations</termref> @@ -886,7 +881,7 @@ both. The DTD for a document consists of both subsets taken together.</termdef> </p> - <p><termdef id="dt-markupdecl" term="markup declaration"> +<p><termdef id="dt-markupdecl" term="markup declaration"> A <term>markup declaration</term> is an <termref def="dt-eldecl">element type declaration</termref>, an <termref def="dt-attdecl">attribute-list declaration</termref>, @@ -898,37 +893,37 @@ within <termref def="dt-PE">parameter entities</termref>, as described in the well-formedness and validity constraints below. For fuller information, see <specref ref="sec-physical-struct"/>.</p> - <scrap lang="ebnf" id="dtd"> - <head>Document Type Definition</head> - <prodgroup pcw2="6" pcw4="17.5" pcw5="9"> - <prod id="NT-doctypedecl"> - <lhs>doctypedecl</lhs> - <rhs>'<!DOCTYPE' <nt def="NT-S">S</nt> +<scrap lang="ebnf" id="dtd"> +<head>Document Type Definition</head> +<prodgroup pcw2="6" pcw4="17.5" pcw5="9"> +<prod id="NT-doctypedecl"> +<lhs>doctypedecl</lhs> +<rhs>'<!DOCTYPE' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> (<nt def="NT-S">S</nt> <nt def="NT-ExternalID">ExternalID</nt>)? -<nt def="NT-S">S</nt>? ('[' +<nt def="NT-S">S</nt>? ('[' (<nt def="NT-markupdecl">markupdecl</nt> | <nt def="NT-PEReference">PEReference</nt> | <nt def="NT-S">S</nt>)* -']' -<nt def="NT-S">S</nt>?)? '>'</rhs> - <vc def="vc-roottype"/> - </prod> - <prod id="NT-markupdecl"> - <lhs>markupdecl</lhs> - <rhs><nt def="NT-elementdecl">elementdecl</nt> +']' +<nt def="NT-S">S</nt>?)? '>'</rhs> +<vc def="vc-roottype"/> +</prod> +<prod id="NT-markupdecl"> +<lhs>markupdecl</lhs> +<rhs><nt def="NT-elementdecl">elementdecl</nt> | <nt def="NT-AttlistDecl">AttlistDecl</nt> | <nt def="NT-EntityDecl">EntityDecl</nt> | <nt def="NT-NotationDecl">NotationDecl</nt> | <nt def="NT-PI">PI</nt> | <nt def="NT-Comment">Comment</nt> </rhs> - <vc def="vc-PEinMarkupDecl"/> - <wfc def="wfc-PEinInternalSubset"/> - </prod> - </prodgroup> - </scrap> - <p>The markup declarations may be made up in whole or in part of +<vc def="vc-PEinMarkupDecl"/> +<wfc def="wfc-PEinInternalSubset"/> +</prod> +</prodgroup> +</scrap> +<p>The markup declarations may be made up in whole or in part of the <termref def="dt-repltext">replacement text</termref> of <termref def="dt-PE">parameter entities</termref>. The productions later in this specification for @@ -936,16 +931,16 @@ individual nonterminals (<nt def="NT-elementdecl">elementdecl</nt>, <nt def="NT-AttlistDecl">AttlistDecl</nt>, and so on) describe the declarations <emph>after</emph> all the parameter entities have been <termref def="dt-include">included</termref>.</p> - <vcnote id="vc-roottype"> - <head>Root Element Type</head> - <p> +<vcnote id="vc-roottype"> +<head>Root Element Type</head> +<p> The <nt def="NT-Name">Name</nt> in the document type declaration must match the element type of the <termref def="dt-root">root element</termref>. </p> - </vcnote> - <vcnote id="vc-PEinMarkupDecl"> - <head>Proper Declaration/PE Nesting</head> - <p>Parameter-entity +</vcnote> +<vcnote id="vc-PEinMarkupDecl"> +<head>Proper Declaration/PE Nesting</head> +<p>Parameter-entity <termref def="dt-repltext">replacement text</termref> must be properly nested with markup declarations. That is to say, if either the first character @@ -954,18 +949,18 @@ declaration (<nt def="NT-markupdecl">markupdecl</nt> above) is contained in the replacement text for a <termref def="dt-PERef">parameter-entity reference</termref>, both must be contained in the same replacement text.</p> - </vcnote> - <wfcnote id="wfc-PEinInternalSubset"> - <head>PEs in Internal Subset</head> - <p>In the internal DTD subset, +</vcnote> +<wfcnote id="wfc-PEinInternalSubset"> +<head>PEs in Internal Subset</head> +<p>In the internal DTD subset, <termref def="dt-PERef">parameter-entity references</termref> can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.) </p> - </wfcnote> - <p> +</wfcnote> +<p> Like the internal subset, the external subset and any external parameter entities referred to in the DTD must consist of a series of complete markup declarations of the types @@ -986,19 +981,19 @@ construct; this is not allowed in the internal subset. | <nt def="NT-PEReference">PEReference</nt> | <nt def="NT-S">S</nt> )*</rhs></prod></prodgroup></scrap></p> - <p>The external subset and external parameter entities also differ +<p>The external subset and external parameter entities also differ from the internal subset in that in them, <termref def="dt-PERef">parameter-entity references</termref> are permitted <emph>within</emph> markup declarations, not only <emph>between</emph> markup declarations.</p> - <p>An example of an XML document with a document type declaration: +<p>An example of an XML document with a document type declaration: <eg><![CDATA[<?xml version="1.0"?> <!DOCTYPE greeting SYSTEM "hello.dtd"> <greeting>Hello, world!</greeting> ]]></eg> The <termref def="dt-sysid">system identifier</termref> "<code>hello.dtd</code>" gives the URI of a DTD for the document.</p> - <p>The declarations can also be given locally, as in this +<p>The declarations can also be given locally, as in this example: <eg><![CDATA[<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE greeting [ @@ -1012,10 +1007,10 @@ internal subset is considered to occur before the external subset. This has the effect that entity and attribute-list declarations in the internal subset take precedence over those in the external subset. </p> - </div2> - <div2 id="sec-rmd"> - <head>Standalone Document Declaration</head> - <p>Markup declarations can affect the content of the document, +</div2> +<div2 id="sec-rmd"> +<head>Standalone Document Declaration</head> +<p>Markup declarations can affect the content of the document, as passed from an <termref def="dt-xml-proc">XML processor</termref> to an application; examples are attribute defaults and entity declarations. @@ -1025,10 +1020,10 @@ whether or not there are such declarations which appear external to the <termref def="dt-docent">document entity</termref>. <scrap lang="ebnf" id="fulldtd"><head>Standalone Document Declaration</head><prodgroup pcw2="4" pcw4="19.5" pcw5="9"><prod id="NT-SDDecl"><lhs>SDDecl</lhs><rhs> <nt def="NT-S">S</nt> -'standalone' <nt def="NT-Eq">Eq</nt> -(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) +'standalone' <nt def="NT-Eq">Eq</nt> +(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) </rhs><vc def="vc-check-rmd"/></prod></prodgroup></scrap></p> - <p> +<p> In a standalone document declaration, the value "<code>yes</code>" indicates that there are no markup declarations external to the <termref def="dt-docent">document @@ -1044,49 +1039,49 @@ document, of references to external <emph>entities</emph>, when those entities are internally declared, does not change its standalone status.</p> - <p>If there are no external markup declarations, the standalone document +<p>If there are no external markup declarations, the standalone document declaration has no meaning. If there are external markup declarations but there is no standalone document declaration, the value "<code>no</code>" is assumed.</p> - <p>Any XML document for which <code>standalone="no"</code> holds can +<p>Any XML document for which <code>standalone="no"</code> holds can be converted algorithmically to a standalone document, which may be desirable for some network delivery applications.</p> - <vcnote id="vc-check-rmd"> - <head>Standalone Document Declaration</head> - <p>The standalone document declaration must have +<vcnote id="vc-check-rmd"> +<head>Standalone Document Declaration</head> +<p>The standalone document declaration must have the value "<code>no</code>" if any external markup declarations contain declarations of:</p> - <ulist> - <item> - <p>attributes with <termref def="dt-default">default</termref> values, if +<ulist> +<item> +<p>attributes with <termref def="dt-default">default</termref> values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or</p> - </item> - <item> - <p>entities (other than &magicents;), +</item> +<item> +<p>entities (other than &magicents;), if <termref def="dt-entref">references</termref> to those entities appear in the document, or</p> - </item> - <item> - <p>attributes with values subject to +</item> +<item> +<p>attributes with values subject to <titleref href="AVNormalize">normalization</titleref>, where the attribute appears in the document with a value which will change as a result of normalization, or</p> - </item> - <item> - <p>element types with <termref def="dt-elemcontent">element content</termref>, +</item> +<item> +<p>element types with <termref def="dt-elemcontent">element content</termref>, if white space occurs directly within any instance of those types. </p> - </item> - </ulist> - </vcnote> - <p>An example XML declaration with a standalone document declaration:<eg><?xml version="&XML.version;" standalone='yes'?></eg></p> - </div2> - <div2 id="sec-white-space"> - <head>White Space Handling</head> - <p>In editing XML documents, it is often convenient to use "white space" +</item> +</ulist> +</vcnote> +<p>An example XML declaration with a standalone document declaration:<eg><?xml version="&XML.version;" standalone='yes'?></eg></p> +</div2> +<div2 id="sec-white-space"> +<head>White Space Handling</head> +<p>In editing XML documents, it is often convenient to use "white space" (spaces, tabs, and blank lines, denoted by the nonterminal <nt def="NT-S">S</nt> in this specification) to set apart the markup for greater readability. Such white space is typically @@ -1094,14 +1089,14 @@ not intended for inclusion in the delivered version of the document. On the other hand, "significant" white space that should be preserved in the delivered version is common, for example in poetry and source code.</p> - <p>An <termref def="dt-xml-proc">XML processor</termref> +<p>An <termref def="dt-xml-proc">XML processor</termref> must always pass all characters in a document that are not markup through to the application. A <termref def="dt-validating"> validating XML processor</termref> must also inform the application which of these characters constitute white space appearing in <termref def="dt-elemcontent">element content</termref>. </p> - <p>A special <termref def="dt-attr">attribute</termref> +<p>A special <termref def="dt-attr">attribute</termref> named <kw>xml:space</kw> may be attached to an element to signal an intention that in that element, white space should be preserved by applications. @@ -1111,7 +1106,7 @@ When declared, it must be given as an <termref def="dt-enumerated">enumerated type</termref> whose only possible values are "<code>default</code>" and "<code>preserve</code>". For example:<eg><![CDATA[ <!ATTLIST poem xml:space (default|preserve) 'preserve'>]]></eg></p> - <p>The value "<code>default</code>" signals that applications' +<p>The value "<code>default</code>" signals that applications' default white-space processing modes are acceptable for this element; the value "<code>preserve</code>" indicates the intent that applications preserve all the white space. @@ -1119,19 +1114,19 @@ This declared intent is considered to apply to all elements within the content of the element where it is specified, unless overriden with another instance of the <kw>xml:space</kw> attribute. </p> - <p>The <termref def="dt-root">root element</termref> of any document +<p>The <termref def="dt-root">root element</termref> of any document is considered to have signaled no intentions as regards application space handling, unless it provides a value for this attribute or the attribute is declared with a default value. </p> - </div2> - <div2 id="sec-line-ends"> - <head>End-of-Line Handling</head> - <p>XML <termref def="dt-parsedent">parsed entities</termref> are often stored in +</div2> +<div2 id="sec-line-ends"> +<head>End-of-Line Handling</head> +<p>XML <termref def="dt-parsedent">parsed entities</termref> are often stored in computer files which, for editing convenience, are organized into lines. These lines are typically separated by some combination of the characters carriage-return (#xD) and line-feed (#xA).</p> - <p>To simplify the tasks of <termref def="dt-app">applications</termref>, +<p>To simplify the tasks of <termref def="dt-app">applications</termref>, wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence "#xD#xA" or a standalone literal @@ -1141,10 +1136,10 @@ pass to the application the single character #xA. conveniently be produced by normalizing all line breaks to #xA on input, before parsing.) </p> - </div2> - <div2 id="sec-lang-tag"> - <head>Language Identification</head> - <p>In document processing, it is often useful to +</div2> +<div2 id="sec-lang-tag"> +<head>Language Identification</head> +<p>In document processing, it is often useful to identify the natural or formal language in which the content is written. @@ -1158,9 +1153,9 @@ In valid documents, this attribute, like any other, must be The values of the attribute are language identifiers as defined by <bibref ref="RFC1766"/>, "Tags for the Identification of Languages": <scrap lang="ebnf"><head>Language Identification</head><prod id="NT-LanguageID"><lhs>LanguageID</lhs><rhs><nt def="NT-Langcode">Langcode</nt> -('-' <nt def="NT-Subcode">Subcode</nt>)*</rhs></prod><prod id="NT-Langcode"><lhs>Langcode</lhs><rhs><nt def="NT-ISO639Code">ISO639Code</nt> | +('-' <nt def="NT-Subcode">Subcode</nt>)*</rhs></prod><prod id="NT-Langcode"><lhs>Langcode</lhs><rhs><nt def="NT-ISO639Code">ISO639Code</nt> | <nt def="NT-IanaCode">IanaCode</nt> | -<nt def="NT-UserCode">UserCode</nt></rhs></prod><prod id="NT-ISO639Code"><lhs>ISO639Code</lhs><rhs>([a-z] | [A-Z]) ([a-z] | [A-Z])</rhs></prod><prod id="NT-IanaCode"><lhs>IanaCode</lhs><rhs>('i' | 'I') '-' ([a-z] | [A-Z])+</rhs></prod><prod id="NT-UserCode"><lhs>UserCode</lhs><rhs>('x' | 'X') '-' ([a-z] | [A-Z])+</rhs></prod><prod id="NT-Subcode"><lhs>Subcode</lhs><rhs>([a-z] | [A-Z])+</rhs></prod></scrap> +<nt def="NT-UserCode">UserCode</nt></rhs></prod><prod id="NT-ISO639Code"><lhs>ISO639Code</lhs><rhs>([a-z] | [A-Z]) ([a-z] | [A-Z])</rhs></prod><prod id="NT-IanaCode"><lhs>IanaCode</lhs><rhs>('i' | 'I') '-' ([a-z] | [A-Z])+</rhs></prod><prod id="NT-UserCode"><lhs>UserCode</lhs><rhs>('x' | 'X') '-' ([a-z] | [A-Z])+</rhs></prod><prod id="NT-Subcode"><lhs>Subcode</lhs><rhs>([a-z] | [A-Z])+</rhs></prod></scrap> The <nt def="NT-Langcode">Langcode</nt> may be any of the following: <ulist><item><p>a two-letter language code as defined by <bibref ref="ISO639"/>, "Codes @@ -1170,7 +1165,7 @@ prefix "<code>i-</code>" (or "<code>I-</code>")</p></item><i between parties in private use; these must begin with the prefix "<code>x-</code>" or "<code>X-</code>" in order to ensure that they do not conflict with names later standardized or registered with IANA</p></item></ulist></p> - <p>There may be any number of <nt def="NT-Subcode">Subcode</nt> segments; if +<p>There may be any number of <nt def="NT-Subcode">Subcode</nt> segments; if the first subcode segment exists and the Subcode consists of two letters, then it must be a country code from @@ -1182,11 +1177,11 @@ a subcode for the language in question registered with IANA, unless the <nt def="NT-Langcode">Langcode</nt> begins with the prefix "<code>x-</code>" or "<code>X-</code>". </p> - <p>It is customary to give the language code in lower case, and +<p>It is customary to give the language code in lower case, and the country code (if any) in upper case. Note that these values, unlike other names in XML documents, are case insensitive.</p> - <p>For example: +<p>For example: <eg><![CDATA[<p xml:lang="en">The quick brown fox jumps over the lazy dog.</p> <p xml:lang="en-GB">What colour is it?</p> <p xml:lang="en-US">What color is it?</p> @@ -1200,7 +1195,7 @@ are case insensitive.</p> element and (unless otherwise via attribute default values) to the values of all of its attributes with free-text (CDATA) values. --> - <p>The intent declared with <kw>xml:lang</kw> is considered to apply to +<p>The intent declared with <kw>xml:lang</kw> is considered to apply to all attributes and content of the element where it is specified, unless overridden with an instance of <kw>xml:lang</kw> on another element within that content.</p> @@ -1219,7 +1214,7 @@ value for xml:lang: The application, not the XML processor, is responsible for this ' inheritance' of attribute values. --> - <p>A simple declaration for <kw>xml:lang</kw> might take +<p>A simple declaration for <kw>xml:lang</kw> might take the form <eg>xml:lang NMTOKEN #IMPLIED</eg> but specific default values may also be given, if appropriate. In a @@ -1229,12 +1224,12 @@ notes in English, the xml:lang attribute might be declared this way: <!ATTLIST gloss xml:lang NMTOKEN 'en'> <!ATTLIST note xml:lang NMTOKEN 'en'>]]></eg> </p> - </div2> - </div1> +</div2> +</div1> <!-- &Elements; --> - <div1 id="sec-logical-struct"> - <head>Logical Structures</head> - <p><termdef id="dt-element" term="Element">Each <termref def="dt-xml-doc">XML document</termref> contains one or more +<div1 id="sec-logical-struct"> +<head>Logical Structures</head> +<p><termdef id="dt-element" term="Element">Each <termref def="dt-xml-doc">XML document</termref> contains one or more <term>elements</term>, the boundaries of which are either delimited by <termref def="dt-stag">start-tags</termref> and <termref def="dt-etag">end-tags</termref>, or, for <termref def="dt-empty">empty</termref> elements, by an <termref def="dt-eetag">empty-element tag</termref>. Each element has a type, @@ -1243,79 +1238,79 @@ identifier" (GI), and may have a set of attribute specifications.</termdef> Each attribute specification has a <termref def="dt-attrname">name</termref> and a <termref def="dt-attrval">value</termref>. </p> - <scrap lang="ebnf"> - <head>Element</head> - <prod id="NT-element"> - <lhs>element</lhs> - <rhs> - <nt def="NT-EmptyElemTag">EmptyElemTag</nt> - </rhs> - <rhs>| <nt def="NT-STag">STag</nt> <nt def="NT-content">content</nt> +<scrap lang="ebnf"> +<head>Element</head> +<prod id="NT-element"> +<lhs>element</lhs> +<rhs> +<nt def="NT-EmptyElemTag">EmptyElemTag</nt> +</rhs> +<rhs>| <nt def="NT-STag">STag</nt> <nt def="NT-content">content</nt> <nt def="NT-ETag">ETag</nt></rhs> - <wfc def="GIMatch"/> - <vc def="elementvalid"/> - </prod> - </scrap> - <p>This specification does not constrain the semantics, use, or (beyond +<wfc def="GIMatch"/> +<vc def="elementvalid"/> +</prod> +</scrap> +<p>This specification does not constrain the semantics, use, or (beyond syntax) names of the element types and attributes, except that names -beginning with a match to <code>(('X'|'x')('M'|'m')('L'|'l'))</code> +beginning with a match to <code>(('X'|'x')('M'|'m')('L'|'l'))</code> are reserved for standardization in this or future versions of this specification. </p> - <wfcnote id="GIMatch"> - <head>Element Type Match</head> - <p> -The <nt def="NT-Name">Name</nt> in an element's end-tag must match +<wfcnote id="GIMatch"> +<head>Element Type Match</head> +<p> +The <nt def="NT-Name">Name</nt> in an element's end-tag must match the element type in the start-tag. </p> - </wfcnote> - <vcnote id="elementvalid"> - <head>Element Valid</head> - <p>An element is +</wfcnote> +<vcnote id="elementvalid"> +<head>Element Valid</head> +<p>An element is valid if there is a declaration matching <nt def="NT-elementdecl">elementdecl</nt> where the <nt def="NT-Name">Name</nt> matches the element type, and one of the following holds:</p> - <olist> - <item> - <p>The declaration matches <kw>EMPTY</kw> and the element has no +<olist> +<item> +<p>The declaration matches <kw>EMPTY</kw> and the element has no <termref def="dt-content">content</termref>.</p> - </item> - <item> - <p>The declaration matches <nt def="NT-children">children</nt> and +</item> +<item> +<p>The declaration matches <nt def="NT-children">children</nt> and the sequence of <termref def="dt-parentchild">child elements</termref> belongs to the language generated by the regular expression in the content model, with optional white space (characters matching the nonterminal <nt def="NT-S">S</nt>) between each pair of child elements.</p> - </item> - <item> - <p>The declaration matches <nt def="NT-Mixed">Mixed</nt> and +</item> +<item> +<p>The declaration matches <nt def="NT-Mixed">Mixed</nt> and the content consists of <termref def="dt-chardata">character data</termref> and <termref def="dt-parentchild">child elements</termref> whose types match names in the content model.</p> - </item> - <item> - <p>The declaration matches <kw>ANY</kw>, and the types +</item> +<item> +<p>The declaration matches <kw>ANY</kw>, and the types of any <termref def="dt-parentchild">child elements</termref> have been declared.</p> - </item> - </olist> - </vcnote> - <div2 id="sec-starttags"> - <head>Start-Tags, End-Tags, and Empty-Element Tags</head> - <p><termdef id="dt-stag" term="Start-Tag">The beginning of every +</item> +</olist> +</vcnote> +<div2 id="sec-starttags"> +<head>Start-Tags, End-Tags, and Empty-Element Tags</head> +<p><termdef id="dt-stag" term="Start-Tag">The beginning of every non-empty XML element is marked by a <term>start-tag</term>. -<scrap lang="ebnf"><head>Start-tag</head><prodgroup pcw2="6" pcw4="15" pcw5="11.5"><prod id="NT-STag"><lhs>STag</lhs><rhs>'<' <nt def="NT-Name">Name</nt> +<scrap lang="ebnf"><head>Start-tag</head><prodgroup pcw2="6" pcw4="15" pcw5="11.5"><prod id="NT-STag"><lhs>STag</lhs><rhs>'<' <nt def="NT-Name">Name</nt> (<nt def="NT-S">S</nt> <nt def="NT-Attribute">Attribute</nt>)* -<nt def="NT-S">S</nt>? '>'</rhs><wfc def="uniqattspec"/></prod><prod id="NT-Attribute"><lhs>Attribute</lhs><rhs><nt def="NT-Name">Name</nt> <nt def="NT-Eq">Eq</nt> +<nt def="NT-S">S</nt>? '>'</rhs><wfc def="uniqattspec"/></prod><prod id="NT-Attribute"><lhs>Attribute</lhs><rhs><nt def="NT-Name">Name</nt> <nt def="NT-Eq">Eq</nt> <nt def="NT-AttValue">AttValue</nt></rhs><vc def="ValueType"/><wfc def="NoExternalRefs"/><wfc def="CleanAttrVals"/></prod></prodgroup></scrap> The <nt def="NT-Name">Name</nt> in the start- and end-tags gives the -element's <term>type</term>.</termdef> +element's <term>type</term>.</termdef> <termdef id="dt-attr" term="Attribute"> The <nt def="NT-Name">Name</nt>-<nt def="NT-AttValue">AttValue</nt> pairs are referred to as @@ -1325,126 +1320,126 @@ the <term>attribute specifications</term> of the element</termdef>, referred to as the <term>attribute name</term></termdef> and <termdef id="dt-attrval" term="Attribute Value">the content of the <nt def="NT-AttValue">AttValue</nt> (the text between the -<code>'</code> or <code>"</code> delimiters) +<code>'</code> or <code>"</code> delimiters) as the <term>attribute value</term>.</termdef> </p> - <wfcnote id="uniqattspec"> - <head>Unique Att Spec</head> - <p> +<wfcnote id="uniqattspec"> +<head>Unique Att Spec</head> +<p> No attribute name may appear more than once in the same start-tag or empty-element tag. </p> - </wfcnote> - <vcnote id="ValueType"> - <head>Attribute Value Type</head> - <p> +</wfcnote> +<vcnote id="ValueType"> +<head>Attribute Value Type</head> +<p> The attribute must have been declared; the value must be of the type declared for it. (For attribute types, see <specref ref="attdecls"/>.) </p> - </vcnote> - <wfcnote id="NoExternalRefs"> - <head>No External Entity References</head> - <p> +</vcnote> +<wfcnote id="NoExternalRefs"> +<head>No External Entity References</head> +<p> Attribute values cannot contain direct or indirect entity references to external entities. </p> - </wfcnote> - <wfcnote id="CleanAttrVals"> - <head>No <code><</code> in Attribute Values</head> - <p>The <termref def="dt-repltext">replacement text</termref> of any entity +</wfcnote> +<wfcnote id="CleanAttrVals"> +<head>No <code><</code> in Attribute Values</head> +<p>The <termref def="dt-repltext">replacement text</termref> of any entity referred to directly or indirectly in an attribute value (other than "<code>&lt;</code>") must not contain a <code><</code>. </p> - </wfcnote> - <p>An example of a start-tag: +</wfcnote> +<p>An example of a start-tag: <eg><termdef id="dt-dog" term="dog"></eg></p> - <p> - <termdef id="dt-etag" term="End Tag">The end of every element +<p> +<termdef id="dt-etag" term="End Tag">The end of every element that begins with a start-tag must be marked by an <term>end-tag</term> -containing a name that echoes the element's type as given in the +containing a name that echoes the element's type as given in the start-tag: -<scrap lang="ebnf"><head>End-tag</head><prodgroup pcw2="6" pcw4="15" pcw5="11.5"><prod id="NT-ETag"><lhs>ETag</lhs><rhs>'</' <nt def="NT-Name">Name</nt> -<nt def="NT-S">S</nt>? '>'</rhs></prod></prodgroup></scrap> +<scrap lang="ebnf"><head>End-tag</head><prodgroup pcw2="6" pcw4="15" pcw5="11.5"><prod id="NT-ETag"><lhs>ETag</lhs><rhs>'</' <nt def="NT-Name">Name</nt> +<nt def="NT-S">S</nt>? '>'</rhs></prod></prodgroup></scrap> </termdef> - </p> - <p>An example of an end-tag:<eg></termdef></eg></p> - <p> - <termdef id="dt-content" term="Content">The +</p> +<p>An example of an end-tag:<eg></termdef></eg></p> +<p> +<termdef id="dt-content" term="Content">The <termref def="dt-text">text</termref> between the start-tag and -end-tag is called the element's +end-tag is called the element's <term>content</term>: <scrap lang="ebnf"><head>Content of Elements</head><prodgroup pcw2="6" pcw4="15" pcw5="11.5"><prod id="NT-content"><lhs>content</lhs><rhs>(<nt def="NT-element">element</nt> | <nt def="NT-CharData">CharData</nt> | <nt def="NT-Reference">Reference</nt> | <nt def="NT-CDSect">CDSect</nt> | <nt def="NT-PI">PI</nt> | <nt def="NT-Comment">Comment</nt>)*</rhs></prod></prodgroup></scrap> </termdef> - </p> - <p><termdef id="dt-empty" term="Empty">If an element is <term>empty</term>, +</p> +<p><termdef id="dt-empty" term="Empty">If an element is <term>empty</term>, it must be represented either by a start-tag immediately followed by an end-tag or by an empty-element tag.</termdef> <termdef id="dt-eetag" term="empty-element tag">An <term>empty-element tag</term> takes a special form: -<scrap lang="ebnf"><head>Tags for Empty Elements</head><prodgroup pcw2="6" pcw4="15" pcw5="11.5"><prod id="NT-EmptyElemTag"><lhs>EmptyElemTag</lhs><rhs>'<' <nt def="NT-Name">Name</nt> (<nt def="NT-S">S</nt> +<scrap lang="ebnf"><head>Tags for Empty Elements</head><prodgroup pcw2="6" pcw4="15" pcw5="11.5"><prod id="NT-EmptyElemTag"><lhs>EmptyElemTag</lhs><rhs>'<' <nt def="NT-Name">Name</nt> (<nt def="NT-S">S</nt> <nt def="NT-Attribute">Attribute</nt>)* <nt def="NT-S">S</nt>? -'/>'</rhs><wfc def="uniqattspec"/></prod></prodgroup></scrap> +'/>'</rhs><wfc def="uniqattspec"/></prod></prodgroup></scrap> </termdef></p> - <p>Empty-element tags may be used for any element which has no +<p>Empty-element tags may be used for any element which has no content, whether or not it is declared using the keyword <kw>EMPTY</kw>. <termref def="dt-interop">For interoperability</termref>, the empty-element tag must be used, and can only be used, for elements which are <termref def="dt-eldecl">declared</termref> <kw>EMPTY</kw>.</p> - <p>Examples of empty elements: +<p>Examples of empty elements: <eg><IMG align="left" src="http://www.w3.org/Icons/WWW/w3c_home" /> <br></br> <br/></eg></p> - </div2> - <div2 id="elemdecls"> - <head>Element Type Declarations</head> - <p>The <termref def="dt-element">element</termref> structure of an +</div2> +<div2 id="elemdecls"> +<head>Element Type Declarations</head> +<p>The <termref def="dt-element">element</termref> structure of an <termref def="dt-xml-doc">XML document</termref> may, for <termref def="dt-valid">validation</termref> purposes, be constrained using element type and attribute-list declarations. -An element type declaration constrains the element's +An element type declaration constrains the element's <termref def="dt-content">content</termref>. </p> - <p>Element type declarations often constrain which element types can +<p>Element type declarations often constrain which element types can appear as <termref def="dt-parentchild">children</termref> of the element. At user option, an XML processor may issue a warning when a declaration mentions an element type for which no declaration is provided, but this is not an error.</p> - <p><termdef id="dt-eldecl" term="Element Type declaration">An <term>element +<p><termdef id="dt-eldecl" term="Element Type declaration">An <term>element type declaration</term> takes the form: -<scrap lang="ebnf"><head>Element Type Declaration</head><prodgroup pcw2="5.5" pcw4="18" pcw5="9"><prod id="NT-elementdecl"><lhs>elementdecl</lhs><rhs>'<!ELEMENT' <nt def="NT-S">S</nt> +<scrap lang="ebnf"><head>Element Type Declaration</head><prodgroup pcw2="5.5" pcw4="18" pcw5="9"><prod id="NT-elementdecl"><lhs>elementdecl</lhs><rhs>'<!ELEMENT' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> <nt def="NT-S">S</nt> <nt def="NT-contentspec">contentspec</nt> -<nt def="NT-S">S</nt>? '>'</rhs><vc def="EDUnique"/></prod><prod id="NT-contentspec"><lhs>contentspec</lhs><rhs>'EMPTY' -| 'ANY' +<nt def="NT-S">S</nt>? '>'</rhs><vc def="EDUnique"/></prod><prod id="NT-contentspec"><lhs>contentspec</lhs><rhs>'EMPTY' +| 'ANY' | <nt def="NT-Mixed">Mixed</nt> | <nt def="NT-children">children</nt> </rhs></prod></prodgroup></scrap> where the <nt def="NT-Name">Name</nt> gives the element type being declared.</termdef> </p> - <vcnote id="EDUnique"> - <head>Unique Element Type Declaration</head> - <p> +<vcnote id="EDUnique"> +<head>Unique Element Type Declaration</head> +<p> No element type may be declared more than once. </p> - </vcnote> - <p>Examples of element type declarations: +</vcnote> +<p>Examples of element type declarations: <eg><!ELEMENT br EMPTY> <!ELEMENT p (#PCDATA|emph)* > <!ELEMENT %name.para; %content.para; > <!ELEMENT container ANY></eg></p> - <div3 id="sec-element-content"> - <head>Element Content</head> - <p><termdef id="dt-elemcontent" term="Element content">An element <termref def="dt-stag">type</termref> has +<div3 id="sec-element-content"> +<head>Element Content</head> +<p><termdef id="dt-elemcontent" term="Element content">An element <termref def="dt-stag">type</termref> has <term>element content</term> when elements of that type must contain only <termref def="dt-parentchild">child</termref> elements (no character data), optionally separated by @@ -1461,14 +1456,14 @@ choice lists of content particles, or sequence lists of content particles: <scrap lang="ebnf"><head>Element-content Models</head><prodgroup pcw2="5.5" pcw4="16" pcw5="11"><prod id="NT-children"><lhs>children</lhs><rhs>(<nt def="NT-choice">choice</nt> | <nt def="NT-seq">seq</nt>) -('?' | '*' | '+')?</rhs></prod><prod id="NT-cp"><lhs>cp</lhs><rhs>(<nt def="NT-Name">Name</nt> +('?' | '*' | '+')?</rhs></prod><prod id="NT-cp"><lhs>cp</lhs><rhs>(<nt def="NT-Name">Name</nt> | <nt def="NT-choice">choice</nt> | <nt def="NT-seq">seq</nt>) -('?' | '*' | '+')?</rhs></prod><prod id="NT-choice"><lhs>choice</lhs><rhs>'(' <nt def="NT-S">S</nt>? cp -( <nt def="NT-S">S</nt>? '|' <nt def="NT-S">S</nt>? <nt def="NT-cp">cp</nt> )* -<nt def="NT-S">S</nt>? ')'</rhs><vc def="vc-PEinGroup"/></prod><prod id="NT-seq"><lhs>seq</lhs><rhs>'(' <nt def="NT-S">S</nt>? cp -( <nt def="NT-S">S</nt>? ',' <nt def="NT-S">S</nt>? <nt def="NT-cp">cp</nt> )* -<nt def="NT-S">S</nt>? ')'</rhs><vc def="vc-PEinGroup"/></prod></prodgroup></scrap> +('?' | '*' | '+')?</rhs></prod><prod id="NT-choice"><lhs>choice</lhs><rhs>'(' <nt def="NT-S">S</nt>? cp +( <nt def="NT-S">S</nt>? '|' <nt def="NT-S">S</nt>? <nt def="NT-cp">cp</nt> )* +<nt def="NT-S">S</nt>? ')'</rhs><vc def="vc-PEinGroup"/></prod><prod id="NT-seq"><lhs>seq</lhs><rhs>'(' <nt def="NT-S">S</nt>? cp +( <nt def="NT-S">S</nt>? ',' <nt def="NT-S">S</nt>? <nt def="NT-cp">cp</nt> )* +<nt def="NT-S">S</nt>? ')'</rhs><vc def="vc-PEinGroup"/></prod></prodgroup></scrap> where each <nt def="NT-Name">Name</nt> is the type of an element which may appear as a <termref def="dt-parentchild">child</termref>. Any content @@ -1486,7 +1481,7 @@ must appear exactly once. This syntax and meaning are identical to those used in the productions in this specification.</p> - <p> +<p> The content of an element matches a content model if and only if it is possible to trace out a path through the content model, obeying the sequence, choice, and repetition operators and matching each element in @@ -1497,9 +1492,9 @@ For more information, see <specref ref="determinism"/>. <!-- appendix <specref ref="determinism"/>. --> <!-- appendix on deterministic content models. --> </p> - <vcnote id="vc-PEinGroup"> - <head>Proper Group/PE Nesting</head> - <p>Parameter-entity +<vcnote id="vc-PEinGroup"> +<head>Proper Group/PE Nesting</head> +<p>Parameter-entity <termref def="dt-repltext">replacement text</termref> must be properly nested with parenthetized groups. That is to say, if either of the opening or closing parentheses @@ -1508,7 +1503,7 @@ in a <nt def="NT-choice">choice</nt>, <nt def="NT-seq">seq</nt>, or is contained in the replacement text for a <termref def="dt-PERef">parameter entity</termref>, both must be contained in the same replacement text.</p> - <p><termref def="dt-interop">For interoperability</termref>, +<p><termref def="dt-interop">For interoperability</termref>, if a parameter-entity reference appears in a <nt def="NT-choice">choice</nt>, <nt def="NT-seq">seq</nt>, or <nt def="NT-Mixed">Mixed</nt> construct, its replacement text @@ -1517,48 +1512,48 @@ neither the first nor last non-blank character of the replacement text should be a connector (<code>|</code> or <code>,</code>). </p> - </vcnote> - <p>Examples of element-content models: +</vcnote> +<p>Examples of element-content models: <eg><!ELEMENT spec (front, body, back?)> <!ELEMENT div1 (head, (p | list | note)*, div2*)> <!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*></eg></p> - </div3> - <div3 id="sec-mixed-content"> - <head>Mixed Content</head> - <p><termdef id="dt-mixed" term="Mixed Content">An element +</div3> +<div3 id="sec-mixed-content"> +<head>Mixed Content</head> +<p><termdef id="dt-mixed" term="Mixed Content">An element <termref def="dt-stag">type</termref> has <term>mixed content</term> when elements of that type may contain character data, optionally interspersed with <termref def="dt-parentchild">child</termref> elements.</termdef> In this case, the types of the child elements may be constrained, but not their order or their number of occurrences: -<scrap lang="ebnf"><head>Mixed-content Declaration</head><prodgroup pcw2="5.5" pcw4="16" pcw5="11"><prod id="NT-Mixed"><lhs>Mixed</lhs><rhs>'(' <nt def="NT-S">S</nt>? -'#PCDATA' +<scrap lang="ebnf"><head>Mixed-content Declaration</head><prodgroup pcw2="5.5" pcw4="16" pcw5="11"><prod id="NT-Mixed"><lhs>Mixed</lhs><rhs>'(' <nt def="NT-S">S</nt>? +'#PCDATA' (<nt def="NT-S">S</nt>? -'|' +'|' <nt def="NT-S">S</nt>? <nt def="NT-Name">Name</nt>)* <nt def="NT-S">S</nt>? -')*' </rhs><rhs>| '(' <nt def="NT-S">S</nt>? '#PCDATA' <nt def="NT-S">S</nt>? ')' +')*' </rhs><rhs>| '(' <nt def="NT-S">S</nt>? '#PCDATA' <nt def="NT-S">S</nt>? ')' </rhs><vc def="vc-PEinGroup"/><vc def="vc-MixedChildrenUnique"/></prod></prodgroup></scrap> where the <nt def="NT-Name">Name</nt>s give the types of elements that may appear as children. </p> - <vcnote id="vc-MixedChildrenUnique"> - <head>No Duplicate Types</head> - <p>The same name must not appear more than once in a single mixed-content +<vcnote id="vc-MixedChildrenUnique"> +<head>No Duplicate Types</head> +<p>The same name must not appear more than once in a single mixed-content declaration. </p> - </vcnote> - <p>Examples of mixed content declarations: +</vcnote> +<p>Examples of mixed content declarations: <eg><!ELEMENT p (#PCDATA|a|ul|b|i|em)*> <!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* > <!ELEMENT b (#PCDATA)></eg></p> - </div3> - </div2> - <div2 id="attdecls"> - <head>Attribute-List Declarations</head> - <p><termref def="dt-attr">Attributes</termref> are used to associate +</div3> +</div2> +<div2 id="attdecls"> +<head>Attribute-List Declarations</head> +<p><termref def="dt-attr">Attributes</termref> are used to associate name-value pairs with <termref def="dt-element">elements</termref>. Attribute specifications may appear only within <termref def="dt-stag">start-tags</termref> and <termref def="dt-eetag">empty-element tags</termref>; @@ -1571,14 +1566,14 @@ element type.</p></item><item><p>To establish type constraints for these attributes.</p></item><item><p>To provide <termref def="dt-default">default values</termref> for attributes.</p></item></ulist> </p> - <p> - <termdef id="dt-attdecl" term="Attribute-List Declaration"> +<p> +<termdef id="dt-attdecl" term="Attribute-List Declaration"> <term>Attribute-list declarations</term> specify the name, data type, and default value (if any) of each attribute associated with a given element type: -<scrap lang="ebnf"><head>Attribute-list Declaration</head><prod id="NT-AttlistDecl"><lhs>AttlistDecl</lhs><rhs>'<!ATTLIST' <nt def="NT-S">S</nt> +<scrap lang="ebnf"><head>Attribute-list Declaration</head><prod id="NT-AttlistDecl"><lhs>AttlistDecl</lhs><rhs>'<!ATTLIST' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> <nt def="NT-AttDef">AttDef</nt>* -<nt def="NT-S">S</nt>? '>'</rhs></prod><prod id="NT-AttDef"><lhs>AttDef</lhs><rhs><nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> +<nt def="NT-S">S</nt>? '>'</rhs></prod><prod id="NT-AttDef"><lhs>AttDef</lhs><rhs><nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> <nt def="NT-S">S</nt> <nt def="NT-AttType">AttType</nt> <nt def="NT-S">S</nt> <nt def="NT-DefaultDecl">DefaultDecl</nt></rhs></prod></scrap> The <nt def="NT-Name">Name</nt> in the @@ -1588,8 +1583,8 @@ declared for an element type not itself declared, but this is not an error. The <nt def="NT-Name">Name</nt> in the <nt def="NT-AttDef">AttDef</nt> rule is the name of the attribute.</termdef> - </p> - <p> +</p> +<p> When more than one <nt def="NT-AttlistDecl">AttlistDecl</nt> is provided for a given element type, the contents of all those provided are merged. When more than one definition is provided for the same attribute of a @@ -1606,39 +1601,39 @@ provided for a given element type, or more than one attribute definition is provided for a given attribute, but this is not an error. </p> - <div3 id="sec-attribute-types"> - <head>Attribute Types</head> - <p>XML attribute types are of three kinds: a string type, a +<div3 id="sec-attribute-types"> +<head>Attribute Types</head> +<p>XML attribute types are of three kinds: a string type, a set of tokenized types, and enumerated types. The string type may take any literal string as a value; the tokenized types have varying lexical and semantic constraints, as noted: <scrap lang="ebnf"><head>Attribute Types</head><prodgroup pcw4="14" pcw5="11.5"><prod id="NT-AttType"><lhs>AttType</lhs><rhs><nt def="NT-StringType">StringType</nt> | <nt def="NT-TokenizedType">TokenizedType</nt> | <nt def="NT-EnumeratedType">EnumeratedType</nt> -</rhs></prod><prod id="NT-StringType"><lhs>StringType</lhs><rhs>'CDATA'</rhs></prod><prod id="NT-TokenizedType"><lhs>TokenizedType</lhs><rhs>'ID'</rhs><vc def="id"/><vc def="one-id-per-el"/><vc def="id-default"/><rhs>| 'IDREF'</rhs><vc def="idref"/><rhs>| 'IDREFS'</rhs><vc def="idref"/><rhs>| 'ENTITY'</rhs><vc def="entname"/><rhs>| 'ENTITIES'</rhs><vc def="entname"/><rhs>| 'NMTOKEN'</rhs><vc def="nmtok"/><rhs>| 'NMTOKENS'</rhs><vc def="nmtok"/></prod></prodgroup></scrap> +</rhs></prod><prod id="NT-StringType"><lhs>StringType</lhs><rhs>'CDATA'</rhs></prod><prod id="NT-TokenizedType"><lhs>TokenizedType</lhs><rhs>'ID'</rhs><vc def="id"/><vc def="one-id-per-el"/><vc def="id-default"/><rhs>| 'IDREF'</rhs><vc def="idref"/><rhs>| 'IDREFS'</rhs><vc def="idref"/><rhs>| 'ENTITY'</rhs><vc def="entname"/><rhs>| 'ENTITIES'</rhs><vc def="entname"/><rhs>| 'NMTOKEN'</rhs><vc def="nmtok"/><rhs>| 'NMTOKENS'</rhs><vc def="nmtok"/></prod></prodgroup></scrap> </p> - <vcnote id="id"> - <head>ID</head> - <p> +<vcnote id="id"> +<head>ID</head> +<p> Values of type <kw>ID</kw> must match the <nt def="NT-Name">Name</nt> production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. </p> - </vcnote> - <vcnote id="one-id-per-el"> - <head>One ID per Element Type</head> - <p>No element type may have more than one ID attribute specified.</p> - </vcnote> - <vcnote id="id-default"> - <head>ID Attribute Default</head> - <p>An ID attribute must have a declared default of <kw>#IMPLIED</kw> or +</vcnote> +<vcnote id="one-id-per-el"> +<head>One ID per Element Type</head> +<p>No element type may have more than one ID attribute specified.</p> +</vcnote> +<vcnote id="id-default"> +<head>ID Attribute Default</head> +<p>An ID attribute must have a declared default of <kw>#IMPLIED</kw> or <kw>#REQUIRED</kw>.</p> - </vcnote> - <vcnote id="idref"> - <head>IDREF</head> - <p> +</vcnote> +<vcnote id="idref"> +<head>IDREF</head> +<p> Values of type <kw>IDREF</kw> must match the <nt def="NT-Name">Name</nt> production, and values of type <kw>IDREFS</kw> must match @@ -1647,10 +1642,10 @@ each <nt def="NT-Name">Name</nt> must match the value of an ID attribute on some element in the XML document; i.e. <kw>IDREF</kw> values must match the value of some ID attribute. </p> - </vcnote> - <vcnote id="entname"> - <head>Entity Name</head> - <p> +</vcnote> +<vcnote id="entname"> +<head>Entity Name</head> +<p> Values of type <kw>ENTITY</kw> must match the <nt def="NT-Name">Name</nt> production, values of type <kw>ENTITIES</kw> must match @@ -1660,79 +1655,79 @@ match the name of an <termref def="dt-unparsed">unparsed entity</termref> declared in the <termref def="dt-doctype">DTD</termref>. </p> - </vcnote> - <vcnote id="nmtok"> - <head>Name Token</head> - <p> +</vcnote> +<vcnote id="nmtok"> +<head>Name Token</head> +<p> Values of type <kw>NMTOKEN</kw> must match the <nt def="NT-Nmtoken">Nmtoken</nt> production; values of type <kw>NMTOKENS</kw> must match <termref def="NT-Nmtokens">Nmtokens</termref>. </p> - </vcnote> +</vcnote> <!-- why? <p>The XML processor must normalize attribute values before passing them to the application, as described in <specref ref="AVNormalize"/>.</p>--> - <p><termdef id="dt-enumerated" term="Enumerated Attribute Values"><term>Enumerated attributes</term> can take one +<p><termdef id="dt-enumerated" term="Enumerated Attribute Values"><term>Enumerated attributes</term> can take one of a list of values provided in the declaration</termdef>. There are two kinds of enumerated types: <scrap lang="ebnf"><head>Enumerated Attribute Types</head><prod id="NT-EnumeratedType"><lhs>EnumeratedType</lhs><rhs><nt def="NT-NotationType">NotationType</nt> | <nt def="NT-Enumeration">Enumeration</nt> -</rhs></prod><prod id="NT-NotationType"><lhs>NotationType</lhs><rhs>'NOTATION' +</rhs></prod><prod id="NT-NotationType"><lhs>NotationType</lhs><rhs>'NOTATION' <nt def="NT-S">S</nt> -'(' +'(' <nt def="NT-S">S</nt>? <nt def="NT-Name">Name</nt> -(<nt def="NT-S">S</nt>? '|' <nt def="NT-S">S</nt>? +(<nt def="NT-S">S</nt>? '|' <nt def="NT-S">S</nt>? <nt def="NT-Name">Name</nt>)* -<nt def="NT-S">S</nt>? ')' -</rhs><vc def="notatn"/></prod><prod id="NT-Enumeration"><lhs>Enumeration</lhs><rhs>'(' <nt def="NT-S">S</nt>? +<nt def="NT-S">S</nt>? ')' +</rhs><vc def="notatn"/></prod><prod id="NT-Enumeration"><lhs>Enumeration</lhs><rhs>'(' <nt def="NT-S">S</nt>? <nt def="NT-Nmtoken">Nmtoken</nt> -(<nt def="NT-S">S</nt>? '|' +(<nt def="NT-S">S</nt>? '|' <nt def="NT-S">S</nt>? <nt def="NT-Nmtoken">Nmtoken</nt>)* <nt def="NT-S">S</nt>? -')'</rhs><vc def="enum"/></prod></scrap> +')'</rhs><vc def="enum"/></prod></scrap> A <kw>NOTATION</kw> attribute identifies a <termref def="dt-notation">notation</termref>, declared in the DTD with associated system and/or public identifiers, to be used in interpreting the element to which the attribute is attached. </p> - <vcnote id="notatn"> - <head>Notation Attributes</head> - <p> +<vcnote id="notatn"> +<head>Notation Attributes</head> +<p> Values of this type must match one of the <titleref href="Notations">notation</titleref> names included in the declaration; all notation names in the declaration must be declared. </p> - </vcnote> - <vcnote id="enum"> - <head>Enumeration</head> - <p> +</vcnote> +<vcnote id="enum"> +<head>Enumeration</head> +<p> Values of this type must match one of the <nt def="NT-Nmtoken">Nmtoken</nt> tokens in the declaration. </p> - </vcnote> - <p><termref def="dt-interop">For interoperability,</termref> the same +</vcnote> +<p><termref def="dt-interop">For interoperability,</termref> the same <nt def="NT-Nmtoken">Nmtoken</nt> should not occur more than once in the enumerated attribute types of a single element type. </p> - </div3> - <div3 id="sec-attr-defaults"> - <head>Attribute Defaults</head> - <p>An <termref def="dt-attdecl">attribute declaration</termref> provides +</div3> +<div3 id="sec-attr-defaults"> +<head>Attribute Defaults</head> +<p>An <termref def="dt-attdecl">attribute declaration</termref> provides information on whether -the attribute's presence is required, and if not, how an XML processor should +the attribute's presence is required, and if not, how an XML processor should react if a declared attribute is absent in a document. -<scrap lang="ebnf"><head>Attribute Defaults</head><prodgroup pcw4="14" pcw5="11.5"><prod id="NT-DefaultDecl"><lhs>DefaultDecl</lhs><rhs>'#REQUIRED' -| '#IMPLIED' </rhs><rhs>| (('#FIXED' S)? <nt def="NT-AttValue">AttValue</nt>)</rhs><vc def="RequiredAttr"/><vc def="defattrvalid"/><wfc def="CleanAttrVals"/><vc def="FixedAttr"/></prod></prodgroup></scrap> +<scrap lang="ebnf"><head>Attribute Defaults</head><prodgroup pcw4="14" pcw5="11.5"><prod id="NT-DefaultDecl"><lhs>DefaultDecl</lhs><rhs>'#REQUIRED' +| '#IMPLIED' </rhs><rhs>| (('#FIXED' S)? <nt def="NT-AttValue">AttValue</nt>)</rhs><vc def="RequiredAttr"/><vc def="defattrvalid"/><wfc def="CleanAttrVals"/><vc def="FixedAttr"/></prod></prodgroup></scrap> </p> - <p>In an attribute declaration, <kw>#REQUIRED</kw> means that the +<p>In an attribute declaration, <kw>#REQUIRED</kw> means that the attribute must always be provided, <kw>#IMPLIED</kw> that no default value is provided. <!-- not any more!! @@ -1751,28 +1746,28 @@ If a default value is declared, when an XML processor encounters an omitted attribute, it is to behave as though the attribute were present with the declared default value.</termdef></p> - <vcnote id="RequiredAttr"> - <head>Required Attribute</head> - <p>If the default declaration is the keyword <kw>#REQUIRED</kw>, then +<vcnote id="RequiredAttr"> +<head>Required Attribute</head> +<p>If the default declaration is the keyword <kw>#REQUIRED</kw>, then the attribute must be specified for all elements of the type in the attribute-list declaration. </p> - </vcnote> - <vcnote id="defattrvalid"> - <head>Attribute Default Legal</head> - <p> +</vcnote> +<vcnote id="defattrvalid"> +<head>Attribute Default Legal</head> +<p> The declared default value must meet the lexical constraints of the declared attribute type. </p> - </vcnote> - <vcnote id="FixedAttr"> - <head>Fixed Attribute Default</head> - <p>If an attribute has a default value declared with the +</vcnote> +<vcnote id="FixedAttr"> +<head>Fixed Attribute Default</head> +<p>If an attribute has a default value declared with the <kw>#FIXED</kw> keyword, instances of that attribute must match the default value. </p> - </vcnote> - <p>Examples of attribute-list declarations: +</vcnote> +<p>Examples of attribute-list declarations: <eg><!ATTLIST termdef id ID #REQUIRED name CDATA #IMPLIED> @@ -1780,10 +1775,10 @@ match the default value. type (bullets|ordered|glossary) "ordered"> <!ATTLIST form method CDATA #FIXED "POST"></eg></p> - </div3> - <div3 id="AVNormalize"> - <head>Attribute-Value Normalization</head> - <p>Before the value of an attribute is passed to the application +</div3> +<div3 id="AVNormalize"> +<head>Attribute-Value Normalization</head> +<p>Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize it as follows: <ulist><item><p>a character reference is processed by appending the referenced @@ -1795,21 +1790,21 @@ parsed entity or the literal entity value of an internal parsed entity</p></item><item><p>other characters are processed by appending them to the normalized value</p></item></ulist> </p> - <p>If the declared value is not CDATA, then the XML processor must +<p>If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character.</p> - <p> +<p> All attributes for which no declaration has been read should be treated by a non-validating parser as if declared <kw>CDATA</kw>. </p> - </div3> - </div2> - <div2 id="sec-condition-sect"> - <head>Conditional Sections</head> - <p><termdef id="dt-cond-section" term="conditional section"> +</div3> +</div2> +<div2 id="sec-condition-sect"> +<head>Conditional Sections</head> +<p><termdef id="dt-cond-section" term="conditional section"> <term>Conditional sections</term> are portions of the <termref def="dt-doctype">document type declaration external subset</termref> which are @@ -1817,25 +1812,25 @@ included in, or excluded from, the logical structure of the DTD based on the keyword which governs them.</termdef> <scrap lang="ebnf"><head>Conditional Section</head><prodgroup pcw2="9" pcw4="14.5"><prod id="NT-conditionalSect"><lhs>conditionalSect</lhs><rhs><nt def="NT-includeSect">includeSect</nt> | <nt def="NT-ignoreSect">ignoreSect</nt> -</rhs></prod><prod id="NT-includeSect"><lhs>includeSect</lhs><rhs>'<![' S? 'INCLUDE' S? '[' +</rhs></prod><prod id="NT-includeSect"><lhs>includeSect</lhs><rhs>'<![' S? 'INCLUDE' S? '[' <nt def="NT-extSubsetDecl">extSubsetDecl</nt> -']]>' -</rhs></prod><prod id="NT-ignoreSect"><lhs>ignoreSect</lhs><rhs>'<![' S? 'IGNORE' S? '[' +']]>' +</rhs></prod><prod id="NT-ignoreSect"><lhs>ignoreSect</lhs><rhs>'<![' S? 'IGNORE' S? '[' <nt def="NT-ignoreSectContents">ignoreSectContents</nt>* -']]>'</rhs></prod><prod id="NT-ignoreSectContents"><lhs>ignoreSectContents</lhs><rhs><nt def="NT-Ignore">Ignore</nt> -('<![' <nt def="NT-ignoreSectContents">ignoreSectContents</nt> ']]>' +']]>'</rhs></prod><prod id="NT-ignoreSectContents"><lhs>ignoreSectContents</lhs><rhs><nt def="NT-Ignore">Ignore</nt> +('<![' <nt def="NT-ignoreSectContents">ignoreSectContents</nt> ']]>' <nt def="NT-Ignore">Ignore</nt>)*</rhs></prod><prod id="NT-Ignore"><lhs>Ignore</lhs><rhs><nt def="NT-Char">Char</nt>* - -(<nt def="NT-Char">Char</nt>* ('<![' | ']]>') +(<nt def="NT-Char">Char</nt>* ('<![' | ']]>') <nt def="NT-Char">Char</nt>*) </rhs></prod></prodgroup></scrap> </p> - <p>Like the internal and external DTD subsets, a conditional section +<p>Like the internal and external DTD subsets, a conditional section may contain one or more complete declarations, comments, processing instructions, or nested conditional sections, intermingled with white space. </p> - <p>If the keyword of the +<p>If the keyword of the conditional section is <kw>INCLUDE</kw>, then the contents of the conditional section are part of the DTD. If the keyword of the conditional @@ -1849,13 +1844,13 @@ If a conditional section with a keyword of <kw>INCLUDE</kw> occurs within a larger conditional section with a keyword of <kw>IGNORE</kw>, both the outer and the inner conditional sections are ignored.</p> - <p>If the keyword of the conditional section is a +<p>If the keyword of the conditional section is a parameter-entity reference, the parameter entity must be replaced by its content before the processor decides whether to include or ignore the conditional section.</p> - <p>An example: -<eg><!ENTITY % draft 'INCLUDE' > -<!ENTITY % final 'IGNORE' > +<p>An example: +<eg><!ENTITY % draft 'INCLUDE' > +<!ENTITY % final 'IGNORE' > <![%draft;[ <!ELEMENT book (comments*, title, body, supplements?)> @@ -1865,7 +1860,7 @@ include or ignore the conditional section.</p> ]]> </eg> </p> - </div2> +</div2> <!-- <div2 id='sec-pass-to-app'> <head>XML Processor Treatment of Logical Structure</head> @@ -1887,11 +1882,11 @@ values are specified. </p> </div2> --> - </div1> +</div1> <!-- &Entities; --> - <div1 id="sec-physical-struct"> - <head>Physical Structures</head> - <p><termdef id="dt-entity" term="Entity">An XML document may consist +<div1 id="sec-physical-struct"> +<head>Physical Structures</head> +<p><termdef id="dt-entity" term="Entity">An XML document may consist of one or many storage units. These are called <term>entities</term>; they all have <term>content</term> and are all (except for the document entity, see below, and @@ -1902,13 +1897,13 @@ Each XML document has one entity called the <termref def="dt-docent">document entity</termref>, which serves as the starting point for the <termref def="dt-xml-proc">XML processor</termref> and may contain the whole document.</p> - <p>Entities may be either parsed or unparsed. -<termdef id="dt-parsedent" term="Text Entity">A <term>parsed entity's</term> +<p>Entities may be either parsed or unparsed. +<termdef id="dt-parsedent" term="Text Entity">A <term>parsed entity's</term> contents are referred to as its <termref def="dt-repltext">replacement text</termref>; this <termref def="dt-text">text</termref> is considered an integral part of the document.</termdef></p> - <p><termdef id="dt-unparsed" term="Unparsed Entity">An +<p><termdef id="dt-unparsed" term="Unparsed Entity">An <term>unparsed entity</term> is a resource whose contents may or may not be <termref def="dt-text">text</termref>, and if text, may not be XML. @@ -1919,12 +1914,12 @@ that an XML processor make the identifiers for the entity and notation available to the application, XML places no constraints on the contents of unparsed entities.</termdef> </p> - <p> +<p> Parsed entities are invoked by name using entity references; unparsed entities by name, given in the value of <kw>ENTITY</kw> or <kw>ENTITIES</kw> attributes.</p> - <p><termdef id="gen-entity" term="general entity"><term>General entities</term> +<p><termdef id="gen-entity" term="general entity"><term>General entities</term> are entities for use within the document content. In this specification, general entities are sometimes referred to with the unqualified term <emph>entity</emph> when this leads @@ -1936,25 +1931,25 @@ are recognized in different contexts. Furthermore, they occupy different namespaces; a parameter entity and a general entity with the same name are two distinct entities. </p> - <div2 id="sec-references"> - <head>Character and Entity References</head> - <p><termdef id="dt-charref" term="Character Reference"> +<div2 id="sec-references"> +<head>Character and Entity References</head> +<p><termdef id="dt-charref" term="Character Reference"> A <term>character reference</term> refers to a specific character in the ISO/IEC 10646 character set, for example one not directly accessible from available input devices. -<scrap lang="ebnf"><head>Character Reference</head><prod id="NT-CharRef"><lhs>CharRef</lhs><rhs>'&#' [0-9]+ ';' </rhs><rhs>| '&hcro;' [0-9a-fA-F]+ ';'</rhs><wfc def="wf-Legalchar"/></prod></scrap> +<scrap lang="ebnf"><head>Character Reference</head><prod id="NT-CharRef"><lhs>CharRef</lhs><rhs>'&#' [0-9]+ ';' </rhs><rhs>| '&hcro;' [0-9a-fA-F]+ ';'</rhs><wfc def="wf-Legalchar"/></prod></scrap> <wfcnote id="wf-Legalchar"><head>Legal Character</head><p>Characters referred to using character references must match the production for <termref def="NT-Char">Char</termref>.</p></wfcnote> If the character reference begins with "<code>&#x</code>", the digits and letters up to the terminating <code>;</code> provide a hexadecimal -representation of the character's code point in ISO/IEC 10646. +representation of the character's code point in ISO/IEC 10646. If it begins just with "<code>&#</code>", the digits up to the terminating -<code>;</code> provide a decimal representation of the character's +<code>;</code> provide a decimal representation of the character's code point. </termdef> </p> - <p><termdef id="dt-entref" term="Entity Reference">An <term>entity +<p><termdef id="dt-entref" term="Entity Reference">An <term>entity reference</term> refers to the content of a named entity.</termdef> <termdef id="dt-GERef" term="General Entity Reference">References to parsed general entities @@ -1965,34 +1960,34 @@ delimiters.</termdef> semicolon (<code>;</code>) as delimiters.</termdef> </p> - <scrap lang="ebnf"> - <head>Entity Reference</head> - <prod id="NT-Reference"> - <lhs>Reference</lhs> - <rhs><nt def="NT-EntityRef">EntityRef</nt> +<scrap lang="ebnf"> +<head>Entity Reference</head> +<prod id="NT-Reference"> +<lhs>Reference</lhs> +<rhs><nt def="NT-EntityRef">EntityRef</nt> | <nt def="NT-CharRef">CharRef</nt></rhs> - </prod> - <prod id="NT-EntityRef"> - <lhs>EntityRef</lhs> - <rhs>'&' <nt def="NT-Name">Name</nt> ';'</rhs> - <wfc def="wf-entdeclared"/> - <vc def="vc-entdeclared"/> - <wfc def="textent"/> - <wfc def="norecursion"/> - </prod> - <prod id="NT-PEReference"> - <lhs>PEReference</lhs> - <rhs>'%' <nt def="NT-Name">Name</nt> ';'</rhs> - <vc def="vc-entdeclared"/> - <wfc def="norecursion"/> - <wfc def="indtd"/> - </prod> - </scrap> - <wfcnote id="wf-entdeclared"> - <head>Entity Declared</head> - <p>In a document without any DTD, a document with only an internal +</prod> +<prod id="NT-EntityRef"> +<lhs>EntityRef</lhs> +<rhs>'&' <nt def="NT-Name">Name</nt> ';'</rhs> +<wfc def="wf-entdeclared"/> +<vc def="vc-entdeclared"/> +<wfc def="textent"/> +<wfc def="norecursion"/> +</prod> +<prod id="NT-PEReference"> +<lhs>PEReference</lhs> +<rhs>'%' <nt def="NT-Name">Name</nt> ';'</rhs> +<vc def="vc-entdeclared"/> +<wfc def="norecursion"/> +<wfc def="indtd"/> +</prod> +</scrap> +<wfcnote id="wf-entdeclared"> +<head>Entity Declared</head> +<p>In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with -"<code>standalone='yes'</code>", +"<code>standalone='yes'</code>", the <nt def="NT-Name">Name</nt> given in the entity reference must <termref def="dt-match">match</termref> that in an <titleref href="sec-entity-decl">entity declaration</titleref>, except that @@ -2002,17 +1997,17 @@ The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration.</p> - <p>Note that if entities are declared in the external subset or in +<p>Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is <titleref href="include-if-valid">not obligated to</titleref> read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only -if <titleref href="sec-rmd">standalone='yes'</titleref>.</p> - </wfcnote> - <vcnote id="vc-entdeclared"> - <head>Entity Declared</head> - <p>In a document with an external subset or external parameter -entities with "<code>standalone='no'</code>", +if <titleref href="sec-rmd">standalone='yes'</titleref>.</p> +</wfcnote> +<vcnote id="vc-entdeclared"> +<head>Entity Declared</head> +<p>In a document with an external subset or external parameter +entities with "<code>standalone='no'</code>", the <nt def="NT-Name">Name</nt> given in the entity reference must <termref def="dt-match">match</termref> that in an <titleref href="sec-entity-decl">entity declaration</titleref>. For interoperability, valid documents should declare the entities @@ -2022,51 +2017,51 @@ The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration.</p> - </vcnote> +</vcnote> <!-- FINAL EDIT: is this duplication too clumsy? --> - <wfcnote id="textent"> - <head>Parsed Entity</head> - <p> +<wfcnote id="textent"> +<head>Parsed Entity</head> +<p> An entity reference must not contain the name of an <termref def="dt-unparsed">unparsed entity</termref>. Unparsed entities may be referred to only in <termref def="dt-attrval">attribute values</termref> declared to be of type <kw>ENTITY</kw> or <kw>ENTITIES</kw>. </p> - </wfcnote> - <wfcnote id="norecursion"> - <head>No Recursion</head> - <p> +</wfcnote> +<wfcnote id="norecursion"> +<head>No Recursion</head> +<p> A parsed entity must not contain a recursive reference to itself, either directly or indirectly. </p> - </wfcnote> - <wfcnote id="indtd"> - <head>In DTD</head> - <p> +</wfcnote> +<wfcnote id="indtd"> +<head>In DTD</head> +<p> Parameter-entity references may only appear in the <termref def="dt-doctype">DTD</termref>. </p> - </wfcnote> - <p>Examples of character and entity references: +</wfcnote> +<p>Examples of character and entity references: <eg>Type <key>less-than</key> (&hcro;3C;) to save options. This document was prepared on &docdate; and is classified &security-level;.</eg></p> - <p>Example of a parameter-entity reference: +<p>Example of a parameter-entity reference: <eg><![CDATA[<!-- declare the parameter entity "ISOLat2"... --> <!ENTITY % ISOLat2 SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" > <!-- ... now reference it. --> %ISOLat2;]]></eg></p> - </div2> - <div2 id="sec-entity-decl"> - <head>Entity Declarations</head> - <p><termdef id="dt-entdecl" term="entity declaration"> +</div2> +<div2 id="sec-entity-decl"> +<head>Entity Declarations</head> +<p><termdef id="dt-entdecl" term="entity declaration"> Entities are declared thus: <scrap lang="ebnf"><head>Entity Declaration</head><prodgroup pcw2="5" pcw4="18.5"><prod id="NT-EntityDecl"><lhs>EntityDecl</lhs><rhs><nt def="NT-GEDecl">GEDecl</nt><!--</rhs><com>General entities</com> -<rhs>--> | <nt def="NT-PEDecl">PEDecl</nt></rhs><!--<com>Parameter entities</com>--></prod><prod id="NT-GEDecl"><lhs>GEDecl</lhs><rhs>'<!ENTITY' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> +<rhs>--> | <nt def="NT-PEDecl">PEDecl</nt></rhs><!--<com>Parameter entities</com>--></prod><prod id="NT-GEDecl"><lhs>GEDecl</lhs><rhs>'<!ENTITY' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> <nt def="NT-S">S</nt> <nt def="NT-EntityDef">EntityDef</nt> -<nt def="NT-S">S</nt>? '>'</rhs></prod><prod id="NT-PEDecl"><lhs>PEDecl</lhs><rhs>'<!ENTITY' <nt def="NT-S">S</nt> '%' <nt def="NT-S">S</nt> +<nt def="NT-S">S</nt>? '>'</rhs></prod><prod id="NT-PEDecl"><lhs>PEDecl</lhs><rhs>'<!ENTITY' <nt def="NT-S">S</nt> '%' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> <nt def="NT-S">S</nt> -<nt def="NT-PEDef">PEDef</nt> <nt def="NT-S">S</nt>? '>'</rhs><!--<com>Parameter entities</com>--></prod><prod id="NT-EntityDef"><lhs>EntityDef</lhs><rhs><nt def="NT-EntityValue">EntityValue</nt> +<nt def="NT-PEDef">PEDef</nt> <nt def="NT-S">S</nt>? '>'</rhs><!--<com>Parameter entities</com>--></prod><prod id="NT-EntityDef"><lhs>EntityDef</lhs><rhs><nt def="NT-EntityValue">EntityValue</nt> <!--</rhs> <rhs>-->| (<nt def="NT-ExternalID">ExternalID</nt> <nt def="NT-NDataDecl">NDataDecl</nt>?)</rhs><!-- <nt def='NT-ExternalDef'>ExternalDef</nt></rhs> --></prod><!-- FINAL EDIT: what happened to WFs here? --><prod id="NT-PEDef"><lhs>PEDef</lhs><rhs><nt def="NT-EntityValue">EntityValue</nt> @@ -2079,9 +2074,9 @@ If the same entity is declared more than once, the first declaration encountered is binding; at user option, an XML processor may issue a warning if entities are declared multiple times.</termdef> </p> - <div3 id="sec-internal-ent"> - <head>Internal Entities</head> - <p><termdef id="dt-internent" term="Internal Entity Replacement Text">If +<div3 id="sec-internal-ent"> +<head>Internal Entities</head> +<p><termdef id="dt-internent" term="Internal Entity Replacement Text">If the entity definition is an <nt def="NT-EntityValue">EntityValue</nt>, the defined entity is called an <term>internal entity</term>. @@ -2093,41 +2088,41 @@ Note that some processing of entity and character references in the produce the correct <termref def="dt-repltext">replacement text</termref>: see <specref ref="intern-replacement"/>. </p> - <p>An internal entity is a <termref def="dt-parsedent">parsed +<p>An internal entity is a <termref def="dt-parsedent">parsed entity</termref>.</p> - <p>Example of an internal entity declaration: +<p>Example of an internal entity declaration: <eg><!ENTITY Pub-Status "This is a pre-release of the specification."></eg></p> - </div3> - <div3 id="sec-external-ent"> - <head>External Entities</head> - <p> - <termdef id="dt-extent" term="External Entity">If the entity is not +</div3> +<div3 id="sec-external-ent"> +<head>External Entities</head> +<p> +<termdef id="dt-extent" term="External Entity">If the entity is not internal, it is an <term>external entity</term>, declared as follows: <scrap lang="ebnf"><head>External Entity Declaration</head><!-- <prod id='NT-ExternalDef'><lhs>ExternalDef</lhs> -<rhs></prod> --><prod id="NT-ExternalID"><lhs>ExternalID</lhs><rhs>'SYSTEM' <nt def="NT-S">S</nt> -<nt def="NT-SystemLiteral">SystemLiteral</nt></rhs><rhs>| 'PUBLIC' <nt def="NT-S">S</nt> +<rhs></prod> --><prod id="NT-ExternalID"><lhs>ExternalID</lhs><rhs>'SYSTEM' <nt def="NT-S">S</nt> +<nt def="NT-SystemLiteral">SystemLiteral</nt></rhs><rhs>| 'PUBLIC' <nt def="NT-S">S</nt> <nt def="NT-PubidLiteral">PubidLiteral</nt> <nt def="NT-S">S</nt> <nt def="NT-SystemLiteral">SystemLiteral</nt> -</rhs></prod><prod id="NT-NDataDecl"><lhs>NDataDecl</lhs><rhs><nt def="NT-S">S</nt> 'NDATA' <nt def="NT-S">S</nt> +</rhs></prod><prod id="NT-NDataDecl"><lhs>NDataDecl</lhs><rhs><nt def="NT-S">S</nt> 'NDATA' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt></rhs><vc def="not-declared"/></prod></scrap> If the <nt def="NT-NDataDecl">NDataDecl</nt> is present, this is a general <termref def="dt-unparsed">unparsed entity</termref>; otherwise it is a parsed entity.</termdef> - </p> - <vcnote id="not-declared"> - <head>Notation Declared</head> - <p> +</p> +<vcnote id="not-declared"> +<head>Notation Declared</head> +<p> The <nt def="NT-Name">Name</nt> must match the declared name of a <termref def="dt-notation">notation</termref>. </p> - </vcnote> - <p><termdef id="dt-sysid" term="System Identifier">The +</vcnote> +<p><termdef id="dt-sysid" term="System Identifier">The <nt def="NT-SystemLiteral">SystemLiteral</nt> -is called the entity's <term>system identifier</term>. It is a URI, +is called the entity's <term>system identifier</term>. It is a URI, which may be used to retrieve the entity.</termdef> Note that the hash mark (<code>#</code>) and fragment identifier frequently used with URIs are not, formally, part of the URI itself; @@ -2143,21 +2138,21 @@ A URI might thus be relative to the containing the <termref def="dt-doctype">external DTD subset</termref>, or to some other <termref def="dt-extent">external parameter entity</termref>. </p> - <p>An XML processor should handle a non-ASCII character in a URI by +<p>An XML processor should handle a non-ASCII character in a URI by representing the character in UTF-8 as one or more bytes, and then escaping these bytes with the URI escaping mechanism (i.e., by converting each byte to %HH, where HH is the hexadecimal notation of the byte value).</p> - <p><termdef id="dt-pubid" term="Public identifier"> +<p><termdef id="dt-pubid" term="Public identifier"> In addition to a system identifier, an external identifier may include a <term>public identifier</term>.</termdef> -An XML processor attempting to retrieve the entity's content may use the public +An XML processor attempting to retrieve the entity's content may use the public identifier to try to generate an alternative URI. If the processor is unable to do so, it must use the URI specified in the system literal. Before a match is attempted, all strings of white space in the public identifier must be normalized to single space characters (#x20), and leading and trailing white space must be removed.</p> - <p>Examples of external entity declarations: +<p>Examples of external entity declarations: <eg><!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml"> <!ENTITY open-hatch @@ -2166,27 +2161,27 @@ and leading and trailing white space must be removed.</p> <!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif ></eg></p> - </div3> - </div2> - <div2 id="TextEntities"> - <head>Parsed Entities</head> - <div3 id="sec-TextDecl"> - <head>The Text Declaration</head> - <p>External parsed entities may each begin with a <term>text +</div3> +</div2> +<div2 id="TextEntities"> +<head>Parsed Entities</head> +<div3 id="sec-TextDecl"> +<head>The Text Declaration</head> +<p>External parsed entities may each begin with a <term>text declaration</term>. <scrap lang="ebnf"><head>Text Declaration</head><prodgroup pcw4="12.5" pcw5="13"><prod id="NT-TextDecl"><lhs>TextDecl</lhs><rhs>&xmlpio; <nt def="NT-VersionInfo">VersionInfo</nt>? <nt def="NT-EncodingDecl">EncodingDecl</nt> <nt def="NT-S">S</nt>? &pic;</rhs></prod></prodgroup></scrap> </p> - <p>The text declaration must be provided literally, not +<p>The text declaration must be provided literally, not by reference to a parsed entity. No text declaration may appear at any position other than the beginning of an external parsed entity.</p> - </div3> - <div3 id="wf-entities"> - <head>Well-Formed Parsed Entities</head> - <p>The document entity is well-formed if it matches the production labeled +</div3> +<div3 id="wf-entities"> +<head>Well-Formed Parsed Entities</head> +<p>The document entity is well-formed if it matches the production labeled <nt def="NT-document">document</nt>. An external general parsed entity is well-formed if it matches the production labeled @@ -2202,7 +2197,7 @@ matches the production labeled <nt def="NT-content">content</nt>. All internal parameter entities are well-formed by definition. </p> - <p>A consequence of well-formedness in entities is that the logical +<p>A consequence of well-formedness in entities is that the logical and physical structures in an XML document are properly nested; no <termref def="dt-stag">start-tag</termref>, <termref def="dt-etag">end-tag</termref>, @@ -2214,22 +2209,22 @@ and physical structures in an XML document are properly nested; no reference</termref>, or <termref def="dt-entref">entity reference</termref> can begin in one entity and end in another.</p> - </div3> - <div3 id="charencoding"> - <head>Character Encoding in Entities</head> - <p>Each external parsed entity in an XML document may use a different +</div3> +<div3 id="charencoding"> +<head>Character Encoding in Entities</head> +<p>Each external parsed entity in an XML document may use a different encoding for its characters. All XML processors must be able to read entities in either UTF-8 or UTF-16. </p> - <p>Entities encoded in UTF-16 must +<p>Entities encoded in UTF-16 must begin with the Byte Order Mark described by ISO/IEC 10646 Annex E and Unicode Appendix B (the ZERO WIDTH NO-BREAK SPACE character, #xFEFF). This is an encoding signature, not part of either the markup or the character data of the XML document. XML processors must be able to use this character to differentiate between UTF-8 and UTF-16 encoded documents.</p> - <p>Although an XML processor is required to read only entities in +<p>Although an XML processor is required to read only entities in the UTF-8 and UTF-16 encodings, it is recognized that other encodings are used around the world, and it may be desired for XML processors to read entities that use them. @@ -2237,16 +2232,16 @@ Parsed entities which are stored in an encoding other than UTF-8 or UTF-16 must begin with a <titleref href="TextDecl">text declaration</titleref> containing an encoding declaration: <scrap lang="ebnf"><head>Encoding Declaration</head><prod id="NT-EncodingDecl"><lhs>EncodingDecl</lhs><rhs><nt def="NT-S">S</nt> -'encoding' <nt def="NT-Eq">Eq</nt> -('"' <nt def="NT-EncName">EncName</nt> '"' | -"'" <nt def="NT-EncName">EncName</nt> "'" ) -</rhs></prod><prod id="NT-EncName"><lhs>EncName</lhs><rhs>[A-Za-z] ([A-Za-z0-9._] | '-')*</rhs><com>Encoding name contains only Latin characters</com></prod></scrap> +'encoding' <nt def="NT-Eq">Eq</nt> +('"' <nt def="NT-EncName">EncName</nt> '"' | +"'" <nt def="NT-EncName">EncName</nt> "'" ) +</rhs></prod><prod id="NT-EncName"><lhs>EncName</lhs><rhs>[A-Za-z] ([A-Za-z0-9._] | '-')*</rhs><com>Encoding name contains only Latin characters</com></prod></scrap> In the <termref def="dt-docent">document entity</termref>, the encoding declaration is part of the <termref def="dt-xmldecl">XML declaration</termref>. The <nt def="NT-EncName">EncName</nt> is the name of the encoding used. </p> <!-- FINAL EDIT: check name of IANA and charset names --> - <p>In an encoding declaration, the values +<p>In an encoding declaration, the values "<code>UTF-8</code>", "<code>UTF-16</code>", "<code>ISO-10646-UCS-2</code>", and @@ -2271,7 +2266,7 @@ Note that these registered names are defined to be case-insensitive, so processors wishing to match against them should do so in a case-insensitive way.</p> - <p>In the absence of information provided by an external +<p>In the absence of information provided by an external transport protocol (e.g. HTTP or MIME), it is an <termref def="dt-error">error</termref> for an entity including an encoding declaration to be presented to the XML processor @@ -2283,16 +2278,16 @@ declaration to use an encoding other than UTF-8. Note that since ASCII is a subset of UTF-8, ordinary ASCII entities do not strictly need an encoding declaration.</p> - <p>It is a <termref def="dt-fatal">fatal error</termref> when an XML processor +<p>It is a <termref def="dt-fatal">fatal error</termref> when an XML processor encounters an entity with an encoding that it is unable to process.</p> - <p>Examples of encoding declarations: -<eg><?xml encoding='UTF-8'?> -<?xml encoding='EUC-JP'?></eg></p> - </div3> - </div2> - <div2 id="entproc"> - <head>XML Processor Treatment of Entities and References</head> - <p>The table below summarizes the contexts in which character references, +<p>Examples of encoding declarations: +<eg><?xml encoding='UTF-8'?> +<?xml encoding='EUC-JP'?></eg></p> +</div3> +</div2> +<div2 id="entproc"> +<head>XML Processor Treatment of Entities and References</head> +<p>The table below summarizes the contexts in which character references, entity references, and invocations of unparsed entities might appear and the required behavior of an <termref def="dt-xml-proc">XML processor</termref> in each case. @@ -2309,138 +2304,138 @@ the value of an attribute which has been declared as type <kw>ENTITY</kw>, or as one of the space-separated tokens in the value of an attribute which has been declared as type <kw>ENTITIES</kw>.</p></def></gitem><gitem><label>Reference in Entity Value</label><def><p>as a reference -within a parameter or internal entity's +within a parameter or internal entity's <termref def="dt-litentval">literal entity value</termref> in -the entity's declaration; corresponds to the nonterminal +the entity's declaration; corresponds to the nonterminal <nt def="NT-EntityValue">EntityValue</nt>.</p></def></gitem><gitem><label>Reference in DTD</label><def><p>as a reference within either the internal or external subsets of the <termref def="dt-doctype">DTD</termref>, but outside of an <nt def="NT-EntityValue">EntityValue</nt> or <nt def="NT-AttValue">AttValue</nt>.</p></def></gitem></glist></p> - <htable border="1" cellpadding="7" align="center"> - <htbody> - <tr> - <td bgcolor="&cellback;" rowspan="2" colspan="1"/> - <td bgcolor="&cellback;" align="center" valign="bottom" colspan="4">Entity Type</td> - <td bgcolor="&cellback;" rowspan="2" align="center">Character</td> - </tr> - <tr align="center" valign="bottom"> - <td bgcolor="&cellback;">Parameter</td> - <td bgcolor="&cellback;">Internal +<htable border="1" cellpadding="7" align="center"> +<htbody> +<tr> +<td bgcolor="&cellback;" rowspan="2" colspan="1"/> +<td bgcolor="&cellback;" align="center" valign="bottom" colspan="4">Entity Type</td> +<td bgcolor="&cellback;" rowspan="2" align="center">Character</td> +</tr> +<tr align="center" valign="bottom"> +<td bgcolor="&cellback;">Parameter</td> +<td bgcolor="&cellback;">Internal General</td> - <td bgcolor="&cellback;">External Parsed +<td bgcolor="&cellback;">External Parsed General</td> - <td bgcolor="&cellback;">Unparsed</td> - </tr> - <tr align="center" valign="middle"> - <td bgcolor="&cellback;" align="right">Reference +<td bgcolor="&cellback;">Unparsed</td> +</tr> +<tr align="center" valign="middle"> +<td bgcolor="&cellback;" align="right">Reference in Content</td> - <td bgcolor="&cellback;"> - <titleref href="not-recognized">Not recognized</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="included">Included</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="include-if-valid">Included if validating</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="forbidden">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="included">Included</titleref> - </td> - </tr> - <tr align="center" valign="middle"> - <td bgcolor="&cellback;" align="right">Reference +<td bgcolor="&cellback;"> +<titleref href="not-recognized">Not recognized</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="included">Included</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="include-if-valid">Included if validating</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="forbidden">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="included">Included</titleref> +</td> +</tr> +<tr align="center" valign="middle"> +<td bgcolor="&cellback;" align="right">Reference in Attribute Value</td> - <td bgcolor="&cellback;"> - <titleref href="not-recognized">Not recognized</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="inliteral">Included in literal</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="forbidden">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="forbidden">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="included">Included</titleref> - </td> - </tr> - <tr align="center" valign="middle"> - <td bgcolor="&cellback;" align="right">Occurs as +<td bgcolor="&cellback;"> +<titleref href="not-recognized">Not recognized</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="inliteral">Included in literal</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="forbidden">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="forbidden">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="included">Included</titleref> +</td> +</tr> +<tr align="center" valign="middle"> +<td bgcolor="&cellback;" align="right">Occurs as Attribute Value</td> - <td bgcolor="&cellback;"> - <titleref href="not-recognized">Not recognized</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="not-recognized">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="not-recognized">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="notify">Notify</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="not recognized">Not recognized</titleref> - </td> - </tr> - <tr align="center" valign="middle"> - <td bgcolor="&cellback;" align="right">Reference +<td bgcolor="&cellback;"> +<titleref href="not-recognized">Not recognized</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="not-recognized">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="not-recognized">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="notify">Notify</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="not recognized">Not recognized</titleref> +</td> +</tr> +<tr align="center" valign="middle"> +<td bgcolor="&cellback;" align="right">Reference in EntityValue</td> - <td bgcolor="&cellback;"> - <titleref href="inliteral">Included in literal</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="bypass">Bypassed</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="bypass">Bypassed</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="forbidden">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="included">Included</titleref> - </td> - </tr> - <tr align="center" valign="middle"> - <td bgcolor="&cellback;" align="right">Reference +<td bgcolor="&cellback;"> +<titleref href="inliteral">Included in literal</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="bypass">Bypassed</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="bypass">Bypassed</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="forbidden">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="included">Included</titleref> +</td> +</tr> +<tr align="center" valign="middle"> +<td bgcolor="&cellback;" align="right">Reference in DTD</td> - <td bgcolor="&cellback;"> - <titleref href="as-PE">Included as PE</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="forbidden">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="forbidden">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="forbidden">Forbidden</titleref> - </td> - <td bgcolor="&cellback;"> - <titleref href="forbidden">Forbidden</titleref> - </td> - </tr> - </htbody> - </htable> - <div3 id="not-recognized"> - <head>Not Recognized</head> - <p>Outside the DTD, the <code>%</code> character has no +<td bgcolor="&cellback;"> +<titleref href="as-PE">Included as PE</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="forbidden">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="forbidden">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="forbidden">Forbidden</titleref> +</td> +<td bgcolor="&cellback;"> +<titleref href="forbidden">Forbidden</titleref> +</td> +</tr> +</htbody> +</htable> +<div3 id="not-recognized"> +<head>Not Recognized</head> +<p>Outside the DTD, the <code>%</code> character has no special significance; thus, what would be parameter entity references in the DTD are not recognized as markup in <nt def="NT-content">content</nt>. Similarly, the names of unparsed entities are not recognized except when they appear in the value of an appropriately declared attribute. </p> - </div3> - <div3 id="included"> - <head>Included</head> - <p> - <termdef id="dt-include" term="Include">An entity is +</div3> +<div3 id="included"> +<head>Included</head> +<p> +<termdef id="dt-include" term="Include">An entity is <term>included</term> when its <termref def="dt-repltext">replacement text</termref> is retrieved and processed, in place of the reference itself, @@ -2458,11 +2453,11 @@ as an entity-reference delimiter.) A character reference is <term>included</term> when the indicated character is processed in place of the reference itself. </termdef> - </p> - </div3> - <div3 id="include-if-valid"> - <head>Included If Validating</head> - <p>When an XML processor recognizes a reference to a parsed entity, in order +</p> +</div3> +<div3 id="include-if-valid"> +<head>Included If Validating</head> +<p>When an XML processor recognizes a reference to a parsed entity, in order to <termref def="dt-valid">validate</termref> the document, the processor must <termref def="dt-include">include</termref> its @@ -2470,22 +2465,22 @@ replacement text. If the entity is external, and the processor is not attempting to validate the XML document, the processor <termref def="dt-may">may</termref>, but need not, -include the entity's replacement text. +include the entity's replacement text. If a non-validating parser does not include the replacement text, it must inform the application that it recognized, but did not read, the entity.</p> - <p>This rule is based on the recognition that the automatic inclusion +<p>This rule is based on the recognition that the automatic inclusion provided by the SGML and XML entity mechanism, primarily designed to support modularity in authoring, is not necessarily appropriate for other applications, in particular document browsing. Browsers, for example, when encountering an external parsed entity reference, -might choose to provide a visual indication of the entity's +might choose to provide a visual indication of the entity's presence and retrieve it for display only on demand. </p> - </div3> - <div3 id="forbidden"> - <head>Forbidden</head> - <p>The following are forbidden, and constitute +</div3> +<div3 id="forbidden"> +<head>Forbidden</head> +<p>The following are forbidden, and constitute <termref def="dt-fatal">fatal</termref> errors: <ulist><item><p>the appearance of a reference to an <termref def="dt-unparsed">unparsed entity</termref>. @@ -2493,10 +2488,10 @@ presence and retrieve it for display only on demand. DTD except within an <nt def="NT-EntityValue">EntityValue</nt> or <nt def="NT-AttValue">AttValue</nt>.</p></item><item><p>a reference to an external entity in an attribute value.</p></item></ulist> </p> - </div3> - <div3 id="inliteral"> - <head>Included in Literal</head> - <p>When an <termref def="dt-entref">entity reference</termref> appears in an +</div3> +<div3 id="inliteral"> +<head>Included in Literal</head> +<p>When an <termref def="dt-entref">entity reference</termref> appears in an attribute value, or a parameter entity reference appears in a literal entity value, its <termref def="dt-repltext">replacement text</termref> is processed in place of the reference itself as though it @@ -2508,13 +2503,13 @@ For example, this is well-formed: <eg><![CDATA[<!ENTITY % YN '"Yes"' > <!ENTITY WhatHeSaid "He said &YN;" >]]></eg> while this is not: -<eg><!ENTITY EndAttr "27'" > -<element attribute='a-&EndAttr;></eg> +<eg><!ENTITY EndAttr "27'" > +<element attribute='a-&EndAttr;></eg> </p> - </div3> - <div3 id="notify"> - <head>Notify</head> - <p>When the name of an <termref def="dt-unparsed">unparsed +</div3> +<div3 id="notify"> +<head>Notify</head> +<p>When the name of an <termref def="dt-unparsed">unparsed entity</termref> appears as a token in the value of an attribute of declared type <kw>ENTITY</kw> or <kw>ENTITIES</kw>, a validating processor must inform the @@ -2522,16 +2517,16 @@ application of the <termref def="dt-sysid">system</termref> and <termref def="dt-pubid">public</termref> (if any) identifiers for both the entity and its associated <termref def="dt-notation">notation</termref>.</p> - </div3> - <div3 id="bypass"> - <head>Bypassed</head> - <p>When a general entity reference appears in the +</div3> +<div3 id="bypass"> +<head>Bypassed</head> +<p>When a general entity reference appears in the <nt def="NT-EntityValue">EntityValue</nt> in an entity declaration, it is bypassed and left as is.</p> - </div3> - <div3 id="as-PE"> - <head>Included as PE</head> - <p>Just as with external parsed entities, parameter entities +</div3> +<div3 id="as-PE"> +<head>Included as PE</head> +<p>Just as with external parsed entities, parameter entities need only be <titleref href="include-if-valid">included if validating</titleref>. When a parameter-entity reference is recognized in the DTD @@ -2542,13 +2537,13 @@ space (#x20) character; the intent is to constrain the replacement text of parameter entities to contain an integral number of grammatical tokens in the DTD. </p> - </div3> - </div2> - <div2 id="intern-replacement"> - <head>Construction of Internal Entity Replacement Text</head> - <p>In discussing the treatment +</div3> +</div2> +<div2 id="intern-replacement"> +<head>Construction of Internal Entity Replacement Text</head> +<p>In discussing the treatment of internal entities, it is -useful to distinguish two forms of the entity's value. +useful to distinguish two forms of the entity's value. <termdef id="dt-litentval" term="Literal Entity Value">The <term>literal entity value</term> is the quoted string actually present in the entity declaration, corresponding to the @@ -2558,7 +2553,7 @@ text</term> is the content of the entity, after replacement of character references and parameter-entity references. </termdef></p> - <p>The literal entity value +<p>The literal entity value as given in an internal entity declaration (<nt def="NT-EntityValue">EntityValue</nt>) may contain character, parameter-entity, and general-entity references. @@ -2579,19 +2574,19 @@ For example, given the following declarations: © 1947 %pub;. &rights;" >]]></eg> then the replacement text for the entity "<code>book</code>" is: <eg>La Peste: Albert Camus, -© 1947 Éditions Gallimard. &rights;</eg> +© 1947 Éditions Gallimard. &rights;</eg> The general-entity reference "<code>&rights;</code>" would be expanded -should the reference "<code>&book;</code>" appear in the document's +should the reference "<code>&book;</code>" appear in the document's content or an attribute value.</p> - <p>These simple rules may have complex interactions; for a detailed +<p>These simple rules may have complex interactions; for a detailed discussion of a difficult example, see <specref ref="sec-entexpand"/>. </p> - </div2> - <div2 id="sec-predefined-ent"> - <head>Predefined Entities</head> - <p> - <termdef id="dt-escape" term="escape">Entity and character +</div2> +<div2 id="sec-predefined-ent"> +<head>Predefined Entities</head> +<p> +<termdef id="dt-escape" term="escape">Entity and character references can both be used to <term>escape</term> the left angle bracket, ampersand, and other delimiters. A set of general entities (&magicents;) is specified for this purpose. @@ -2601,8 +2596,8 @@ character data, so the numeric character references "<code>&#60;</code>" and "<code>&#38;</code>" may be used to escape <code><</code> and <code>&</code> when they occur in character data.</termdef> - </p> - <p>All XML processors must recognize these entities whether they +</p> +<p>All XML processors must recognize these entities whether they are declared or not. <termref def="dt-interop">For interoperability</termref>, valid XML documents should declare these @@ -2622,36 +2617,36 @@ in the declarations of "<code>lt</code>" and "<code>amp</code>&qu are doubly escaped to meet the requirement that entity replacement be well-formed. </p> - </div2> - <div2 id="Notations"> - <head>Notation Declarations</head> - <p> - <termdef id="dt-notation" term="Notation"><term>Notations</term> identify by +</div2> +<div2 id="Notations"> +<head>Notation Declarations</head> +<p> +<termdef id="dt-notation" term="Notation"><term>Notations</term> identify by name the format of <termref def="dt-extent">unparsed entities</termref>, the format of elements which bear a notation attribute, or the application to which a <termref def="dt-pi">processing instruction</termref> is addressed.</termdef> - </p> - <p> - <termdef id="dt-notdecl" term="Notation Declaration"> +</p> +<p> +<termdef id="dt-notdecl" term="Notation Declaration"> <term>Notation declarations</term> provide a name for the notation, for use in entity and attribute-list declarations and in attribute specifications, and an external identifier for the notation which may allow an XML processor or its client application to locate a helper application capable of processing data in the given notation. -<scrap lang="ebnf"><head>Notation Declarations</head><prod id="NT-NotationDecl"><lhs>NotationDecl</lhs><rhs>'<!NOTATION' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> +<scrap lang="ebnf"><head>Notation Declarations</head><prod id="NT-NotationDecl"><lhs>NotationDecl</lhs><rhs>'<!NOTATION' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt> <nt def="NT-S">S</nt> (<nt def="NT-ExternalID">ExternalID</nt> | <nt def="NT-PublicID">PublicID</nt>) -<nt def="NT-S">S</nt>? '>'</rhs></prod><prod id="NT-PublicID"><lhs>PublicID</lhs><rhs>'PUBLIC' <nt def="NT-S">S</nt> +<nt def="NT-S">S</nt>? '>'</rhs></prod><prod id="NT-PublicID"><lhs>PublicID</lhs><rhs>'PUBLIC' <nt def="NT-S">S</nt> <nt def="NT-PubidLiteral">PubidLiteral</nt> </rhs></prod></scrap> </termdef> - </p> - <p>XML processors must provide applications with the name and external +</p> +<p>XML processors must provide applications with the name and external identifier(s) of any notation declared and referred to in an attribute value, attribute definition, or entity declaration. They may additionally resolve the external identifier into the @@ -2661,10 +2656,10 @@ application to call a processor for data in the notation described. (It is not an error, however, for XML documents to declare and refer to notations for which notation-specific applications are not available on the system where the XML processor or application is running.)</p> - </div2> - <div2 id="sec-doc-entity"> - <head>Document Entity</head> - <p><termdef id="dt-docent" term="Document Entity">The <term>document +</div2> +<div2 id="sec-doc-entity"> +<head>Document Entity</head> +<p><termdef id="dt-docent" term="Document Entity">The <term>document entity</term> serves as the root of the entity tree and a starting-point for an <termref def="dt-xml-proc">XML processor</termref>.</termdef> @@ -2673,22 +2668,22 @@ not specify how the document entity is to be located by an XML processor; unlike other entities, the document entity has no name and might well appear on a processor input stream without any identification at all.</p> - </div2> - </div1> +</div2> +</div1> <!-- &Conformance; --> - <div1 id="sec-conformance"> - <head>Conformance</head> - <div2 id="proc-types"> - <head>Validating and Non-Validating Processors</head> - <p>Conforming <termref def="dt-xml-proc">XML processors</termref> fall into two +<div1 id="sec-conformance"> +<head>Conformance</head> +<div2 id="proc-types"> +<head>Validating and Non-Validating Processors</head> +<p>Conforming <termref def="dt-xml-proc">XML processors</termref> fall into two classes: validating and non-validating.</p> - <p>Validating and non-validating processors alike must report -violations of this specification's well-formedness constraints +<p>Validating and non-validating processors alike must report +violations of this specification's well-formedness constraints in the content of the <termref def="dt-docent">document entity</termref> and any other <termref def="dt-parsedent">parsed entities</termref> that they read.</p> - <p><termdef id="dt-validating" term="Validating Processor"> +<p><termdef id="dt-validating" term="Validating Processor"> <term>Validating processors</term> must report violations of the constraints expressed by the declarations in the <termref def="dt-doctype">DTD</termref>, and @@ -2698,7 +2693,7 @@ in this specification. To accomplish this, validating XML processors must read and process the entire DTD and all external parsed entities referenced in the document. </p> - <p>Non-validating processors are required to check only the +<p>Non-validating processors are required to check only the <termref def="dt-docent">document entity</termref>, including the entire internal DTD subset, for well-formedness. <termdef id="dt-use-mdecl" term="Process Declarations"> @@ -2721,10 +2716,10 @@ They must not <termref def="dt-use-mdecl">process</termref> encountered after a reference to a parameter entity that is not read, since the entity may have contained overriding declarations. </p> - </div2> - <div2 id="safe-behavior"> - <head>Using XML Processors</head> - <p>The behavior of a validating XML processor is highly predictable; it +</div2> +<div2 id="safe-behavior"> +<head>Using XML Processors</head> +<p>The behavior of a validating XML processor is highly predictable; it must read every piece of a document and report all well-formedness and validity violations. Less is required of a non-validating processor; it need not read any @@ -2749,27 +2744,27 @@ internal entities, or supply where doing so depends on having read declarations in external or parameter entities.</p></item></ulist> </p> - <p>For maximum reliability in interoperating between different XML +<p>For maximum reliability in interoperating between different XML processors, applications which use non-validating processors should not rely on any behaviors not required of such processors. Applications which require facilities such as the use of default attributes or internal entities which are declared in external entities should use validating XML processors.</p> - </div2> - </div1> - <div1 id="sec-notation"> - <head>Notation</head> - <p>The formal grammar of XML is given in this specification using a simple +</div2> +</div1> +<div1 id="sec-notation"> +<head>Notation</head> +<p>The formal grammar of XML is given in this specification using a simple Extended Backus-Naur Form (EBNF) notation. Each rule in the grammar defines one symbol, in the form <eg>symbol ::= expression</eg></p> - <p>Symbols are written with an initial capital letter if they are +<p>Symbols are written with an initial capital letter if they are defined by a regular expression, or with an initial lower case letter otherwise. Literal strings are quoted. </p> - <p>Within the expression on the right-hand side of a rule, the following +<p>Within the expression on the right-hand side of a rule, the following expressions are used to match strings of one or more characters: <glist><gitem><label><code>#xN</code></label><def><p>where <code>N</code> is a hexadecimal integer, the expression matches the character in ISO/IEC 10646 whose canonical @@ -2784,7 +2779,7 @@ with a value in the range(s) indicated (inclusive).</p></def></gitem><gitem><lab with a value <emph>outside</emph> the range indicated.</p></def></gitem><gitem><label><code>[^abc]</code>, <code>[^#xN#xN#xN]</code></label><def><p>matches any <termref def="dt-character">character</termref> with a value not among the characters given.</p></def></gitem><gitem><label><code>"string"</code></label><def><p>matches a literal string <termref def="dt-match">matching</termref> -that given inside the double quotes.</p></def></gitem><gitem><label><code>'string'</code></label><def><p>matches a literal string <termref def="dt-match">matching</termref> +that given inside the double quotes.</p></def></gitem><gitem><label><code>'string'</code></label><def><p>matches a literal string <termref def="dt-match">matching</termref> that given inside the single quotes.</p></def></gitem></glist> These symbols may be combined to match more complex patterns as follows, where <code>A</code> and <code>B</code> represent simple expressions: @@ -2800,42 +2795,42 @@ associated with a production.</p></def></gitem><gitem><label><code>[ vc: ... ]</ <termref def="dt-valid">valid</termref> documents associated with a production.</p></def></gitem></glist> </p> - </div1> - </body> - <back> +</div1> +</body> +<back> <!-- &SGML; --> <!-- &Biblio; --> - <div1 id="sec-bibliography"> - <head>References</head> - <div2 id="sec-existing-stds"> - <head>Normative References</head> - <blist> - <bibl id="IANA" key="IANA"> +<div1 id="sec-bibliography"> +<head>References</head> +<div2 id="sec-existing-stds"> +<head>Normative References</head> +<blist> +<bibl id="IANA" key="IANA"> (Internet Assigned Numbers Authority) <emph>Official Names for Character Sets</emph>, ed. Keld Simonsen et al. See <loc href="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</loc>. </bibl> - <bibl id="RFC1766" key="IETF RFC 1766"> +<bibl id="RFC1766" key="IETF RFC 1766"> IETF (Internet Engineering Task Force). <emph>RFC 1766: Tags for the Identification of Languages</emph>, ed. H. Alvestrand. 1995. </bibl> - <bibl id="ISO639" key="ISO 639"> +<bibl id="ISO639" key="ISO 639"> (International Organization for Standardization). <emph>ISO 639:1988 (E). Code for the representation of names of languages.</emph> [Geneva]: International Organization for Standardization, 1988.</bibl> - <bibl id="ISO3166" key="ISO 3166"> +<bibl id="ISO3166" key="ISO 3166"> (International Organization for Standardization). <emph>ISO 3166-1:1997 (E). Codes for the representation of names of countries and their subdivisions — Part 1: Country codes</emph> [Geneva]: International Organization for Standardization, 1997.</bibl> - <bibl id="ISO10646" key="ISO/IEC 10646">ISO +<bibl id="ISO10646" key="ISO/IEC 10646">ISO (International Organization for Standardization). <emph>ISO/IEC 10646-1993 (E). Information technology — Universal Multiple-Octet Coded Character Set (UCS) — Part 1: @@ -2843,67 +2838,67 @@ Architecture and Basic Multilingual Plane.</emph> [Geneva]: International Organization for Standardization, 1993 (plus amendments AM 1 through AM 7). </bibl> - <bibl id="Unicode" key="Unicode">The Unicode Consortium. +<bibl id="Unicode" key="Unicode">The Unicode Consortium. <emph>The Unicode Standard, Version 2.0.</emph> Reading, Mass.: Addison-Wesley Developers Press, 1996.</bibl> - </blist> - </div2> - <div2> - <head>Other References</head> - <blist> - <bibl id="Aho" key="Aho/Ullman">Aho, Alfred V., +</blist> +</div2> +<div2> +<head>Other References</head> +<blist> +<bibl id="Aho" key="Aho/Ullman">Aho, Alfred V., Ravi Sethi, and Jeffrey D. Ullman. <emph>Compilers: Principles, Techniques, and Tools</emph>. Reading: Addison-Wesley, 1986, rpt. corr. 1988.</bibl> - <bibl xml-link="simple" id="Berners-Lee" key="Berners-Lee et al."> +<bibl xml-link="simple" id="Berners-Lee" key="Berners-Lee et al."> Berners-Lee, T., R. Fielding, and L. Masinter. <emph>Uniform Resource Identifiers (URI): Generic Syntax and Semantics</emph>. 1997. (Work in progress; see updates to RFC1738.)</bibl> - <bibl id="ABK" key="Brüggemann-Klein">Brüggemann-Klein, Anne. +<bibl id="ABK" key="Brüggemann-Klein">Brüggemann-Klein, Anne. <emph>Regular Expressions into Finite Automata</emph>. Extended abstract in I. Simon, Hrsg., LATIN 1992, S. 97-98. Springer-Verlag, Berlin 1992. Full Version in Theoretical Computer Science 120: 197-213, 1993. </bibl> - <bibl id="ABKDW" key="Brüggemann-Klein and Wood">Brüggemann-Klein, Anne, +<bibl id="ABKDW" key="Brüggemann-Klein and Wood">Brüggemann-Klein, Anne, and Derick Wood. <emph>Deterministic Regular Languages</emph>. -Universität Freiburg, Institut für Informatik, +Universität Freiburg, Institut für Informatik, Bericht 38, Oktober 1991. </bibl> - <bibl id="Clark" key="Clark">James Clark. +<bibl id="Clark" key="Clark">James Clark. Comparison of SGML and XML. See <loc href="http://www.w3.org/TR/NOTE-sgml-xml-971215">http://www.w3.org/TR/NOTE-sgml-xml-971215</loc>. </bibl> - <bibl xml-link="simple" id="RFC1738" key="IETF RFC1738"> +<bibl xml-link="simple" id="RFC1738" key="IETF RFC1738"> IETF (Internet Engineering Task Force). <emph>RFC 1738: Uniform Resource Locators (URL)</emph>, ed. T. Berners-Lee, L. Masinter, M. McCahill. 1994. </bibl> - <bibl xml-link="simple" id="RFC1808" key="IETF RFC1808"> +<bibl xml-link="simple" id="RFC1808" key="IETF RFC1808"> IETF (Internet Engineering Task Force). <emph>RFC 1808: Relative Uniform Resource Locators</emph>, ed. R. Fielding. 1995. </bibl> - <bibl xml-link="simple" id="RFC2141" key="IETF RFC2141"> +<bibl xml-link="simple" id="RFC2141" key="IETF RFC2141"> IETF (Internet Engineering Task Force). <emph>RFC 2141: URN Syntax</emph>, ed. R. Moats. 1997. </bibl> - <bibl id="ISO8879" key="ISO 8879">ISO +<bibl id="ISO8879" key="ISO 8879">ISO (International Organization for Standardization). <emph>ISO 8879:1986(E). Information processing — Text and Office Systems — Standard Generalized Markup Language (SGML).</emph> First edition — 1986-10-15. [Geneva]: International Organization for Standardization, 1986. </bibl> - <bibl id="ISO10744" key="ISO/IEC 10744">ISO +<bibl id="ISO10744" key="ISO/IEC 10744">ISO (International Organization for Standardization). <emph>ISO/IEC 10744-1992 (E). Information technology — Hypermedia/Time-based Structuring Language (HyTime). @@ -2914,12 +2909,12 @@ Standardization, 1992. [Geneva]: International Organization for Standardization, 1996. </bibl> - </blist> - </div2> - </div1> - <div1 id="CharClasses"> - <head>Character Classes</head> - <p>Following the characteristics defined in the Unicode standard, +</blist> +</div2> +</div1> +<div1 id="CharClasses"> +<head>Character Classes</head> +<p>Following the characteristics defined in the Unicode standard, characters are classed as base characters (among others, these contain the alphabetic characters of the Latin alphabet, without diacritics), ideographic characters, and combining characters (among @@ -3255,7 +3250,7 @@ also distinguished. | [#x30FC-#x30FE] </rhs></prod></prodgroup></scrap> </p> - <p>The character classes defined here can be derived from the +<p>The character classes defined here can be derived from the Unicode character database as follows: <ulist><item><p>Name start characters must have one of the categories Ll, Lu, Lo, Lt, Nl.</p></item><item><p>Name characters other than Name-start characters @@ -3268,24 +3263,24 @@ rather than name characters, because the property file classifies them as Alphabetic: [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.</p></item><item><p>Characters #x20DD-#x20E0 are excluded (in accordance with Unicode, section 5.14).</p></item><item><p>Character #x00B7 is classified as an extender, because the property list so identifies it.</p></item><item><p>Character #x0387 is added as a name character, because #x00B7 -is its canonical equivalent.</p></item><item><p>Characters ':' and '_' are allowed as name-start characters.</p></item><item><p>Characters '-' and '.' are allowed as name characters.</p></item></ulist> +is its canonical equivalent.</p></item><item><p>Characters ':' and '_' are allowed as name-start characters.</p></item><item><p>Characters '-' and '.' are allowed as name characters.</p></item></ulist> </p> - </div1> - <inform-div1 id="sec-xml-and-sgml"> - <head>XML and SGML</head> - <p>XML is designed to be a subset of SGML, in that every +</div1> +<inform-div1 id="sec-xml-and-sgml"> +<head>XML and SGML</head> +<p>XML is designed to be a subset of SGML, in that every <termref def="dt-valid">valid</termref> XML document should also be a conformant SGML document. For a detailed comparison of the additional restrictions that XML places on documents beyond those of SGML, see <bibref ref="Clark"/>. </p> - </inform-div1> - <inform-div1 id="sec-entexpand"> - <head>Expansion of Entity and Character References</head> - <p>This appendix contains some examples illustrating the +</inform-div1> +<inform-div1 id="sec-entexpand"> +<head>Expansion of Entity and Character References</head> +<p>This appendix contains some examples illustrating the sequence of entity- and character-reference recognition and expansion, as specified in <specref ref="entproc"/>.</p> - <p> +<p> If the DTD contains the declaration <eg><![CDATA[<!ENTITY example "<p>An ampersand (&#38;) may be escaped numerically (&#38;#38;) or with a general entity @@ -3310,7 +3305,7 @@ numerically (&) or with a general entity (&). ]]></eg> </p> - <p>A more complex example will illustrate the rules and their +<p>A more complex example will illustrate the rules and their effects fully. In the following example, the line numbers are solely for reference. <eg><![CDATA[1 <?xml version='1.0'?> @@ -3345,19 +3340,19 @@ recognized, and it is expanded, so the full content of the <emph>This sample shows a error-prone method.</emph> </p></item></ulist> </p> - </inform-div1> - <inform-div1 id="determinism"> - <head>Deterministic Content Models</head> - <p><termref def="dt-compat">For compatibility</termref>, it is +</inform-div1> +<inform-div1 id="determinism"> +<head>Deterministic Content Models</head> +<p><termref def="dt-compat">For compatibility</termref>, it is required that content models in element type declarations be deterministic. </p> <!-- FINAL EDIT: WebSGML allows ambiguity? --> - <p>SGML +<p>SGML requires deterministic content models (it calls them "unambiguous"); XML processors built using SGML systems may flag non-deterministic content models as errors.</p> - <p>For example, the content model <code>((b, c) | (b, d))</code> is +<p>For example, the content model <code>((b, c) | (b, d))</code> is non-deterministic, because given an initial <code>b</code> the parser cannot know which <code>b</code> in the model is being matched without looking ahead to see which element follows the <code>b</code>. @@ -3365,10 +3360,10 @@ In this case, the two references to <code>b</code> can be collapsed into a single reference, making the model read <code>(b, (c | d))</code>. An initial <code>b</code> now clearly -matches only a single name in the content model. The parser doesn't +matches only a single name in the content model. The parser doesn't need to look ahead to see what follows; either <code>c</code> or <code>d</code> would be accepted.</p> - <p>More formally: a finite state automaton may be constructed from the +<p>More formally: a finite state automaton may be constructed from the content model using the standard algorithms, e.g. algorithm 3.5 in section 3.9 of Aho, Sethi, and Ullman <bibref ref="Aho"/>. @@ -3382,13 +3377,13 @@ labeled with the same element type name, then the content model is in error and may be reported as an error. </p> - <p>Algorithms exist which allow many but not all non-deterministic +<p>Algorithms exist which allow many but not all non-deterministic content models to be reduced automatically to equivalent deterministic -models; see Brüggemann-Klein 1991 <bibref ref="ABK"/>.</p> - </inform-div1> - <inform-div1 id="sec-guessing"> - <head>Autodetection of Character Encodings</head> - <p>The XML encoding declaration functions as an internal label on each +models; see Brüggemann-Klein 1991 <bibref ref="ABK"/>.</p> +</inform-div1> +<inform-div1 id="sec-guessing"> +<head>Autodetection of Character Encodings</head> +<p>The XML encoding declaration functions as an internal label on each entity, indicating which character encoding is in use. Before an XML processor can read the internal label, however, it apparently has to know what character encoding is in use—which is what the internal label @@ -3405,15 +3400,15 @@ depending on whether the XML entity is presented to the processor without, or with, any accompanying (external) information. We consider the first case first. </p> - <p> +<p> Because each XML entity not in UTF-8 or UTF-16 format <emph>must</emph> begin with an XML encoding declaration, in which the first characters -must be '<code><?xml</code>', any conforming processor can detect, +must be '<code><?xml</code>', any conforming processor can detect, after two to four octets of input, which of the following cases apply. -In reading this list, it may help to know that in UCS-4, '<' is -"<code>#x0000003C</code>" and '?' is "<code>#x0000003F</code>", and the Byte +In reading this list, it may help to know that in UCS-4, '<' is +"<code>#x0000003C</code>" and '?' is "<code>#x0000003F</code>", and the Byte Order Mark required of UTF-16 data streams is "<code>#xFEFF</code>".</p> - <p> +<p> <ulist><item><p><code>00 00 00 3C</code>: UCS-4, big-endian machine (1234 order)</p></item><item><p><code>3C 00 00 00</code>: UCS-4, little-endian machine (4321 order)</p></item><item><p><code>00 00 3C 00</code>: UCS-4, unusual octet order (2143)</p></item><item><p><code>00 3C 00 00</code>: UCS-4, unusual octet order (3412)</p></item><item><p><code>FE FF</code>: UTF-16, big-endian</p></item><item><p><code>FF FE</code>: UTF-16, little-endian</p></item><item><p><code>00 3C 00 3F</code>: UTF-16, big-endian, no Byte Order Mark (and thus, strictly speaking, in error)</p></item><item><p><code>3C 00 3F 00</code>: UTF-16, little-endian, no Byte Order Mark (and thus, strictly speaking, in error)</p></item><item><p><code>3C 3F 78 6D</code>: UTF-8, ISO 646, ASCII, some part of ISO 8859, @@ -3430,7 +3425,7 @@ use)</p></item><item><p>other: UTF-8 without an encoding declaration, or else the data stream is corrupt, fragmentary, or enclosed in a wrapper of some kind</p></item></ulist> </p> - <p> +<p> This level of autodetection is enough to read the XML encoding declaration and parse the character-encoding identifier, which is still necessary to distinguish the individual members of each family @@ -3438,7 +3433,7 @@ of encodings (e.g. to tell UTF-8 from 8859, and the parts of 8859 from each other, or to distinguish the specific EBCDIC code page in use, and so on). </p> - <p> +<p> Because the contents of the encoding declaration are restricted to ASCII characters, a processor can reliably read the entire encoding declaration as soon as it has detected which family of encodings is in @@ -3448,20 +3443,20 @@ reasonably reliable in-band labeling of character encodings, even when external sources of information at the operating-system or transport-protocol level are unreliable. </p> - <p> +<p> Once the processor has detected the character encoding in use, it can act appropriately, whether by invoking a separate input routine for each case, or by calling the proper conversion function on each character of input. </p> - <p> +<p> Like any self-labeling system, the XML encoding declaration will not -work if any software changes the entity's character set or encoding +work if any software changes the entity's character set or encoding without updating the encoding declaration. Implementors of character-encoding routines should be careful to ensure the accuracy of the internal and external information used to label the entity. </p> - <p>The second possible case occurs when the XML entity is accompanied +<p>The second possible case occurs when the XML entity is accompanied by encoding information, as in some file systems and some network protocols. When multiple sources of information are available, @@ -3495,78 +3490,78 @@ in particular, when the MIME types text/xml and application/xml are defined, the recommendations of the relevant RFC will supersede these rules. </p> - </inform-div1> - <inform-div1 id="sec-xml-wg"> - <head>W3C XML Working Group</head> - <p>This specification was prepared and approved for publication by the +</inform-div1> +<inform-div1 id="sec-xml-wg"> +<head>W3C XML Working Group</head> +<p>This specification was prepared and approved for publication by the W3C XML Working Group (WG). WG approval of this specification does not necessarily imply that all WG members voted for its approval. The current and former members of the XML WG are:</p> - <orglist> - <member> - <name>Jon Bosak, Sun</name> - <role>Chair</role> - </member> - <member> - <name>James Clark</name> - <role>Technical Lead</role> - </member> - <member> - <name>Tim Bray, Textuality and Netscape</name> - <role>XML Co-editor</role> - </member> - <member> - <name>Jean Paoli, Microsoft</name> - <role>XML Co-editor</role> - </member> - <member> - <name>C. M. Sperberg-McQueen, U. of Ill.</name> - <role>XML +<orglist> +<member> +<name>Jon Bosak, Sun</name> +<role>Chair</role> +</member> +<member> +<name>James Clark</name> +<role>Technical Lead</role> +</member> +<member> +<name>Tim Bray, Textuality and Netscape</name> +<role>XML Co-editor</role> +</member> +<member> +<name>Jean Paoli, Microsoft</name> +<role>XML Co-editor</role> +</member> +<member> +<name>C. M. Sperberg-McQueen, U. of Ill.</name> +<role>XML Co-editor</role> - </member> - <member> - <name>Dan Connolly, W3C</name> - <role>W3C Liaison</role> - </member> - <member> - <name>Paula Angerstein, Texcel</name> - </member> - <member> - <name>Steve DeRose, INSO</name> - </member> - <member> - <name>Dave Hollander, HP</name> - </member> - <member> - <name>Eliot Kimber, ISOGEN</name> - </member> - <member> - <name>Eve Maler, ArborText</name> - </member> - <member> - <name>Tom Magliery, NCSA</name> - </member> - <member> - <name>Murray Maloney, Muzmo and Grif</name> - </member> - <member> - <name>Makoto Murata, Fuji Xerox Information Systems</name> - </member> - <member> - <name>Joel Nava, Adobe</name> - </member> - <member> - <name>Conleth O'Connell, Vignette</name> - </member> - <member> - <name>Peter Sharpe, SoftQuad</name> - </member> - <member> - <name>John Tigue, DataChannel</name> - </member> - </orglist> - </inform-div1> - </back> +</member> +<member> +<name>Dan Connolly, W3C</name> +<role>W3C Liaison</role> +</member> +<member> +<name>Paula Angerstein, Texcel</name> +</member> +<member> +<name>Steve DeRose, INSO</name> +</member> +<member> +<name>Dave Hollander, HP</name> +</member> +<member> +<name>Eliot Kimber, ISOGEN</name> +</member> +<member> +<name>Eve Maler, ArborText</name> +</member> +<member> +<name>Tom Magliery, NCSA</name> +</member> +<member> +<name>Murray Maloney, Muzmo and Grif</name> +</member> +<member> +<name>Makoto Murata, Fuji Xerox Information Systems</name> +</member> +<member> +<name>Joel Nava, Adobe</name> +</member> +<member> +<name>Conleth O'Connell, Vignette</name> +</member> +<member> +<name>Peter Sharpe, SoftQuad</name> +</member> +<member> +<name>John Tigue, DataChannel</name> +</member> +</orglist> +</inform-div1> +</back> </spec> <!-- Keep this comment at the end of the file Local variables: diff --git a/result/valid/dia.xml b/result/valid/dia.xml index 4ffced97..c1959845 100644 --- a/result/valid/dia.xml +++ b/result/valid/dia.xml @@ -3,136 +3,136 @@ <!ELEMENT diagram (diagramdata , layer*)> <!ELEMENT diagramdata (attribute)*> <!ELEMENT layer (object | group)*> -<!ELEMENT object (attribute* , connections?)> -<!ELEMENT connections (connection)*> -<!ELEMENT connection EMPTY> -<!ELEMENT group (object | group)*> -<!ELEMENT attribute (composite | int | enum | real | boolean | color | point | rectangle | string | font)*> -<!ELEMENT composite (attribute)*> -<!ELEMENT int EMPTY> -<!ELEMENT enum EMPTY> -<!ELEMENT real EMPTY> -<!ELEMENT boolean EMPTY> -<!ELEMENT color EMPTY> -<!ELEMENT point EMPTY> -<!ELEMENT rectangle EMPTY> -<!ELEMENT string EMPTY> -<!ELEMENT font EMPTY> <!ATTLIST layer name CDATA #REQUIRED> <!ATTLIST layer visible (true | false) #REQUIRED> +<!ELEMENT object (attribute* , connections?)> <!ATTLIST object type CDATA #REQUIRED> <!ATTLIST object version NMTOKEN #REQUIRED> <!ATTLIST object id ID #REQUIRED> +<!ELEMENT connections (connection)*> +<!ELEMENT connection EMPTY> <!ATTLIST connection handle NMTOKEN #REQUIRED> <!ATTLIST connection to IDREF #REQUIRED> <!ATTLIST connection connection NMTOKEN #REQUIRED> +<!ELEMENT group (object | group)*> +<!ELEMENT attribute (composite | int | enum | real | boolean | color | point | rectangle | string | font)*> <!ATTLIST attribute name CDATA #REQUIRED> +<!ELEMENT composite (attribute)*> <!ATTLIST composite type CDATA #IMPLIED> +<!ELEMENT int EMPTY> <!ATTLIST int val NMTOKEN #REQUIRED> +<!ELEMENT enum EMPTY> <!ATTLIST enum val NMTOKEN #REQUIRED> +<!ELEMENT real EMPTY> <!ATTLIST real val CDATA #REQUIRED> +<!ELEMENT boolean EMPTY> <!ATTLIST boolean val (true | false) #REQUIRED> +<!ELEMENT color EMPTY> <!ATTLIST color val CDATA #REQUIRED> +<!ELEMENT point EMPTY> <!ATTLIST point val CDATA #REQUIRED> +<!ELEMENT rectangle EMPTY> <!ATTLIST rectangle val CDATA #REQUIRED> +<!ELEMENT string EMPTY> <!ATTLIST string val CDATA #IMPLIED> +<!ELEMENT font EMPTY> <!ATTLIST font name CDATA #REQUIRED> ]> <dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"> - <dia:diagramdata> - <dia:attribute name="background"> - <dia:color val="#ffffff"/> - </dia:attribute> - </dia:diagramdata> - <dia:layer name="Background" visible="true"> - <dia:object type="Standard - Line" version="0" id="O0"> - <dia:attribute name="obj_pos"> - <dia:point val="1.95,6.85"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="1.9,6.8;11,8.55"/> - </dia:attribute> - <dia:attribute name="conn_endpoints"> - <dia:point val="1.95,6.85"/> - <dia:point val="10.95,8.5"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.1"/> - </dia:attribute> - <dia:attribute name="line_style"> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="start_arrow"> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="end_arrow"> - <dia:enum val="0"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="1" to="O2" connection="3"/> - </dia:connections> - </dia:object> - <dia:object type="Standard - Text" version="0" id="O1"> - <dia:attribute name="obj_pos"> - <dia:point val="4.8,4.75"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="2.579,3.96359;7.021,4.96359"/> - </dia:attribute> - <dia:attribute name="text"> - <dia:composite type="text"> - <dia:attribute name="string"> - <dia:string val="sdfsdfg"/> - </dia:attribute> - <dia:attribute name="font"> - <dia:font name="Courier"/> - </dia:attribute> - <dia:attribute name="height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="pos"> - <dia:point val="4.8,4.75"/> - </dia:attribute> - <dia:attribute name="color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="alignment"> - <dia:enum val="1"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - </dia:object> - <dia:object type="Standard - Box" version="0" id="O2"> - <dia:attribute name="obj_pos"> - <dia:point val="10.95,7.5"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="10.9,7.45;13.05,9.55"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="10.95,7.5"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="2.05"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="2"/> - </dia:attribute> - <dia:attribute name="border_width"> - <dia:real val="0.1"/> - </dia:attribute> - <dia:attribute name="border_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="inner_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="line_style"> - <dia:enum val="0"/> - </dia:attribute> - </dia:object> - </dia:layer> +<dia:diagramdata> +<dia:attribute name="background"> +<dia:color val="#ffffff"/> +</dia:attribute> +</dia:diagramdata> +<dia:layer name="Background" visible="true"> +<dia:object type="Standard - Line" version="0" id="O0"> +<dia:attribute name="obj_pos"> +<dia:point val="1.95,6.85"/> +</dia:attribute> +<dia:attribute name="obj_bb"> +<dia:rectangle val="1.9,6.8;11,8.55"/> +</dia:attribute> +<dia:attribute name="conn_endpoints"> +<dia:point val="1.95,6.85"/> +<dia:point val="10.95,8.5"/> +</dia:attribute> +<dia:attribute name="line_color"> +<dia:color val="#000000"/> +</dia:attribute> +<dia:attribute name="line_width"> +<dia:real val="0.1"/> +</dia:attribute> +<dia:attribute name="line_style"> +<dia:enum val="0"/> +</dia:attribute> +<dia:attribute name="start_arrow"> +<dia:enum val="0"/> +</dia:attribute> +<dia:attribute name="end_arrow"> +<dia:enum val="0"/> +</dia:attribute> +<dia:connections> +<dia:connection handle="1" to="O2" connection="3"/> +</dia:connections> +</dia:object> +<dia:object type="Standard - Text" version="0" id="O1"> +<dia:attribute name="obj_pos"> +<dia:point val="4.8,4.75"/> +</dia:attribute> +<dia:attribute name="obj_bb"> +<dia:rectangle val="2.579,3.96359;7.021,4.96359"/> +</dia:attribute> +<dia:attribute name="text"> +<dia:composite type="text"> +<dia:attribute name="string"> +<dia:string val="sdfsdfg"/> +</dia:attribute> +<dia:attribute name="font"> +<dia:font name="Courier"/> +</dia:attribute> +<dia:attribute name="height"> +<dia:real val="1"/> +</dia:attribute> +<dia:attribute name="pos"> +<dia:point val="4.8,4.75"/> +</dia:attribute> +<dia:attribute name="color"> +<dia:color val="#000000"/> +</dia:attribute> +<dia:attribute name="alignment"> +<dia:enum val="1"/> +</dia:attribute> +</dia:composite> +</dia:attribute> +</dia:object> +<dia:object type="Standard - Box" version="0" id="O2"> +<dia:attribute name="obj_pos"> +<dia:point val="10.95,7.5"/> +</dia:attribute> +<dia:attribute name="obj_bb"> +<dia:rectangle val="10.9,7.45;13.05,9.55"/> +</dia:attribute> +<dia:attribute name="elem_corner"> +<dia:point val="10.95,7.5"/> +</dia:attribute> +<dia:attribute name="elem_width"> +<dia:real val="2.05"/> +</dia:attribute> +<dia:attribute name="elem_height"> +<dia:real val="2"/> +</dia:attribute> +<dia:attribute name="border_width"> +<dia:real val="0.1"/> +</dia:attribute> +<dia:attribute name="border_color"> +<dia:color val="#000000"/> +</dia:attribute> +<dia:attribute name="inner_color"> +<dia:color val="#ffffff"/> +</dia:attribute> +<dia:attribute name="line_style"> +<dia:enum val="0"/> +</dia:attribute> +</dia:object> +</dia:layer> </dia:diagram> diff --git a/result/valid/xlink.xml b/result/valid/xlink.xml index 79197898..baab1537 100644 --- a/result/valid/xlink.xml +++ b/result/valid/xlink.xml @@ -10,156 +10,156 @@ type="text/css"?> <spec> <!-- Last edited: 27 May 1999 by bent --> - <header> +<header> <?Pub Dtl?> - <title>XML Linking Language (XLink)</title> - <version>Version 1.0</version> - <w3c-designation><!-- &doc-type;-&iso6.doc.date; --> WD-xlink-19990527</w3c-designation> - <w3c-doctype>World Wide Web Consortium Working Draft</w3c-doctype> - <pubdate> - <day>29</day> - <month>May</month> - <year>1999</year> - </pubdate> - <notice> - <p>This draft is for public discussion.</p> - </notice> - <publoc> - <loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-current">http://www.w3.org/XML/Group/1999/05/WD-xlink-current</loc> - </publoc> - <prevlocs> +<title>XML Linking Language (XLink)</title> +<version>Version 1.0</version> +<w3c-designation><!-- &doc-type;-&iso6.doc.date; --> WD-xlink-19990527</w3c-designation> +<w3c-doctype>World Wide Web Consortium Working Draft</w3c-doctype> +<pubdate> +<day>29</day> +<month>May</month> +<year>1999</year> +</pubdate> +<notice> +<p>This draft is for public discussion.</p> +</notice> +<publoc> +<loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-current">http://www.w3.org/XML/Group/1999/05/WD-xlink-current</loc> +</publoc> +<prevlocs> <!--Check: was it actually August?--> - <loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-19990527">http://www.w3.org/XML/Group/1999/05/WD-xlink-19990527</loc> - <loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-19990505">http://www.w3.org/XML/Group/1999/05/WD-xlink-19990505</loc> - <loc href="http://www.w3.org/TR/1998/WD-xlink-19980303">http://www.w3.org/TR/1998/WD-xlink-19980303</loc> - <loc href="http://www.w3.org/TR/WD-xml-link-970630">http://www.w3.org/TR/WD-xml-link-970630</loc> - </prevlocs> - <authlist> +<loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-19990527">http://www.w3.org/XML/Group/1999/05/WD-xlink-19990527</loc> +<loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-19990505">http://www.w3.org/XML/Group/1999/05/WD-xlink-19990505</loc> +<loc href="http://www.w3.org/TR/1998/WD-xlink-19980303">http://www.w3.org/TR/1998/WD-xlink-19980303</loc> +<loc href="http://www.w3.org/TR/WD-xml-link-970630">http://www.w3.org/TR/WD-xml-link-970630</loc> +</prevlocs> +<authlist> <!--Updated author hrefs dorchard--> <!-- Update Steve's email - bent --> - <author> - <name>Steve DeRose</name> - <affiliation>Inso Corp. and Brown University</affiliation> - <email href="mailto:Steven_DeRose@Brown.edu">Steven_DeRose@Brown.edu</email> - </author> - <author> - <name>David Orchard</name> - <affiliation>IBM Corp.</affiliation> - <email href="mailto:dorchard@ca.ibm.com">dorchard@ca.ibm.com</email> - </author> - <author> - <name>Ben Trafford</name> - <affiliation>Invited Expert</affiliation> - <email href="mailto:bent@exemplary.net">bent@exemplary.net</email> - </author> +<author> +<name>Steve DeRose</name> +<affiliation>Inso Corp. and Brown University</affiliation> +<email href="mailto:Steven_DeRose@Brown.edu">Steven_DeRose@Brown.edu</email> +</author> +<author> +<name>David Orchard</name> +<affiliation>IBM Corp.</affiliation> +<email href="mailto:dorchard@ca.ibm.com">dorchard@ca.ibm.com</email> +</author> +<author> +<name>Ben Trafford</name> +<affiliation>Invited Expert</affiliation> +<email href="mailto:bent@exemplary.net">bent@exemplary.net</email> +</author> <!-- I suggest we move Eve and Tim down to the Acknowledgements section. We also ought to add Gabe Beged-Dov there, as well. bent how shall we cite Tim? sjd What about with an Acknowledgments section? -elm <AUTHOR> <NAME>Tim Bray</NAME> <AFFILIATION>Textuality</AFFILIATION> <EMAIL>tbray@textuality.com</EMAIL> </AUTHOR>--> - </authlist> - <status> - <p>This is a W3C Working Draft for review by W3C members and other interested parties. It is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current W3C working drafts can be found at <loc href="http://www.w3.org/TR">http://www.w3.org/TR</loc>.</p> - <p><emph>Note:</emph> Since working drafts are subject to frequent change, you are advised to reference the above URI, rather than the URIs for working drafts themselves. Some of the work remaining is described in <specref ref="unfinished"/>. </p> - <p>This work is part of the W3C XML Activity (for current status, see <loc href="http://www.w3.org/MarkUp/SGML/Activity">http://www.w3.org/XML/Activity </loc>). For information about the XPointer language which is expected to be used with XLink, see <loc href="http://www.w3.org/MarkUp/SGML/Activity">http://www.w3.org/TR/WD-xptr</loc>. +</authlist> +<status> +<p>This is a W3C Working Draft for review by W3C members and other interested parties. It is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current W3C working drafts can be found at <loc href="http://www.w3.org/TR">http://www.w3.org/TR</loc>.</p> +<p><emph>Note:</emph> Since working drafts are subject to frequent change, you are advised to reference the above URI, rather than the URIs for working drafts themselves. Some of the work remaining is described in <specref ref="unfinished"/>. </p> +<p>This work is part of the W3C XML Activity (for current status, see <loc href="http://www.w3.org/MarkUp/SGML/Activity">http://www.w3.org/XML/Activity </loc>). For information about the XPointer language which is expected to be used with XLink, see <loc href="http://www.w3.org/MarkUp/SGML/Activity">http://www.w3.org/TR/WD-xptr</loc>. </p> - <p>See <loc href="http://www.w3.org/TR/NOTE-xlink-principles">http://www.w3.org/TR/NOTE-xlink-principles </loc> for additional background on the design principles informing XLink.</p> - <p>Also see <loc href="http://www.w3.org/TR/NOTE-xlink-req/">http://www.w3.org/TR/NOTE-xlink-req/</loc> for the XLink requirements that this document attempts to satisfy.</p> - </status> - <abstract> +<p>See <loc href="http://www.w3.org/TR/NOTE-xlink-principles">http://www.w3.org/TR/NOTE-xlink-principles </loc> for additional background on the design principles informing XLink.</p> +<p>Also see <loc href="http://www.w3.org/TR/NOTE-xlink-req/">http://www.w3.org/TR/NOTE-xlink-req/</loc> for the XLink requirements that this document attempts to satisfy.</p> +</status> +<abstract> <!-- edited the abstract for further clarity - bent --> - <p>This specification defines constructs that may be inserted into XML DTDs, schemas and document instances to describe links between objects. It uses XML syntax to create structures that can describe the simple unidirectional hyperlinks of today's HTML as well as more sophisticated links.</p> - </abstract> - <pubstmt> - <p>Burlington, Seekonk, et al.: World-Wide Web Consortium, XML Working Group, 1998.</p> - </pubstmt> - <sourcedesc> - <p>Created in electronic form.</p> - </sourcedesc> - <langusage> - <language id="en">English</language> - <language id="ebnf">Extended Backus-Naur Form (formal grammar)</language> - </langusage> - <revisiondesc> - <slist> - <sitem>1997-01-15 : Skeleton draft by TB</sitem> - <sitem>1997-01-24 : Fleshed out by sjd</sitem> - <sitem>1997-04-08 : Substantive draft</sitem> - <sitem>1997-06-30 : Public draft</sitem> - <sitem>1997-08-01 : Public draft</sitem> - <sitem>1997-08-05 : Prose/organization work by sjd</sitem> - <sitem>1997-10-14: Conformance and design principles; a bit of cleanup by elm</sitem> - <sitem>1997-11-07: Update for editorial issues per issues doc, by sjd.</sitem> - <sitem>1997-12-01: Update for editorial issues per issues doc in preparation for F2F meeting, by sjd.</sitem> - <sitem>1998-01-13: Editorial cleanup, addition of new design principles, by elm.</sitem> - <sitem>1998-02-27: Splitting out of XLink and XPointer, by elm.</sitem> - <sitem>1998-03-03: Moved most of the XPointer locator stuff here. elm</sitem> - <sitem>1999-04-24: Editorial rewrites to represent new ideas on XLink, especially the inclusion of arcs. bent</sitem> - <sitem>1999-05-05: Prose/organization work by dorchard. Moved much of the semantics section around, from: locators, link semantics, remote resource semantics, local resource semantics; to: resource semantics, locators, behavior semantics, link semantics, arc semantics</sitem> - <sitem>1999-05-12: Prose/organization work. Re-organized some of the sections, removed XML constructs from the document, added descriptive prose, edited document text for clarity. Rewrote the link recognition section. bent</sitem> - <sitem>1999-05-17: Further prose work. Added non-normative examples. Clarified arcs. bent</sitem> - <sitem>1999-05-23: Edited for grammar and clarity. bent</sitem> - <sitem>1999-05-27: Final once-over before sending to group. Fixed sjd's email address. bent</sitem> - </slist> - </revisiondesc> - </header> - <body> - <div1> +<p>This specification defines constructs that may be inserted into XML DTDs, schemas and document instances to describe links between objects. It uses XML syntax to create structures that can describe the simple unidirectional hyperlinks of today's HTML as well as more sophisticated links.</p> +</abstract> +<pubstmt> +<p>Burlington, Seekonk, et al.: World-Wide Web Consortium, XML Working Group, 1998.</p> +</pubstmt> +<sourcedesc> +<p>Created in electronic form.</p> +</sourcedesc> +<langusage> +<language id="en">English</language> +<language id="ebnf">Extended Backus-Naur Form (formal grammar)</language> +</langusage> +<revisiondesc> +<slist> +<sitem>1997-01-15 : Skeleton draft by TB</sitem> +<sitem>1997-01-24 : Fleshed out by sjd</sitem> +<sitem>1997-04-08 : Substantive draft</sitem> +<sitem>1997-06-30 : Public draft</sitem> +<sitem>1997-08-01 : Public draft</sitem> +<sitem>1997-08-05 : Prose/organization work by sjd</sitem> +<sitem>1997-10-14: Conformance and design principles; a bit of cleanup by elm</sitem> +<sitem>1997-11-07: Update for editorial issues per issues doc, by sjd.</sitem> +<sitem>1997-12-01: Update for editorial issues per issues doc in preparation for F2F meeting, by sjd.</sitem> +<sitem>1998-01-13: Editorial cleanup, addition of new design principles, by elm.</sitem> +<sitem>1998-02-27: Splitting out of XLink and XPointer, by elm.</sitem> +<sitem>1998-03-03: Moved most of the XPointer locator stuff here. elm</sitem> +<sitem>1999-04-24: Editorial rewrites to represent new ideas on XLink, especially the inclusion of arcs. bent</sitem> +<sitem>1999-05-05: Prose/organization work by dorchard. Moved much of the semantics section around, from: locators, link semantics, remote resource semantics, local resource semantics; to: resource semantics, locators, behavior semantics, link semantics, arc semantics</sitem> +<sitem>1999-05-12: Prose/organization work. Re-organized some of the sections, removed XML constructs from the document, added descriptive prose, edited document text for clarity. Rewrote the link recognition section. bent</sitem> +<sitem>1999-05-17: Further prose work. Added non-normative examples. Clarified arcs. bent</sitem> +<sitem>1999-05-23: Edited for grammar and clarity. bent</sitem> +<sitem>1999-05-27: Final once-over before sending to group. Fixed sjd's email address. bent</sitem> +</slist> +</revisiondesc> +</header> +<body> +<div1> <?Pub Dtl?> - <head>Introduction</head> - <p>This specification defines constructs that may be inserted into XML DTDs, schemas, and document instances to describe links between objects. A <termref def="dt-link">link</termref>, as the term is used here, is an explicit relationship between two or more data objects or portions of data objects. This specification is concerned with the syntax used to assert link existence and describe link characteristics. Implicit (unasserted) relationships, for example that of one word to the next or that of a word in a text to its entry in an on-line dictionary are obviously important, but outside its scope.</p> - <p>Links are asserted by <xtermref href="WD-xml-lang.html#dt-element">elements </xtermref> contained in <xtermref href="WD-xml-lang.html#dt-xml-doc">XML document instances</xtermref>. The simplest case is very like an HTML <code>A</code> link, and has these characteristics: - <ulist><item><p>The link is expressed at one of its ends (similar to the <code>A</code> element in some document)</p></item><item><p>Users can only initiate travel from that end to the other</p></item><item><p>The link's effect on windows, frames, go-back lists, stylesheets in use, and so on is mainly determined by browsers, not by the link itself. For example, traveral of <code>A</code> links normally replaces the current view, perhaps with a user option to open a new window.</p></item><item><p>The link goes to only one destination (although a server may have great freedom in finding or dynamically creating that destination).</p></item></ulist> +<head>Introduction</head> +<p>This specification defines constructs that may be inserted into XML DTDs, schemas, and document instances to describe links between objects. A <termref def="dt-link">link</termref>, as the term is used here, is an explicit relationship between two or more data objects or portions of data objects. This specification is concerned with the syntax used to assert link existence and describe link characteristics. Implicit (unasserted) relationships, for example that of one word to the next or that of a word in a text to its entry in an on-line dictionary are obviously important, but outside its scope.</p> +<p>Links are asserted by <xtermref href="WD-xml-lang.html#dt-element">elements </xtermref> contained in <xtermref href="WD-xml-lang.html#dt-xml-doc">XML document instances</xtermref>. The simplest case is very like an HTML <code>A</code> link, and has these characteristics: + <ulist><item><p>The link is expressed at one of its ends (similar to the <code>A</code> element in some document)</p></item><item><p>Users can only initiate travel from that end to the other</p></item><item><p>The link's effect on windows, frames, go-back lists, stylesheets in use, and so on is mainly determined by browsers, not by the link itself. For example, traveral of <code>A</code> links normally replaces the current view, perhaps with a user option to open a new window.</p></item><item><p>The link goes to only one destination (although a server may have great freedom in finding or dynamically creating that destination).</p></item></ulist> </p> - <p>While this set of characteristics is already very powerful and obviously has proven itself highly useful and effective, each of these assumptions also limits the range of hypertext functionality. The linking model defined here provides ways to create links that go beyond each of these specific characteristics, thus providing features previously available mostly in dedicated hypermedia systems. +<p>While this set of characteristics is already very powerful and obviously has proven itself highly useful and effective, each of these assumptions also limits the range of hypertext functionality. The linking model defined here provides ways to create links that go beyond each of these specific characteristics, thus providing features previously available mostly in dedicated hypermedia systems. </p> - <div2> - <head>Origin and Goals</head> - <p>Following is a summary of the design principles governing XLink: +<div2> +<head>Origin and Goals</head> +<p>Following is a summary of the design principles governing XLink: <olist><item><p>XLink must be straightforwardly usable over the Internet. </p></item><item><p>XLink must be usable by a wide variety of link usage domains and classes of linking application software.</p></item><item><p>XLink must support HTML 4.0 linking constructs.</p></item><item><p>The XLink expression language must be XML.</p></item><item><p>The XLink design must be formal, concise, and illustrative.</p></item><item><p>XLinks must be human-readable and human-writable.</p></item><item><p>XLinks may reside within or outside the documents in which the participating resources reside. </p></item><item><p>XLink must represent the abstract structure and significance of links.</p></item><item><p>XLink must be feasible to implement.</p></item><item><p>XLink must be informed by knowledge of established hypermedia systems and standards.</p></item></olist> </p> - </div2> +</div2> <!--Changed the list of requirements to reflect current XLink requirements document. bent--> - <div2> - <head>Relationship to Existing Standards</head> - <p>Three standards have been especially influential: +<div2> +<head>Relationship to Existing Standards</head> +<p>Three standards have been especially influential: <ulist><item><p><emph>HTML:</emph> Defines several SGML element types that represent links.</p></item><item><p><emph>HyTime:</emph> Defines inline and out-of-line link structures and some semantic features, including traversal control and presentation of objects. <!--Changed from "placement of objects into a display or other space" -elm--> </p></item><item><p><emph>Text Encoding Initiative Guidelines (TEI P3):</emph> Provides structures for creating links, aggregate objects, and link collections out of them.</p></item></ulist> </p> - <p>Many other linking systems have also informed this design, especially Dexter, FRESS, MicroCosm, and InterMedia.</p> - </div2> - <div2> - <head>Terminology</head> - <p>The following basic terms apply in this document. <!--<IMG +<p>Many other linking systems have also informed this design, especially Dexter, FRESS, MicroCosm, and InterMedia.</p> +</div2> +<div2> +<head>Terminology</head> +<p>The following basic terms apply in this document. <!--<IMG SRC="local://./linkdiag.gif">(figure to be inserted)--> <glist><gitem><label><termdef id="dt-arc" term="Arc">arc</termdef></label><def><p>A symbolic representation of traversal behavior in links, especially the direction, context and timing of traversal.</p></def></gitem><gitem><label><termdef id="dt-eltree" term="Element Tree">element tree</termdef></label><def><p>A representation of the relevant structure specified by the tags and attributes in an XML document, based on "groves" as defined in the ISO DSSSL standard. </p></def></gitem><gitem><label><termdef id="dt-inline" term="In-Line Link">inline link</termdef></label><def><p>Abstractly, a <termref def="dt-link">link</termref> which serves as one of its own <termref def="dt-resource">resources</termref>. Concretely, a link where the content of the <termref def="dt-linkel">linking element</termref> serves as a <termref def="dt-particip-resource">participating resource</termref>. HTML <code>A</code>, HyTime <code>clink</code>, and TEI <code>XREF</code> are all inline links.</p></def></gitem><gitem><label><termdef id="dt-link" term="Link">link</termdef></label><def><p>An explicit relationship between two or more data objects or portions of data objects.</p></def></gitem><gitem><label><termdef id="dt-linkel" term="Linking Element">linking element </termdef></label><def><p>An <xtermref href="WD-xml-lang.html#dt-element">element</xtermref> that asserts the existence and describes the characteristics of a <termref def="dt-link"> link</termref>.</p></def></gitem><gitem><label><termdef id="dt-local-resource" term="Local Resource">local resource</termdef></label><def><p>The content of an <termref def="dt-inline">inline</termref>linking element. Note that the content of the linking element could be explicitly pointed to by means of a regular <termref def="dt-locator">locator</termref> in the same linking element, in which case the resource is considered <termref def="dt-remote-resource"> remote</termref>, not local.</p></def></gitem><gitem><label><termdef id="dt-locator" term="Locator">locator</termdef> </label><def><p>Data, provided as part of a link, which identifies a - <termref def="dt-resource">resource</termref>.</p></def></gitem><gitem><label><termdef id="dt-multidir" term="Multi-Directional Link">multidirectional link</termdef></label><def><p>A <termref def="dt-link">link</termref> whose <termref def="dt-traversal"> traversal</termref> can be initiated from more than one of its <termref def="dt-particip-resource"> participating resources</termref>. Note that being able to "go back" after following a one-directional link does not make the link multidirectional.</p></def></gitem><gitem><label><termdef id="dt-outofline" term="Out-of-line Link">out-of-line link</termdef></label><def><p>A <termref def="dt-link">link</termref> whose content does not serve as one of the link's <termref def="dt-particip-resource">participating resources </termref>. Such links presuppose a notion like <termref def="dt-xlg">extended link groups</termref>, which instruct application software where to look for links. Out-of-line links are generally required for supporting multidirectional <termref def="dt-traversal">traversal</termref> and for allowing read-only resources to have outgoing links.</p></def></gitem><gitem><label><termdef id="dt-parsedq" term="Parsed">parsed</termdef></label><def><p>In the context of link behavior, a parsed link is any link whose content is transcluded into the document where the link originated. The use of the term "parsed" directly refers to the concept in XML of a + <termref def="dt-resource">resource</termref>.</p></def></gitem><gitem><label><termdef id="dt-multidir" term="Multi-Directional Link">multidirectional link</termdef></label><def><p>A <termref def="dt-link">link</termref> whose <termref def="dt-traversal"> traversal</termref> can be initiated from more than one of its <termref def="dt-particip-resource"> participating resources</termref>. Note that being able to "go back" after following a one-directional link does not make the link multidirectional.</p></def></gitem><gitem><label><termdef id="dt-outofline" term="Out-of-line Link">out-of-line link</termdef></label><def><p>A <termref def="dt-link">link</termref> whose content does not serve as one of the link's <termref def="dt-particip-resource">participating resources </termref>. Such links presuppose a notion like <termref def="dt-xlg">extended link groups</termref>, which instruct application software where to look for links. Out-of-line links are generally required for supporting multidirectional <termref def="dt-traversal">traversal</termref> and for allowing read-only resources to have outgoing links.</p></def></gitem><gitem><label><termdef id="dt-parsedq" term="Parsed">parsed</termdef></label><def><p>In the context of link behavior, a parsed link is any link whose content is transcluded into the document where the link originated. The use of the term "parsed" directly refers to the concept in XML of a parsed entity.</p></def></gitem><gitem><label><termdef id="dt-particip-resource" term="Participating Resource"> participating resource</termdef></label><def><p>A <termref def="dt-resource">resource</termref> that belongs to a link. All resources are potential contributors to a link; participating resources are the actual contributors to a particular link.</p></def></gitem><gitem><label><termdef id="dt-remote-resource" term="Remote Resource">remote resource</termdef></label><def><p>Any participating resource of a link that is pointed to with a locator. </p></def></gitem><gitem><label><termdef id="dt-resource" term="Resource">resource</termdef></label><def><p>In the abstract sense, an addressable unit of information or service that is participating in a <termref def="dt-link">link</termref>. Examples include files, images, documents, programs, and query results. Concretely, anything reachable by the use of a <termref def="dt-locator">locator</termref> in some <termref def="dt-linkel">linking element</termref>. Note that this term and its definition are taken from the basic specifications governing the World Wide Web. <!--Joel notes: need link here. bent asks: A link?--> </p></def></gitem><gitem><label><termdef id="dt-subresource" term="sub-Resource">sub-resource</termdef></label><def><p>A portion of a resource, pointed to as the precise destination of a link. As one example, a link might specify that an entire document be retrieved and displayed, but that some specific part(s) of it is the specific linked data, to be treated in an application-appropriate manner such as indication by highlighting, scrolling, etc.</p></def></gitem><gitem><label><termdef id="dt-traversal" term="Traversal">traversal</termdef></label><def><p>The action of using a <termref def="dt-link">link</termref>; that is, of accessing a <termref def="dt-resource">resource</termref>. Traversal may be initiated by a user action (for example, clicking on the displayed content of a <termref def="dt-linkel">linking element</termref>) or occur under program control.</p></def></gitem></glist> </p> - </div2> - <div2> - <head>Notation</head> - <p>The formal grammar for <termref def="dt-locator">locators</termref> is given using a simple Extended Backus-Naur Form (EBNF) location, as described in <xspecref href="http://www.w3.org/TR/REC-xml#sec-notation">the XML specification</xspecref>.</p> +</div2> +<div2> +<head>Notation</head> +<p>The formal grammar for <termref def="dt-locator">locators</termref> is given using a simple Extended Backus-Naur Form (EBNF) location, as described in <xspecref href="http://www.w3.org/TR/REC-xml#sec-notation">the XML specification</xspecref>.</p> <!-- fixed link to XML spec - bent --> - </div2> - </div1> - <div1 id="addressing"> +</div2> +</div1> +<div1 id="addressing"> <?Pub Dtl?> - <head>Locator Syntax</head> - <p>The locator for a <termref def="dt-resource">resource</termref> is typically provided by means of a Uniform Resource Identifier, or URI. XPointers can be used in conjunction with the URI structure, as fragment identifiers, to specify a more precise sub-resource. </p> +<head>Locator Syntax</head> +<p>The locator for a <termref def="dt-resource">resource</termref> is typically provided by means of a Uniform Resource Identifier, or URI. XPointers can be used in conjunction with the URI structure, as fragment identifiers, to specify a more precise sub-resource. </p> <!-- Removed the discussion of queries from the previous paragraph, due to contention within the WG. bent --> - <p>A locator generally contains a URI, as described in IETF RFCs <bibref ref="rfc1738"/> and <bibref ref="rfc1808"/>. As these RFCs state, the URI may include a trailing <emph>query</emph> (marked by a leading "<code>?</code>"), and be followed by a "<code>#</code>" and a <emph>fragment identifier</emph>, with the query interpreted by the host providing the indicated resource, and the interpretation of the fragment identifier dependent on the data type of the indicated resource.</p> +<p>A locator generally contains a URI, as described in IETF RFCs <bibref ref="rfc1738"/> and <bibref ref="rfc1808"/>. As these RFCs state, the URI may include a trailing <emph>query</emph> (marked by a leading "<code>?</code>"), and be followed by a "<code>#</code>" and a <emph>fragment identifier</emph>, with the query interpreted by the host providing the indicated resource, and the interpretation of the fragment identifier dependent on the data type of the indicated resource.</p> <!--Is there some restriction on URNs having queries and/or fragment identifiers? Since these RFCs don't mention URIs explicitly, should the wording here lead from URLs to URIs more explicitly? -elm--> - <p>In order to locate XML documents and portions of documents, a locator value may contain either a <xtermref href="http://www.w3.org/Addressing/rfc1738.txt"> URI</xtermref> or a fragment identifier, or both. Any fragment identifier for pointing into XML must be an <xtermref href="http://www.w3.org/TR/WD-xptr#dt-xpointer"> XPointer</xtermref>.</p> - <p>Special syntax may be used to request the use of particular processing models in accessing the locator's resource. This is designed to reflect the realities of network operation, where it may or may not be desirable to exercise fine control over the distribution of work between local and remote processors. - <scrap id="locator" lang="ebnf"><head>Locator</head><prod id="nt-locator"><lhs>Locator</lhs><rhs><nt def="nt-uri">URI</nt></rhs><rhs>| <nt def="nt-connector">Connector</nt> (<xnt href="http://www.w3.org/TR/WD-xptr">XPointer</xnt> | <xnt href="WD-xml-lang.html#NT-Name">Name</xnt>)</rhs><rhs>| <nt def="nt-uri">URI</nt> <nt def="nt-connector">Connector</nt> (<xnt href="http://www.w3.org/TR/WD-xptr">XPointer</xnt> | <xnt href="WD-xml-lang.html#NT-Name">Name</xnt>)</rhs></prod><prod id="nt-connector"><lhs>Connector</lhs><rhs>'#' | '|'</rhs></prod><prod id="nt-uri"><lhs>URI</lhs><rhs><xnt href="WD-xml-lang.html#NT-URLchar">URIchar*</xnt></rhs></prod></scrap> +<p>In order to locate XML documents and portions of documents, a locator value may contain either a <xtermref href="http://www.w3.org/Addressing/rfc1738.txt"> URI</xtermref> or a fragment identifier, or both. Any fragment identifier for pointing into XML must be an <xtermref href="http://www.w3.org/TR/WD-xptr#dt-xpointer"> XPointer</xtermref>.</p> +<p>Special syntax may be used to request the use of particular processing models in accessing the locator's resource. This is designed to reflect the realities of network operation, where it may or may not be desirable to exercise fine control over the distribution of work between local and remote processors. + <scrap id="locator" lang="ebnf"><head>Locator</head><prod id="nt-locator"><lhs>Locator</lhs><rhs><nt def="nt-uri">URI</nt></rhs><rhs>| <nt def="nt-connector">Connector</nt> (<xnt href="http://www.w3.org/TR/WD-xptr">XPointer</xnt> | <xnt href="WD-xml-lang.html#NT-Name">Name</xnt>)</rhs><rhs>| <nt def="nt-uri">URI</nt> <nt def="nt-connector">Connector</nt> (<xnt href="http://www.w3.org/TR/WD-xptr">XPointer</xnt> | <xnt href="WD-xml-lang.html#NT-Name">Name</xnt>)</rhs></prod><prod id="nt-connector"><lhs>Connector</lhs><rhs>'#' | '|'</rhs></prod><prod id="nt-uri"><lhs>URI</lhs><rhs><xnt href="WD-xml-lang.html#NT-URLchar">URIchar*</xnt></rhs></prod></scrap> </p> - <p><termdef id="dt-designated" term="Designated Resource">In this discussion, the term <term>designated resource</term> refers to the resource which an entire locator serves to locate.</termdef> The following rules apply: +<p><termdef id="dt-designated" term="Designated Resource">In this discussion, the term <term>designated resource</term> refers to the resource which an entire locator serves to locate.</termdef> The following rules apply: <ulist><item><p><termdef id="dt-containing-resource" term="Containing Resource"> The URI, if provided, locates a resource called the <term>containing resource</term>.</termdef></p></item><item><p>If the URI is not provided, the containing resource is considered to be the document in which the linking element is contained. </p></item><item><p><termdef id="dt-sub-resource" term="Sub-Resource">If an XPointer is provided, the designated resource is a <term>sub-resource</term> of the containing resource; otherwise the designated resource is the @@ -167,59 +167,59 @@ document. bent--> Oy, yes, i think so. it will require some fun wording, though, so i haven't fixed it yet here -sjd--><item><p>If the <nt def="nt-connector">Connector</nt> is followed directly by a <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>, the <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt> is shorthand for the XPointer"<code>id(Name)</code>"; that is, the sub-resource is the element in the containing resource that has an XML <xtermref href="http://www.w3.org/TR/REC-xml#sec-attrtypes">ID attribute</xtermref> whose value <xtermref href="http://www.w3.org/TR/REC-xml#dt-match">matches</xtermref> the <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>. This shorthand is to encourage use of the robust <code>id</code> addressing mode.</p></item><!-- fixed links to the XML recommendation - bent --><item><p>If the connector is "<code>#</code>", this signals an intent that the containing resource is to be fetched as a whole from the host that provides it, and that the XPointer processing to extract the sub-resource is to be performed on the client, that is to say on the same system where the linking element is recognized and processed.</p></item><item><p>If the connector is "<code>|</code>", no intent is signaled as to what processing model is to be used to go about accessing the designated resource.</p></item></ulist> </p> - <p>Note that the definition of a URI includes an optional query component. </p> - <p>In the case where the URI contains a query (to be interpreted by the server), information providers and authors of server software are urged to use queries as follows: - <scrap id="querysyntax" lang="ebnf"><head>Query</head><prod id="nt-query"><lhs>Query</lhs><rhs>'XML-XPTR=' (<xnt href="http://www.w3.org/TR/WD-xptr"> XPointer</xnt> | <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>)</rhs></prod></scrap> +<p>Note that the definition of a URI includes an optional query component. </p> +<p>In the case where the URI contains a query (to be interpreted by the server), information providers and authors of server software are urged to use queries as follows: + <scrap id="querysyntax" lang="ebnf"><head>Query</head><prod id="nt-query"><lhs>Query</lhs><rhs>'XML-XPTR=' (<xnt href="http://www.w3.org/TR/WD-xptr"> XPointer</xnt> | <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>)</rhs></prod></scrap> </p> <!-- fixed link to XML recommendation - bent --> - </div1> - <div1> +</div1> +<div1> <?Pub Dtl?> - <head>Link Recognition</head> - <p>The existence of a <termref def="dt-link">link</termref> is asserted by a <termref def="dt-linkel">linking element</termref>. Linking elements must be recognized reliably by application software in order to provide appropriate display and behavior. There are several ways link recognition could be accomplished: for example, reserving element type names, reserving attributes names, leaving the matter of recognition entirely up to stylesheets and application software, or using the XLink <xtermref href="http://www.w3.org/TR/REC-xml-names/">namespace</xtermref> to specify element names and attribute names that would be recognized by namespace and XLink-aware processors. Using element and attribute names within the XLink namespace provides a balance between giving users control of their own markup language design and keeping the identification of linking elements simple and unambiguous.</p> - <p>The two approaches to identifying linking elements are relatively simple to implement. For example, here's how the HTML <code>A</code> element would be declared using attributes within the XLink namespace, and then how an element within the XLink namespace might do the same: +<head>Link Recognition</head> +<p>The existence of a <termref def="dt-link">link</termref> is asserted by a <termref def="dt-linkel">linking element</termref>. Linking elements must be recognized reliably by application software in order to provide appropriate display and behavior. There are several ways link recognition could be accomplished: for example, reserving element type names, reserving attributes names, leaving the matter of recognition entirely up to stylesheets and application software, or using the XLink <xtermref href="http://www.w3.org/TR/REC-xml-names/">namespace</xtermref> to specify element names and attribute names that would be recognized by namespace and XLink-aware processors. Using element and attribute names within the XLink namespace provides a balance between giving users control of their own markup language design and keeping the identification of linking elements simple and unambiguous.</p> +<p>The two approaches to identifying linking elements are relatively simple to implement. For example, here's how the HTML <code>A</code> element would be declared using attributes within the XLink namespace, and then how an element within the XLink namespace might do the same: <eg><A xlink:type="simple" xlink:href="http://www.w3.org/TR/wd-xlink/" xlink:title="The Xlink Working Draft">The XLink Working Draft.</A></eg> <eg><xlink:simple href="http://www.w3.org/TR/wd-xlink/" title="The XLink Working Draft">The XLink Working Draft</xlink:simple></eg> Any arbitrary element can be made into an XLink by using the <code>xlink:type</code> attribute. And, of course, the explicit XLink elements may be used, as well. This document will go on to describe the linking attributes that are associated with linking elements. It may be assumed by the reader that these attributes would require the <code>xlink</code> namespace prefix if they existed within an arbitrary element, or that they may be used directly if they exist within an explicit Xlink element.</p> <!-- heavily modified this section to accomodate namespace-aware link recognition - bent --> - </div1> +</div1> <!-- Rewrote this entire section. - bent --> - <div1> - <head>Linking Attributes</head> - <p>XLink has several attributes associated with the variety of links it may represent. These attributes define four main concepts: locators, arcs, behaviors, and semantics. <emph>Locators</emph> define where the actual resource is located. <emph>Arcs</emph> define the traversal of links. Where does the link come from? Where does it go to? All this information can be stored in the arc attributes. <emph>Behaviors</emph> define how the link is activated, and what the application should do with the resource being linked to. <emph>Semantics</emph> define useful information that the application may use, and enables the link for such specalized targets as constricted devices and accessibility software.</p> - <div2 id="link-locators"> - <head>Locator Attributes</head> - <p>The only locator attribute at this time is <code>href</code>. This attribute must contain either a string in the form of a URI that defines the remote resource being linked to, a string containing a fragment identifier that links to a local resource, or a string containing a URI with a fragment identifier concacenated onto it.</p> - </div2> - <div2 id="link-arcs"> - <head>Arc Attributes</head> - <p>Arcs contain two attributes, <code>from</code> and <code>to</code>. The <code>from</code> attribute may contain a string containing the content of a <code>role</code> attribute from the resource being linked from. The purpose of the <code>from</code> attribute is to define where this link is being actuated from.</p> - <p>The <code>to</code> attribute may contain a string containing the content of a <code>role</code> attribute from the resource being linked to. The purpose of the <code>to</code> attribute is to define where this link traverses to.</p> - <p>The application may use this information in a number of ways, especially in a complex hypertext system, but it is mainly useful in providing context for application behavior.</p> +<div1> +<head>Linking Attributes</head> +<p>XLink has several attributes associated with the variety of links it may represent. These attributes define four main concepts: locators, arcs, behaviors, and semantics. <emph>Locators</emph> define where the actual resource is located. <emph>Arcs</emph> define the traversal of links. Where does the link come from? Where does it go to? All this information can be stored in the arc attributes. <emph>Behaviors</emph> define how the link is activated, and what the application should do with the resource being linked to. <emph>Semantics</emph> define useful information that the application may use, and enables the link for such specalized targets as constricted devices and accessibility software.</p> +<div2 id="link-locators"> +<head>Locator Attributes</head> +<p>The only locator attribute at this time is <code>href</code>. This attribute must contain either a string in the form of a URI that defines the remote resource being linked to, a string containing a fragment identifier that links to a local resource, or a string containing a URI with a fragment identifier concacenated onto it.</p> +</div2> +<div2 id="link-arcs"> +<head>Arc Attributes</head> +<p>Arcs contain two attributes, <code>from</code> and <code>to</code>. The <code>from</code> attribute may contain a string containing the content of a <code>role</code> attribute from the resource being linked from. The purpose of the <code>from</code> attribute is to define where this link is being actuated from.</p> +<p>The <code>to</code> attribute may contain a string containing the content of a <code>role</code> attribute from the resource being linked to. The purpose of the <code>to</code> attribute is to define where this link traverses to.</p> +<p>The application may use this information in a number of ways, especially in a complex hypertext system, but it is mainly useful in providing context for application behavior.</p> <!-- I'm at a loss as to how to describe arcs more clearly than this. I don't want to devolve into discussions of directed graphs and n-ary links. -bent --> - </div2> - <div2 id="link-behaviors"> - <head>Behavior Attributes</head> - <p>There are two attributes associated with behavior: <code>show</code> and <code>actuate</code>. The <code>show</code> attribute defines how the remote resource is to be revealed to the user. It has three options: <code>new</code>, <code>parsed</code>, and <code>replace</code>. The <code>new</code> option indicates that the remote resource should be shown in a new window (or other device context) without replacing the previous content. The <code>parsed</code> option, relating directly to the XML concept of a parsed entity, indicates that the content should be integrated into the document from which the link was actuated. The <code>replace</code> option is the one most commonly seen on the World Wide Web, where the document being linked from is entirely replaced by the object being linked to.</p> - <p>The <code>actuate</code> attribute defines how the link is initiated. It has two options: <code>user</code> and <code>auto</code>. The <code>user</code> option indicates that the link must be initiated by some sort of human-initiated selection, such as clicking on an HTML anchor. The <code>auto</code> option indicates that the link is automatically initiated when the application deems that the user has reached the link. It then follows the behavior set out in the <code>show</code> option.</p> +</div2> +<div2 id="link-behaviors"> +<head>Behavior Attributes</head> +<p>There are two attributes associated with behavior: <code>show</code> and <code>actuate</code>. The <code>show</code> attribute defines how the remote resource is to be revealed to the user. It has three options: <code>new</code>, <code>parsed</code>, and <code>replace</code>. The <code>new</code> option indicates that the remote resource should be shown in a new window (or other device context) without replacing the previous content. The <code>parsed</code> option, relating directly to the XML concept of a parsed entity, indicates that the content should be integrated into the document from which the link was actuated. The <code>replace</code> option is the one most commonly seen on the World Wide Web, where the document being linked from is entirely replaced by the object being linked to.</p> +<p>The <code>actuate</code> attribute defines how the link is initiated. It has two options: <code>user</code> and <code>auto</code>. The <code>user</code> option indicates that the link must be initiated by some sort of human-initiated selection, such as clicking on an HTML anchor. The <code>auto</code> option indicates that the link is automatically initiated when the application deems that the user has reached the link. It then follows the behavior set out in the <code>show</code> option.</p> <!-- Something should be put here in terms of an example. Idea: "A" link versus automatically updating encyclopedia. -bent --> - </div2> - <div2 id="link-semantics"> - <head>Semantic Attributes</head> - <p>There are two attributes associated with semantics, <code>role</code> and <code>title</code>. The <code>role</code> attribute is a generic string used to describe the function of the link's content. For example, a poem might have a link with a <code>role="stanza"</code>. The <code>role</code> is also used as an identifier for the <code>from</code> and <code>to</code> attributes of arcs.</p> - <p>The <code>title</code> attribute is designed to provide human-readable text describing the link. It is very useful for those who have text-based applications, whether that be due to a constricted device that cannot display the link's content, or if it's being read by an application to a visually-impaired user, or if it's being used to create a table of links. The <code>title</code> attribute contains a simple, descriptive string.</p> - </div2> - </div1> - <div1 id="linking-elements"> - <head>Linking Elements</head> - <p>There are several kinds of linking elements in XLink: <code>simple</code> links, <code>locators</code>, <code>arcs</code>, and <code>extended</code> links. These elements may be instantiated via element declarations from the XLink namespace, or they may be instantiated via attribute declarations from the XLink namespace. Both kinds of instantiation are described in the definition of each linking element.</p> - <p>The <code>simple</code> link is used to declare a link that approximates the functionality of the HTML <code>A</code> element. It has, however, a few added features to increase its value, including the potential declaration of semantics and behavior. The <code>locator</code> elements are used to define the resource being linked to. Some links may contain multiple locators, representing a choice of potential links to be traversed. The <code>arcs</code> are used to define the traversal semantics of the link. Finally, an <code>extended</code> linking element differs from a simple link in that it can connect any number of resources, not just one local resource (optionally) and one remote resource, and in that extended links are more often out-of-line than simple links.</p> - <div2 id="simple-links"> - <head>Simple Links</head> - <p id="dt-simplelink"><termdef id="dt-simpleline" term="Simple Link"><term>Simple links</term> can be used for purposes that approximate the functionality of a basic HTML <code>A</code> link, but they can also support a limited amount of additional functionality. Simple links have only one locator and thus, for convenience, combine the functions of a linking element and a locator into a single element.</termdef> As a result of this combination, the simple linking element offers both a locator attribute and all the behavior and semantic attributes.</p> - <p>The following are two examples of linking elements, each showing all the possible attributes that can be associated with a simple link. Here is the explicit XLink simple linking element. +</div2> +<div2 id="link-semantics"> +<head>Semantic Attributes</head> +<p>There are two attributes associated with semantics, <code>role</code> and <code>title</code>. The <code>role</code> attribute is a generic string used to describe the function of the link's content. For example, a poem might have a link with a <code>role="stanza"</code>. The <code>role</code> is also used as an identifier for the <code>from</code> and <code>to</code> attributes of arcs.</p> +<p>The <code>title</code> attribute is designed to provide human-readable text describing the link. It is very useful for those who have text-based applications, whether that be due to a constricted device that cannot display the link's content, or if it's being read by an application to a visually-impaired user, or if it's being used to create a table of links. The <code>title</code> attribute contains a simple, descriptive string.</p> +</div2> +</div1> +<div1 id="linking-elements"> +<head>Linking Elements</head> +<p>There are several kinds of linking elements in XLink: <code>simple</code> links, <code>locators</code>, <code>arcs</code>, and <code>extended</code> links. These elements may be instantiated via element declarations from the XLink namespace, or they may be instantiated via attribute declarations from the XLink namespace. Both kinds of instantiation are described in the definition of each linking element.</p> +<p>The <code>simple</code> link is used to declare a link that approximates the functionality of the HTML <code>A</code> element. It has, however, a few added features to increase its value, including the potential declaration of semantics and behavior. The <code>locator</code> elements are used to define the resource being linked to. Some links may contain multiple locators, representing a choice of potential links to be traversed. The <code>arcs</code> are used to define the traversal semantics of the link. Finally, an <code>extended</code> linking element differs from a simple link in that it can connect any number of resources, not just one local resource (optionally) and one remote resource, and in that extended links are more often out-of-line than simple links.</p> +<div2 id="simple-links"> +<head>Simple Links</head> +<p id="dt-simplelink"><termdef id="dt-simpleline" term="Simple Link"><term>Simple links</term> can be used for purposes that approximate the functionality of a basic HTML <code>A</code> link, but they can also support a limited amount of additional functionality. Simple links have only one locator and thus, for convenience, combine the functions of a linking element and a locator into a single element.</termdef> As a result of this combination, the simple linking element offers both a locator attribute and all the behavior and semantic attributes.</p> +<p>The following are two examples of linking elements, each showing all the possible attributes that can be associated with a simple link. Here is the explicit XLink simple linking element. <eg><!ELEMENT xlink:simple ANY> <!ATTLIST xlink:slink href CDATA #REQUIRED @@ -248,33 +248,33 @@ The XLink Working Draft.</foo></eg> Alternately, a simple link could be as terse as this: <eg><foo xlink:href="#stanza1">The First Stanza.</foo></eg> </p> - <p> +<p> There are no constraints on the contents of a simple linking element. In the sample declaration above, it is given a content model of <code>ANY</code> to illustrate that any content model or declared content is acceptable. In a valid document, every element that is significant to XLink must still conform to the constraints expressed in its governing DTD.</p> - <p>Note that it is meaningful to have an out-of-line simple link, although +<p>Note that it is meaningful to have an out-of-line simple link, although such links are uncommon. They are called "one-ended" and are typically used to associate discrete semantic properties with locations. The properties might - be expressed by attributes on the link, the link's element type name, or in + be expressed by attributes on the link, the link's element type name, or in some other way, and are not considered full-fledged resources of the link. Most out-of-line links are extended links, as these have a far wider range of uses.</p> - </div2> - <div2 id="extended-link"> - <head>Extended Links</head> - <p> - <termdef id="dt-extendedlink" term="Extended Link">An <term>extended link</term> differs from a simple link in that it can connect any number of resources, not just one local resource (optionally) and one remote resource, and in that extended links are more often out-of-line than simple links.</termdef> - </p> - <p>These additional capabilities of extended links are required for: +</div2> +<div2 id="extended-link"> +<head>Extended Links</head> +<p> +<termdef id="dt-extendedlink" term="Extended Link">An <term>extended link</term> differs from a simple link in that it can connect any number of resources, not just one local resource (optionally) and one remote resource, and in that extended links are more often out-of-line than simple links.</termdef> +</p> +<p>These additional capabilities of extended links are required for: <ulist><item><p>Enabling outgoing links in documents that cannot be modified to add an inline link</p></item><item><p>Creating links to and from resources in formats with no native support for embedded links (such as most multimedia formats)</p></item><item><p>Applying and filtering sets of relevant links on demand</p></item><item><p>Enabling other advanced hypermedia capabilities</p></item></ulist> </p> - <p>Application software might be expected to provide traversal among all of a link's participating resources (subject to semantic constraints outside the scope of this specification) and to signal the fact that a given resource or sub-resource participates in one or more links when it is displayed (even though there is no markup at exactly that point to signal it).</p> - <p>A linking element for an extended link contains a series of <xtermref href="http://www.w3.org/TR/REC-xml/#dt-parentchild">child elements</xtermref> that serve as locators and arcs. Because an extended link can have more than one remote resource, it separates out linking itself from the mechanisms used to locate each resource (whereas a simple link combines the two).</p> - <p>The <code>xlink:type</code> attribute value for an extended link must be <code> extended</code>, if the link is being instantiated on an arbitrary element. Note that extended links introduce variants of the <code>show</code> and <code>actuate</code> behavior attributes. These attributes, the <code>showdefault</code> and <code>actuatedefault</code> define the same behavior as their counterparts. However, in this case, they are considered to define the default behavior for all the linking elements that they contain.</p> - <p>However, when a linking element within an extended link has a <code>show</code> or <code>actuate</code> attribute of its own, that attribute overrides the defaults set on the extended linking element.</p> - <p>The extended linking element itself retains those attributes relevant to the link as a whole, and to its local resource if any. Following are two sample declaration for an extended link. The first is an example of the explicit XLink extended link: +<p>Application software might be expected to provide traversal among all of a link's participating resources (subject to semantic constraints outside the scope of this specification) and to signal the fact that a given resource or sub-resource participates in one or more links when it is displayed (even though there is no markup at exactly that point to signal it).</p> +<p>A linking element for an extended link contains a series of <xtermref href="http://www.w3.org/TR/REC-xml/#dt-parentchild">child elements</xtermref> that serve as locators and arcs. Because an extended link can have more than one remote resource, it separates out linking itself from the mechanisms used to locate each resource (whereas a simple link combines the two).</p> +<p>The <code>xlink:type</code> attribute value for an extended link must be <code> extended</code>, if the link is being instantiated on an arbitrary element. Note that extended links introduce variants of the <code>show</code> and <code>actuate</code> behavior attributes. These attributes, the <code>showdefault</code> and <code>actuatedefault</code> define the same behavior as their counterparts. However, in this case, they are considered to define the default behavior for all the linking elements that they contain.</p> +<p>However, when a linking element within an extended link has a <code>show</code> or <code>actuate</code> attribute of its own, that attribute overrides the defaults set on the extended linking element.</p> +<p>The extended linking element itself retains those attributes relevant to the link as a whole, and to its local resource if any. Following are two sample declaration for an extended link. The first is an example of the explicit XLink extended link: <eg><!ELEMENT xlink:extended ((xlink:arc | xlink:locator)*)> <!ATTLIST xlink:extended @@ -293,59 +293,59 @@ The XLink Working Draft.</foo></eg> xlink:showdefault (new|parsed|replace) #IMPLIED xlink:actuatedefault (user|auto) #IMPLIED ></eg> - The following two examples demonstrate how each of the above might appear within a document instance. Note that the content of these examples would be other elements. For brevity's sake, they've been left blank. The first example shows how the link might appear, using an explicit XLink extended link: + The following two examples demonstrate how each of the above might appear within a document instance. Note that the content of these examples would be other elements. For brevity's sake, they've been left blank. The first example shows how the link might appear, using an explicit XLink extended link: -<eg><xlink:extended role="address book" title="Ben's Address Book" showdefault="replace" actuatedefault="user"> ... </xlink:extended></eg> +<eg><xlink:extended role="address book" title="Ben's Address Book" showdefault="replace" actuatedefault="user"> ... </xlink:extended></eg> And the second shows how the link might appear, using an arbitrary element: -<eg><foo xlink:type="extended" xlink:role="address book" xlink:title="Ben's Address Book" xlink:showdefault="replace" xlink:actuatedefault="user"> ... </foo></eg> +<eg><foo xlink:type="extended" xlink:role="address book" xlink:title="Ben's Address Book" xlink:showdefault="replace" xlink:actuatedefault="user"> ... </foo></eg> </p> - </div2> - <div2 id="xlink-arcs"> - <head>Arc Elements</head> - <p><termdef id="dt-arc" term="Arc">An <term>arc</term> is contained within an extended link for the purpose of defining traversal behavior.</termdef> More than one arc may be associated with a link. Otherwise, arc elements function exactly as the arc attributes might lead on to expect.</p> +</div2> +<div2 id="xlink-arcs"> +<head>Arc Elements</head> +<p><termdef id="dt-arc" term="Arc">An <term>arc</term> is contained within an extended link for the purpose of defining traversal behavior.</termdef> More than one arc may be associated with a link. Otherwise, arc elements function exactly as the arc attributes might lead on to expect.</p> <!-- More here? -bent --> - </div2> - </div1> - <div1> - <head>Conformance</head> - <p>An element conforms to XLink if: <olist><item><p>The element has an <code>xml:link</code> attribute whose value is +</div2> +</div1> +<div1> +<head>Conformance</head> +<p>An element conforms to XLink if: <olist><item><p>The element has an <code>xml:link</code> attribute whose value is one of the attribute values prescribed by this specification, and</p></item><item><p>the element and all of its attributes and content adhere to the syntactic requirements imposed by the chosen <code>xml:link</code> attribute value, as prescribed in this specification.</p></item></olist></p> - <p>Note that conformance is assessed at the level of individual elements, +<p>Note that conformance is assessed at the level of individual elements, rather than whole XML documents, because XLink and non-XLink linking mechanisms may be used side by side in any one document.</p> - <p>An application conforms to XLink if it interprets XLink-conforming elements +<p>An application conforms to XLink if it interprets XLink-conforming elements according to all required semantics prescribed by this specification and, for any optional semantics it chooses to support, supports them in the way prescribed. <!--If/when we split out the XLinkfunctionality (e.g. inline links and out-of-line links), the conformance language will have to address the different levels of support. -elm--> </p> - </div1> - </body> - <back> - <div1 id="unfinished"> - <head>Unfinished Work</head> - <div2> - <head>Structured Titles</head> - <p>The simple title mechanism described in this draft is insufficient to cope +</div1> +</body> +<back> +<div1 id="unfinished"> +<head>Unfinished Work</head> +<div2> +<head>Structured Titles</head> +<p>The simple title mechanism described in this draft is insufficient to cope with internationalization or the use of multimedia in link titles. A future version will provide a mechanism for the use of structured link titles.</p> - </div2> - </div1> - <div1> - <head>References</head> - <blist> - <bibl id="xptr" key="XPTR">Eve Maler and Steve DeRose, editors. <titleref> +</div2> +</div1> +<div1> +<head>References</head> +<blist> +<bibl id="xptr" key="XPTR">Eve Maler and Steve DeRose, editors. <titleref> XML Pointer Language (XPointer) V1.0</titleref>. ArborText, Inso, and Brown University. Burlington, Seekonk, et al.: World Wide Web Consortium, 1998. (See <loc href="http://www.w3.org/TR/WD-xptr">http://www.w3.org/TR/WD-xptr </loc>.)</bibl> - <bibl id="iso10744" key="ISO/IEC 10744">ISO (International Organization for +<bibl id="iso10744" key="ISO/IEC 10744">ISO (International Organization for Standardization). <titleref>ISO/IEC 10744-1992 (E). Information technology - Hypermedia/Time-based Structuring Language (HyTime).</titleref> [Geneva]: International Organization for Standardization, 1992. <titleref>Extended @@ -354,29 +354,29 @@ Annex.</titleref> [Geneva]: International Organization for Standardization, 1996. (See <loc href="http://www.ornl.gov/sgml/wg8/hytime/html/is10744r.html">http://www.ornl.go v/sgml/wg8/hytime/html/is10744r.html </loc> <!--p m-r says this link is broken. elm --> ).</bibl> - <bibl id="rfc1738" key="IETF RFC 1738">IETF (Internet Engineering Task +<bibl id="rfc1738" key="IETF RFC 1738">IETF (Internet Engineering Task Force). <titleref> RFC 1738: Uniform Resource Locators</titleref>. 1991. (See <loc href="http://www.w3.org/Addressing/rfc1738.txt"> http://www.w3.org/Addressing/rfc1738.txt</loc>).</bibl> - <bibl id="rfc1808" key="IETF RFC 1808">IETF (Internet Engineering Task +<bibl id="rfc1808" key="IETF RFC 1808">IETF (Internet Engineering Task Force). <titleref> RFC 1808: Relative Uniform Resource Locators</titleref>. 1995. (See <loc href="http://www.w3.org/Addressing/rfc1808.txt">http://www.w3.org/Addressing/rfc 1808.txt </loc>).</bibl> - <bibl id="tei" key="TEI">C. M. Sperberg-McQueen and Lou Burnard, editors. +<bibl id="tei" key="TEI">C. M. Sperberg-McQueen and Lou Burnard, editors. <titleref> Guidelines for Electronic Text Encoding and Interchange</titleref>. Association for Computers and the Humanities (ACH), Association for Computational Linguistics (ACL), and Association for Literary and Linguistic Computing (ALLC). Chicago, Oxford: Text Encoding Initiative, 1994. <!-- add cite to DOM work --> </bibl> - <bibl id="chum" key="CHUM">]Steven J. DeRose and David G. Durand. 1995. "The +<bibl id="chum" key="CHUM">]Steven J. DeRose and David G. Durand. 1995. "The TEI Hypertext Guidelines." In <titleref>Computing and the Humanities </titleref>29(3). Reprinted in <titleref>Text Encoding Initiative: Background and Context</titleref>, ed. Nancy Ide and Jean ronis <!-- fix this name -->, ISBN 0-7923-3704-2. </bibl> - </blist> - </div1> - </back> +</blist> +</div1> +</back> </spec> <?Pub *0000052575?> diff --git a/result/valid/xlink.xml.err b/result/valid/xlink.xml.err index 6e8beefd..48c3b0cb 100644 --- a/result/valid/xlink.xml.err +++ b/result/valid/xlink.xml.err @@ -1,6 +1,6 @@ ./test/valid/xlink.xml:450: validity error: ID dt-arc already defined <p><termdef id="dt-arc" term="Arc">An <term>arc</term> is contained within an ^ -./test/valid/xlink.xml:530: validity error: IDREF attribute def reference an unknown ID 'dt-xlg' +./test/valid/xlink.xml:530: validity error: IDREF attribute def reference an unknown ID "dt-xlg" ^ diff --git a/result/xml2 b/result/xml2 index 89abac15..b26b3582 100644 --- a/result/xml2 +++ b/result/xml2 @@ -1,8 +1,8 @@ <?xml version="1.0"?> <!DOCTYPE test [ +<!ELEMENT test (#PCDATA)> <!ENTITY % xx "%zz;"> <!ENTITY % zz '<!ENTITY tricky "error-prone" >'> <!ENTITY tricky "error-prone"> -<!ELEMENT test (#PCDATA)> ]> <test>This sample shows a &tricky; method.</test> @@ -1,5 +1,5 @@ <!DOCTYPE doc [ -<!ENTITY % YN '"Yes"' > -<!ENTITY WhatHeSaid "He said %YN;" > +<!ENTITY YN '"Yes"' > +<!ENTITY WhatHeSaid "He said &YN;" > ]> <doc>&WhatHeSaid;</doc> @@ -73,6 +73,7 @@ xmlSAXHandler emptySAXHandlerStruct = { NULL, /* xmlParserError */ NULL, /* xmlParserError */ NULL, /* getParameterEntity */ + NULL, /* cdataBlock; */ }; xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct; @@ -455,6 +456,21 @@ processingInstructionDebug(void *ctx, const xmlChar *target, } /** + * cdataBlockDebug: + * @ctx: the user data (XML parser context) + * @value: The pcdata content + * @len: the block length + * + * called when a pcdata block has been parsed + */ +void +cdataBlockDebug(void *ctx, const xmlChar *value, int len) +{ + fprintf(stderr, "SAX.pcdata(%.20s, %d)\n", + (char *) value, len); +} + +/** * commentDebug: * @ctxt: An XML parser context * @value: the comment content @@ -553,6 +569,7 @@ xmlSAXHandler debugSAXHandlerStruct = { errorDebug, fatalErrorDebug, getParameterEntityDebug, + cdataBlockDebug }; xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct; @@ -14,6 +14,8 @@ #include <stdio.h> #include <string.h> +#include <stdio.h> +#include <stdarg.h> #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> @@ -39,6 +41,7 @@ #include "xmlmemory.h" #include "parser.h" +#include "parserInternals.h" #include "HTMLparser.h" #include "HTMLtree.h" #include "tree.h" @@ -51,18 +54,252 @@ static int copy = 0; static int recovery = 0; static int noent = 0; static int noout = 0; +static int nowrap = 0; static int valid = 0; static int postvalid = 0; static int repeat = 0; static int insert = 0; static int compress = 0; static int html = 0; +static int htmlout = 0; static int shell = 0; static int push = 0; -static int blanks = 0; +static int noblanks = 0; extern int xmlDoValidityCheckingDefaultValue; +extern int xmlGetWarningsDefaultValue; + +/************************************************************************ + * * + * HTML ouput * + * * + ************************************************************************/ +char buffer[50000]; + +void +xmlHTMLEncodeSend(void) { + char *result; + + result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer); + if (result) { + fprintf(stderr, "%s", result); + xmlFree(result); + } + buffer[0] = 0; +} + +/** + * xmlHTMLPrintFileInfo: + * @input: an xmlParserInputPtr input + * + * Displays the associated file and line informations for the current input + */ + +void +xmlHTMLPrintFileInfo(xmlParserInputPtr input) { + fprintf(stderr, "<p>"); + if (input != NULL) { + if (input->filename) { + sprintf(&buffer[strlen(buffer)], "%s:%d: ", input->filename, + input->line); + } else { + sprintf(&buffer[strlen(buffer)], "Entity: line %d: ", input->line); + } + } + xmlHTMLEncodeSend(); +} + +/** + * xmlHTMLPrintFileContext: + * @input: an xmlParserInputPtr input + * + * Displays current context within the input content for error tracking + */ + +void +xmlHTMLPrintFileContext(xmlParserInputPtr input) { + const xmlChar *cur, *base; + int n; + + if (input == NULL) return; + fprintf(stderr, "<pre>\n"); + cur = input->cur; + base = input->base; + while ((cur > base) && ((*cur == '\n') || (*cur == '\r'))) { + cur--; + } + n = 0; + while ((n++ < 80) && (cur > base) && (*cur != '\n') && (*cur != '\r')) + cur--; + if ((*cur == '\n') || (*cur == '\r')) cur++; + base = cur; + n = 0; + while ((*cur != 0) && (*cur != '\n') && (*cur != '\r') && (n < 79)) { + sprintf(&buffer[strlen(buffer)], "%c", (unsigned char) *cur++); + n++; + } + sprintf(&buffer[strlen(buffer)], "\n"); + cur = input->cur; + while ((*cur == '\n') || (*cur == '\r')) + cur--; + n = 0; + while ((cur != base) && (n++ < 80)) { + sprintf(&buffer[strlen(buffer)], " "); + base++; + } + sprintf(&buffer[strlen(buffer)],"^\n"); + xmlHTMLEncodeSend(); + fprintf(stderr, "</pre>"); +} + +/** + * xmlHTMLError: + * @ctx: an XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format an error messages, gives file, line, position and + * extra parameters. + */ +void +xmlHTMLError(void *ctx, const char *msg, ...) +{ + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; + xmlParserInputPtr input; + xmlParserInputPtr cur = NULL; + va_list args; + + buffer[0] = 0; + input = ctxt->input; + if ((input != NULL) && (input->filename == NULL) && (ctxt->inputNr > 1)) { + cur = input; + input = ctxt->inputTab[ctxt->inputNr - 2]; + } + + xmlHTMLPrintFileInfo(input); + + fprintf(stderr, "<b>error</b>: "); + va_start(args, msg); + vsprintf(&buffer[strlen(buffer)], msg, args); + va_end(args); + xmlHTMLEncodeSend(); + fprintf(stderr, "</p>\n"); + + xmlHTMLPrintFileContext(input); + xmlHTMLEncodeSend(); +} + +/** + * xmlHTMLWarning: + * @ctx: an XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format a warning messages, gives file, line, position and + * extra parameters. + */ +void +xmlHTMLWarning(void *ctx, const char *msg, ...) +{ + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; + xmlParserInputPtr input; + xmlParserInputPtr cur = NULL; + va_list args; + + buffer[0] = 0; + input = ctxt->input; + if ((input != NULL) && (input->filename == NULL) && (ctxt->inputNr > 1)) { + cur = input; + input = ctxt->inputTab[ctxt->inputNr - 2]; + } + + + xmlHTMLPrintFileInfo(input); + + fprintf(stderr, "<b>warning</b>: "); + va_start(args, msg); + vsprintf(&buffer[strlen(buffer)], msg, args); + va_end(args); + xmlHTMLEncodeSend(); + fprintf(stderr, "</p>\n"); + + xmlHTMLPrintFileContext(input); + xmlHTMLEncodeSend(); +} + +/** + * xmlHTMLValidityError: + * @ctx: an XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format an validity error messages, gives file, + * line, position and extra parameters. + */ +void +xmlHTMLValidityError(void *ctx, const char *msg, ...) +{ + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; + xmlParserInputPtr input; + va_list args; + + buffer[0] = 0; + input = ctxt->input; + if ((input->filename == NULL) && (ctxt->inputNr > 1)) + input = ctxt->inputTab[ctxt->inputNr - 2]; + + xmlHTMLPrintFileInfo(input); + + fprintf(stderr, "<b>validity error</b>: "); + va_start(args, msg); + vsprintf(&buffer[strlen(buffer)], msg, args); + va_end(args); + xmlHTMLEncodeSend(); + fprintf(stderr, "</p>\n"); + + xmlHTMLPrintFileContext(input); + xmlHTMLEncodeSend(); +} + +/** + * xmlHTMLValidityWarning: + * @ctx: an XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format a validity warning messages, gives file, line, + * position and extra parameters. + */ +void +xmlHTMLValidityWarning(void *ctx, const char *msg, ...) +{ + xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; + xmlParserInputPtr input; + va_list args; + + buffer[0] = 0; + input = ctxt->input; + if ((input->filename == NULL) && (ctxt->inputNr > 1)) + input = ctxt->inputTab[ctxt->inputNr - 2]; + + xmlHTMLPrintFileInfo(input); + + fprintf(stderr, "<b>validity warning</b>: "); + va_start(args, msg); + vsprintf(&buffer[strlen(buffer)], msg, args); + va_end(args); + xmlHTMLEncodeSend(); + fprintf(stderr, "</p>\n"); + xmlHTMLPrintFileContext(input); + xmlHTMLEncodeSend(); +} + +/************************************************************************ + * * + * Shell Interface * + * * + ************************************************************************/ /** * xmlShellReadline: * @prompt: the prompt value @@ -97,6 +334,11 @@ xmlShellReadline(char *prompt) { #endif } +/************************************************************************ + * * + * Test processing * + * * + ************************************************************************/ void parseAndPrintFile(char *filename) { xmlDocPtr doc = NULL, tmp; @@ -129,9 +371,40 @@ void parseAndPrintFile(char *filename) { xmlFreeParserCtxt(ctxt); } } - } else if (recovery) + } else if (recovery) { doc = xmlRecoverFile(filename); - else + } else if (htmlout) { + int ret; + xmlParserCtxtPtr ctxt; + xmlSAXHandler silent, *old; + + ctxt = xmlCreateFileParserCtxt(filename); + memcpy(&silent, ctxt->sax, sizeof(silent)); + old = ctxt->sax; + silent.error = xmlHTMLError; + if (xmlGetWarningsDefaultValue) + silent.warning = xmlHTMLWarning; + else + silent.warning = NULL; + silent.fatalError = xmlHTMLError; + ctxt->sax = &silent; + ctxt->vctxt.error = xmlHTMLValidityError; + if (xmlGetWarningsDefaultValue) + ctxt->vctxt.warning = xmlHTMLValidityWarning; + else + ctxt->vctxt.warning = NULL; + + xmlParseDocument(ctxt); + + ret = ctxt->wellFormed; + doc = ctxt->myDoc; + ctxt->sax = old; + xmlFreeParserCtxt(ctxt); + if (!ret) { + xmlFreeDoc(doc); + doc = NULL; + } + } else doc = xmlParseFile(filename); } @@ -155,8 +428,8 @@ void parseAndPrintFile(char *filename) { int nb, i; xmlNodePtr node; - if (doc->root != NULL) { - node = doc->root; + if (doc->children != NULL) { + node = doc->children; while ((node != NULL) && (node->last == NULL)) node = node->next; if (node != NULL) { nb = xmlValidGetValidElements(node->last, NULL, list, 256); @@ -224,6 +497,12 @@ int main(int argc, char **argv) { else if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout"))) noout++; + else if ((!strcmp(argv[i], "-htmlout")) || + (!strcmp(argv[i], "--htmlout"))) + htmlout++; + else if ((!strcmp(argv[i], "-nowrap")) || + (!strcmp(argv[i], "--nowrap"))) + nowrap++; else if ((!strcmp(argv[i], "-valid")) || (!strcmp(argv[i], "--valid"))) valid++; @@ -244,15 +523,19 @@ int main(int argc, char **argv) { compress++; xmlSetCompressMode(9); } - else if ((!strcmp(argv[i], "-blanks")) || - (!strcmp(argv[i], "--blanks"))) { - blanks++; - xmlKeepBlanksDefault(1); - } else if ((!strcmp(argv[i], "-html")) || (!strcmp(argv[i], "--html"))) { html++; } + else if ((!strcmp(argv[i], "-nowarning")) || + (!strcmp(argv[i], "--nowarning"))) { + xmlGetWarningsDefaultValue = 0; + } + else if ((!strcmp(argv[i], "-noblanks")) || + (!strcmp(argv[i], "--noblanks"))) { + noblanks++; + xmlKeepBlanksDefault(0); + } else if ((!strcmp(argv[i], "-shell")) || (!strcmp(argv[i], "--shell"))) { shell++; @@ -261,6 +544,17 @@ int main(int argc, char **argv) { } if (noent != 0) xmlSubstituteEntitiesDefault(1); if (valid != 0) xmlDoValidityCheckingDefaultValue = 1; + if ((htmlout) && (!nowrap)) { + fprintf(stderr, + "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\n"); + fprintf(stderr, "\t\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n"); + fprintf(stderr, + "<html><head><title>%s output</title></head>\n", + argv[0]); + fprintf(stderr, + "<body bgcolor=\"#ffffff\"><h1 align=\"center\">%s output</h1>\n", + argv[0]); + } for (i = 1; i < argc ; i++) { if (argv[i][0] != '-') { if (repeat) { @@ -271,8 +565,11 @@ int main(int argc, char **argv) { files ++; } } + if ((htmlout) && (!nowrap)) { + fprintf(stderr, "</body></html>\n"); + } if (files == 0) { - printf("Usage : %s [--debug] [--shell] [--debugent] [--copy] [--recover] [--noent] [--noout] [--valid] [--repeat] XMLfiles ...\n", + printf("Usage : %s [--debug] [--debugent] [--copy] [--recover] [--noent] [--noout] [--valid] [--repeat] XMLfiles ...\n", argv[0]); printf("\tParse the XML files and output the result of the parsing\n"); printf("\t--debug : dump a debug tree of the in-memory document\n"); @@ -281,6 +578,8 @@ int main(int argc, char **argv) { printf("\t--recover : output what was parsable on broken XML documents\n"); printf("\t--noent : substitute entity references by their value\n"); printf("\t--noout : don't output the result tree\n"); + printf("\t--htmlout : output results as HTML\n"); + printf("\t--nowarp : do not put HTML doc wrapper\n"); printf("\t--valid : validate the document in addition to std well-formed check\n"); printf("\t--postvalid : do a posteriori validation, i.e after parsing\n"); printf("\t--repeat : repeat 100 times, for timing or profiling\n"); @@ -288,8 +587,9 @@ int main(int argc, char **argv) { printf("\t--compress : turn on gzip compression of output\n"); printf("\t--html : use the HTML parser\n"); printf("\t--shell : run a navigating shell\n"); - printf("\t--blanks : keep blank text node\n"); printf("\t--push : use the push mode of the parser\n"); + printf("\t--nowarning : do not emit warnings from parser/validator\n"); + printf("\t--noblanks : drop (ignorable?) blanks spaces\n"); } xmlCleanupParser(); xmlMemoryDump(); @@ -32,20 +32,20 @@ #include "valid.h" static xmlChar xmlStringText[] = { 't', 'e', 'x', 't', 0 }; +static xmlChar xmlStringComment[] = { 'c', 'o', 'm', 'm', 'e', 'n', 't', 0 }; int oldXMLWDcompatibility = 0; -int xmlIndentTreeOutput = 1; +int xmlIndentTreeOutput = 0; xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT; static int xmlCompressMode = 0; static int xmlCheckDTD = 1; int xmlSaveNoEmptyTags = 0; -extern int xmlKeepBlanksDefaultValue; #define IS_BLANK(c) \ (((c) == '\n') || ((c) == '\r') || ((c) == '\t') || ((c) == ' ')) #define UPDATE_LAST_CHILD(n) if ((n) != NULL) { \ - xmlNodePtr ulccur = (n)->childs; \ + xmlNodePtr ulccur = (n)->children; \ if (ulccur == NULL) { \ (n)->last = NULL; \ } else { \ @@ -102,7 +102,7 @@ xmlUpgradeOldNs(xmlDocPtr doc) { xmlNsPtr cur; if ((doc == NULL) || (doc->oldNs == NULL)) return; - if (doc->root == NULL) { + if (doc->children == NULL) { #ifdef DEBUG_TREE fprintf(stderr, "xmlUpgradeOldNs: failed no root !\n"); #endif @@ -115,8 +115,8 @@ xmlUpgradeOldNs(xmlDocPtr doc) { cur = cur->next; } cur->type = XML_LOCAL_NAMESPACE; - cur->next = doc->root->nsDef; - doc->root->nsDef = doc->oldNs; + cur->next = doc->children->nsDef; + doc->children->nsDef = doc->oldNs; doc->oldNs = NULL; } @@ -143,29 +143,25 @@ xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix) { } /* - * Allocate a new DTD and fill the fields. + * Allocate a new Namespace and fill the fields. */ cur = (xmlNsPtr) xmlMalloc(sizeof(xmlNs)); if (cur == NULL) { fprintf(stderr, "xmlNewNs : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlNs)); cur->type = XML_LOCAL_NAMESPACE; + if (href != NULL) cur->href = xmlStrdup(href); - else - cur->href = NULL; if (prefix != NULL) cur->prefix = xmlStrdup(prefix); - else - cur->prefix = NULL; /* * Add it at the end to preserve parsing order ... * and checks for existing use of the prefix */ - cur->next = NULL; if (node != NULL) { if (node->nsDef == NULL) { node->nsDef = cur; @@ -221,21 +217,17 @@ xmlNewGlobalNs(xmlDocPtr doc, const xmlChar *href, const xmlChar *prefix) { fprintf(stderr, "xmlNewGlobalNs : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlNs)); cur->type = XML_GLOBAL_NAMESPACE; + if (href != NULL) cur->href = xmlStrdup(href); - else - cur->href = NULL; if (prefix != NULL) cur->prefix = xmlStrdup(prefix); - else - cur->prefix = NULL; /* * Add it at the end to preserve parsing order ... */ - cur->next = NULL; if (doc != NULL) { if (doc->oldNs == NULL) { doc->oldNs = cur; @@ -262,7 +254,7 @@ xmlSetNs(xmlNodePtr node, xmlNsPtr ns) { if (node == NULL) { #ifdef DEBUG_TREE fprintf(stderr, "xmlSetNs: node == NULL\n"); -#else +#endif return; } node->ns = ns; @@ -317,7 +309,9 @@ xmlFreeNsList(xmlNsPtr cur) { * @ExternalID: the external ID * @SystemID: the system ID * - * Creation of a new DTD. + * Creation of a new DTD for the external subset. To create an + * internal subset, use xmlCreateIntSubset(). + * * Returns a pointer to the new DTD structure */ xmlDtdPtr @@ -342,30 +336,46 @@ xmlNewDtd(xmlDocPtr doc, const xmlChar *name, fprintf(stderr, "xmlNewDtd : malloc failed\n"); return(NULL); } + memset(cur, 0 , sizeof(xmlDtd)); + cur->type = XML_DTD_NODE; if (name != NULL) cur->name = xmlStrdup(name); - else - cur->name = NULL; if (ExternalID != NULL) cur->ExternalID = xmlStrdup(ExternalID); - else - cur->ExternalID = NULL; if (SystemID != NULL) cur->SystemID = xmlStrdup(SystemID); - else - cur->SystemID = NULL; - cur->notations = NULL; - cur->elements = NULL; - cur->attributes = NULL; - cur->entities = NULL; if (doc != NULL) doc->extSubset = cur; + cur->doc = doc; return(cur); } /** + * xmlGetIntSubset: + * @doc: the document pointer + * + * Get the internal subset of a document + * Returns a pointer to the DTD structure or NULL if not found + */ + +xmlDtdPtr +xmlGetIntSubset(xmlDocPtr doc) { + xmlNodePtr cur; + + if (doc == NULL) + return(NULL); + cur = doc->children; + while (cur != NULL) { + if (cur->type == XML_DTD_NODE) + return((xmlDtdPtr) cur); + cur = cur->next; + } + return((xmlDtdPtr) doc->intSubset); +} + +/** * xmlCreateIntSubset: * @doc: the document pointer * @name: the DTD name @@ -380,7 +390,7 @@ xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { xmlDtdPtr cur; - if ((doc != NULL) && (doc->intSubset != NULL)) { + if ((doc != NULL) && (xmlGetIntSubset(doc) != NULL)) { #ifdef DEBUG_TREE fprintf(stderr, "xmlCreateIntSubset(): document %s already have an internal subset\n", @@ -397,26 +407,31 @@ xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name, fprintf(stderr, "xmlNewDtd : malloc failed\n"); return(NULL); } + memset(cur, 0, sizeof(xmlDtd)); + cur->type = XML_DTD_NODE; if (name != NULL) cur->name = xmlStrdup(name); - else - cur->name = NULL; if (ExternalID != NULL) cur->ExternalID = xmlStrdup(ExternalID); - else - cur->ExternalID = NULL; if (SystemID != NULL) cur->SystemID = xmlStrdup(SystemID); - else - cur->SystemID = NULL; - cur->notations = NULL; - cur->elements = NULL; - cur->attributes = NULL; - cur->entities = NULL; - if (doc != NULL) + if (doc != NULL) { doc->intSubset = cur; + cur->parent = doc; + cur->doc = doc; + if (doc->children == NULL) { + doc->children = (xmlNodePtr) cur; + doc->last = (xmlNodePtr) cur; + } else { + xmlNodePtr prev; + prev = doc->last; + prev->next = (xmlNodePtr) cur; + cur->prev = prev; + doc->last = (xmlNodePtr) cur; + } + } return(cur); } @@ -434,17 +449,36 @@ xmlFreeDtd(xmlDtdPtr cur) { #endif return; } + if (cur->children != NULL) { + xmlNodePtr next, c = cur->children; + + /* + * Cleanup all the DTD comments they are not in the Dtd + * indexes. + */ + while (c != NULL) { + next = c->next; + if (c->type == XML_COMMENT_NODE) { + xmlUnlinkNode(c); + xmlFreeNode(c); + } + c = next; + } + } if (cur->name != NULL) xmlFree((char *) cur->name); if (cur->SystemID != NULL) xmlFree((char *) cur->SystemID); if (cur->ExternalID != NULL) xmlFree((char *) cur->ExternalID); + /* TODO !!! */ if (cur->notations != NULL) xmlFreeNotationTable((xmlNotationTablePtr) cur->notations); + if (cur->elements != NULL) xmlFreeElementTable((xmlElementTablePtr) cur->elements); if (cur->attributes != NULL) xmlFreeAttributeTable((xmlAttributeTablePtr) cur->attributes); if (cur->entities != NULL) xmlFreeEntitiesTable((xmlEntitiesTablePtr) cur->entities); + memset(cur, -1, sizeof(xmlDtd)); xmlFree(cur); } @@ -474,23 +508,13 @@ xmlNewDoc(const xmlChar *version) { fprintf(stderr, "xmlNewDoc : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlDoc)); cur->type = XML_DOCUMENT_NODE; + cur->version = xmlStrdup(version); - cur->name = NULL; - cur->root = NULL; - cur->intSubset = NULL; - cur->extSubset = NULL; - cur->oldNs = NULL; - cur->encoding = NULL; cur->standalone = -1; cur->compression = -1; /* not initialized */ - cur->ids = NULL; - cur->refs = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif + cur->doc = cur; return(cur); } @@ -512,12 +536,13 @@ xmlFreeDoc(xmlDocPtr cur) { if (cur->version != NULL) xmlFree((char *) cur->version); if (cur->name != NULL) xmlFree((char *) cur->name); if (cur->encoding != NULL) xmlFree((char *) cur->encoding); - if (cur->root != NULL) xmlFreeNodeList(cur->root); + if (cur->children != NULL) xmlFreeNodeList(cur->children); if (cur->intSubset != NULL) xmlFreeDtd(cur->intSubset); if (cur->extSubset != NULL) xmlFreeDtd(cur->extSubset); if (cur->oldNs != NULL) xmlFreeNsList(cur->oldNs); if (cur->ids != NULL) xmlFreeIDTable((xmlIDTablePtr) cur->ids); if (cur->refs != NULL) xmlFreeRefTable((xmlRefTablePtr) cur->refs); + if (cur->URL != NULL) xmlFree((char *) cur->URL); memset(cur, -1, sizeof(xmlDoc)); xmlFree(cur); } @@ -584,7 +609,7 @@ xmlStringLenGetNodeList(xmlDocPtr doc, const xmlChar *value, int len) { val = xmlStrndup(q, cur - q); ent = xmlGetDocEntity(doc, val); if ((ent != NULL) && - (ent->type == XML_INTERNAL_PREDEFINED_ENTITY)) { + (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { if (last == NULL) { node = xmlNewDocText(doc, ent->content); last = ret = node; @@ -697,7 +722,7 @@ xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value) { val = xmlStrndup(q, cur - q); ent = xmlGetDocEntity(doc, val); if ((ent != NULL) && - (ent->type == XML_INTERNAL_PREDEFINED_ENTITY)) { + (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { if (last == NULL) { node = xmlNewDocText(doc, ent->content); last = ret = node; @@ -849,28 +874,30 @@ xmlNewProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) { fprintf(stderr, "xmlNewProp : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlAttr)); cur->type = XML_ATTRIBUTE_NODE; - cur->node = node; - cur->ns = NULL; + + cur->parent = node; cur->name = xmlStrdup(name); if (value != NULL) { xmlChar *buffer; + xmlNodePtr tmp; + buffer = xmlEncodeEntitiesReentrant(node->doc, value); - cur->val = xmlStringGetNodeList(node->doc, buffer); + cur->children = xmlStringGetNodeList(node->doc, buffer); + tmp = cur->children; + while (tmp != NULL) { + tmp->parent = (xmlNodePtr) cur; + if (tmp->next == NULL) + cur->last = tmp; + tmp = tmp->next; + } xmlFree(buffer); } - else - cur->val = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif /* * Add it at the end to preserve parsing order ... */ - cur->next = NULL; if (node != NULL) { if (node->properties == NULL) { node->properties = cur; @@ -879,12 +906,9 @@ xmlNewProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) { while (prev->next != NULL) prev = prev->next; prev->next = cur; + cur->prev = prev; } } -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif return(cur); } @@ -918,24 +942,33 @@ xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name, fprintf(stderr, "xmlNewProp : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlAttr)); cur->type = XML_ATTRIBUTE_NODE; - cur->node = node; + + cur->parent = node; + if (node != NULL) + cur->doc = node->doc; cur->ns = ns; cur->name = xmlStrdup(name); - if (value != NULL) - cur->val = xmlStringGetNodeList(node->doc, value); - else - cur->val = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif + if (value != NULL) { + xmlChar *buffer; + xmlNodePtr tmp; + + buffer = xmlEncodeEntitiesReentrant(node->doc, value); + cur->children = xmlStringGetNodeList(node->doc, buffer); + tmp = cur->children; + while (tmp != NULL) { + tmp->parent = (xmlNodePtr) cur; + if (tmp->next == NULL) + cur->last = tmp; + tmp = tmp->next; + } + xmlFree(buffer); + } /* * Add it at the end to preserve parsing order ... */ - cur->next = NULL; if (node != NULL) { if (node->properties == NULL) { node->properties = cur; @@ -944,6 +977,7 @@ xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name, while (prev->next != NULL) prev = prev->next; prev->next = cur; + cur->prev = prev; } } return(cur); @@ -977,20 +1011,13 @@ xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value) { fprintf(stderr, "xmlNewProp : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlAttr)); cur->type = XML_ATTRIBUTE_NODE; - cur->node = NULL; + cur->name = xmlStrdup(name); + cur->doc = doc; if (value != NULL) - cur->val = xmlStringGetNodeList(doc, value); - else - cur->val = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif - - cur->next = NULL; + cur->children = xmlStringGetNodeList(doc, value); return(cur); } @@ -998,7 +1025,7 @@ xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value) { * xmlFreePropList: * @cur: the first property in the list * - * Free a property and all its siblings, all the childs are freed too. + * Free a property and all its siblings, all the children are freed too. */ void xmlFreePropList(xmlAttrPtr cur) { @@ -1031,11 +1058,11 @@ xmlFreeProp(xmlAttrPtr cur) { return; } /* Check for ID removal -> leading to invalid references ! */ - if ((cur->node != NULL) && - (xmlIsID(cur->node->doc, cur->node, cur))) - xmlRemoveID(cur->node->doc, cur); + if ((cur->parent != NULL) && + (xmlIsID(cur->parent->doc, cur->parent, cur))) + xmlRemoveID(cur->parent->doc, cur); if (cur->name != NULL) xmlFree((char *) cur->name); - if (cur->val != NULL) xmlFreeNodeList(cur->val); + if (cur->children != NULL) xmlFreeNodeList(cur->children); memset(cur, -1, sizeof(xmlAttr)); xmlFree(cur); } @@ -1058,20 +1085,23 @@ xmlRemoveProp(xmlAttrPtr cur) { #endif return(-1); } - if (cur->node == NULL) { - fprintf(stderr, "xmlRemoveProp : cur->node == NULL\n"); + if (cur->parent == NULL) { +#ifdef DEBUG_TREE + fprintf(stderr, "xmlRemoveProp : cur->parent == NULL\n"); #endif return(-1); } - tmp = cur->node->properties; + tmp = cur->parent->properties; if (tmp == cur) { - cur->node->properties = cur->next; + cur->parent->properties = cur->next; xmlFreeProp(cur); return(0); } while (tmp != NULL) { if (tmp->next == cur) { tmp->next = cur->next; + if (tmp->next != NULL) + tmp->next->prev = tmp; xmlFreeProp(cur); return(0); } @@ -1110,18 +1140,10 @@ xmlNewPI(const xmlChar *name, const xmlChar *content) { fprintf(stderr, "xmlNewPI : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlNode)); cur->type = XML_PI_NODE; - cur->doc = NULL; - cur->parent = NULL; - cur->next = NULL; - cur->prev = NULL; - cur->childs = NULL; - cur->last = NULL; - cur->properties = NULL; + cur->name = xmlStrdup(name); - cur->ns = NULL; - cur->nsDef = NULL; if (content != NULL) { #ifndef XML_USE_BUFFER_CONTENT cur->content = xmlStrdup(content); @@ -1131,12 +1153,7 @@ xmlNewPI(const xmlChar *name, const xmlChar *content) { xmlGetBufferAllocationScheme()); xmlBufferAdd(cur->content, content, -1); #endif - } else - cur->content = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif + } return(cur); } @@ -1169,23 +1186,11 @@ xmlNewNode(xmlNsPtr ns, const xmlChar *name) { fprintf(stderr, "xmlNewNode : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlNode)); cur->type = XML_ELEMENT_NODE; - cur->doc = NULL; - cur->parent = NULL; - cur->next = NULL; - cur->prev = NULL; - cur->childs = NULL; - cur->last = NULL; - cur->properties = NULL; + cur->name = xmlStrdup(name); cur->ns = ns; - cur->nsDef = NULL; - cur->content = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif return(cur); } @@ -1214,7 +1219,7 @@ xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns, if (cur != NULL) { cur->doc = doc; if (content != NULL) { - cur->childs = xmlStringGetNodeList(doc, content); + cur->children = xmlStringGetNodeList(doc, content); UPDATE_LAST_CHILD(cur) } } @@ -1243,7 +1248,7 @@ xmlNewDocRawNode(xmlDocPtr doc, xmlNsPtr ns, if (cur != NULL) { cur->doc = doc; if (content != NULL) { - cur->childs = xmlNewDocText(doc, content); + cur->children = xmlNewDocText(doc, content); UPDATE_LAST_CHILD(cur) } } @@ -1269,23 +1274,10 @@ xmlNewDocFragment(xmlDocPtr doc) { fprintf(stderr, "xmlNewDocFragment : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlNode)); cur->type = XML_DOCUMENT_FRAG_NODE; + cur->doc = doc; - cur->parent = NULL; - cur->next = NULL; - cur->prev = NULL; - cur->childs = NULL; - cur->last = NULL; - cur->properties = NULL; - cur->name = NULL; - cur->ns = NULL; - cur->nsDef = NULL; - cur->content = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif return(cur); } @@ -1308,19 +1300,10 @@ xmlNewText(const xmlChar *content) { fprintf(stderr, "xmlNewText : malloc failed\n"); return(NULL); } - - cur->type = XML_TEXT_NODE; - cur->doc = NULL; - cur->parent = NULL; - cur->next = NULL; - cur->prev = NULL; - cur->childs = NULL; - cur->last = NULL; - cur->properties = NULL; + memset(cur, 0, sizeof(xmlNode)); cur->type = XML_TEXT_NODE; + cur->name = xmlStrdup(xmlStringText); - cur->ns = NULL; - cur->nsDef = NULL; if (content != NULL) { #ifndef XML_USE_BUFFER_CONTENT cur->content = xmlStrdup(content); @@ -1330,12 +1313,7 @@ xmlNewText(const xmlChar *content) { xmlGetBufferAllocationScheme()); xmlBufferAdd(cur->content, content, -1); #endif - } else - cur->content = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif + } return(cur); } @@ -1346,7 +1324,7 @@ xmlNewText(const xmlChar *content) { * @name: the name of the child * @content: the text content of the child if any. * - * Creation of a new child element, added at the end of @parent childs list. + * Creation of a new child element, added at the end of @parent children list. * @ns and @content parameters are optionnal (NULL). If content is non NULL, * a child TEXT node will be created containing the string content. * @@ -1381,13 +1359,13 @@ xmlNewTextChild(xmlNodePtr parent, xmlNsPtr ns, if (cur == NULL) return(NULL); /* - * add the new element at the end of the childs list. + * add the new element at the end of the children list. */ cur->type = XML_ELEMENT_NODE; cur->parent = parent; cur->doc = parent->doc; - if (parent->childs == NULL) { - parent->childs = cur; + if (parent->children == NULL) { + parent->children = cur; parent->last = cur; } else { prev = parent->last; @@ -1400,6 +1378,43 @@ xmlNewTextChild(xmlNodePtr parent, xmlNsPtr ns, } /** + * xmlNewCharRef: + * @doc: the document + * @name: the char ref string, starting with # or "&# ... ;" + * + * Creation of a new character reference node. + * Returns a pointer to the new node object. + */ +xmlNodePtr +xmlNewCharRef(xmlDocPtr doc, const xmlChar *name) { + xmlNodePtr cur; + + /* + * Allocate a new node and fill the fields. + */ + cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode)); + if (cur == NULL) { + fprintf(stderr, "xmlNewText : malloc failed\n"); + return(NULL); + } + memset(cur, 0, sizeof(xmlNode)); + cur->type = XML_ENTITY_REF_NODE; + + cur->doc = doc; + if (name[0] == '&') { + int len; + name++; + len = xmlStrlen(name); + if (name[len - 1] == ';') + cur->name = xmlStrndup(name, len - 1); + else + cur->name = xmlStrndup(name, len); + } else + cur->name = xmlStrdup(name); + return(cur); +} + +/** * xmlNewReference: * @doc: the document * @name: the reference name, or the reference string with & and ; @@ -1420,15 +1435,10 @@ xmlNewReference(xmlDocPtr doc, const xmlChar *name) { fprintf(stderr, "xmlNewText : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlNode)); cur->type = XML_ENTITY_REF_NODE; + cur->doc = doc; - cur->parent = NULL; - cur->next = NULL; - cur->prev = NULL; - cur->childs = NULL; - cur->last = NULL; - cur->properties = NULL; if (name[0] == '&') { int len; name++; @@ -1439,8 +1449,6 @@ xmlNewReference(xmlDocPtr doc, const xmlChar *name) { cur->name = xmlStrndup(name, len); } else cur->name = xmlStrdup(name); - cur->ns = NULL; - cur->nsDef = NULL; ent = xmlGetDocEntity(doc, cur->name); if (ent != NULL) { @@ -1458,12 +1466,8 @@ xmlNewReference(xmlDocPtr doc, const xmlChar *name) { if (ent->content != NULL) xmlBufferAdd(cur->content, ent->content, -1); #endif - } else - cur->content = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif + cur->children = (xmlNodePtr) ent; + } return(cur); } @@ -1504,19 +1508,10 @@ xmlNewTextLen(const xmlChar *content, int len) { fprintf(stderr, "xmlNewText : malloc failed\n"); return(NULL); } - - cur->type = XML_TEXT_NODE; - cur->doc = NULL; - cur->parent = NULL; - cur->prev = NULL; - cur->next = NULL; - cur->childs = NULL; - cur->last = NULL; - cur->properties = NULL; + memset(cur, 0, sizeof(xmlNode)); cur->type = XML_TEXT_NODE; + cur->name = xmlStrdup(xmlStringText); - cur->ns = NULL; - cur->nsDef = NULL; if (content != NULL) { #ifndef XML_USE_BUFFER_CONTENT cur->content = xmlStrndup(content, len); @@ -1526,12 +1521,7 @@ xmlNewTextLen(const xmlChar *content, int len) { xmlGetBufferAllocationScheme()); xmlBufferAdd(cur->content, content, len); #endif - } else - cur->content = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif + } return(cur); } @@ -1573,19 +1563,10 @@ xmlNewComment(const xmlChar *content) { fprintf(stderr, "xmlNewComment : malloc failed\n"); return(NULL); } - - cur->type = XML_COMMENT_NODE; - cur->doc = NULL; - cur->parent = NULL; - cur->prev = NULL; - cur->next = NULL; - cur->childs = NULL; - cur->last = NULL; - cur->properties = NULL; + memset(cur, 0, sizeof(xmlNode)); cur->type = XML_COMMENT_NODE; - cur->name = xmlStrdup(xmlStringText); - cur->ns = NULL; - cur->nsDef = NULL; + + cur->name = xmlStrdup(xmlStringComment); if (content != NULL) { #ifndef XML_USE_BUFFER_CONTENT cur->content = xmlStrdup(content); @@ -1595,12 +1576,7 @@ xmlNewComment(const xmlChar *content) { xmlGetBufferAllocationScheme()); xmlBufferAdd(cur->content, content, -1); #endif - } else - cur->content = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif + } return(cur); } @@ -1625,18 +1601,9 @@ xmlNewCDataBlock(xmlDocPtr doc, const xmlChar *content, int len) { fprintf(stderr, "xmlNewCDataBlock : malloc failed\n"); return(NULL); } - + memset(cur, 0, sizeof(xmlNode)); cur->type = XML_CDATA_SECTION_NODE; - cur->doc = NULL; - cur->parent = NULL; - cur->prev = NULL; - cur->next = NULL; - cur->childs = NULL; - cur->last = NULL; - cur->properties = NULL; - cur->name = xmlStrdup(xmlStringText); - cur->ns = NULL; - cur->nsDef = NULL; + if (content != NULL) { #ifndef XML_USE_BUFFER_CONTENT cur->content = xmlStrndup(content, len); @@ -1646,12 +1613,7 @@ xmlNewCDataBlock(xmlDocPtr doc, const xmlChar *content, int len) { xmlGetBufferAllocationScheme()); xmlBufferAdd(cur->content, content, len); #endif - } else - cur->content = NULL; -#ifndef XML_WITHOUT_CORBA - cur->_private = NULL; - cur->vepv = NULL; -#endif + } return(cur); } @@ -1680,7 +1642,7 @@ xmlNewDocComment(xmlDocPtr doc, const xmlChar *content) { * @name: the name of the child * @content: the XML content of the child if any. * - * Creation of a new child element, added at the end of @parent childs list. + * Creation of a new child element, added at the end of @parent children list. * @ns and @content parameters are optionnal (NULL). If content is non NULL, * a child list containing the TEXTs and ENTITY_REFs node will be created. * NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities @@ -1719,13 +1681,13 @@ xmlNewChild(xmlNodePtr parent, xmlNsPtr ns, if (cur == NULL) return(NULL); /* - * add the new element at the end of the childs list. + * add the new element at the end of the children list. */ cur->type = XML_ELEMENT_NODE; cur->parent = parent; cur->doc = parent->doc; - if (parent->childs == NULL) { - parent->childs = cur; + if (parent->children == NULL) { + parent->children = cur; parent->last = cur; } else { prev = parent->last; @@ -1771,8 +1733,8 @@ xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) { cur->prev = elem; if (elem->prev != NULL) elem->prev->next = elem; - if ((elem->parent != NULL) && (elem->parent->childs == cur)) - elem->parent->childs = elem; + if ((elem->parent != NULL) && (elem->parent->children == cur)) + elem->parent->children = elem; return(elem); } @@ -1849,7 +1811,7 @@ xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) { * the last sibling. */ if ((cur->parent != NULL) && - (cur->parent->childs != NULL) && + (cur->parent->children != NULL) && (cur->parent->last != NULL) && (cur->parent->last->next == NULL)) { cur = cur->parent->last; @@ -1906,7 +1868,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { } /* - * add the new element at the end of the childs list. + * add the new element at the end of the children list. */ cur->parent = parent; cur->doc = parent->doc; /* the parent may not be linked to a doc ! */ @@ -1915,7 +1877,8 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { * Handle the case where parent->content != NULL, in that case it will * create a intermediate TEXT node. */ - if (parent->content != NULL) { + if (((parent->type == XML_ELEMENT_NODE) || (parent->type == XML_TEXT_NODE)) && + (parent->content != NULL)) { xmlNodePtr text; #ifndef XML_USE_BUFFER_CONTENT @@ -1924,10 +1887,10 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { text = xmlNewDocText(parent->doc, xmlBufferContent(parent->content)); #endif if (text != NULL) { - text->next = parent->childs; + text->next = parent->children; if (text->next != NULL) text->next->prev = text; - parent->childs = text; + parent->children = text; UPDATE_LAST_CHILD(parent) #ifndef XML_USE_BUFFER_CONTENT xmlFree(parent->content); @@ -1937,8 +1900,8 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { parent->content = NULL; } } - if (parent->childs == NULL) { - parent->childs = cur; + if (parent->children == NULL) { + parent->children = cur; parent->last = cur; } else { prev = parent->last; @@ -1973,7 +1936,7 @@ xmlGetLastChild(xmlNodePtr parent) { * @cur: the first node in the list * * Free a node and all its siblings, this is a recursive behaviour, all - * the childs are freed too. + * the children are freed too. */ void xmlFreeNodeList(xmlNodePtr cur) { @@ -1995,7 +1958,8 @@ xmlFreeNodeList(xmlNodePtr cur) { * xmlFreeNode: * @cur: the node * - * Free a node, this is a recursive behaviour, all the childs are freed too. + * Free a node, this is a recursive behaviour, all the children are freed too. + * This doesn't unlink the child from the list, use xmlUnlinkNode() first. */ void xmlFreeNode(xmlNodePtr cur) { @@ -2005,11 +1969,15 @@ xmlFreeNode(xmlNodePtr cur) { #endif return; } + if (cur->type == XML_DTD_NODE) + return; cur->doc = NULL; cur->parent = NULL; cur->next = NULL; cur->prev = NULL; - if (cur->childs != NULL) xmlFreeNodeList(cur->childs); + if ((cur->children != NULL) && + (cur->type != XML_ENTITY_REF_NODE)) + xmlFreeNodeList(cur->children); if (cur->properties != NULL) xmlFreePropList(cur->properties); if (cur->type != XML_ENTITY_REF_NODE) #ifndef XML_USE_BUFFER_CONTENT @@ -2037,8 +2005,8 @@ xmlUnlinkNode(xmlNodePtr cur) { #endif return; } - if ((cur->parent != NULL) && (cur->parent->childs == cur)) - cur->parent->childs = cur->next; + if ((cur->parent != NULL) && (cur->parent->children == cur)) + cur->parent->children = cur->next; if ((cur->parent != NULL) && (cur->parent->last == cur)) cur->parent->last = cur->prev; if (cur->next != NULL) @@ -2082,8 +2050,8 @@ xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) { if (cur->prev != NULL) cur->prev->next = cur; if (cur->parent != NULL) { - if (cur->parent->childs == old) - cur->parent->childs = cur; + if (cur->parent->children == old) + cur->parent->children = cur; if (cur->parent->last == old) cur->parent->last = cur; } @@ -2167,11 +2135,14 @@ xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) { xmlAttrPtr ret; if (cur == NULL) return(NULL); - if (cur->val != NULL) - ret = xmlNewDocProp(cur->val->doc, cur->name, NULL); + if (cur->parent != NULL) + ret = xmlNewDocProp(cur->parent->doc, cur->name, NULL); + else if (cur->children != NULL) + ret = xmlNewDocProp(cur->children->doc, cur->name, NULL); else ret = xmlNewDocProp(NULL, cur->name, NULL); if (ret == NULL) return(NULL); + ret->parent = target; if ((cur->ns != NULL) && (target != NULL)) { xmlNsPtr ns; @@ -2181,8 +2152,8 @@ xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) { } else ret->ns = NULL; - if (cur->val != NULL) - ret->val = xmlCopyNodeList(cur->val); + if (cur->children != NULL) + ret->children = xmlCopyNodeList(cur->children); return(ret); } @@ -2206,6 +2177,7 @@ xmlCopyPropList(xmlNodePtr target, xmlAttrPtr cur) { ret = p = q; } else { p->next = q; + q->prev = p; p = q; } cur = cur->next; @@ -2245,21 +2217,13 @@ xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, fprintf(stderr, "xmlStaticCopyNode : malloc failed\n"); return(NULL); } - + memset(ret, 0, sizeof(xmlNode)); ret->type = node->type; + ret->doc = doc; ret->parent = parent; - ret->next = NULL; - ret->prev = NULL; - ret->childs = NULL; - ret->last = NULL; - ret->properties = NULL; if (node->name != NULL) ret->name = xmlStrdup(node->name); - else - ret->name = NULL; - ret->ns = NULL; - ret->nsDef = NULL; if ((node->content != NULL) && (node->type != XML_ENTITY_REF_NODE)) { #ifndef XML_USE_BUFFER_CONTENT ret->content = xmlStrdup(node->content); @@ -2271,12 +2235,7 @@ xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, xmlBufferContent(node->content), xmlBufferLength(node->content)); #endif - } else - ret->content = NULL; -#ifndef XML_WITHOUT_CORBA - ret->_private = NULL; - ret->vepv = NULL; -#endif + } if (parent != NULL) xmlAddChild(parent, ret); @@ -2310,8 +2269,8 @@ xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent, } if (node->properties != NULL) ret->properties = xmlCopyPropList(ret, node->properties); - if (node->childs != NULL) - ret->childs = xmlStaticCopyNodeList(node->childs, doc, ret); + if (node->children != NULL) + ret->children = xmlStaticCopyNodeList(node->children, doc, ret); UPDATE_LAST_CHILD(ret) return(ret); } @@ -2390,8 +2349,8 @@ xmlCopyElement(xmlElementPtr elem) { if (elem->nsDef != NULL) ret->nsDef = xmlCopyNamespaceList(elem->nsDef); - if (elem->childs != NULL) - ret->childs = xmlCopyElementList(elem->childs); + if (elem->children != NULL) + ret->children = xmlCopyElementList(elem->children); return(ret); } */ @@ -2455,8 +2414,8 @@ xmlCopyDoc(xmlDocPtr doc, int recursive) { ret->intSubset = xmlCopyDtd(doc->intSubset); if (doc->oldNs != NULL) ret->oldNs = xmlCopyNamespaceList(doc->oldNs); - if (doc->root != NULL) - ret->root = xmlStaticCopyNodeList(doc->root, ret, NULL); + if (doc->children != NULL) + ret->children = xmlStaticCopyNodeList(doc->children, ret, NULL); return(ret); } @@ -2470,7 +2429,7 @@ xmlCopyDoc(xmlDocPtr doc, int recursive) { * xmlDocGetRootElement: * @doc: the document * - * Get the root element of the document (doc->root is a list + * Get the root element of the document (doc->children is a list * containing possibly comments, PIs, etc ...). * * Returns the xmlNodePtr for the root or NULL @@ -2480,7 +2439,7 @@ xmlDocGetRootElement(xmlDocPtr doc) { xmlNodePtr ret; if (doc == NULL) return(NULL); - ret = doc->root; + ret = doc->children; while (ret != NULL) { if (ret->type == XML_ELEMENT_NODE) return(ret); @@ -2494,7 +2453,7 @@ xmlDocGetRootElement(xmlDocPtr doc) { * @doc: the document * @root: the new document root element * - * Set the root element of the document (doc->root is a list + * Set the root element of the document (doc->children is a list * containing possibly comments, PIs, etc ...). * * Returns the old root element if any was found @@ -2504,17 +2463,17 @@ xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root) { xmlNodePtr old = NULL; if (doc == NULL) return(NULL); - old = doc->root; + old = doc->children; while (old != NULL) { if (old->type == XML_ELEMENT_NODE) break; old = old->next; } if (old == NULL) { - if (doc->root == NULL) { - doc->root = root; + if (doc->children == NULL) { + doc->children = root; } else { - xmlAddSibling(doc->root, root); + xmlAddSibling(doc->children, root); } } else { xmlReplaceNode(old, root); @@ -2542,6 +2501,10 @@ xmlNodeSetLang(xmlNodePtr cur, const xmlChar *lang) { case XML_DOCUMENT_FRAG_NODE: case XML_NOTATION_NODE: case XML_HTML_DOCUMENT_NODE: + case XML_DTD_NODE: + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: return; case XML_ELEMENT_NODE: case XML_ATTRIBUTE_NODE: @@ -2577,6 +2540,37 @@ xmlNodeGetLang(xmlNodePtr cur) { } /** + * xmlNodeGetSpacePreserve: + * @cur: the node being checked + * + * Searches the language of a node, i.e. the values of the xml:space + * attribute or the one carried by the nearest ancestor. + * + * Returns -1 if xml:space is not inheried, 0 if "default", 1 if "preserve" + */ +int +xmlNodeGetSpacePreserve(xmlNodePtr cur) { + xmlChar *space; + + while (cur != NULL) { + space = xmlGetProp(cur, BAD_CAST "xml:space"); + if (space != NULL) { + if (!xmlStrcmp(space, BAD_CAST "preserve")) { + xmlFree(space); + return(1); + } + if (!xmlStrcmp(space, BAD_CAST "default")) { + xmlFree(space); + return(0); + } + xmlFree(space); + } + cur = cur->parent; + } + return(-1); +} + +/** * xmlNodeSetName: * @cur: the node being changed * @name: the new tag name @@ -2592,7 +2586,6 @@ xmlNodeSetName(xmlNodePtr cur, const xmlChar *name) { case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_COMMENT_NODE: - case XML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_NOTATION_NODE: @@ -2603,6 +2596,11 @@ xmlNodeSetName(xmlNodePtr cur, const xmlChar *name) { case XML_PI_NODE: case XML_ENTITY_REF_NODE: case XML_ENTITY_NODE: + case XML_DTD_NODE: + case XML_DOCUMENT_NODE: + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: break; } if (cur->name != NULL) xmlFree((xmlChar *) cur->name); @@ -2628,7 +2626,7 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) { return(NULL); if (doc == NULL) doc = cur->doc; if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) { - cur = doc->root; + cur = doc->children; while ((cur != NULL) && (cur->name != NULL)) { if (cur->type != XML_ELEMENT_NODE) { cur = cur->next; @@ -2636,12 +2634,12 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) { } if ((!xmlStrcmp(cur->name, BAD_CAST "html")) || (!xmlStrcmp(cur->name, BAD_CAST "HTML"))) { - cur = cur->childs; + cur = cur->children; continue; } if ((!xmlStrcmp(cur->name, BAD_CAST "head")) || (!xmlStrcmp(cur->name, BAD_CAST "HEAD"))) { - cur = cur->childs; + cur = cur->children; continue; } if ((!xmlStrcmp(cur->name, BAD_CAST "base")) || @@ -2650,7 +2648,10 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) { if (base != NULL) return(base); return(xmlGetProp(cur, BAD_CAST "HREF")); } + cur = cur->next; } + if ((doc != NULL) && (doc->URL != NULL)) + return(xmlStrdup(doc->URL)); return(NULL); } while (cur != NULL) { @@ -2659,6 +2660,8 @@ xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur) { return(base); cur = cur->parent; } + if ((doc != NULL) && (doc->URL != NULL)) + return(xmlStrdup(doc->URL)); return(NULL); } @@ -2679,14 +2682,14 @@ xmlNodeGetContent(xmlNodePtr cur) { switch (cur->type) { case XML_DOCUMENT_FRAG_NODE: case XML_ELEMENT_NODE: - return(xmlNodeListGetString(cur->doc, cur->childs, 1)); + return(xmlNodeListGetString(cur->doc, cur->children, 1)); break; case XML_ATTRIBUTE_NODE: { xmlAttrPtr attr = (xmlAttrPtr) cur; - if (attr->node != NULL) - return(xmlNodeListGetString(attr->node->doc, attr->val, 1)); + if (attr->parent != NULL) + return(xmlNodeListGetString(attr->parent->doc, attr->children, 1)); else - return(xmlNodeListGetString(NULL, attr->val, 1)); + return(xmlNodeListGetString(NULL, attr->children, 1)); break; } case XML_COMMENT_NODE: @@ -2709,6 +2712,16 @@ xmlNodeGetContent(xmlNodePtr cur) { case XML_HTML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: case XML_NOTATION_NODE: + case XML_DTD_NODE: + return(NULL); + case XML_ELEMENT_DECL: + /* TODO !!! */ + return(NULL); + case XML_ATTRIBUTE_DECL: + /* TODO !!! */ + return(NULL); + case XML_ENTITY_DECL: + /* TODO !!! */ return(NULL); case XML_CDATA_SECTION_NODE: case XML_TEXT_NODE: @@ -2749,8 +2762,8 @@ xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) { #endif cur->content = NULL; } - if (cur->childs != NULL) xmlFreeNodeList(cur->childs); - cur->childs = xmlStringGetNodeList(cur->doc, content); + if (cur->children != NULL) xmlFreeNodeList(cur->children); + cur->children = xmlStringGetNodeList(cur->doc, content); UPDATE_LAST_CHILD(cur) break; case XML_ATTRIBUTE_NODE: @@ -2768,8 +2781,8 @@ xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) { xmlBufferFree(cur->content); #endif } - if (cur->childs != NULL) xmlFreeNodeList(cur->childs); - cur->last = cur->childs = NULL; + if (cur->children != NULL) xmlFreeNodeList(cur->children); + cur->last = cur->children = NULL; if (content != NULL) { #ifndef XML_USE_BUFFER_CONTENT cur->content = xmlStrdup(content); @@ -2788,6 +2801,17 @@ xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) { break; case XML_NOTATION_NODE: break; + case XML_DTD_NODE: + break; + case XML_ELEMENT_DECL: + /* TODO !!! */ + break; + case XML_ATTRIBUTE_DECL: + /* TODO !!! */ + break; + case XML_ENTITY_DECL: + /* TODO !!! */ + break; } } @@ -2818,8 +2842,8 @@ xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) { #endif cur->content = NULL; } - if (cur->childs != NULL) xmlFreeNodeList(cur->childs); - cur->childs = xmlStringLenGetNodeList(cur->doc, content, len); + if (cur->children != NULL) xmlFreeNodeList(cur->children); + cur->children = xmlStringLenGetNodeList(cur->doc, content, len); UPDATE_LAST_CHILD(cur) break; case XML_ATTRIBUTE_NODE: @@ -2838,8 +2862,8 @@ xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) { xmlBufferFree(cur->content); #endif } - if (cur->childs != NULL) xmlFreeNodeList(cur->childs); - cur->childs = cur->last = NULL; + if (cur->children != NULL) xmlFreeNodeList(cur->children); + cur->children = cur->last = NULL; if (content != NULL) { #ifndef XML_USE_BUFFER_CONTENT cur->content = xmlStrndup(content, len); @@ -2853,9 +2877,19 @@ xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) { cur->content = NULL; break; case XML_DOCUMENT_NODE: + case XML_DTD_NODE: case XML_HTML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: break; + case XML_ELEMENT_DECL: + /* TODO !!! */ + break; + case XML_ATTRIBUTE_DECL: + /* TODO !!! */ + break; + case XML_ENTITY_DECL: + /* TODO !!! */ + break; } } @@ -2881,14 +2915,14 @@ xmlNodeAddContentLen(xmlNodePtr cur, const xmlChar *content, int len) { case XML_ELEMENT_NODE: { xmlNodePtr last = NULL, new; - if (cur->childs != NULL) { + if (cur->children != NULL) { last = cur->last; } else { if (cur->content != NULL) { #ifndef XML_USE_BUFFER_CONTENT - cur->childs = xmlStringGetNodeList(cur->doc, cur->content); + cur->children = xmlStringGetNodeList(cur->doc, cur->content); #else - cur->childs = xmlStringGetNodeList(cur->doc, + cur->children = xmlStringGetNodeList(cur->doc, xmlBufferContent(cur->content)); #endif UPDATE_LAST_CHILD(cur) @@ -2927,9 +2961,14 @@ xmlNodeAddContentLen(xmlNodePtr cur, const xmlChar *content, int len) { #endif } case XML_DOCUMENT_NODE: + case XML_DTD_NODE: case XML_HTML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: break; + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: + break; } } @@ -3051,14 +3090,16 @@ xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace) { if (node == NULL) return(NULL); while (node != NULL) { - cur = node->nsDef; - while (cur != NULL) { - if ((cur->prefix == NULL) && (nameSpace == NULL)) - return(cur); - if ((cur->prefix != NULL) && (nameSpace != NULL) && - (!xmlStrcmp(cur->prefix, nameSpace))) - return(cur); - cur = cur->next; + if (node->type == XML_ELEMENT_NODE) { + cur = node->nsDef; + while (cur != NULL) { + if ((cur->prefix == NULL) && (nameSpace == NULL)) + return(cur); + if ((cur->prefix != NULL) && (nameSpace != NULL) && + (!xmlStrcmp(cur->prefix, nameSpace))) + return(cur); + cur = cur->next; + } } node = node->parent; } @@ -3329,9 +3370,9 @@ xmlReconciliateNs(xmlDocPtr doc, xmlNodePtr tree) { /* * Browse the full subtree, deep first */ - if (node->childs != NULL) { + if (node->children != NULL) { /* deep first */ - node = node->childs; + node = node->children; } else if ((node != tree) && (node->next != NULL)) { /* then siblings */ node = node->next; @@ -3384,7 +3425,7 @@ xmlGetProp(xmlNodePtr node, const xmlChar *name) { if (!xmlStrcmp(prop->name, name)) { xmlChar *ret; - ret = xmlNodeListGetString(node->doc, prop->val, 1); + ret = xmlNodeListGetString(node->doc, prop->children, 1); if (ret == NULL) return(xmlStrdup((xmlChar *)"")); return(ret); } @@ -3447,7 +3488,7 @@ xmlGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *namespace) { ((prop->ns != NULL) && (!xmlStrcmp(prop->ns->href, namespace))))) { xmlChar *ret; - ret = xmlNodeListGetString(node->doc, prop->val, 1); + ret = xmlNodeListGetString(node->doc, prop->children, 1); if (ret == NULL) return(xmlStrdup((xmlChar *)"")); return(ret); } @@ -3495,13 +3536,22 @@ xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) { while (prop != NULL) { if (!xmlStrcmp(prop->name, name)) { - if (prop->val != NULL) - xmlFreeNodeList(prop->val); - prop->val = NULL; + if (prop->children != NULL) + xmlFreeNodeList(prop->children); + prop->children = NULL; if (value != NULL) { xmlChar *buffer; + xmlNodePtr tmp; + buffer = xmlEncodeEntitiesReentrant(node->doc, value); - prop->val = xmlStringGetNodeList(node->doc, buffer); + prop->children = xmlStringGetNodeList(node->doc, buffer); + tmp = prop->children; + while (tmp != NULL) { + tmp->parent = (xmlNodePtr) prop; + if (tmp->next == NULL) + prop->last = tmp; + tmp = tmp->next; + } xmlFree(buffer); } return(prop); @@ -3842,7 +3892,7 @@ xmlBufferResize(xmlBufferPtr buf, int size) */ void xmlBufferAdd(xmlBufferPtr buf, const xmlChar *str, int len) { - int l, needSize; + int needSize; if (str == NULL) { #ifdef DEBUG_BUFFER @@ -3858,22 +3908,8 @@ xmlBufferAdd(xmlBufferPtr buf, const xmlChar *str, int len) { } if (len == 0) return; - /* CJN What's this for??? */ if (len < 0) - l = xmlStrlen(str); - else - for (l = 0;l < len;l++) - if (str[l] == 0) break; - if (l < len){ - len = l; -#ifdef DEBUG_BUFFER - printf("xmlBufferAdd bad length\n"); -#endif - } - - /* CJN 11.18.99 okay, now I'm using the length */ - if(len == -1) len = l; - + len = xmlStrlen(str); if (len <= 0) return; @@ -3987,6 +4023,15 @@ xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string) { } +static void +xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, + int format); +static void +xmlNodeListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, + int format); +void +htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur); + /** * xmlGlobalNsDump: * @buf: the XML buffer output @@ -4083,43 +4128,42 @@ xmlNsListDump(xmlBufferPtr buf, xmlNsPtr cur) { * Dump the XML document DTD, if any. */ static void -xmlDtdDump(xmlBufferPtr buf, xmlDocPtr doc) { - xmlDtdPtr cur = doc->intSubset; - - if (cur == NULL) { +xmlDtdDump(xmlBufferPtr buf, xmlDtdPtr dtd) { + if (dtd == NULL) { #ifdef DEBUG_TREE fprintf(stderr, "xmlDtdDump : no internal subset\n"); #endif return; } xmlBufferWriteChar(buf, "<!DOCTYPE "); - xmlBufferWriteCHAR(buf, cur->name); - if (cur->ExternalID != NULL) { + xmlBufferWriteCHAR(buf, dtd->name); + if (dtd->ExternalID != NULL) { xmlBufferWriteChar(buf, " PUBLIC "); - xmlBufferWriteQuotedString(buf, cur->ExternalID); + xmlBufferWriteQuotedString(buf, dtd->ExternalID); xmlBufferWriteChar(buf, " "); - xmlBufferWriteQuotedString(buf, cur->SystemID); - } else if (cur->SystemID != NULL) { + xmlBufferWriteQuotedString(buf, dtd->SystemID); + } else if (dtd->SystemID != NULL) { xmlBufferWriteChar(buf, " SYSTEM "); - xmlBufferWriteQuotedString(buf, cur->SystemID); + xmlBufferWriteQuotedString(buf, dtd->SystemID); } - if ((cur->entities == NULL) && (cur->elements == NULL) && - (cur->attributes == NULL) && (cur->notations == NULL)) { - xmlBufferWriteChar(buf, ">\n"); + if ((dtd->entities == NULL) && (dtd->elements == NULL) && + (dtd->attributes == NULL) && (dtd->notations == NULL)) { + xmlBufferWriteChar(buf, ">"); return; } xmlBufferWriteChar(buf, " [\n"); - if (cur->entities != NULL) - xmlDumpEntitiesTable(buf, (xmlEntitiesTablePtr) cur->entities); - if (cur->notations != NULL) - xmlDumpNotationTable(buf, (xmlNotationTablePtr) cur->notations); - if (cur->elements != NULL) - xmlDumpElementTable(buf, (xmlElementTablePtr) cur->elements); - if (cur->attributes != NULL) - xmlDumpAttributeTable(buf, (xmlAttributeTablePtr) cur->attributes); - xmlBufferWriteChar(buf, "]"); - - xmlBufferWriteChar(buf, ">\n"); + xmlNodeListDump(buf, dtd->doc, dtd->children, -1, 0); +#if 0 + if (dtd->entities != NULL) + xmlDumpEntitiesTable(buf, (xmlEntitiesTablePtr) dtd->entities); + if (dtd->notations != NULL) + xmlDumpNotationTable(buf, (xmlNotationTablePtr) dtd->notations); + if (dtd->elements != NULL) + xmlDumpElementTable(buf, (xmlElementTablePtr) dtd->elements); + if (dtd->attributes != NULL) + xmlDumpAttributeTable(buf, (xmlAttributeTablePtr) dtd->attributes); +#endif + xmlBufferWriteChar(buf, "]>"); } /** @@ -4146,7 +4190,7 @@ xmlAttrDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { xmlBufferWriteChar(buf, ":"); } xmlBufferWriteCHAR(buf, cur->name); - value = xmlNodeListGetString(doc, cur->val, 0); + value = xmlNodeListGetString(doc, cur->children, 0); if (value) { xmlBufferWriteChar(buf, "="); xmlBufferWriteQuotedString(buf, value); @@ -4179,18 +4223,13 @@ xmlAttrListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { } -static void -xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, - int format); -void -htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur); /** * xmlNodeListDump: * @buf: the XML buffer output * @doc: the document * @cur: the first node - * @level: the imbrication level for indenting, -1 to disable it + * @level: the imbrication level for indenting * @format: is formatting allowed * * Dump an XML node list, recursive behaviour,children are printed too. @@ -4224,7 +4263,7 @@ xmlNodeListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, * @buf: the XML buffer output * @doc: the document * @cur: the current node - * @level: the imbrication level for indenting, -1 to disable it + * @level: the imbrication level for indenting * @format: is formatting allowed * * Dump an XML node, recursive behaviour,children are printed too. @@ -4241,6 +4280,22 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, #endif return; } + if (cur->type == XML_DTD_NODE) { + xmlDtdDump(buf, (xmlDtdPtr) cur); + return; + } + if (cur->type == XML_ELEMENT_DECL) { + xmlDumpElementDecl(buf, (xmlElementPtr) cur); + return; + } + if (cur->type == XML_ATTRIBUTE_DECL) { + xmlDumpAttributeDecl(buf, (xmlAttributePtr) cur); + return; + } + if (cur->type == XML_ENTITY_DECL) { + xmlDumpEntityDecl(buf, (xmlEntityPtr) cur); + return; + } if (cur->type == XML_TEXT_NODE) { if (cur->content != NULL) { xmlChar *buffer; @@ -4271,6 +4326,10 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, #endif } xmlBufferWriteChar(buf, "?>"); + } else { + xmlBufferWriteChar(buf, "<?"); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, "?>"); } return; } @@ -4305,7 +4364,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, } if (format == 1) { - tmp = cur->childs; + tmp = cur->children; while (tmp != NULL) { if ((tmp->type == XML_TEXT_NODE) || (tmp->type == XML_ENTITY_REF_NODE)) { @@ -4327,7 +4386,7 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, if (cur->properties != NULL) xmlAttrListDump(buf, doc, cur->properties); - if ((cur->content == NULL) && (cur->childs == NULL) && + if ((cur->content == NULL) && (cur->children == NULL) && (!xmlSaveNoEmptyTags)) { xmlBufferWriteChar(buf, "/>"); return; @@ -4347,9 +4406,9 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, xmlFree(buffer); } } - if (cur->childs != NULL) { + if (cur->children != NULL) { if (format) xmlBufferWriteChar(buf, "\n"); - xmlNodeListDump(buf, doc, cur->childs, + xmlNodeListDump(buf, doc, cur->children, (level >= 0?level+1:-1), format); if ((xmlIndentTreeOutput) && (format)) for (i = 0;i < level;i++) @@ -4426,10 +4485,8 @@ xmlDocContentDump(xmlBufferPtr buf, xmlDocPtr cur) { break; } xmlBufferWriteChar(buf, "?>\n"); - if (cur->intSubset != NULL) - xmlDtdDump(buf, cur); - if (cur->root != NULL) { - xmlNodePtr child = cur->root; + if (cur->children != NULL) { + xmlNodePtr child = cur->children; /* global namespace definitions, the old way */ if (oldXMLWDcompatibility) @@ -36,24 +36,22 @@ typedef enum { XML_DOCUMENT_TYPE_NODE= 10, XML_DOCUMENT_FRAG_NODE= 11, XML_NOTATION_NODE= 12, - XML_HTML_DOCUMENT_NODE= 13 + XML_HTML_DOCUMENT_NODE= 13, + XML_DTD_NODE= 14, + XML_ELEMENT_DECL= 15, + XML_ATTRIBUTE_DECL= 16, + XML_ENTITY_DECL= 17 } xmlElementType; /* * Size of an internal character representation. * - * Currently we use 8bit chars internal representation for memory efficiency, - * but the parser is not tied to that, just define UNICODE to switch to - * a 16 bits internal representation. Note that with 8 bits wide - * xmlChars one can still use UTF-8 to handle correctly non ISO-Latin - * input. + * We use 8bit chars internal representation for memory efficiency, + * Note that with 8 bits wide xmlChars one can still use UTF-8 to handle + * correctly non ISO-Latin input. */ -#ifdef UNICODE -typedef unsigned short xmlChar; -#else typedef unsigned char xmlChar; -#endif #ifndef WIN32 #ifndef CHAR @@ -109,14 +107,25 @@ struct _xmlEnumeration { typedef struct _xmlAttribute xmlAttribute; typedef xmlAttribute *xmlAttributePtr; struct _xmlAttribute { - const xmlChar *elem; /* Element holding the attribute */ - const xmlChar *name; /* Attribute name */ - struct _xmlAttribute *next; /* list of attributes of an element */ - xmlAttributeType type; /* The type */ - xmlAttributeDefault def; /* the default */ - const xmlChar *defaultValue;/* or the default value */ - xmlEnumerationPtr tree; /* or the enumeration tree if any */ - const xmlChar *prefix; /* the namespace prefix if any */ +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ + const xmlChar *name; /* Attribute name */ + struct _xmlNode *children; /* NULL */ + struct _xmlNode *last; /* NULL */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + struct _xmlAttribute *nexth; /* next in hash table */ + xmlAttributeType atype; /* The attribute type */ + xmlAttributeDefault def; /* the default */ + const xmlChar *defaultValue; /* or the default value */ + xmlEnumerationPtr tree; /* or the enumeration tree if any */ + const xmlChar *prefix; /* the namespace prefix if any */ + const xmlChar *elem; /* Element holding the attribute */ }; /* @@ -156,8 +165,19 @@ typedef enum { typedef struct _xmlElement xmlElement; typedef xmlElement *xmlElementPtr; struct _xmlElement { +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ const xmlChar *name; /* Element name */ - xmlElementTypeVal type; /* The type */ + struct _xmlNode *children; /* NULL */ + struct _xmlNode *last; /* NULL */ + struct _xmlDtd *parent; /* -> DTD */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + xmlElementTypeVal etype; /* The type */ xmlElementContentPtr content; /* the allowed element content */ xmlAttributePtr attributes; /* List of the declared attributes */ }; @@ -188,14 +208,25 @@ struct _xmlNs { typedef struct _xmlDtd xmlDtd; typedef xmlDtd *xmlDtdPtr; struct _xmlDtd { +#ifndef XML_WITHOUT_CORBA + void *_private; /* for Corba, must be first ! */ +#endif + xmlElementType type; /* XML_DTD_NODE, must be second ! */ const xmlChar *name; /* Name of the DTD */ - const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ - const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ + struct _xmlNode *children; /* the value of the property link */ + struct _xmlNode *last; /* last child link */ + struct _xmlDoc *parent; /* child->parent link */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ + + /* End of common part */ void *notations; /* Hash table for notations if any */ void *elements; /* Hash table for elements if any */ void *attributes; /* Hash table for attributes if any */ void *entities; /* Hash table for entities if any */ - /* struct xmlDtd *next; * next link for this document */ + const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ }; /* @@ -206,14 +237,17 @@ typedef xmlAttr *xmlAttrPtr; struct _xmlAttr { #ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ - void *vepv; /* for Corba, must be next ! */ #endif - xmlElementType type; /* XML_ATTRIBUTE_NODE, must be third ! */ - struct _xmlNode *node; /* attr->node link */ - struct _xmlAttr *next; /* attribute list link */ + xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ const xmlChar *name; /* the name of the property */ - struct _xmlNode *val; /* the value of the property */ + struct _xmlNode *children; /* the value of the property */ + struct _xmlNode *last; /* NULL */ + struct _xmlNode *parent; /* child->parent link */ + struct _xmlAttr *next; /* next sibling link */ + struct _xmlAttr *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* the containing document */ xmlNs *ns; /* pointer to the associated namespace */ + xmlAttributeType atype; /* the attribute type if validating */ }; /* @@ -266,24 +300,25 @@ typedef xmlNode *xmlNodePtr; struct _xmlNode { #ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ - void *vepv; /* for Corba, must be next ! */ #endif - xmlElementType type; /* type number in the DTD, must be third ! */ - struct _xmlDoc *doc; /* the containing document */ + xmlElementType type; /* type number, must be second ! */ + const xmlChar *name; /* the name of the node, or the entity */ + struct _xmlNode *children; /* parent->childs link */ + struct _xmlNode *last; /* last child link */ struct _xmlNode *parent; /* child->parent link */ struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ - struct _xmlNode *childs; /* parent->childs link */ - struct _xmlNode *last; /* last child link */ - struct _xmlAttr *properties;/* properties list */ - const xmlChar *name; /* the name of the node, or the entity */ - xmlNs *ns; /* pointer to the associated namespace */ - xmlNs *nsDef; /* namespace definitions on this node */ + struct _xmlDoc *doc; /* the containing document */ + xmlNs *ns; /* pointer to the associated namespace */ #ifndef XML_USE_BUFFER_CONTENT - xmlChar *content; /* the content */ + xmlChar *content; /* the content */ #else - xmlBufferPtr content; /* the content in a buffer */ + xmlBufferPtr content; /* the content in a buffer */ #endif + + /* End of common part */ + struct _xmlAttr *properties;/* properties list */ + xmlNs *nsDef; /* namespace definitions on this node */ }; /* @@ -294,20 +329,27 @@ typedef xmlDoc *xmlDocPtr; struct _xmlDoc { #ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ - void *vepv; /* for Corba, must be next ! */ #endif xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ char *name; /* name/filename/URI of the document */ - const xmlChar *version; /* the XML version string */ - const xmlChar *encoding; /* encoding, if any */ + struct _xmlNode *children; /* the document tree */ + struct _xmlNode *last; /* last child link */ + struct _xmlNode *parent; /* child->parent link */ + struct _xmlNode *next; /* next sibling link */ + struct _xmlNode *prev; /* previous sibling link */ + struct _xmlDoc *doc; /* autoreference to itself */ + + /* End of common part */ int compression;/* level of zlib compression */ int standalone; /* standalone document (no external refs) */ struct _xmlDtd *intSubset; /* the document internal subset */ struct _xmlDtd *extSubset; /* the document external subset */ struct _xmlNs *oldNs; /* Global namespace, the old way */ - struct _xmlNode *root; /* the document tree */ + const xmlChar *version; /* the XML version string */ + const xmlChar *encoding; /* encoding, if any */ void *ids; /* Hash table for ID attributes if any */ void *refs; /* Hash table for IDREFs attributes if any */ + const xmlChar *URL; /* The URI for that document */ }; /* @@ -422,6 +464,8 @@ xmlNodePtr xmlNewComment (const xmlChar *content); xmlNodePtr xmlNewCDataBlock (xmlDocPtr doc, const xmlChar *content, int len); +xmlNodePtr xmlNewCharRef (xmlDocPtr doc, + const xmlChar *name); xmlNodePtr xmlNewReference (xmlDocPtr doc, const xmlChar *name); xmlNodePtr xmlCopyNode (xmlNodePtr node, @@ -513,13 +557,14 @@ xmlChar * xmlNodeGetContent (xmlNodePtr cur); xmlChar * xmlNodeGetLang (xmlNodePtr cur); void xmlNodeSetLang (xmlNodePtr cur, const xmlChar *lang); +int xmlNodeGetSpacePreserve (xmlNodePtr cur); xmlChar * xmlNodeGetBase (xmlDocPtr doc, xmlNodePtr cur); /* * Removing content. */ -int xmlRemoveProp (xmlAttrPtr attr); /* TODO */ +int xmlRemoveProp (xmlAttrPtr attr); int xmlRemoveNode (xmlNodePtr node); /* TODO */ /* @@ -533,6 +578,12 @@ void xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string); /* + * Namespace handling + */ +int xmlReconciliateNs (xmlDocPtr doc, + xmlNodePtr tree); + +/* * Saving */ void xmlDocDumpMemory (xmlDocPtr cur, @@ -25,6 +25,120 @@ #include "parser.h" #include "parserInternals.h" +/* + * Generic function for accessing stacks in the Validity Context + */ + +#define PUSH_AND_POP(scope, type, name) \ +scope int name##VPush(xmlValidCtxtPtr ctxt, type value) { \ + if (ctxt->name##Nr >= ctxt->name##Max) { \ + ctxt->name##Max *= 2; \ + ctxt->name##Tab = (void *) xmlRealloc(ctxt->name##Tab, \ + ctxt->name##Max * sizeof(ctxt->name##Tab[0])); \ + if (ctxt->name##Tab == NULL) { \ + fprintf(stderr, "realloc failed !\n"); \ + return(0); \ + } \ + } \ + ctxt->name##Tab[ctxt->name##Nr] = value; \ + ctxt->name = value; \ + return(ctxt->name##Nr++); \ +} \ +scope type name##VPop(xmlValidCtxtPtr ctxt) { \ + type ret; \ + if (ctxt->name##Nr <= 0) return(0); \ + ctxt->name##Nr--; \ + if (ctxt->name##Nr > 0) \ + ctxt->name = ctxt->name##Tab[ctxt->name##Nr - 1]; \ + else \ + ctxt->name = NULL; \ + ret = ctxt->name##Tab[ctxt->name##Nr]; \ + ctxt->name##Tab[ctxt->name##Nr] = 0; \ + return(ret); \ +} \ + +PUSH_AND_POP(static, xmlNodePtr, node) + +/* #define DEBUG_VALID_ALGO */ + +#ifdef DEBUG_VALID_ALGO +void xmlValidPrintNodeList(xmlNodePtr cur) { + if (cur == NULL) + fprintf(stderr, "null "); + while (cur != NULL) { + switch (cur->type) { + case XML_ELEMENT_NODE: + fprintf(stderr, "%s ", cur->name); + break; + case XML_TEXT_NODE: + fprintf(stderr, "text "); + break; + case XML_CDATA_SECTION_NODE: + fprintf(stderr, "cdata "); + break; + case XML_ENTITY_REF_NODE: + fprintf(stderr, "&%s; ", cur->name); + break; + case XML_PI_NODE: + fprintf(stderr, "pi(%s) ", cur->name); + break; + case XML_COMMENT_NODE: + fprintf(stderr, "comment "); + break; + case XML_ATTRIBUTE_NODE: + fprintf(stderr, "?attr? "); + break; + case XML_ENTITY_NODE: + fprintf(stderr, "?ent? "); + break; + case XML_DOCUMENT_NODE: + fprintf(stderr, "?doc? "); + break; + case XML_DOCUMENT_TYPE_NODE: + fprintf(stderr, "?doctype? "); + break; + case XML_DOCUMENT_FRAG_NODE: + fprintf(stderr, "?frag? "); + break; + case XML_NOTATION_NODE: + fprintf(stderr, "?nota? "); + break; + case XML_HTML_DOCUMENT_NODE: + fprintf(stderr, "?html? "); + break; + case XML_DTD_NODE: + fprintf(stderr, "?dtd? "); + break; + case XML_ELEMENT_DECL: + fprintf(stderr, "?edecl? "); + break; + case XML_ATTRIBUTE_DECL: + fprintf(stderr, "?adecl? "); + break; + case XML_ENTITY_DECL: + fprintf(stderr, "?entdecl? "); + break; + } + cur = cur->next; + } +} + +void xmlValidDebug(xmlNodePtr cur, xmlElementContentPtr cont) { + char expr[1000]; + + expr[0] = 0; + fprintf(stderr, "valid: "); + xmlValidPrintNodeList(cur); + fprintf(stderr, "against "); + xmlSprintfElementContent(expr, cont, 0); + fprintf(stderr, "%s\n", expr); +} + +#define DEBUG_VALID_STATE(n,c) xmlValidDebug(n,c); +#else +#define DEBUG_VALID_STATE(n,c) +#endif + /* TODO: use hash table for accesses to elem and attribute dedinitions */ #define VERROR \ @@ -310,7 +424,8 @@ xmlCreateElementTable(void) { */ xmlElementPtr xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, - xmlElementTypeVal type, xmlElementContentPtr content) { + xmlElementTypeVal type, + xmlElementContentPtr content) { xmlElementPtr ret, cur; xmlElementTablePtr table; int i; @@ -403,17 +518,31 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, fprintf(stderr, "xmlAddElementDecl: out of memory\n"); return(NULL); } + memset(ret, 0, sizeof(xmlElement)); + ret->type = XML_ELEMENT_DECL; table->table[table->nb_elements] = ret; /* * fill the structure. */ - ret->type = type; + ret->etype = type; ret->name = xmlStrdup(name); ret->content = xmlCopyElementContent(content); ret->attributes = xmlScanAttributeDecl(dtd, name); table->nb_elements++; + /* + * Link it to the Dtd + */ + ret->parent = dtd; + ret->doc = dtd->doc; + if (dtd->last == NULL) { + dtd->children = dtd->last = (xmlNodePtr) ret; + } else { + dtd->last->next = (xmlNodePtr) ret; + ret->prev = dtd->last; + dtd->last = (xmlNodePtr) ret; + } return(ret); } @@ -426,6 +555,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, void xmlFreeElement(xmlElementPtr elem) { if (elem == NULL) return; + xmlUnlinkNode((xmlNodePtr) elem); xmlFreeElementContent(elem->content); if (elem->name != NULL) xmlFree((xmlChar *) elem->name); @@ -488,9 +618,11 @@ xmlCopyElementTable(xmlElementTablePtr table) { xmlFree(ret->table); return(NULL); } + memset(cur, 0, sizeof(xmlElement)); + cur->type = XML_ELEMENT_DECL; ret->table[i] = cur; ent = table->table[i]; - cur->type = ent->type; + cur->etype = ent->etype; if (ent->name != NULL) cur->name = xmlStrdup(ent->name); else @@ -503,6 +635,48 @@ xmlCopyElementTable(xmlElementTablePtr table) { } /** + * xmlDumpElementDecl: + * @buf: the XML buffer output + * @elem: An element table + * + * This will dump the content of the element declaration as an XML + * DTD definition + */ +void +xmlDumpElementDecl(xmlBufferPtr buf, xmlElementPtr elem) { + switch (elem->etype) { + case XML_ELEMENT_TYPE_EMPTY: + xmlBufferWriteChar(buf, "<!ELEMENT "); + xmlBufferWriteCHAR(buf, elem->name); + xmlBufferWriteChar(buf, " EMPTY>\n"); + break; + case XML_ELEMENT_TYPE_ANY: + xmlBufferWriteChar(buf, "<!ELEMENT "); + xmlBufferWriteCHAR(buf, elem->name); + xmlBufferWriteChar(buf, " ANY>\n"); + break; + case XML_ELEMENT_TYPE_MIXED: + xmlBufferWriteChar(buf, "<!ELEMENT "); + xmlBufferWriteCHAR(buf, elem->name); + xmlBufferWriteChar(buf, " "); + xmlDumpElementContent(buf, elem->content, 1); + xmlBufferWriteChar(buf, ">\n"); + break; + case XML_ELEMENT_TYPE_ELEMENT: + xmlBufferWriteChar(buf, "<!ELEMENT "); + xmlBufferWriteCHAR(buf, elem->name); + xmlBufferWriteChar(buf, " "); + xmlDumpElementContent(buf, elem->content, 1); + xmlBufferWriteChar(buf, ">\n"); + break; + default: + fprintf(stderr, + "xmlDumpElementDecl: internal: unknown type %d\n", + elem->etype); + } +} + +/** * xmlDumpElementTable: * @buf: the XML buffer output * @table: An element table @@ -518,36 +692,7 @@ xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) { for (i = 0;i < table->nb_elements;i++) { cur = table->table[i]; - switch (cur->type) { - case XML_ELEMENT_TYPE_EMPTY: - xmlBufferWriteChar(buf, "<!ELEMENT "); - xmlBufferWriteCHAR(buf, cur->name); - xmlBufferWriteChar(buf, " EMPTY>\n"); - break; - case XML_ELEMENT_TYPE_ANY: - xmlBufferWriteChar(buf, "<!ELEMENT "); - xmlBufferWriteCHAR(buf, cur->name); - xmlBufferWriteChar(buf, " ANY>\n"); - break; - case XML_ELEMENT_TYPE_MIXED: - xmlBufferWriteChar(buf, "<!ELEMENT "); - xmlBufferWriteCHAR(buf, cur->name); - xmlBufferWriteChar(buf, " "); - xmlDumpElementContent(buf, cur->content, 1); - xmlBufferWriteChar(buf, ">\n"); - break; - case XML_ELEMENT_TYPE_ELEMENT: - xmlBufferWriteChar(buf, "<!ELEMENT "); - xmlBufferWriteCHAR(buf, cur->name); - xmlBufferWriteChar(buf, " "); - xmlDumpElementContent(buf, cur->content, 1); - xmlBufferWriteChar(buf, ">\n"); - break; - default: - fprintf(stderr, - "xmlDumpElementTable: internal: unknown type %d\n", - cur->type); - } + xmlDumpElementDecl(buf, cur); } } @@ -570,12 +715,10 @@ xmlCreateEnumeration(xmlChar *name) { (long)sizeof(xmlEnumeration)); return(NULL); } + memset(ret, 0, sizeof(xmlEnumeration)); if (name != NULL) ret->name = xmlStrdup(name); - else - ret->name = NULL; - ret->next = NULL; return(ret); } @@ -701,7 +844,7 @@ xmlScanAttributeDecl(xmlDtdPtr dtd, const xmlChar *elem) { for (i = 0;i < table->nb_attributes;i++) { if (!xmlStrcmp(table->table[i]->elem, elem)) { - table->table[i]->next = ret; + table->table[i]->nexth = ret; ret = table->table[i]; } } @@ -726,14 +869,14 @@ xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) { if (elem == NULL) return(0); cur = elem->attributes; while (cur != NULL) { - if (cur->type == XML_ATTRIBUTE_ID) { + if (cur->atype == XML_ATTRIBUTE_ID) { ret ++; if (ret > 1) VERROR(ctxt->userData, "Element %s has too may ID attributes defined : %s\n", elem->name, cur->name); } - cur = cur->next; + cur = cur->nexth; } return(ret); } @@ -745,6 +888,7 @@ xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) { * @dtd: pointer to the DTD * @elem: the element name * @name: the attribute name + * @ns: the attribute namespace prefix * @type: the attribute type * @def: the attribute default type * @defaultValue: the attribute default value @@ -756,14 +900,12 @@ xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem) { */ xmlAttributePtr xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, - const xmlChar *name, xmlAttributeType type, - xmlAttributeDefault def, const xmlChar *defaultValue, - xmlEnumerationPtr tree) { + const xmlChar *name, const xmlChar *ns, + xmlAttributeType type, xmlAttributeDefault def, + const xmlChar *defaultValue, xmlEnumerationPtr tree) { xmlAttributePtr ret, cur; xmlAttributeTablePtr table; xmlElementPtr elemDef; - xmlChar *rname; - xmlChar *ns; int i; if (dtd == NULL) { @@ -825,11 +967,6 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, } /* - * Split the full name into a namespace prefix and the tag name - */ - rname = xmlSplitQName(name, &ns); - - /* * Validity Check: * Search the DTD for previous declarations of the ATTLIST */ @@ -837,12 +974,12 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, cur = table->table[i]; if ((ns != NULL) && (cur->prefix == NULL)) continue; if ((ns == NULL) && (cur->prefix != NULL)) continue; - if ((!xmlStrcmp(cur->name, rname)) && (!xmlStrcmp(cur->elem, elem)) && + if ((!xmlStrcmp(cur->name, name)) && (!xmlStrcmp(cur->elem, elem)) && ((ns == NULL) || (!xmlStrcmp(cur->prefix, ns)))) { /* * The attribute is already defined in this Dtd. */ - VERROR(ctxt->userData, "Attribute %s on %s: already defined\n", + VWARNING(ctxt->userData, "Attribute %s on %s: already defined\n", elem, name); } } @@ -868,21 +1005,21 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, fprintf(stderr, "xmlAddAttributeDecl: out of memory\n"); return(NULL); } + memset(ret, 0, sizeof(xmlAttribute)); + ret->type = XML_ATTRIBUTE_DECL; table->table[table->nb_attributes] = ret; /* * fill the structure. */ - ret->type = type; - ret->name = rname; - ret->prefix = ns; + ret->atype = type; + ret->name = xmlStrdup(name); + ret->prefix = xmlStrdup(ns); ret->elem = xmlStrdup(elem); ret->def = def; ret->tree = tree; if (defaultValue != NULL) ret->defaultValue = xmlStrdup(defaultValue); - else - ret->defaultValue = NULL; elemDef = xmlGetDtdElementDesc(dtd, elem); if (elemDef != NULL) { if ((type == XML_ATTRIBUTE_ID) && @@ -890,11 +1027,23 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, VERROR(ctxt->userData, "Element %s has too may ID attributes defined : %s\n", elem, name); - ret->next = elemDef->attributes; + ret->nexth = elemDef->attributes; elemDef->attributes = ret; } table->nb_attributes++; + /* + * Link it to the Dtd + */ + ret->parent = dtd; + ret->doc = dtd->doc; + if (dtd->last == NULL) { + dtd->children = dtd->last = (xmlNodePtr) ret; + } else { + dtd->last->next = (xmlNodePtr) ret; + ret->prev = dtd->last; + dtd->last = (xmlNodePtr) ret; + } return(ret); } @@ -907,6 +1056,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, void xmlFreeAttribute(xmlAttributePtr attr) { if (attr == NULL) return; + xmlUnlinkNode((xmlNodePtr) attr); if (attr->tree != NULL) xmlFreeEnumeration(attr->tree); if (attr->elem != NULL) @@ -977,28 +1127,100 @@ xmlCopyAttributeTable(xmlAttributeTablePtr table) { xmlFree(ret->table); return(NULL); } + memset(cur, 0, sizeof(xmlAttribute)); + /* !!! cur->type = XML_ATTRIBUTE_DECL; */ ret->table[i] = cur; - cur->type = attr->type; + cur->atype = attr->atype; cur->def = attr->def; cur->tree = xmlCopyEnumeration(attr->tree); if (attr->elem != NULL) cur->elem = xmlStrdup(attr->elem); - else - cur->elem = NULL; if (attr->name != NULL) cur->name = xmlStrdup(attr->name); - else - cur->name = NULL; if (attr->defaultValue != NULL) cur->defaultValue = xmlStrdup(attr->defaultValue); - else - cur->defaultValue = NULL; /* NEED to rebuild the next chain !!!!!! */ } return(ret); } /** + * xmlDumpAttributeDecl: + * @buf: the XML buffer output + * @attr: An attribute declaration + * + * This will dump the content of the attribute declaration as an XML + * DTD definition + */ +void +xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) { + xmlBufferWriteChar(buf, "<!ATTLIST "); + xmlBufferWriteCHAR(buf, attr->elem); + xmlBufferWriteChar(buf, " "); + xmlBufferWriteCHAR(buf, attr->name); + switch (attr->atype) { + case XML_ATTRIBUTE_CDATA: + xmlBufferWriteChar(buf, " CDATA"); + break; + case XML_ATTRIBUTE_ID: + xmlBufferWriteChar(buf, " ID"); + break; + case XML_ATTRIBUTE_IDREF: + xmlBufferWriteChar(buf, " IDREF"); + break; + case XML_ATTRIBUTE_IDREFS: + xmlBufferWriteChar(buf, " IDREFS"); + break; + case XML_ATTRIBUTE_ENTITY: + xmlBufferWriteChar(buf, " ENTITY"); + break; + case XML_ATTRIBUTE_ENTITIES: + xmlBufferWriteChar(buf, " ENTITIES"); + break; + case XML_ATTRIBUTE_NMTOKEN: + xmlBufferWriteChar(buf, " NMTOKEN"); + break; + case XML_ATTRIBUTE_NMTOKENS: + xmlBufferWriteChar(buf, " NMTOKENS"); + break; + case XML_ATTRIBUTE_ENUMERATION: + xmlBufferWriteChar(buf, " ("); + xmlDumpEnumeration(buf, attr->tree); + break; + case XML_ATTRIBUTE_NOTATION: + xmlBufferWriteChar(buf, " NOTATION ("); + xmlDumpEnumeration(buf, attr->tree); + break; + default: + fprintf(stderr, + "xmlDumpAttributeTable: internal: unknown type %d\n", + attr->atype); + } + switch (attr->def) { + case XML_ATTRIBUTE_NONE: + break; + case XML_ATTRIBUTE_REQUIRED: + xmlBufferWriteChar(buf, " #REQUIRED"); + break; + case XML_ATTRIBUTE_IMPLIED: + xmlBufferWriteChar(buf, " #IMPLIED"); + break; + case XML_ATTRIBUTE_FIXED: + xmlBufferWriteChar(buf, " #FIXED"); + break; + default: + fprintf(stderr, + "xmlDumpAttributeTable: internal: unknown default %d\n", + attr->def); + } + if (attr->defaultValue != NULL) { + xmlBufferWriteChar(buf, " "); + xmlBufferWriteQuotedString(buf, attr->defaultValue); + } + xmlBufferWriteChar(buf, ">\n"); +} + +/** * xmlDumpAttributeTable: * @buf: the XML buffer output * @table: An attribute table @@ -1014,70 +1236,7 @@ xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table) { for (i = 0;i < table->nb_attributes;i++) { cur = table->table[i]; - xmlBufferWriteChar(buf, "<!ATTLIST "); - xmlBufferWriteCHAR(buf, cur->elem); - xmlBufferWriteChar(buf, " "); - xmlBufferWriteCHAR(buf, cur->name); - switch (cur->type) { - case XML_ATTRIBUTE_CDATA: - xmlBufferWriteChar(buf, " CDATA"); - break; - case XML_ATTRIBUTE_ID: - xmlBufferWriteChar(buf, " ID"); - break; - case XML_ATTRIBUTE_IDREF: - xmlBufferWriteChar(buf, " IDREF"); - break; - case XML_ATTRIBUTE_IDREFS: - xmlBufferWriteChar(buf, " IDREFS"); - break; - case XML_ATTRIBUTE_ENTITY: - xmlBufferWriteChar(buf, " ENTITY"); - break; - case XML_ATTRIBUTE_ENTITIES: - xmlBufferWriteChar(buf, " ENTITIES"); - break; - case XML_ATTRIBUTE_NMTOKEN: - xmlBufferWriteChar(buf, " NMTOKEN"); - break; - case XML_ATTRIBUTE_NMTOKENS: - xmlBufferWriteChar(buf, " NMTOKENS"); - break; - case XML_ATTRIBUTE_ENUMERATION: - xmlBufferWriteChar(buf, " ("); - xmlDumpEnumeration(buf, cur->tree); - break; - case XML_ATTRIBUTE_NOTATION: - xmlBufferWriteChar(buf, " NOTATION ("); - xmlDumpEnumeration(buf, cur->tree); - break; - default: - fprintf(stderr, - "xmlDumpAttributeTable: internal: unknown type %d\n", - cur->type); - } - switch (cur->def) { - case XML_ATTRIBUTE_NONE: - break; - case XML_ATTRIBUTE_REQUIRED: - xmlBufferWriteChar(buf, " #REQUIRED"); - break; - case XML_ATTRIBUTE_IMPLIED: - xmlBufferWriteChar(buf, " #IMPLIED"); - break; - case XML_ATTRIBUTE_FIXED: - xmlBufferWriteChar(buf, " #FIXED"); - break; - default: - fprintf(stderr, - "xmlDumpAttributeTable: internal: unknown default %d\n", - cur->def); - } - if (cur->defaultValue != NULL) { - xmlBufferWriteChar(buf, " "); - xmlBufferWriteQuotedString(buf, cur->defaultValue); - } - xmlBufferWriteChar(buf, ">\n"); + xmlDumpAttributeDecl(buf, cur); } } @@ -1197,6 +1356,7 @@ xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, fprintf(stderr, "xmlAddNotationDecl: out of memory\n"); return(NULL); } + memset(ret, 0, sizeof(xmlNotation)); table->table[table->nb_notations] = ret; /* @@ -1205,12 +1365,8 @@ xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, ret->name = xmlStrdup(name); if (SystemID != NULL) ret->SystemID = xmlStrdup(SystemID); - else - ret->SystemID = NULL; if (PublicID != NULL) ret->PublicID = xmlStrdup(PublicID); - else - ret->PublicID = NULL; table->nb_notations++; return(ret); @@ -1309,6 +1465,31 @@ xmlCopyNotationTable(xmlNotationTablePtr table) { } /** + * xmlDumpNotationDecl: + * @buf: the XML buffer output + * @nota: A notation declaration + * + * This will dump the content the notation declaration as an XML DTD definition + */ +void +xmlDumpNotationDecl(xmlBufferPtr buf, xmlNotationPtr nota) { + xmlBufferWriteChar(buf, "<!NOTATION "); + xmlBufferWriteCHAR(buf, nota->name); + if (nota->PublicID != NULL) { + xmlBufferWriteChar(buf, " PUBLIC "); + xmlBufferWriteQuotedString(buf, nota->PublicID); + if (nota->SystemID != NULL) { + xmlBufferWriteChar(buf, " "); + xmlBufferWriteCHAR(buf, nota->SystemID); + } + } else { + xmlBufferWriteChar(buf, " SYSTEM "); + xmlBufferWriteCHAR(buf, nota->SystemID); + } + xmlBufferWriteChar(buf, " >\n"); +} + +/** * xmlDumpNotationTable: * @buf: the XML buffer output * @table: A notation table @@ -1324,20 +1505,7 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) { for (i = 0;i < table->nb_notations;i++) { cur = table->table[i]; - xmlBufferWriteChar(buf, "<!NOTATION "); - xmlBufferWriteCHAR(buf, cur->name); - if (cur->PublicID != NULL) { - xmlBufferWriteChar(buf, " PUBLIC "); - xmlBufferWriteQuotedString(buf, cur->PublicID); - if (cur->SystemID != NULL) { - xmlBufferWriteChar(buf, " "); - xmlBufferWriteCHAR(buf, cur->SystemID); - } - } else { - xmlBufferWriteChar(buf, " SYSTEM "); - xmlBufferWriteCHAR(buf, cur->SystemID); - } - xmlBufferWriteChar(buf, " >\n"); + xmlDumpNotationDecl(buf, cur); } } @@ -1537,7 +1705,7 @@ xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) { attrDecl = xmlGetDtdAttrDesc(doc->extSubset, elem->name, attr->name); - if ((attrDecl != NULL) && (attrDecl->type == XML_ATTRIBUTE_ID)) + if ((attrDecl != NULL) && (attrDecl->atype == XML_ATTRIBUTE_ID)) return(1); } return(0); @@ -1795,7 +1963,7 @@ xmlIsRef(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) { attrDecl = xmlGetDtdAttrDesc(doc->extSubset, elem->name, attr->name); - if ((attrDecl != NULL) && (attrDecl->type == XML_ATTRIBUTE_IDREF)) + if ((attrDecl != NULL) && (attrDecl->atype == XML_ATTRIBUTE_IDREF)) return(1); } return(0); @@ -2022,7 +2190,7 @@ xmlIsMixedElement(xmlDocPtr doc, const xmlChar *name) { if ((elemDecl == NULL) && (doc->extSubset != NULL)) elemDecl = xmlGetDtdElementDesc(doc->extSubset, name); if (elemDecl == NULL) return(-1); - switch (elemDecl->type) { + switch (elemDecl->etype) { case XML_ELEMENT_TYPE_ELEMENT: return(0); case XML_ELEMENT_TYPE_EMPTY: @@ -2174,6 +2342,7 @@ xmlValidateNmtokensValue(const xmlChar *value) { if (value == NULL) return(0); cur = value; + while (IS_BLANK(*cur)) cur++; if (!IS_LETTER(*cur) && !IS_DIGIT(*cur) && (*cur != '.') && (*cur != '-') && (*cur != '_') && (*cur != ':') && @@ -2190,6 +2359,7 @@ xmlValidateNmtokensValue(const xmlChar *value) { while (IS_BLANK(*cur)) { while (IS_BLANK(*cur)) cur++; + if (*cur == 0) return(1); if (!IS_LETTER(*cur) && !IS_DIGIT(*cur) && (*cur != '.') && (*cur != '-') && @@ -2282,6 +2452,176 @@ xmlValidateAttributeValue(xmlAttributeType type, const xmlChar *value) { } /** + * xmlValidateAttributeValue2: + * @ctxt: the validation context + * @doc: the document + * @name: the attribute name (used for error reporting only) + * @type: the attribute type + * @value: the attribute value + * + * Validate that the given attribute value match a given type. + * This typically cannot be done before having finished parsing + * the subsets. + * + * [ VC: IDREF ] + * Values of type IDREF must match one of the declared IDs + * Values of type IDREFS must match a sequence of the declared IDs + * each Name must match the value of an ID attribute on some element + * in the XML document; i.e. IDREF values must match the value of + * some ID attribute + * + * [ VC: Entity Name ] + * Values of type ENTITY must match one declared entity + * Values of type ENTITIES must match a sequence of declared entities + * + * [ VC: Notation Attributes ] + * all notation names in the declaration must be declared. + * + * returns 1 if valid or 0 otherwise + */ + +int +xmlValidateAttributeValue2(xmlValidCtxtPtr ctxt, xmlDocPtr doc, + const xmlChar *name, xmlAttributeType type, const xmlChar *value) { + int ret = 1; + switch (type) { + case XML_ATTRIBUTE_IDREFS: + case XML_ATTRIBUTE_IDREF: + case XML_ATTRIBUTE_ID: + case XML_ATTRIBUTE_NMTOKENS: + case XML_ATTRIBUTE_ENUMERATION: + case XML_ATTRIBUTE_NMTOKEN: + case XML_ATTRIBUTE_CDATA: + break; + case XML_ATTRIBUTE_ENTITY: { + xmlEntityPtr ent; + + ent = xmlGetDocEntity(doc, value); + if (ent == NULL) { + VERROR(ctxt->userData, + "ENTITY attribute %s reference an unknown entity \"%s\"\n", + name, value); + ret = 0; + } else if (ent->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { + VERROR(ctxt->userData, + "ENTITY attribute %s reference an entity \"%s\" of wrong type\n", + name, value); + ret = 0; + } + break; + } + case XML_ATTRIBUTE_ENTITIES: { + xmlChar *dup, *nam = NULL, *cur, save; + xmlEntityPtr ent; + + dup = xmlStrdup(value); + if (dup == NULL) + return(0); + cur = dup; + while (*cur != 0) { + nam = cur; + while ((*cur != 0) && (!IS_BLANK(*cur))) cur++; + save = *cur; + *cur = 0; + ent = xmlGetDocEntity(doc, nam); + if (ent == NULL) { + VERROR(ctxt->userData, + "ENTITIES attribute %s reference an unknown entity \"%s\"\n", + name, nam); + ret = 0; + } else if (ent->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) { + VERROR(ctxt->userData, + "ENTITIES attribute %s reference an entity \"%s\" of wrong type\n", + name, nam); + ret = 0; + } + if (save == 0) + break; + *cur = save; + while (IS_BLANK(*cur)) cur++; + } + xmlFree(dup); + break; + } + case XML_ATTRIBUTE_NOTATION: { + xmlNotationPtr nota; + + nota = xmlGetDtdNotationDesc(doc->intSubset, value); + if ((nota == NULL) && (doc->extSubset != NULL)) + nota = xmlGetDtdNotationDesc(doc->extSubset, value); + + if (nota == NULL) { + VERROR(ctxt->userData, + "NOTATION attribute %s reference an unknown notation \"%s\"\n", + name, value); + ret = 0; + } + break; + } + } + return(ret); +} + +/** + * xmlValidNormalizeAttributeValue: + * @doc: the document + * @elem: the parent + * @name: the attribute name + * @value: the attribute value + * + * Does the validation related extra step of the normalization of attribute + * values: + * + * If the declared value is not CDATA, then the XML processor must further + * process the normalized attribute value by discarding any leading and + * trailing space (#x20) characters, and by replacing sequences of space + * (#x20) characters by single space (#x20) character. + * + * returns a new normalized string if normalization is needed, NULL otherwise + * the caller must free the returned value. + */ + +xmlChar * +xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem, + const xmlChar *name, const xmlChar *value) { + xmlChar *ret, *dst; + const xmlChar *src; + xmlAttributePtr attrDecl; + + if (doc == NULL) return(NULL); + if (elem == NULL) return(NULL); + if (name == NULL) return(NULL); + if (value == NULL) return(NULL); + + attrDecl = xmlGetDtdAttrDesc(doc->intSubset, elem->name, name); + if ((attrDecl == NULL) && (doc->extSubset != NULL)) + attrDecl = xmlGetDtdAttrDesc(doc->extSubset, elem->name, name); + + if (attrDecl == NULL) + return(NULL); + if (attrDecl->atype == XML_ATTRIBUTE_CDATA) + return(NULL); + + ret = xmlStrdup(value); + if (ret == NULL) + return(NULL); + src = value; + dst = ret; + while (*src == 0x20) src++; + while (*src != 0) { + if (*src == 0x20) { + while (*src == 0x20) src++; + if (*src != 0) + *dst++ = 0x20; + } else { + *dst++ = *src++; + } + } + *dst = 0; + return(ret); +} + +/** * xmlValidateAttributeDecl: * @ctxt: the validation context * @doc: a document instance @@ -2310,7 +2650,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, /* Attribute Default Legal */ /* Enumeration */ if (attr->defaultValue != NULL) { - val = xmlValidateAttributeValue(attr->type, attr->defaultValue); + val = xmlValidateAttributeValue(attr->atype, attr->defaultValue); if (val == 0) { VERROR(ctxt->userData, "Syntax of default value for attribute %s on %s is not valid\n", @@ -2320,7 +2660,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, } /* ID Attribute Default */ - if ((attr->type == XML_ATTRIBUTE_ID)&& + if ((attr->atype == XML_ATTRIBUTE_ID)&& (attr->def != XML_ATTRIBUTE_IMPLIED) && (attr->def != XML_ATTRIBUTE_REQUIRED)) { VERROR(ctxt->userData, @@ -2330,19 +2670,68 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, } /* One ID per Element Type */ - if ((attr->type == XML_ATTRIBUTE_ID) && (doc->extSubset != NULL)) { - int nbId = 0; + if (attr->atype == XML_ATTRIBUTE_ID) { + int nbId; /* the trick is taht we parse DtD as their own internal subset */ - xmlElementPtr elem = xmlGetDtdElementDesc(doc->extSubset, + xmlElementPtr elem = xmlGetDtdElementDesc(doc->intSubset, attr->elem); if (elem != NULL) { nbId = xmlScanIDAttributeDecl(NULL, elem); + } else { + xmlAttributeTablePtr table; + int i; + + /* + * The attribute may be declared in the internal subset and the + * element in the external subset. + */ + nbId = 0; + table = doc->intSubset->attributes; + if (table != NULL) { + for (i = 0;i < table->nb_attributes;i++) { + if ((table->table[i]->atype == XML_ATTRIBUTE_ID) && + (!xmlStrcmp(table->table[i]->elem, attr->elem))) { + nbId++; + } + } + } } - if (nbId >= 1) + if (nbId > 1) { VERROR(ctxt->userData, - "Element %s has ID attribute defined in the external subset : %s\n", - attr->elem, attr->name); + "Element %s has %d ID attribute defined in the internal subset : %s\n", + attr->elem, nbId, attr->name); + } else if (doc->extSubset != NULL) { + int extId = 0; + elem = xmlGetDtdElementDesc(doc->extSubset, attr->elem); + if (elem != NULL) { + extId = xmlScanIDAttributeDecl(NULL, elem); + } + if (extId > 1) { + VERROR(ctxt->userData, + "Element %s has %d ID attribute defined in the external subset : %s\n", + attr->elem, extId, attr->name); + } else if (extId + nbId > 1) { + VERROR(ctxt->userData, +"Element %s has ID attributes defined in the internal and external subset : %s\n", + attr->elem, attr->name); + } + } + } + + /* Validity Constraint: Enumeration */ + if ((attr->defaultValue != NULL) && (attr->tree != NULL)) { + xmlEnumerationPtr tree = attr->tree; + while (tree != NULL) { + if (!xmlStrcmp(tree->name, attr->defaultValue)) break; + tree = tree->next; + } + if (tree == NULL) { + VERROR(ctxt->userData, +"Default value \"%s\" for attribute %s on %s is not among the enumerated set\n", + attr->defaultValue, attr->name, attr->elem); + ret = 0; + } } return(ret); @@ -2375,7 +2764,7 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, if (elem == NULL) return(1); /* No Duplicate Types */ - if (elem->type == XML_ELEMENT_TYPE_MIXED) { + if (elem->etype == XML_ELEMENT_TYPE_MIXED) { xmlElementContentPtr cur, next; const xmlChar *name; @@ -2441,7 +2830,7 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, * @value: the attribute value (without entities processing) * * Try to validate a single attribute for an element - * basically it * does the following checks as described by the + * basically it does the following checks as described by the * XML-1.0 recommendation: * - [ VC: Attribute Value Type ] * - [ VC: Fixed Attribute Default ] @@ -2481,7 +2870,9 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc, attr->name, elem->name); return(0); } - val = xmlValidateAttributeValue(attrDecl->type, value); + attr->atype = attrDecl->atype; + + val = xmlValidateAttributeValue(attrDecl->atype, value); if (val == 0) { VERROR(ctxt->userData, "Syntax of value for attribute %s on %s is not valid\n", @@ -2489,17 +2880,28 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc, ret = 0; } + /* Validity constraint: Fixed Attribute Default */ + if (attrDecl->def == XML_ATTRIBUTE_FIXED) { + if (xmlStrcmp(value, attrDecl->defaultValue)) { + VERROR(ctxt->userData, + "Value for attribute %s on %s is differnt from default \"%s\"\n", + attr->name, elem->name, attrDecl->defaultValue); + ret = 0; + } + } + /* Validity Constraint: ID uniqueness */ - if (attrDecl->type == XML_ATTRIBUTE_ID) { + if (attrDecl->atype == XML_ATTRIBUTE_ID) { xmlAddID(ctxt, doc, value, attr); } - if (attrDecl->type == XML_ATTRIBUTE_IDREF) { + if ((attrDecl->atype == XML_ATTRIBUTE_IDREF) || + (attrDecl->atype == XML_ATTRIBUTE_IDREFS)) { xmlAddRef(ctxt, doc, value, attr); } /* Validity Constraint: Notation Attributes */ - if (attrDecl->type == XML_ATTRIBUTE_NOTATION) { + if (attrDecl->atype == XML_ATTRIBUTE_NOTATION) { xmlEnumerationPtr tree = attrDecl->tree; xmlNotationPtr nota; @@ -2522,14 +2924,14 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc, } if (tree == NULL) { VERROR(ctxt->userData, - "Value \"%s\" for attribute %s on %s is among the enumerated notations\n", +"Value \"%s\" for attribute %s on %s is not among the enumerated notations\n", value, attr->name, elem->name); ret = 0; } } /* Validity Constraint: Enumeration */ - if (attrDecl->type == XML_ATTRIBUTE_ENUMERATION) { + if (attrDecl->atype == XML_ATTRIBUTE_ENUMERATION) { xmlEnumerationPtr tree = attrDecl->tree; while (tree != NULL) { if (!xmlStrcmp(tree->name, value)) break; @@ -2552,14 +2954,10 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc, ret = 0; } - /******** - elemDecl = xmlGetDtdElementDesc(doc->intSubset, elem->name); - if ((elemDecl == NULL) && (doc->extSubset != NULL)) - elemDecl = xmlGetDtdElementDesc(doc->extSubset, elem->name); - if (elemDecl == NULL) { - return(0); - } - ********/ + /* Extra check for the attribute value */ + ret &= xmlValidateAttributeValue2(ctxt, doc, attr->name, + attrDecl->atype, value); + return(ret); } @@ -2586,7 +2984,22 @@ xmlValidateElementTypeExpr(xmlValidCtxtPtr ctxt, xmlNodePtr *child, int ret = 1; if (cont == NULL) return(-1); + DEBUG_VALID_STATE(*child, cont) while (*child != NULL) { + if ((*child)->type == XML_ENTITY_REF_NODE) { + /* + * If there is an entity declared an it's not empty + * Push the current node on the stack and process with the + * entity content. + */ + if (((*child)->children != NULL) && + ((*child)->children->children != NULL)) { + nodeVPush(ctxt, *child); + *child = (*child)->children->children; + } else + *child = (*child)->next; + continue; + } if ((*child)->type == XML_PI_NODE) { *child = (*child)->next; continue; @@ -2600,6 +3013,7 @@ xmlValidateElementTypeExpr(xmlValidCtxtPtr ctxt, xmlNodePtr *child, } break; } + DEBUG_VALID_STATE(*child, cont) switch (cont->type) { case XML_ELEMENT_CONTENT_PCDATA: if (*child == NULL) return(0); @@ -2608,8 +3022,16 @@ xmlValidateElementTypeExpr(xmlValidCtxtPtr ctxt, xmlNodePtr *child, case XML_ELEMENT_CONTENT_ELEMENT: if (*child == NULL) return(0); ret = (!xmlStrcmp((*child)->name, cont->name)); - if (ret == 1) + if (ret == 1) { + while ((*child)->next == NULL) { + if (((*child)->parent != NULL) && + ((*child)->parent->type == XML_ENTITY_DECL)) { + *child = nodeVPop(ctxt); + } else + break; + } *child = (*child)->next; + } return(ret); case XML_ELEMENT_CONTENT_OR: cur = *child; @@ -2666,7 +3088,23 @@ xmlValidateElementTypeElement(xmlValidCtxtPtr ctxt, xmlNodePtr *child, int ret = 1; if (cont == NULL) return(-1); + + DEBUG_VALID_STATE(*child, cont) while (*child != NULL) { + if ((*child)->type == XML_ENTITY_REF_NODE) { + /* + * If there is an entity declared an it's not empty + * Push the current node on the stack and process with the + * entity content. + */ + if (((*child)->children != NULL) && + ((*child)->children->children != NULL)) { + nodeVPush(ctxt, *child); + *child = (*child)->children->children; + } else + *child = (*child)->next; + continue; + } if ((*child)->type == XML_PI_NODE) { *child = (*child)->next; continue; @@ -2680,6 +3118,7 @@ xmlValidateElementTypeElement(xmlValidCtxtPtr ctxt, xmlNodePtr *child, } break; } + DEBUG_VALID_STATE(*child, cont) cur = *child; ret = xmlValidateElementTypeExpr(ctxt, child, cont); if (ret == -1) return(-1); @@ -2690,7 +3129,14 @@ xmlValidateElementTypeElement(xmlValidCtxtPtr ctxt, xmlNodePtr *child, while ((*child != NULL) && (((*child)->type == XML_PI_NODE) || ((*child)->type == XML_COMMENT_NODE))) { - *child = (*child)->next; + while ((*child)->next == NULL) { + if (((*child)->parent != NULL) && + ((*child)->parent->type == XML_ENTITY_REF_NODE)) { + *child = (*child)->parent; + } else + break; + } + *child = (*child)->next; } return(1); } @@ -2722,6 +3168,20 @@ xmlValidateElementTypeElement(xmlValidCtxtPtr ctxt, xmlNodePtr *child, break; } while (*child != NULL) { + if ((*child)->type == XML_ENTITY_REF_NODE) { + /* + * If there is an entity declared an it's not empty + * Push the current node on the stack and process with the + * entity content. + */ + if (((*child)->children != NULL) && + ((*child)->children->children != NULL)) { + nodeVPush(ctxt, *child); + *child = (*child)->children->children; + } else + *child = (*child)->next; + continue; + } if ((*child)->type == XML_PI_NODE) { *child = (*child)->next; continue; @@ -2753,7 +3213,7 @@ xmlSprintfElementChilds(char *buf, xmlNodePtr node, int glob) { if (node == NULL) return; if (glob) strcat(buf, "("); - cur = node->childs; + cur = node->children; while (cur != NULL) { switch (cur->type) { case XML_ELEMENT_NODE: @@ -2780,7 +3240,11 @@ xmlSprintfElementChilds(char *buf, xmlNodePtr node, int glob) { break; case XML_ENTITY_NODE: case XML_PI_NODE: + case XML_DTD_NODE: case XML_COMMENT_NODE: + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: break; } cur = cur->next; @@ -2828,7 +3292,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, "Attribute element not expected here\n"); return(0); case XML_TEXT_NODE: - if (elem->childs != NULL) { + if (elem->children != NULL) { VERROR(ctxt->userData, "Text element has childs !\n"); return(0); } @@ -2893,9 +3357,9 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, } /* Check taht the element content matches the definition */ - switch (elemDecl->type) { + switch (elemDecl->etype) { case XML_ELEMENT_TYPE_EMPTY: - if (elem->childs != NULL) { + if (elem->children != NULL) { VERROR(ctxt->userData, "Element %s was declared EMPTY this one has content\n", elem->name); @@ -2907,7 +3371,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, break; case XML_ELEMENT_TYPE_MIXED: /* Hum, this start to get messy */ - child = elem->childs; + child = elem->children; while (child != NULL) { if (child->type == XML_ELEMENT_NODE) { name = child->name; @@ -2939,7 +3403,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, } break; case XML_ELEMENT_TYPE_ELEMENT: - child = elem->childs; + child = elem->children; cont = elemDecl->content; ret = xmlValidateElementTypeElement(ctxt, &child, cont); if ((ret == 0) || (child != NULL)) { @@ -3020,7 +3484,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, } } found: - attr = attr->next; + attr = attr->nexth; } return(ret); } @@ -3091,13 +3555,13 @@ xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) { ret &= xmlValidateOneElement(ctxt, doc, elem); attr = elem->properties; while(attr != NULL) { - value = xmlNodeListGetString(doc, attr->val, 0); + value = xmlNodeListGetString(doc, attr->children, 0); ret &= xmlValidateOneAttribute(ctxt, doc, elem, attr, value); if (value != NULL) xmlFree(value); attr= attr->next; } - child = elem->childs; + child = elem->children; while (child != NULL) { ret &= xmlValidateElement(ctxt, doc, child); child = child->next; @@ -3132,17 +3596,50 @@ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { } /* - * Get the refs table + * Check all the NOTATION/NOTATIONS attributes + */ + /* + * Check all the ENTITY/ENTITIES attributes definition for validity + */ + /* + * Check all the IDREF/IDREFS attributes definition for validity */ table = doc->refs; if (table != NULL) { for (i = 0; i < table->nb_refs; i++) { - id = xmlGetID(doc, table->table[i]->value); - if (id == NULL) { - VERROR(ctxt->userData, - "IDREF attribute %s reference an unknown ID '%s'\n", - table->table[i]->attr->name, table->table[i]->value); - ret = 0; + if (table->table[i]->attr->atype == XML_ATTRIBUTE_IDREF) { + id = xmlGetID(doc, table->table[i]->value); + if (id == NULL) { + VERROR(ctxt->userData, + "IDREF attribute %s reference an unknown ID \"%s\"\n", + table->table[i]->attr->name, table->table[i]->value); + ret = 0; + } + } else if (table->table[i]->attr->atype == XML_ATTRIBUTE_IDREFS) { + xmlChar *dup, *name = NULL, *cur, save; + + dup = xmlStrdup(table->table[i]->value); + if (dup == NULL) + return(0); + cur = dup; + while (*cur != 0) { + name = cur; + while ((*cur != 0) && (!IS_BLANK(*cur))) cur++; + save = *cur; + *cur = 0; + id = xmlGetID(doc, name); + if (id == NULL) { + VERROR(ctxt->userData, + "IDREFS attribute %s reference an unknown ID \"%s\"\n", + table->table[i]->attr->name, name); + ret = 0; + } + if (save == 0) + break; + *cur = save; + while (IS_BLANK(*cur)) cur++; + } + xmlFree(dup); } } } @@ -3185,6 +3682,102 @@ xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) { } /** + * xmlValidateDtdFinal: + * @ctxt: the validation context + * @doc: a document instance + * + * Does the final step for the dtds validation once all the + * subsets have been parsed + * + * basically it does the following checks described by the XML Rec + * - check that ENTITY and ENTITIES type attributes default or + * possible values matches one of the defined entities. + * - check that NOTATION type attributes default or + * possible values matches one of the defined notations. + * + * returns 1 if valid or 0 otherwise + */ + +int +xmlValidateDtdFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { + int ret = 1, i; + xmlDtdPtr dtd; + xmlAttributeTablePtr table; + xmlAttributePtr cur; + + if (doc == NULL) return(0); + if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) + return(0); + dtd = doc->intSubset; + if ((dtd != NULL) && (dtd->attributes != NULL)) { + table = dtd->attributes; + + for (i = 0;i < table->nb_attributes;i++) { + cur = table->table[i]; + switch (cur->atype) { + case XML_ATTRIBUTE_CDATA: + case XML_ATTRIBUTE_ID: + case XML_ATTRIBUTE_IDREF : + case XML_ATTRIBUTE_IDREFS: + case XML_ATTRIBUTE_NMTOKEN: + case XML_ATTRIBUTE_NMTOKENS: + case XML_ATTRIBUTE_ENUMERATION: + break; + case XML_ATTRIBUTE_ENTITY: + case XML_ATTRIBUTE_ENTITIES: + case XML_ATTRIBUTE_NOTATION: + if (cur->defaultValue != NULL) { + ret &= xmlValidateAttributeValue2(ctxt, doc, cur->name, + cur->atype, cur->defaultValue); + } + if (cur->tree != NULL) { + xmlEnumerationPtr tree = cur->tree; + while (tree != NULL) { + ret &= xmlValidateAttributeValue2(ctxt, doc, + cur->name, cur->atype, tree->name); + tree = tree->next; + } + } + } + } + } + dtd = doc->extSubset; + if ((dtd != NULL) && (dtd->attributes != NULL)) { + table = dtd->attributes; + + for (i = 0;i < table->nb_attributes;i++) { + cur = table->table[i]; + switch (cur->atype) { + case XML_ATTRIBUTE_CDATA: + case XML_ATTRIBUTE_ID: + case XML_ATTRIBUTE_IDREF : + case XML_ATTRIBUTE_IDREFS: + case XML_ATTRIBUTE_NMTOKEN: + case XML_ATTRIBUTE_NMTOKENS: + case XML_ATTRIBUTE_ENUMERATION: + break; + case XML_ATTRIBUTE_ENTITY: + case XML_ATTRIBUTE_ENTITIES: + case XML_ATTRIBUTE_NOTATION: + if (cur->defaultValue != NULL) { + ret &= xmlValidateAttributeValue2(ctxt, doc, cur->name, + cur->atype, cur->defaultValue); + } + if (cur->tree != NULL) { + xmlEnumerationPtr tree = cur->tree; + while (tree != NULL) { + ret &= xmlValidateAttributeValue2(ctxt, doc, + cur->name, cur->atype, tree->name); + tree = tree->next; + } + } + } + } + } + return(ret); +} + +/** * xmlValidateDocument: * @ctxt: the validation context * @doc: a document instance @@ -3212,21 +3805,22 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) { if (doc->extSubset == NULL) { if (doc->intSubset->SystemID != NULL) { VERROR(ctxt->userData, - "Could not load the external subset '%s'\n", + "Could not load the external subset \"%s\"\n", doc->intSubset->SystemID); } else { VERROR(ctxt->userData, - "Could not load the external subset '%s'\n", + "Could not load the external subset \"%s\"\n", doc->intSubset->ExternalID); } return(0); } } + ret = xmlValidateDtdFinal(ctxt, doc); if (!xmlValidateRoot(ctxt, doc)) return(0); root = xmlDocGetRootElement(doc); - ret = xmlValidateElement(ctxt, doc, root); + ret &= xmlValidateElement(ctxt, doc, root); ret &= xmlValidateDocumentFinal(ctxt, doc); return(ret); } @@ -3351,7 +3945,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list, */ prev_next = prev ? prev->next : NULL; next_prev = next ? next->prev : NULL; - parent_childs = parent->childs; + parent_childs = parent->children; parent_last = parent->last; /* @@ -3364,7 +3958,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list, test_node->next = next; if (prev) prev->next = test_node; - else parent->childs = test_node; + else parent->children = test_node; if (next) next->prev = test_node; else parent->last = test_node; @@ -3393,7 +3987,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list, */ if (prev) prev->next = prev_next; if (next) next->prev = next_prev; - parent->childs = parent_childs; + parent->children = parent_childs; parent->last = parent_last; return(nb_valid_elements); @@ -29,6 +29,14 @@ struct _xmlValidCtxt { void *userData; /* user specific data block */ xmlValidityErrorFunc error; /* the callback in case of errors */ xmlValidityWarningFunc warning; /* the callback in case of warning */ + + /* Node analysis stack used when validating within entities */ + xmlNodePtr node; /* Current parsed Node */ + int nodeNr; /* Depth of the parsing stack */ + int nodeMax; /* Max depth of the parsing stack */ + xmlNodePtr *nodeTab; /* array of nodes */ + + int finishDtd; /* finished validating the Dtd ? */ }; /* @@ -114,6 +122,8 @@ xmlNotationPtr xmlAddNotationDecl (xmlValidCtxtPtr ctxt, const xmlChar *SystemID); xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table); void xmlFreeNotationTable(xmlNotationTablePtr table); +void xmlDumpNotationDecl (xmlBufferPtr buf, + xmlNotationPtr nota); void xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table); @@ -122,6 +132,9 @@ xmlElementContentPtr xmlNewElementContent (xmlChar *name, xmlElementContentType type); xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content); void xmlFreeElementContent(xmlElementContentPtr cur); +void xmlSprintfElementContent(char *buf, + xmlElementContentPtr content, + int glob); /* Element */ xmlElementPtr xmlAddElementDecl (xmlValidCtxtPtr ctxt, @@ -133,6 +146,8 @@ xmlElementTablePtr xmlCopyElementTable (xmlElementTablePtr table); void xmlFreeElementTable (xmlElementTablePtr table); void xmlDumpElementTable (xmlBufferPtr buf, xmlElementTablePtr table); +void xmlDumpElementDecl (xmlBufferPtr buf, + xmlElementPtr elem); /* Enumeration */ xmlEnumerationPtr xmlCreateEnumeration (xmlChar *name); @@ -144,6 +159,7 @@ xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name, + const xmlChar *prefix, xmlAttributeType type, xmlAttributeDefault def, const xmlChar *defaultValue, @@ -152,6 +168,8 @@ xmlAttributeTablePtr xmlCopyAttributeTable (xmlAttributeTablePtr table); void xmlFreeAttributeTable (xmlAttributeTablePtr table); void xmlDumpAttributeTable (xmlBufferPtr buf, xmlAttributeTablePtr table); +void xmlDumpAttributeDecl (xmlBufferPtr buf, + xmlAttributePtr attr); /* IDs */ xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt, @@ -188,6 +206,10 @@ int xmlValidateRoot (xmlValidCtxtPtr ctxt, int xmlValidateElementDecl (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlElementPtr elem); +xmlChar * xmlValidNormalizeAttributeValue(xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *name, + const xmlChar *value); int xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlAttributePtr attr); @@ -199,6 +221,8 @@ int xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, int xmlValidateDtd (xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd); +int xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); int xmlValidateDocument (xmlValidCtxtPtr ctxt, xmlDocPtr doc); int xmlValidateElement (xmlValidCtxtPtr ctxt, diff --git a/xml-error.h b/xml-error.h index d7e09f47..709dfa20 100644 --- a/xml-error.h +++ b/xml-error.h @@ -115,8 +115,22 @@ typedef enum { XML_ERR_ENCODING_NAME, /* 80 */ - XML_ERR_HYPHEN_IN_COMMENT /* 81 */ + XML_ERR_HYPHEN_IN_COMMENT, /* 81 */ + XML_ERR_INVALID_ENCODING, /* 82 */ + + XML_ERR_EXT_ENTITY_STANDALONE, /* 83 */ + + XML_ERR_CONDSEC_INVALID, /* 84 */ + + XML_ERR_VALUE_REQUIRED, /* 85 */ + + XML_ERR_NOT_WELL_BALANCED, /* 86 */ + XML_ERR_EXTRA_CONTENT, /* 87 */ + XML_ERR_ENTITY_CHAR_ERROR, /* 88 */ + XML_ERR_ENTITY_PE_INTERNAL, /* 88 */ + XML_ERR_ENTITY_LOOP, /* 89 */ + XML_ERR_ENTITY_BOUNDARY /* 90 */ }xmlParserErrors; void xmlParserError (void *ctx, @@ -118,6 +118,7 @@ xmlFreeParserInputBuffer(xmlParserInputBufferPtr in) { * If filename is "-' then we use stdin as the input. * Automatic support for ZLIB/Compress compressed document is provided * by default if found at compile-time. + * Do an encoding check if enc == XML_CHAR_ENCODING_NONE * * Returns the new parser input or NULL */ @@ -201,13 +202,10 @@ xmlParserInputBufferCreateFilename(const char *filename, xmlCharEncoding enc) { } #endif } - /* - * TODO : get the 4 first bytes and decode the charset - * if enc == XML_CHAR_ENCODING_NONE - * plug some encoding conversion routines here. !!! - * enc = xmlDetectCharEncoding(buffer); - */ + /* + * Allocate the Input buffer front-end. + */ ret = xmlAllocParserInputBuffer(enc); if (ret != NULL) { #ifdef HAVE_ZLIB_H @@ -218,7 +216,6 @@ xmlParserInputBufferCreateFilename(const char *filename, xmlCharEncoding enc) { ret->httpIO = httpIO; ret->ftpIO = ftpIO; } - xmlParserInputBufferRead(ret, 4); return(ret); } @@ -289,19 +286,30 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in, int len, const char *buf) { if (len < 0) return(0); if (in->encoder != NULL) { xmlChar *buffer; + int processed = len; buffer = (xmlChar *) xmlMalloc((len + 1) * 2 * sizeof(xmlChar)); if (buffer == NULL) { fprintf(stderr, "xmlParserInputBufferGrow : out of memory !\n"); - xmlFree(buffer); return(-1); } nbchars = in->encoder->input(buffer, (len + 1) * 2 * sizeof(xmlChar), - (xmlChar *) buf, len); + (xmlChar *) buf, &processed); /* * TODO : we really need to have something atomic or the * encoder must report the number of bytes read */ + if (nbchars < 0) { + fprintf(stderr, "xmlParserInputBufferPush: encoder error\n"); + xmlFree(buffer); + return(-1); + } + if (processed != len) { + fprintf(stderr, + "TODO xmlParserInputBufferPush: processed != len\n"); + xmlFree(buffer); + return(-1); + } buffer[nbchars] = 0; xmlBufferAdd(in->buffer, (xmlChar *) buffer, nbchars); xmlFree(buffer); @@ -382,6 +390,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) { } if (in->encoder != NULL) { xmlChar *buf; + int wrote = res; buf = (xmlChar *) xmlMalloc((res + 1) * 2 * sizeof(xmlChar)); if (buf == NULL) { @@ -390,10 +399,24 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) { return(-1); } nbchars = in->encoder->input(buf, (res + 1) * 2 * sizeof(xmlChar), - BAD_CAST buffer, res); + BAD_CAST buffer, &wrote); buf[nbchars] = 0; xmlBufferAdd(in->buffer, (xmlChar *) buf, nbchars); xmlFree(buf); + + /* + * Check that the encoder was able to process the full input + */ + if (wrote != res) { + fprintf(stderr, + "TODO : xmlParserInputBufferGrow wrote %d != res %d\n", + wrote, res); + /* + * TODO !!! + * Need to keep the unprocessed input in a buffer in->unprocessed + */ + } + } else { nbchars = res; buffer[nbchars] = 0; diff --git a/xmlmemory.h b/xmlmemory.h index 64477a1c..11121fb5 100644 --- a/xmlmemory.h +++ b/xmlmemory.h @@ -8,7 +8,7 @@ #ifndef _DEBUG_MEMORY_ALLOC_ #define _DEBUG_MEMORY_ALLOC_ -#define NO_DEBUG_MEMORY +/* #define NO_DEBUG_MEMORY */ #ifdef NO_DEBUG_MEMORY #ifdef HAVE_MALLOC_H @@ -213,9 +213,9 @@ PUSH_AND_POP(xmlXPathObjectPtr, value) * Dirty macros, i.e. one need to make assumption on the context to use them * * CUR_PTR return the current pointer to the xmlChar to be parsed. - * CUR returns the current xmlChar value, i.e. a 8 bit value if compiled - * in ISO-Latin or UTF-8, and the current 16 bit value if compiled - * in UNICODE mode. This should be used internally by the parser + * CUR returns the current xmlChar value, i.e. a 8 bit value + * in ISO-Latin or UTF-8. + * This should be used internally by the parser * only to compare to ASCII values otherwise it would break when * running with UTF-8 encoding. * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only @@ -237,11 +237,8 @@ PUSH_AND_POP(xmlXPathObjectPtr, value) #define SKIP_BLANKS \ while (IS_BLANK(*(ctxt->cur))) NEXT -#ifndef USE_UTF_8 #define CURRENT (*ctxt->cur) #define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur) -#else -#endif /************************************************************************ * * @@ -877,7 +874,7 @@ xmlXPathFreeContext(xmlXPathContextPtr ctxt) { fprintf(xmlXPathDebug, "%s:%d Internal error: no document\n", \ __FILE__, __LINE__); \ } \ - if (ctxt->doc->root == NULL) { \ + if (ctxt->doc->children == NULL) { \ fprintf(xmlXPathDebug, \ "%s:%d Internal error: document without root\n", \ __FILE__, __LINE__); \ @@ -1496,14 +1493,18 @@ xmlXPathNextChild(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_PI_NODE: case XML_COMMENT_NODE: case XML_NOTATION_NODE: - return(ctxt->context->node->childs); - case XML_ATTRIBUTE_NODE: - return(NULL); + case XML_DTD_NODE: + return(ctxt->context->node->children); case XML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: case XML_DOCUMENT_FRAG_NODE: case XML_HTML_DOCUMENT_NODE: - return(((xmlDocPtr) ctxt->context->node)->root); + return(((xmlDocPtr) ctxt->context->node)->children); + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: + case XML_ATTRIBUTE_NODE: + return(NULL); } return(NULL); } @@ -1533,11 +1534,11 @@ xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { return(NULL); if (ctxt->context->node == (xmlNodePtr) ctxt->context->doc) - return(ctxt->context->doc->root); - return(ctxt->context->node->childs); + return(ctxt->context->doc->children); + return(ctxt->context->node->children); } - if (cur->childs != NULL) return(cur->childs); + if (cur->children != NULL) return(cur->children); if (cur->next != NULL) return(cur->next); do { @@ -1606,13 +1607,17 @@ xmlXPathNextParent(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_PI_NODE: case XML_COMMENT_NODE: case XML_NOTATION_NODE: + case XML_DTD_NODE: + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: if (ctxt->context->node->parent == NULL) return((xmlNodePtr) ctxt->context->doc); return(ctxt->context->node->parent); case XML_ATTRIBUTE_NODE: { xmlAttrPtr att = (xmlAttrPtr) ctxt->context->node; - return(att->node); + return(att->parent); } case XML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: @@ -1655,6 +1660,10 @@ xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_ENTITY_NODE: case XML_PI_NODE: case XML_COMMENT_NODE: + case XML_DTD_NODE: + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: case XML_NOTATION_NODE: if (ctxt->context->node->parent == NULL) return((xmlNodePtr) ctxt->context->doc); @@ -1662,7 +1671,7 @@ xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_ATTRIBUTE_NODE: { xmlAttrPtr cur = (xmlAttrPtr) ctxt->context->node; - return(cur->node); + return(cur->parent); } case XML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: @@ -1672,7 +1681,7 @@ xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { } return(NULL); } - if (cur == ctxt->context->doc->root) + if (cur == ctxt->context->doc->children) return((xmlNodePtr) ctxt->context->doc); if (cur == (xmlNodePtr) ctxt->context->doc) return(NULL); @@ -1685,11 +1694,15 @@ xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { case XML_PI_NODE: case XML_COMMENT_NODE: case XML_NOTATION_NODE: + case XML_DTD_NODE: + case XML_ELEMENT_DECL: + case XML_ATTRIBUTE_DECL: + case XML_ENTITY_DECL: return(cur->parent); case XML_ATTRIBUTE_NODE: { xmlAttrPtr att = (xmlAttrPtr) ctxt->context->node; - return(att->node); + return(att->parent); } case XML_DOCUMENT_NODE: case XML_DOCUMENT_TYPE_NODE: @@ -1780,13 +1793,13 @@ xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { return(NULL); if (cur == NULL) return(ctxt->context->node->next);; /* !!!!!!!!! */ - if (cur->childs != NULL) return(cur->childs); + if (cur->children != NULL) return(cur->children); if (cur->next != NULL) return(cur->next); do { cur = cur->parent; if (cur == NULL) return(NULL); - if (cur == ctxt->context->doc->root) return(NULL); + if (cur == ctxt->context->doc->children) return(NULL); if (cur->next != NULL) { cur = cur->next; return(cur); @@ -1820,7 +1833,7 @@ xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { do { cur = cur->parent; if (cur == NULL) return(NULL); - if (cur == ctxt->context->doc->root) return(NULL); + if (cur == ctxt->context->doc->children) return(NULL); if (cur->prev != NULL) { cur = cur->prev; return(cur); @@ -2278,7 +2291,7 @@ xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs) { ID = xmlStrndup(tokens, cur - tokens); attr = xmlGetID(ctxt->context->doc, ID); if (attr != NULL) { - elem = attr->node; + elem = attr->parent; xmlXPathNodeSetAdd(ret->nodesetval, elem); } if (ID != NULL) @@ -3677,6 +3690,8 @@ xmlXPathEvalPathExpr(xmlXPathParserContextPtr ctxt) { if (name != NULL) xmlFree(name); } + if (ctxt->context->nodelist != NULL) + valuePush(ctxt, xmlXPathNewNodeSetList(ctxt->context->nodelist)); } /** |