This is the 2.0.0-beta, lots and lots and lots of changes
Have a look at http://xmlsoft.org/upgrade.html Daniel
@ -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
|
||||
|
95
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
|
||||
#define CURRENT ((int) (*ctxt->input->cur))
|
||||
|
||||
#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 NEXT htmlNextChar(ctxt);
|
||||
|
||||
#else
|
||||
#endif
|
||||
#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;
|
||||
}
|
||||
|
||||
|
20
HTMLtree.c
@ -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;
|
||||
|
350
SAX.c
@ -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);
|
||||
xmlParseExternalSubset(ctxt, 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;
|
||||
/*
|
||||
* 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);
|
||||
if (elem == 0) ctxt->valid = 0;
|
||||
else if (ctxt->inSubset == 2)
|
||||
elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset,
|
||||
name, type, content);
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -679,6 +830,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"
|
||||
*/
|
||||
@ -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;
|
||||
|
@ -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)
|
||||
|
||||
|
454
debugXML.c
@ -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;
|
||||
}
|
||||
|
529
encoding.c
@ -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:
|
||||
*
|
||||
@ -54,6 +51,50 @@
|
||||
* I hope we won't use values > 0xFFFF anytime soon !
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
@ -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;
|
||||
/* 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)
|
||||
* 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-16
|
||||
* Take a block of UTF-8 chars in and try to convert it to an UTF-16LE
|
||||
* block of chars out.
|
||||
* TODO: UTF8ToUTF16 need a fallback mechanism ...
|
||||
* TODO: UTF8ToUTF16LE 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)
|
||||
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= out+outlen;
|
||||
unsigned char* inend= in+inlen;
|
||||
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 < 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
|
||||
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;
|
||||
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;
|
||||
else
|
||||
return(-1);
|
||||
}
|
||||
return out-outstart;
|
||||
return(out-outstart);
|
||||
}
|
||||
|
||||
#endif /* ! HAVE_UNICODE_H */
|
||||
/**
|
||||
* 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) & 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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-16BE
|
||||
* block of chars out.
|
||||
* TODO: UTF8ToUTF16BE need a fallback mechanism ...
|
||||
*
|
||||
* Returns the number of byte written, or -1 by lack of space, or -2
|
||||
* if the transcoding failed.
|
||||
*/
|
||||
int
|
||||
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;
|
||||
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 < 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
|
||||
*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);
|
||||
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);
|
||||
}
|
||||
return(out-outstart);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
10
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
|
||||
|
636
entities.c
@ -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;
|
||||
if (ExternalID != NULL)
|
||||
cur->ExternalID = xmlStrdup(ExternalID);
|
||||
else
|
||||
cur->ExternalID = NULL;
|
||||
if (SystemID != NULL)
|
||||
cur->SystemID = xmlStrdup(SystemID);
|
||||
else
|
||||
cur->SystemID = NULL;
|
||||
if (content != NULL) {
|
||||
cur->length = xmlStrlen(content);
|
||||
cur->content = xmlStrndup(content, cur->length);
|
||||
} else {
|
||||
cur->length = 0;
|
||||
cur->content = NULL;
|
||||
ret = (xmlEntityPtr) xmlMalloc(sizeof(xmlEntity));
|
||||
if (ret == NULL) {
|
||||
fprintf(stderr, "xmlAddEntity: out of memory\n");
|
||||
return(NULL);
|
||||
}
|
||||
cur->orig = 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)
|
||||
ret->ExternalID = xmlStrdup(ExternalID);
|
||||
if (SystemID != NULL)
|
||||
ret->SystemID = xmlStrdup(SystemID);
|
||||
if (content != NULL) {
|
||||
ret->length = xmlStrlen(content);
|
||||
ret->content = xmlStrndup(content, ret->length);
|
||||
} else {
|
||||
ret->length = 0;
|
||||
ret->content = 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;
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -227,30 +274,187 @@ 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
|
||||
@ -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,34 +1024,119 @@ 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.
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
64
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
||||
/*
|
||||
@ -532,6 +577,12 @@ void xmlBufferWriteChar (xmlBufferPtr buf,
|
||||
void xmlBufferWriteQuotedString(xmlBufferPtr buf,
|
||||
const xmlChar *string);
|
||||
|
||||
/*
|
||||
* Namespace handling
|
||||
*/
|
||||
int xmlReconciliateNs (xmlDocPtr doc,
|
||||
xmlNodePtr tree);
|
||||
|
||||
/*
|
||||
* Saving
|
||||
*/
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
34
nanoftp.c
@ -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",
|
||||
|
39
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
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@ -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>
|
||||
^
|
||||
|
@ -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)>
|
||||
^
|
||||
|
@ -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>
|
||||
^
|
||||
|
@ -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)*>
|
||||
^
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<!-- document start -->
|
||||
<empty/>
|
||||
<empty/>
|
||||
<!-- document end -->
|
||||
</doc>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- document start -->
|
||||
<doc>
|
||||
<empty/>
|
||||
<empty/>
|
||||
</doc>
|
||||
<!-- document end -->
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- comment before the DTD -->
|
||||
<!DOCTYPE doc [
|
||||
<!ELEMENT doc ANY>
|
||||
]>
|
||||
<!-- comment after the DTD -->
|
||||
<doc/>
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -6,5 +6,5 @@
|
||||
<!ELEMENT para (#PCDATA)>
|
||||
]>
|
||||
<item>
|
||||
<para>'they called me &sampleEnt;'</para>
|
||||
<para>'they called me &sampleEnt;'</para>
|
||||
</item>
|
||||
|
@ -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>
|
||||
|
@ -2,4 +2,5 @@
|
||||
<!DOCTYPE spec PUBLIC "-//testspec//" "dtds/eve.dtd" [
|
||||
<!ENTITY iso6.doc.date "29-May-1999">
|
||||
]>
|
||||
<spec/>
|
||||
<spec>
|
||||
</spec>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<!-- document start -->
|
||||
<empty/>
|
||||
<empty/>
|
||||
<!-- document end -->
|
||||
</doc>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- document start -->
|
||||
<doc>
|
||||
<empty/>
|
||||
<empty/>
|
||||
</doc>
|
||||
<!-- document end -->
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -2,4 +2,5 @@
|
||||
<!DOCTYPE spec PUBLIC "-//testspec//" "dtds/eve.dtd" [
|
||||
<!ENTITY iso6.doc.date "29-May-1999">
|
||||
]>
|
||||
<spec/>
|
||||
<spec>
|
||||
</spec>
|
||||
|
@ -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>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<?document-start doc?>
|
||||
<empty/>
|
||||
<empty/>
|
||||
<?document-end doc?>
|
||||
</doc>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<?document-start doc?>
|
||||
<doc>
|
||||
<empty/>
|
||||
<empty/>
|
||||
</doc>
|
||||
<?document-end doc?>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@ -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>
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
1440
result/noent/svg3
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 97 KiB |
@ -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>
|
||||
|
@ -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>
|
||||
|
37
result/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>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<?document-start doc?>
|
||||
<empty/>
|
||||
<empty/>
|
||||
<?document-end doc?>
|
||||
</doc>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<?document-start doc?>
|
||||
<doc>
|
||||
<empty/>
|
||||
<empty/>
|
||||
</doc>
|
||||
<?document-end doc?>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
316
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>
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
104
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>
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
1440
result/svg3
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 97 KiB |
@ -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>
|
||||
|
@ -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?>
|
||||
|
@ -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"
|
||||
|
||||
^
|
||||
|
@ -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>
|
||||
|
17
testSAX.c
@ -73,6 +73,7 @@ xmlSAXHandler emptySAXHandlerStruct = {
|
||||
NULL, /* xmlParserError */
|
||||
NULL, /* xmlParserError */
|
||||
NULL, /* getParameterEntity */
|
||||
NULL, /* cdataBlock; */
|
||||
};
|
||||
|
||||
xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
|
||||
@ -454,6 +455,21 @@ processingInstructionDebug(void *ctx, const xmlChar *target,
|
||||
(char *) target, (char *) data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
@ -553,6 +569,7 @@ xmlSAXHandler debugSAXHandlerStruct = {
|
||||
errorDebug,
|
||||
fatalErrorDebug,
|
||||
getParameterEntityDebug,
|
||||
cdataBlockDebug
|
||||
};
|
||||
|
||||
xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;
|
||||
|
324
tester.c
@ -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();
|
||||
|
137
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 */
|
||||
|
||||
/*
|
||||
@ -532,6 +577,12 @@ void xmlBufferWriteChar (xmlBufferPtr buf,
|
||||
void xmlBufferWriteQuotedString(xmlBufferPtr buf,
|
||||
const xmlChar *string);
|
||||
|
||||
/*
|
||||
* Namespace handling
|
||||
*/
|
||||
int xmlReconciliateNs (xmlDocPtr doc,
|
||||
xmlNodePtr tree);
|
||||
|
||||
/*
|
||||
* Saving
|
||||
*/
|
||||
|
24
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,
|
||||
|
16
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,
|
||||
|
43
xmlIO.c
@ -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;
|
||||
|
@ -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
|
||||
|
59
xpath.c
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|