From noreply at sourceforge.net Sun Aug 3 16:47:45 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 03 Aug 2008 14:47:45 +0000 Subject: [Expat-bugs] [ expat-Bugs-2020141 ] Characters lost during parsing Message-ID: Bugs item #2020141, was opened at 2008-07-17 03:22 Message generated for change (Comment added) made by hartwork You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2020141&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Andrew D. Arenson (arenson9) >Assigned to: Sebastian Pipping (hartwork) Summary: Characters lost during parsing Initial Comment: Characters can be lost during parsing. I'm going to attach a file. My example file is too big to be included through this interface, so I've made it available at: http://miniscd.uits.iupui.edu/aarenson/example6.xml I put the Perl program I used to demonstrate the error as an attachment on this submission, but here it is as well: #!/usr/bin/perl -w use XML::Parser; my $XmlFile = shift @ARGV; my $xp = new XML::Parser(Handlers => {Start => \&start, End => \&end, Char => \&cdata}); $xp->parsefile($XmlFile); sub start { $curTag = lc($_[1]); } sub end { $curTag = ""; } sub cdata { my ($xp,$data) = @_; if ($curTag eq "globalid") { $ID = $data; } if ($data eq ".5") { print "ID: $ID; TAG: $curTag\n"; } } When I use the above program on the example XML file, the last value in the XML file, '52.5', gets parsed as just '.5'. I wonder if this is related to something that was reported twelve months ago on the XML::Parser bug list at: http://rt.cpan.org/Public/Bug/Display.html?id=28585 That bug report on the XML::Parser bug list has not been opened. It is still listed as New. I'm sorry I don't know the version number of Expat that I'm using or how to determine it. ---------------------------------------------------------------------- >Comment By: Sebastian Pipping (hartwork) Date: 2008-08-03 16:47 Message: Logged In: YES user_id=1022691 Originator: NO Hello Andrew. Are you aware that character data handlers can receive the content of an element split among several handler calls? For instance your "52.5" text here could come in as two calls serving "52" first and then ".5". I modified the script you attached to help tracing this. Please let us know if this is happening on your machine. (On mine "52.5" is served as a single unit from the XML file you provided.) Best regards, Sebastian File Added: show_err_2.pl ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2020141&group_id=10127 From noreply at sourceforge.net Sun Aug 3 17:11:03 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 03 Aug 2008 15:11:03 +0000 Subject: [Expat-bugs] [ expat-Bugs-1837011 ] Unable to find library 'libexpat.so.6' Message-ID: Bugs item #1837011, was opened at 2007-11-23 12:53 Message generated for change (Comment added) made by hartwork You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1837011&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: XML::Parser (inactive) Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Unable to find library 'libexpat.so.6' Initial Comment: email address annemarie.nolan at meteor.ie ldd -s Expat.so find library=libexpat.so.6; required by ./Expat.so search path=:/isv/isv_app/expat/usr/local/lib:/isv/isv_app/expat/usr/local/include:/isv/isv_app/expat/usr/local/bin:/opt/hp-gcc- 4.2.1/lib/hpux64:/usr/lib/hpux64 (LD_LIBRARY_PATH) trying path=/isv/isv_app/expat/usr/local/lib/libexpat.so.6 trying path=/isv/isv_app/expat/usr/local/include/libexpat.so.6 trying path=/isv/isv_app/expat/usr/local/bin/libexpat.so.6 trying path=/opt/hp-gcc-4.2.1/lib/hpux64/libexpat.so.6 trying path=/usr/lib/hpux64/libexpat.so.6 search path=/isv/isv_app/tuxedo/8.1.273/lib:/isv/isv_app/sqr/rel/bin/SQR/Server/Oracle/bin:/isv/isvsbx1b/rel/server/lib:/isv/isv _app/oracle/product/10.2.0.3/lib::/isv/isvsbx1b/imp/loc/server/lib:/isv/isvsbx1b/imp/rel/server/lib:/isv/isvsbx1b/rel/server/lib32:/ isv/isv_app/oracle/oracle/rel/lib32:/isv/isv_app/tools/bin/../lib:/isv/isv_app/src:/isv/isv_app/expat/usr/local/lib:/isv/isv_app/exp at/usr/local/include:/isv/isv_app/expat/usr/local/bin:/opt/hp-gcc-4.2.1/lib/hpux64:/usr/lib/hpux64:/opt/hp-gcc-4.2.1/lib (SHLIB_PAT H) trying path=/isv/isv_app/tuxedo/8.1.273/lib/libexpat.so.6 trying path=/isv/isv_app/sqr/rel/bin/SQR/Server/Oracle/bin/libexpat.so.6 trying path=/isv/isvsbx1b/rel/server/lib/libexpat.so.6 trying path=/isv/isv_app/oracle/product/10.2.0.3/lib/libexpat.so.6 trying path=/isv/isvsbx1b/imp/loc/server/lib/libexpat.so.6 trying path=/isv/isvsbx1b/imp/rel/server/lib/libexpat.so.6 trying path=/isv/isvsbx1b/rel/server/lib32/libexpat.so.6 trying path=/isv/isv_app/oracle/oracle/rel/lib32/libexpat.so.6 trying path=/isv/isv_app/tools/bin/../lib/libexpat.so.6 trying path=/isv/isv_app/src/libexpat.so.6 trying path=/isv/isv_app/expat/usr/local/lib/libexpat.so.6 trying path=/isv/isv_app/expat/usr/local/include/libexpat.so.6 trying path=/isv/isv_app/expat/usr/local/bin/libexpat.so.6 trying path=/opt/hp-gcc-4.2.1/lib/hpux64/libexpat.so.6 trying path=/usr/lib/hpux64/libexpat.so.6 trying path=/opt/hp-gcc-4.2.1/lib/libexpat.so.6 search path=/usr/local/lib:/usr/lib/hpux64:/sv/app/expat/product/2.0.1_64/lib (RUNPATH) trying path=/usr/local/lib/libexpat.so.6 trying path=/usr/lib/hpux64/libexpat.so.6 trying path=/sv/app/expat/product/2.0.1_64/lib/libexpat.so.6 search path=/usr/lib/hpux64 (default) trying path=/usr/lib/hpux64/libexpat.so.6 Unable to find library 'libexpat.so.6'. Expat was installed to the /isv/isv_app/expat directory. Below, you can see that libexpat.so. exists. $ ll total 2180 drwxr-xr-x 2 isv_app isv 1024 Nov 22 23:05 ./ drwxr-xr-x 6 isv_app isv 96 Nov 22 23:05 ../ -rw-r--r-- 1 isv_app isv 579680 Nov 22 23:05 libexpat.a -rwxr-xr-x 1 isv_app isv 797 Nov 22 23:05 libexpat.la* lrwxr-xr-x 1 root sys 15 Nov 22 23:05 libexpat.so@ -> libexpat.so.6.2 lrwxr-xr-x 1 root sys 15 Nov 22 23:05 libexpat.so.6@ -> libexpat.so.6.2 -r-xr-xr-x 1 isv_app isv 533240 Nov 22 23:05 libexpat.so.6.2* The SHLIB_PATH variable has been configured to include the path containing the above file. Why would the library file not be detected? ---------------------------------------------------------------------- >Comment By: Sebastian Pipping (hartwork) Date: 2008-08-03 17:11 Message: Logged In: YES user_id=1022691 Originator: NO In the output your provived I see the text ":/isv/isv_app/expat/usr/local/lib:". To me this clearly looks like there is a colon missingin between - shouldn't it read ":/isv/isv_app/expat:/usr/local/lib:" instead? Please let us know if that helps. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1837011&group_id=10127 From noreply at sourceforge.net Sun Aug 3 17:17:19 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 03 Aug 2008 15:17:19 +0000 Subject: [Expat-bugs] [ expat-Bugs-1690883 ] Expat rejects xml: prefix with "unbound prefix" error. Message-ID: Bugs item #1690883, was opened at 2007-03-29 22:31 Message generated for change (Comment added) made by hartwork You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1690883&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Test Required >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Scott Klement (klemscot) >Assigned to: Karl Waclawek (kwaclaw) Summary: Expat rejects xml: prefix with "unbound prefix" error. Initial Comment: When namespace handling is enabled, Expat considers the following document invalid: Foo The error is "Unbound prefix", referring to the "xml:" prefix. However, according the W3C spec, it's not necessary to declare that particular prefix. I'm looking at the following document: http://www.w3.org/TR/REC-xml-names/ Under chapter 3, subheading "Namespace constraint: Reserved Prefixes and Namespace Names" This is the section I'm reading: The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace. ****It MAY, but need not, be declared****, and MUST NOT be bound to any other namespace name. Other prefixes MUST NOT be bound to this namespace name, and it MUST NOT be declared as the default namespace. ---------------------------------------------------------------------- >Comment By: Sebastian Pipping (hartwork) Date: 2008-08-03 17:17 Message: Logged In: YES user_id=1022691 Originator: NO Reporter 'klemscot' confirmed the bug to be gone, so I'm closing this bug as closing seems to have been been forgotten... ---------------------------------------------------------------------- Comment By: Scott Klement (klemscot) Date: 2007-05-08 17:58 Message: Logged In: YES user_id=223473 Originator: YES Confirmed. CVS build works great, problem solved! Thanks for your help. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2007-05-08 04:27 Message: Logged In: YES user_id=290026 Originator: NO Patch applied in ascii.h rev. 1.5 and xmlparse.c rev. 1.161. Would you please try a build from CVS and see if it still works for you. ---------------------------------------------------------------------- Comment By: Scott Klement (klemscot) Date: 2007-05-08 00:08 Message: Logged In: YES user_id=223473 Originator: YES Gak, I didn't notice the file upload option until you pointed it out! Yes, I'll upload it as an attachment. Thanks. File Added: expat.diff ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2007-05-07 23:51 Message: Logged In: YES user_id=290026 Originator: NO Thanks very much for catching this! I didn't think of EBCDIC, I have to admit. Could you please attach you patch as a file. SF has added a few line breaks on the web page (and what not). ---------------------------------------------------------------------- Comment By: Scott Klement (klemscot) Date: 2007-05-07 09:30 Message: Logged In: YES user_id=223473 Originator: YES Ooops. Sorry about the duplicate comment! Here's a patch (Unified Diff) that solves the problem for me. --- /home/klemscot/as400/expat-2.0.0.orig/lib/ascii.h Tue Nov 12 15:45:57 2002 +++ ./ascii.h Mon May 7 01:25:36 2007 @@ -83,3 +83,10 @@ #define ASCII_LSQB 0x5B #define ASCII_RSQB 0x5D #define ASCII_UNDERSCORE 0x5F +#define ASCII_LPAREN 0x28 +#define ASCII_RPAREN 0x29 +#define ASCII_FF 0x0C +#define ASCII_SLASH 0x2F +#define ASCII_HASH 0x23 +#define ASCII_PIPE 0x7C +#define ASCII_COMMA 0x2C --- /home/klemscot/as400/expat-2.0.0.orig/lib/xmlparse.c Fri Dec 23 08:45:27 2005 +++ ./xmlparse.c Mon May 7 01:21:55 2007 @@ -5,6 +5,7 @@ #include #include /* memset(), memcpy() */ #include +#include #define XML_BUILDING_EXPAT 1 @@ -665,10 +666,12 @@ } static const XML_Char implicitContext[] = { - 'x', 'm', 'l', '=', 'h', 't', 't', 'p', ':', '/', '/', - 'w', 'w', 'w', '.', 'w', '3', '.', 'o', 'r', 'g', '/', - 'X', 'M', 'L', '/', '1', '9', '9', '8', '/', - 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0' + ASCII_x, ASCII_m, ASCII_l, ASCII_EQUALS, ASCII_h, ASCII_t, ASCII_t, ASCII_p, + ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, + ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g, + ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9, + ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e, + ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0' }; XML_Parser XMLCALL @@ -761,7 +764,7 @@ unknownEncodingHandler = NULL; unknownEncodingHandlerData = NULL; - namespaceSeparator = '!'; + namespaceSeparator = ASCII_EXCL; ns = XML_FALSE; ns_triplets = XML_FALSE; @@ -2806,7 +2809,7 @@ return XML_ERROR_NO_MEMORY; uriHash = CHAR_HASH(uriHash, c); } - while (*s++ != XML_T(':')) + while (*s++ != XML_T(ASCII_COLON)) ; do { /* copies null terminator */ const XML_Char c = *s; @@ -2880,7 +2883,7 @@ if (!binding) return XML_ERROR_UNBOUND_PREFIX; localPart = tagNamePtr->str; - while (*localPart++ != XML_T(':')) + while (*localPart++ != XML_T(ASCII_COLON)) ; } else if (dtd->defaultPrefix.binding) { @@ -2935,17 +2938,21 @@ const XML_Char *uri, BINDING **bindingsPtr) { static const XML_Char xmlNamespace[] = { - 'h', 't', 't', 'p', ':', '/', '/', - 'w', 'w', 'w', '.', 'w', '3', '.', 'o', 'r', 'g', '/', - 'X', 'M', 'L', '/', '1', '9', '9', '8', '/', - 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0' + ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, + ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, + ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, + ASCII_SLASH, ASCII_1, ASCII_9, ASCII_9, ASCII_8, ASCII_SLASH, + ASCII_n, ASCII_a, ASCII_m, ASCII_e, ASCII_s, ASCII_p, ASCII_a, ASCII_c, + ASCII_e, '\0' }; static const int xmlLen = (int)sizeof(xmlNamespace)/sizeof(XML_Char) - 1; static const XML_Char xmlnsNamespace[] = { - 'h', 't', 't', 'p', ':', '/', '/', - 'w', 'w', 'w', '.', 'w', '3', '.', 'o', 'r', 'g', '/', - '2', '0', '0', '0', '/', 'x', 'm', 'l', 'n', 's', '/', '\0' + ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, + ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, + ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_2, ASCII_0, ASCII_0, + ASCII_0, ASCII_SLASH, ASCII_x, ASCII_m, ASCII_l, ASCII_n, ASCII_s, + ASCII_SLASH, '\0' }; static const int xmlnsLen = (int)sizeof(xmlnsNamespace)/sizeof(XML_Char) - 1; @@ -2962,13 +2969,13 @@ return XML_ERROR_UNDECLARING_PREFIX; if (prefix->name - && prefix->name[0] == XML_T('x') - && prefix->name[1] == XML_T('m') - && prefix->name[2] == XML_T('l')) { + && prefix->name[0] == XML_T(ASCII_x) + && prefix->name[1] == XML_T(ASCII_m) + && prefix->name[2] == XML_T(ASCII_l)) { /* Not allowed to bind xmlns */ - if (prefix->name[3] == XML_T('n') - && prefix->name[4] == XML_T('s') + if (prefix->name[3] == XML_T(ASCII_n) + && prefix->name[4] == XML_T(ASCII_s) && prefix->name[5] == XML_T('\0')) return XML_ERROR_RESERVED_PREFIX_XMLNS; @@ -3628,23 +3635,30 @@ XML_Bool haveMore) { #ifdef XML_DTD - static const XML_Char externalSubsetName[] = { '#' , '\0' }; + static const XML_Char externalSubsetName[] = { ASCII_HASH , '\0' }; #endif /* XML_DTD */ - static const XML_Char atypeCDATA[] = { 'C', 'D', 'A', 'T', 'A', '\0' }; - static const XML_Char atypeID[] = { 'I', 'D', '\0' }; - static const XML_Char atypeIDREF[] = { 'I', 'D', 'R', 'E', 'F', '\0' }; - static const XML_Char atypeIDREFS[] = { 'I', 'D', 'R', 'E', 'F', 'S', '\0' }; - static const XML_Char atypeENTITY[] = { 'E', 'N', 'T', 'I', 'T', 'Y', '\0' }; + static const XML_Char atypeCDATA[] = { ASCII_C, ASCII_D, ASCII_A, ASCII_T, + ASCII_A, '\0' }; + static const XML_Char atypeID[] = { ASCII_I, ASCII_D, '\0' }; + static const XML_Char atypeIDREF[] = { ASCII_I, ASCII_D, ASCII_R, ASCII_E, + ASCII_F, '\0' }; + static const XML_Char atypeIDREFS[] = { ASCII_I, ASCII_D, ASCII_R, ASCII_E, + ASCII_F, ASCII_S, '\0' }; + static const XML_Char atypeENTITY[] = { ASCII_E, ASCII_N, ASCII_T, ASCII_I, + ASCII_T, ASCII_Y, '\0' }; static const XML_Char atypeENTITIES[] = - { 'E', 'N', 'T', 'I', 'T', 'I', 'E', 'S', '\0' }; + { ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_I, ASCII_E, + ASCII_S, '\0' }; static const XML_Char atypeNMTOKEN[] = { - 'N', 'M', 'T', 'O', 'K', 'E', 'N', '\0' }; + ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0' }; static const XML_Char atypeNMTOKENS[] = { - 'N', 'M', 'T', 'O', 'K', 'E', 'N', 'S', '\0' }; + ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, + ASCII_S, '\0' }; static const XML_Char notationPrefix[] = { - 'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N', '(', '\0' }; - static const XML_Char enumValueSep[] = { '|', '\0' }; - static const XML_Char enumValueStart[] = { '(', '\0' }; + ASCII_N, ASCII_O, ASCII_T, ASCII_A, ASCII_T, ASCII_I, ASCII_O, ASCII_N, + ASCII_LPAREN, '\0' }; + static const XML_Char enumValueSep[] = { ASCII_PIPE, '\0' }; + static const XML_Char enumValueStart[] = { ASCII_LPAREN, '\0' }; /* save one level of indirection */ DTD * const dtd = _dtd; @@ -3950,11 +3964,11 @@ 0, parser)) return XML_ERROR_NO_MEMORY; if (attlistDeclHandler && declAttributeType) { - if (*declAttributeType == XML_T('(') - || (*declAttributeType == XML_T('N') - && declAttributeType[1] == XML_T('O'))) { + if (*declAttributeType == XML_T(ASCII_LPAREN) + || (*declAttributeType == XML_T(ASCII_N) + && declAttributeType[1] == XML_T(ASCII_O))) { /* Enumerated or Notation type */ - if (!poolAppendChar(&tempPool, XML_T(')')) + if (!poolAppendChar(&tempPool, XML_T(ASCII_RPAREN)) || !poolAppendChar(&tempPool, XML_T('\0'))) return XML_ERROR_NO_MEMORY; declAttributeType = tempPool.start; @@ -3987,11 +4001,11 @@ declAttributeIsCdata, XML_FALSE, attVal, parser)) return XML_ERROR_NO_MEMORY; if (attlistDeclHandler && declAttributeType) { - if (*declAttributeType == XML_T('(') - || (*declAttributeType == XML_T('N') - && declAttributeType[1] == XML_T('O'))) { + if (*declAttributeType == XML_T(ASCII_LPAREN) + || (*declAttributeType == XML_T(ASCII_N) + && declAttributeType[1] == XML_T(ASCII_O))) { /* Enumerated or Notation type */ - if (!poolAppendChar(&tempPool, XML_T(')')) + if (!poolAppendChar(&tempPool, XML_T(ASCII_RPAREN)) || !poolAppendChar(&tempPool, XML_T('\0'))) return XML_ERROR_NO_MEMORY; declAttributeType = tempPool.start; @@ -4318,14 +4332,14 @@ } break; case XML_ROLE_GROUP_SEQUENCE: - if (groupConnector[prologState.level] == '|') + if (groupConnector[prologState.level] == ASCII_PIPE) return XML_ERROR_SYNTAX; - groupConnector[prologState.level] = ','; + groupConnector[prologState.level] = ASCII_COMMA; if (dtd->in_eldecl && elementDeclHandler) handleDefault = XML_FALSE; break; case XML_ROLE_GROUP_CHOICE: - if (groupConnector[prologState.level] == ',') + if (groupConnector[prologState.level] == ASCII_COMMA) return XML_ERROR_SYNTAX; if (dtd->in_eldecl && !groupConnector[prologState.level] @@ -4337,7 +4351,7 @@ if (elementDeclHandler) handleDefault = XML_FALSE; } - groupConnector[prologState.level] = '|'; + groupConnector[prologState.level] = ASCII_PIPE; break; case XML_ROLE_PARAM_ENTITY_REF: #ifdef XML_DTD @@ -5267,7 +5281,7 @@ DTD * const dtd = _dtd; /* save one level of indirection */ const XML_Char *name; for (name = elementType->name; *name; name++) { - if (*name == XML_T(':')) { + if (*name == XML_T(ASCII_COLON)) { PREFIX *prefix; const XML_Char *s; for (s = elementType->name; s != name; s++) { @@ -5314,12 +5328,12 @@ poolFinish(&dtd->pool); if (!ns) ; - else if (name[0] == XML_T('x') - && name[1] == XML_T('m') - && name[2] == XML_T('l') - && name[3] == XML_T('n') - && name[4] == XML_T('s') - && (name[5] == XML_T('\0') || name[5] == XML_T(':'))) { + else if (name[0] == XML_T(ASCII_x) + && name[1] == XML_T(ASCII_m) + && name[2] == XML_T(ASCII_l) + && name[3] == XML_T(ASCII_n) + && name[4] == XML_T(ASCII_s) + && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) { if (name[5] == XML_T('\0')) id->prefix = &dtd->defaultPrefix; else @@ -5330,7 +5344,7 @@ int i; for (i = 0; name[i]; i++) { /* attributes without prefix are *not* in the default namespace */ - if (name[i] == XML_T(':')) { + if (name[i] == XML_T(ASCII_COLON)) { int j; for (j = 0; j < i; j++) { if (!poolAppendChar(&dtd->pool, name[j])) @@ -5352,7 +5366,7 @@ return id; } -#define CONTEXT_SEP XML_T('\f') +#define CONTEXT_SEP XML_T(ASCII_FF) static const XML_Char * getContext(XML_Parser parser) @@ -5364,7 +5378,7 @@ if (dtd->defaultPrefix.binding) { int i; int len; - if (!poolAppendChar(&tempPool, XML_T('='))) + if (!poolAppendChar(&tempPool, XML_T(ASCII_EQUALS))) return NULL; len = dtd->defaultPrefix.binding->uriLen; if (namespaceSeparator) @@ -5390,7 +5404,7 @@ for (s = prefix->name; *s; s++) if (!poolAppendChar(&tempPool, *s)) return NULL; - if (!poolAppendChar(&tempPool, XML_T('='))) + if (!poolAppendChar(&tempPool, XML_T(ASCII_EQUALS))) return NULL; len = prefix->binding->uriLen; if (namespaceSeparator) @@ -5442,7 +5456,7 @@ context = s; poolDiscard(&tempPool); } - else if (*s == XML_T('=')) { + else if (*s == XML_T(ASCII_EQUALS)) { PREFIX *prefix; if (poolLength(&tempPool) == 0) prefix = &dtd->defaultPrefix; ---------------------------------------------------------------------- Comment By: Scott Klement (klemscot) Date: 2007-05-07 09:26 Message: Logged In: YES user_id=223473 Originator: YES I suspect that the problem is due to the fact that I'm running Expat on an EBCDIC-based system. In most cases, Expat uses the macros defined in ascii.h, which work correctly, as they explicitly specify a hex code point. However, there are places where Expat will reference the character directly, expecting that the hex code point of the document will match the hex code point of a character typed into the source code. On an ASCII system, they match, on an EBCDIC system they don't. ---------------------------------------------------------------------- Comment By: Scott Klement (klemscot) Date: 2007-05-07 00:10 Message: Logged In: YES user_id=223473 Originator: YES I suspect that the problem is due to the fact that I'm running Expat on an EBCDIC-based system. In most cases, Expat uses the macros defined in ascii.h, which work correctly, as they explicitly specify a hex code point. However, there are places where Expat will reference the character directly, expecting that the hex code point of the document will match the hex code point of a character typed into the source code. On an ASCII system, they match, on an EBCDIC system they don't. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2007-05-06 18:01 Message: Logged In: YES user_id=290026 Originator: NO Closing this as "Works for me", no follow-up from original poster. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2007-04-29 04:36 Message: Logged In: YES user_id=290026 Originator: NO Just tried with expat 2.0.0 and had no problems. Maybe you are picking up an old version that is still installed on your system? ---------------------------------------------------------------------- Comment By: Scott Klement (klemscot) Date: 2007-04-29 01:52 Message: Logged In: YES user_id=223473 Originator: YES Version 2.0.0. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2007-04-28 17:37 Message: Logged In: YES user_id=290026 Originator: NO I have no issues parsing this document with Expat CVS head. What version of Expat are you using? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1690883&group_id=10127 From noreply at sourceforge.net Sun Aug 3 17:57:21 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 03 Aug 2008 15:57:21 +0000 Subject: [Expat-bugs] [ expat-Bugs-1983953 ] outdated config.sub/config.guess Message-ID: Bugs item #1983953, was opened at 2008-06-04 00:39 Message generated for change (Comment added) made by hartwork You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1983953&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Build control Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Scott McCreary (scottmc) Assigned to: Greg Stein (gstein) Summary: outdated config.sub/config.guess Initial Comment: Seems to be time to update config.sub and config.guess again. Haiku for one needs this to be updated: http://tools.assembla.com/BePorts/wiki/dev-libs/expat ---------------------------------------------------------------------- >Comment By: Sebastian Pipping (hartwork) Date: 2008-08-03 17:57 Message: Logged In: YES user_id=1022691 Originator: NO [2/2] This patch would be needed for Haiku on top of the former. Extracted from the source given by Scott. Do I have green for both? File Added: expat_cvs_head_1983953_2_satisfy_haiku.patch ---------------------------------------------------------------------- Comment By: Sebastian Pipping (hartwork) Date: 2008-08-03 17:54 Message: Logged In: YES user_id=1022691 Originator: NO [1/2] Here's the patch to update our CVS head to config.{guess,sub} of libTool 1.5.26. File Added: expat_cvs_head_1983953_1_update_libtool_1_5_26.patch ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1983953&group_id=10127 From noreply at sourceforge.net Mon Aug 4 23:11:54 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 04 Aug 2008 21:11:54 +0000 Subject: [Expat-bugs] [ expat-Bugs-2020141 ] Characters lost during parsing Message-ID: Bugs item #2020141, was opened at 2008-07-16 21:22 Message generated for change (Comment added) made by arenson9 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2020141&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Open Resolution: None Priority: 5 Private: No Submitted By: Andrew D. Arenson (arenson9) Assigned to: Sebastian Pipping (hartwork) Summary: Characters lost during parsing Initial Comment: Characters can be lost during parsing. I'm going to attach a file. My example file is too big to be included through this interface, so I've made it available at: http://miniscd.uits.iupui.edu/aarenson/example6.xml I put the Perl program I used to demonstrate the error as an attachment on this submission, but here it is as well: #!/usr/bin/perl -w use XML::Parser; my $XmlFile = shift @ARGV; my $xp = new XML::Parser(Handlers => {Start => \&start, End => \&end, Char => \&cdata}); $xp->parsefile($XmlFile); sub start { $curTag = lc($_[1]); } sub end { $curTag = ""; } sub cdata { my ($xp,$data) = @_; if ($curTag eq "globalid") { $ID = $data; } if ($data eq ".5") { print "ID: $ID; TAG: $curTag\n"; } } When I use the above program on the example XML file, the last value in the XML file, '52.5', gets parsed as just '.5'. I wonder if this is related to something that was reported twelve months ago on the XML::Parser bug list at: http://rt.cpan.org/Public/Bug/Display.html?id=28585 That bug report on the XML::Parser bug list has not been opened. It is still listed as New. I'm sorry I don't know the version number of Expat that I'm using or how to determine it. ---------------------------------------------------------------------- >Comment By: Andrew D. Arenson (arenson9) Date: 2008-08-04 17:11 Message: Logged In: YES user_id=466852 Originator: YES Thanks! Problem solved. With your modified show_err2.pl file, I was still able to demonstrate the error, but your pointing out the problem (character data handler can receive the content of an element split among several handler calls) was what I needed to devise a solution. I've uploaded show_err3.pl in case anyone reading this is interested in the solution. For completeness, here's the output when running show_err2.pl: bash> ./show_err2.pl example6.xml ID: LRB0008; TAG: ofc; DATA: 52.5 ID: LRB0014; TAG: ofc; DATA: 52 ID: LRB0049; TAG: ofc; DATA: 52.5 ID: LRB0061; TAG: ofc; DATA: 52 ID: LRB0079; TAG: ofc; DATA: 52.5 ID: PMP008; TAG: ofc; DATA: 52.5 ID: PMP017; TAG: ofc; DATA: 52.5 ID: PMP043; TAG: ofc; DATA: 52 ID: PMP043; TAG: ofc; DATA: .5 Here's the output when running show_err3.pl: bash> ./show_err3.pl example6.xml ID: LRB0008; TAG: ofc; DATA: 52.5; CC: 0 ID: LRB0014; TAG: ofc; DATA: 52; CC: 0 ID: LRB0049; TAG: ofc; DATA: 52.5; CC: 0 ID: LRB0061; TAG: ofc; DATA: 52; CC: 0 ID: LRB0079; TAG: ofc; DATA: 52.5; CC: 0 ID: PMP008; TAG: ofc; DATA: 52.5; CC: 0 ID: PMP017; TAG: ofc; DATA: 52.5; CC: 0 ID: PMP043; TAG: ofc; DATA: 52; CC: 0 ID: PMP043; TAG: ofc; DATA: 52.5; CC: 1 Basically, my solution was to keep track of how many times the character data handler has been called since the start handler has been called. If it's more than one, then I append the most recent character data to the previously returned character data. So, why does eXpat work this way? Why not only call the character data handler once? Is it some sort of efficiency thing when working with streams? Is it part of wanting to be able to handle values of any size? File Added: show_err3.pl ---------------------------------------------------------------------- Comment By: Sebastian Pipping (hartwork) Date: 2008-08-03 10:47 Message: Logged In: YES user_id=1022691 Originator: NO Hello Andrew. Are you aware that character data handlers can receive the content of an element split among several handler calls? For instance your "52.5" text here could come in as two calls serving "52" first and then ".5". I modified the script you attached to help tracing this. Please let us know if this is happening on your machine. (On mine "52.5" is served as a single unit from the XML file you provided.) Best regards, Sebastian File Added: show_err_2.pl ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2020141&group_id=10127 From noreply at sourceforge.net Mon Aug 4 23:56:41 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 04 Aug 2008 21:56:41 +0000 Subject: [Expat-bugs] [ expat-Bugs-2020141 ] Characters lost during parsing Message-ID: Bugs item #2020141, was opened at 2008-07-17 03:22 Message generated for change (Settings changed) made by hartwork You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2020141&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Andrew D. Arenson (arenson9) Assigned to: Sebastian Pipping (hartwork) Summary: Characters lost during parsing Initial Comment: Characters can be lost during parsing. I'm going to attach a file. My example file is too big to be included through this interface, so I've made it available at: http://miniscd.uits.iupui.edu/aarenson/example6.xml I put the Perl program I used to demonstrate the error as an attachment on this submission, but here it is as well: #!/usr/bin/perl -w use XML::Parser; my $XmlFile = shift @ARGV; my $xp = new XML::Parser(Handlers => {Start => \&start, End => \&end, Char => \&cdata}); $xp->parsefile($XmlFile); sub start { $curTag = lc($_[1]); } sub end { $curTag = ""; } sub cdata { my ($xp,$data) = @_; if ($curTag eq "globalid") { $ID = $data; } if ($data eq ".5") { print "ID: $ID; TAG: $curTag\n"; } } When I use the above program on the example XML file, the last value in the XML file, '52.5', gets parsed as just '.5'. I wonder if this is related to something that was reported twelve months ago on the XML::Parser bug list at: http://rt.cpan.org/Public/Bug/Display.html?id=28585 That bug report on the XML::Parser bug list has not been opened. It is still listed as New. I'm sorry I don't know the version number of Expat that I'm using or how to determine it. ---------------------------------------------------------------------- Comment By: Andrew D. Arenson (arenson9) Date: 2008-08-04 23:11 Message: Logged In: YES user_id=466852 Originator: YES Thanks! Problem solved. With your modified show_err2.pl file, I was still able to demonstrate the error, but your pointing out the problem (character data handler can receive the content of an element split among several handler calls) was what I needed to devise a solution. I've uploaded show_err3.pl in case anyone reading this is interested in the solution. For completeness, here's the output when running show_err2.pl: bash> ./show_err2.pl example6.xml ID: LRB0008; TAG: ofc; DATA: 52.5 ID: LRB0014; TAG: ofc; DATA: 52 ID: LRB0049; TAG: ofc; DATA: 52.5 ID: LRB0061; TAG: ofc; DATA: 52 ID: LRB0079; TAG: ofc; DATA: 52.5 ID: PMP008; TAG: ofc; DATA: 52.5 ID: PMP017; TAG: ofc; DATA: 52.5 ID: PMP043; TAG: ofc; DATA: 52 ID: PMP043; TAG: ofc; DATA: .5 Here's the output when running show_err3.pl: bash> ./show_err3.pl example6.xml ID: LRB0008; TAG: ofc; DATA: 52.5; CC: 0 ID: LRB0014; TAG: ofc; DATA: 52; CC: 0 ID: LRB0049; TAG: ofc; DATA: 52.5; CC: 0 ID: LRB0061; TAG: ofc; DATA: 52; CC: 0 ID: LRB0079; TAG: ofc; DATA: 52.5; CC: 0 ID: PMP008; TAG: ofc; DATA: 52.5; CC: 0 ID: PMP017; TAG: ofc; DATA: 52.5; CC: 0 ID: PMP043; TAG: ofc; DATA: 52; CC: 0 ID: PMP043; TAG: ofc; DATA: 52.5; CC: 1 Basically, my solution was to keep track of how many times the character data handler has been called since the start handler has been called. If it's more than one, then I append the most recent character data to the previously returned character data. So, why does eXpat work this way? Why not only call the character data handler once? Is it some sort of efficiency thing when working with streams? Is it part of wanting to be able to handle values of any size? File Added: show_err3.pl ---------------------------------------------------------------------- Comment By: Sebastian Pipping (hartwork) Date: 2008-08-03 16:47 Message: Logged In: YES user_id=1022691 Originator: NO Hello Andrew. Are you aware that character data handlers can receive the content of an element split among several handler calls? For instance your "52.5" text here could come in as two calls serving "52" first and then ".5". I modified the script you attached to help tracing this. Please let us know if this is happening on your machine. (On mine "52.5" is served as a single unit from the XML file you provided.) Best regards, Sebastian File Added: show_err_2.pl ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2020141&group_id=10127 From noreply at sourceforge.net Tue Aug 5 03:09:36 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 05 Aug 2008 01:09:36 +0000 Subject: [Expat-bugs] [ expat-Bugs-2038222 ] Linux Build missing expat.h ? Message-ID: Bugs item #2038222, was opened at 2008-08-05 11:09 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2038222&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Build control Group: Platform Specific Status: Open Resolution: None Priority: 5 Private: No Submitted By: Antony (somervia) Assigned to: Greg Stein (gstein) Summary: Linux Build missing expat.h ? Initial Comment: bash-2.05b# /data/configs/dnsOne/API/perl/bin/perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for XML::Parser::Expat Writing Makefile for XML::Parser bash-2.05b# make make[1]: Entering directory `/data/configs/dnsOne/API/dependancies/XML-Parser-2.36/Expat' cp Expat.pm ../blib/lib/XML/Parser/Expat.pm /data/configs/dnsOne/API/perl/bin/perl /data/configs/dnsOne/API/perl/lib/5.10.0/ExtUtils/xsubpp -noprototypes -typemap /data/configs/dnsOne/API/perl/lib/5.10.0/ExtUtils/typemap -typemap typemap Expat.xs > Expat.xsc && mv Expat.xsc Expat.c cc -c -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"2.36\" -DXS_VERSION=\"2.36\" -fPIC "-I/data/configs/dnsOne/API/perl/lib/5.10.0/i686-linux/CORE" Expat.c Expat.xs:12:19: expat.h: No such file or directory Expat.xs:60: syntax error before "XML_Parser" Expat.xs:60: warning: no semicolon at end of struct or union ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2038222&group_id=10127 From noreply at sourceforge.net Tue Aug 5 03:18:23 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 05 Aug 2008 01:18:23 +0000 Subject: [Expat-bugs] [ expat-Bugs-2038222 ] Linux Build missing expat.h ? Message-ID: Bugs item #2038222, was opened at 2008-08-05 11:09 Message generated for change (Comment added) made by somervia You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2038222&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Build control Group: Platform Specific Status: Open Resolution: None Priority: 5 Private: No Submitted By: Antony (somervia) Assigned to: Greg Stein (gstein) Summary: Linux Build missing expat.h ? Initial Comment: bash-2.05b# /data/configs/dnsOne/API/perl/bin/perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for XML::Parser::Expat Writing Makefile for XML::Parser bash-2.05b# make make[1]: Entering directory `/data/configs/dnsOne/API/dependancies/XML-Parser-2.36/Expat' cp Expat.pm ../blib/lib/XML/Parser/Expat.pm /data/configs/dnsOne/API/perl/bin/perl /data/configs/dnsOne/API/perl/lib/5.10.0/ExtUtils/xsubpp -noprototypes -typemap /data/configs/dnsOne/API/perl/lib/5.10.0/ExtUtils/typemap -typemap typemap Expat.xs > Expat.xsc && mv Expat.xsc Expat.c cc -c -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"2.36\" -DXS_VERSION=\"2.36\" -fPIC "-I/data/configs/dnsOne/API/perl/lib/5.10.0/i686-linux/CORE" Expat.c Expat.xs:12:19: expat.h: No such file or directory Expat.xs:60: syntax error before "XML_Parser" Expat.xs:60: warning: no semicolon at end of struct or union ---------------------------------------------------------------------- >Comment By: Antony (somervia) Date: 2008-08-05 11:18 Message: Logged In: YES user_id=2168393 Originator: YES -bash-2.05b$ uname -a Linux somehost 2.4.21-47.0.1.ELsmp #1 SMP Fri Oct 13 17:56:20 EDT 2006 i686 i686 i386 GNU/Linux -bash-2.05b$ cc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-58) -bash-2.05b$ /data/configs/dnsOne/API/perl/bin/perl -v This is perl, v5.10.0 built for i686-linux Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. -bash-2.05b$ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=2038222&group_id=10127