From bz@datenkueche.com Mon May 4 19:02:25 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0E1F975000B for ; Mon, 4 May 2009 19:02:25 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -3.368 X-Spam-Level: X-Spam-Status: No, score=-3.368 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, L_P0F_Unix=-1, TW_BX=0.077, TW_IB=0.077, TW_XH=0.077] X-Amavis-OS-Fingerprint: Solaris 10 (beta), (distance 18, link: ethernet/modem), [62.179.121.40] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mQY59CBahxN1 for ; Mon, 4 May 2009 19:02:15 +0000 (GMT) Received: from viefep20-int.chello.at (viefep20-int.chello.at [62.179.121.40]) by menubar.gnome.org (Postfix) with ESMTP id 3C9497501B3 for ; Mon, 4 May 2009 19:02:04 +0000 (GMT) Received: from edge04.upc.biz ([192.168.13.239]) by viefep20-int.chello.at (InterMail vM.7.09.01.00 201-2219-108-20080618) with ESMTP id <20090504190141.BBVQ20840.viefep20-int.chello.at@edge04.upc.biz> for ; Mon, 4 May 2009 21:01:41 +0200 Received: from [192.168.1.186] ([212.186.64.225]) by edge04.upc.biz with edge id nX1f1b03j4rbuNC04X1gBl; Mon, 04 May 2009 21:01:41 +0200 X-SourceIP: 212.186.64.225 Message-ID: <49FF3B93.3060700@datenkueche.com> Date: Mon, 04 May 2009 21:01:39 +0200 From: Bernhard zwischenbrugger User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: xml@gnome.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [xml] php5 breaks html parser X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 19:02:25 -0000 Hi all First of all, I tried to report this bug at the PHP Bug reporting system. see: http://bugs.php.net/bug.php?id=48148 http://bugs.php.net/bug.php?id=47666 People at PHP don't feel responsible for that. So maybe it's a libxml problem. Problem Description: PHP dublicates the xhtml namespace. Example: ); header("Content-type:text/xml"); echo $dom->saveXML($dom->documentElement); ?> Expected result: ---------------- Well formed XML. Actual result: -------------- xmlns="http://www.w3.org/1999/xhtml" ... (duplicate namespace) ---- See also my error page at: http://lamp2.fhstp.ac.at/~lbz/beispiele/ss2009/bug/ thanks Bernhard PS: The php dom html-parser worked without problems for years. From chregu@bitflux.ch Mon May 4 20:06:21 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C451C7500A3 for ; Mon, 4 May 2009 20:06:21 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.368 X-Spam-Level: X-Spam-Status: No, score=-2.368 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_BX=0.077, TW_IB=0.077, TW_XH=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 4839 hrs), (distance 20, link: ethernet/modem), [194.50.176.162] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DiV0QpkQfkPb for ; Mon, 4 May 2009 20:06:13 +0000 (GMT) Received: from devel.bitflux.ch (mail.bitflux.ch [194.50.176.162]) by menubar.gnome.org (Postfix) with ESMTP id A3FF27500F7 for ; Mon, 4 May 2009 20:06:04 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by devel.bitflux.ch (Postfix) with ESMTP id 30666E76E5; Mon, 4 May 2009 22:06:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at devel.bitflux.ch Received: from devel.bitflux.ch ([127.0.0.1]) by localhost (devel.bitflux.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PPPP-v4CH2tq; Mon, 4 May 2009 22:05:54 +0200 (CEST) Received: from pr.lan (80-218-56-2.dclient.hispeed.ch [80.218.56.2]) by devel.bitflux.ch (Postfix) with ESMTP id 5E174E76DE; Mon, 4 May 2009 22:05:54 +0200 (CEST) Message-ID: <49FF4AA2.60406@bitflux.ch> Date: Mon, 04 May 2009 22:05:54 +0200 From: Christian Stocker User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Bernhard zwischenbrugger References: <49FF3B93.3060700@datenkueche.com> In-Reply-To: <49FF3B93.3060700@datenkueche.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: xml@gnome.org Subject: Re: [xml] php5 breaks html parser X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 20:06:22 -0000 On 4.5.2009 21:01 Uhr, Bernhard zwischenbrugger wrote: > Hi all > > First of all, I tried to report this bug at the PHP Bug reporting system. > see: > http://bugs.php.net/bug.php?id=48148 > http://bugs.php.net/bug.php?id=47666 > > People at PHP don't feel responsible for that. So maybe it's a libxml > problem. We already told you, that the loadHTML*() Methods are not namespace aware and only meant for non-namespace-aware HTML4 documents and not XHTML. Use the XML methods, if you're so keen on the namespaces. And yes, this difference comes from the libxml2 library, but I don't think anyone will tell you anything else here. chregu > > Problem Description: > > PHP dublicates the xhtml namespace. > > Example: > > @$dom=domDocument::loadHTMLFile("http://www.w3.org/" > ); > header("Content-type:text/xml"); > echo $dom->saveXML($dom->documentElement); > ?> > > Expected result: > ---------------- > Well formed XML. > > Actual result: > -------------- > > xmlns="http://www.w3.org/1999/xhtml" ... > > (duplicate namespace) > > ---- > > See also my error page at: > http://lamp2.fhstp.ac.at/~lbz/beispiele/ss2009/bug/ > > thanks > > Bernhard > > PS: The php dom html-parser worked without problems for years. > > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > http://mail.gnome.org/mailman/listinfo/xml From eaton.alf@googlemail.com Fri May 8 19:19:56 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4D045750122 for ; Fri, 8 May 2009 19:19:56 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 4961 hrs), (distance 16, link: (Google 2)), [74.125.78.27] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aycImzrhkd2D for ; Fri, 8 May 2009 19:19:47 +0000 (GMT) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by menubar.gnome.org (Postfix) with ESMTP id 03ABD750069 for ; Fri, 8 May 2009 19:19:38 +0000 (GMT) Received: by ey-out-2122.google.com with SMTP id d26so430655eyd.9 for ; Fri, 08 May 2009 12:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=vhQSGXZ+4qrsHkAJwECIcn0TuhUsgHgHu67VAjCV8yY=; b=esfkyBSuSKXtNfvsLV9L92u0ePAkdhsfKP+c6b8fIguZzxiMS0eGhwC3yvA1q9IXl+ 7T3eQdJa4VE7a4FRkqsoR9axS9u8myQmNVY4x26UbGToTVwGQO7e2fmNW67lTfk/u3Mq o6xUn2gDzdg01j4nsgzijySe6uy9k9U/kTzfg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=N+vG9MRPqzzZ7KJJ9Wo1qS+CxMVJAzAYVSWOyjTK3UEGp17HumohDnzyjC2+FfCIMv gsYleKAMOWmhZ7uxtgta9heTNgRPthRiBkXlqwpr0GeEMDMPEcjAN4FzZbN9cErqnVEU BKwqW//K5lC9FavE4u4TnijIhXjmj6TmgnS5M= MIME-Version: 1.0 Sender: eaton.alf@googlemail.com Received: by 10.216.23.72 with SMTP id u50mr1704171weu.178.1241810375951; Fri, 08 May 2009 12:19:35 -0700 (PDT) Date: Fri, 8 May 2009 20:19:35 +0100 X-Google-Sender-Auth: e9490e15830e9bc2 Message-ID: <60c83f5f0905081219r7a0cea11wc22538b69c31a949@mail.gmail.com> From: Alf Eaton To: xml@gnome.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [xml] Character encodings are broken on xmlsoft.org X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2009 19:19:56 -0000 The irony in this is deep, but basically the character encodings on the "Encodings support" page are broken: http://xmlsoft.org/encoding.html The charset specified by the tag in the HTML (ISO-8859-1), which would be overruled by the charset specified in the XHTML/XML header (ISO-8859-1) if it wasn't served as text/html, is being overruled by the charset specified in the HTTP header (UTF-8). Perhaps someone added an "AddDefaultCharset UTF-8" setting to Apache's configuration? alf From stefan_ml@behnel.de Sat May 9 04:57:18 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5E7C6750111 for ; Sat, 9 May 2009 04:57:18 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_VC=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (NAT!) (up: 89 hrs), (distance 25, link: GPRS, T1, FreeS/WAN), [130.83.156.225] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8q7fmlJgn2yP for ; Sat, 9 May 2009 04:57:11 +0000 (GMT) Received: from lnx500.hrz.tu-darmstadt.de (lnx500.hrz.tu-darmstadt.de [130.83.156.225]) by menubar.gnome.org (Postfix) with ESMTP id 2C84175010D for ; Sat, 9 May 2009 04:57:02 +0000 (GMT) Received: from paris.dvs.informatik.tu-darmstadt.de (paris2.dvs.informatik.tu-darmstadt.de [130.83.166.130]) by lnx500.hrz.tu-darmstadt.de (8.14.2/8.13.8/HRZ/PMX) with ESMTP id n493PZxb016241 for ; Sat, 9 May 2009 05:25:35 +0200 (envelope-from stefan_ml@behnel.de) Received: from delle.100WORLD.GLOBAL (dslb-084-056-045-016.pools.arcor-ip.net [84.56.45.16]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by paris.dvs.informatik.tu-darmstadt.de (Postfix) with ESMTP id D0FF7170C for ; Sat, 9 May 2009 06:56:59 +0200 (CEST) Message-ID: <4A050D1B.1080706@behnel.de> Date: Sat, 09 May 2009 06:56:59 +0200 From: Stefan Behnel User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: xml@gnome.org Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-PMX-TU: seen v0.62 by 5.5.3.366731, Antispam-Engine: 2.7.0.366912, Antispam-Data: 2009.5.9.44631 X-PMX-SPAMCHECK: outgoing mail Subject: [xml] Inserting XML Schema default attributes X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 04:57:18 -0000 Hi, I'm trying to inject default attributes into a document from an XML Schema during parsing. I set up a validation context and set the XML_SCHEMA_VAL_VC_I_CREATE option on it, which, if I understand the docs correctly, tells the validator to create defaulted/fixed attributes if they do not exist already. Then I inject the validation context into the parser using "xmlSchemaSAXPlug()". The schema document I use is ''' ''' The document I parse is ''' ''' The document validates. However, no default attributes are inserted, neither with my code nor with xmllint (which doesn't seem to support that anyway). When I debug into the validator code in xmlschemas.c, I get to line 25351 (libxml2 2.7.3): ''' /* * Get the owner element; needed for creation of default attributes. * This fixes bug #341337, reported by David Grohmann. */ if (vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) { xmlSchemaNodeInfoPtr ielem = vctxt->elemInfos[vctxt->depth]; ==> if (ielem && ielem->node && ielem->node->doc) defAttrOwnerElem = ielem->node; } ''' but "ielem->node" is NULL every time it gets there, so this doesn't fly. Is there anything else I have to do to make this work? Thanks, Stefan From stefan_ml@behnel.de Sat May 9 07:33:14 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F0295750152 for ; Sat, 9 May 2009 07:33:13 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (NAT!) (up: 92 hrs), (distance 25, link: GPRS, T1, FreeS/WAN), [130.83.156.225] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LMDNLjk24x4u for ; Sat, 9 May 2009 07:33:06 +0000 (GMT) Received: from lnx500.hrz.tu-darmstadt.de (lnx500.hrz.tu-darmstadt.de [130.83.156.225]) by menubar.gnome.org (Postfix) with ESMTP id 3438B750073 for ; Sat, 9 May 2009 07:32:57 +0000 (GMT) Received: from paris.dvs.informatik.tu-darmstadt.de (paris2.dvs.informatik.tu-darmstadt.de [130.83.166.130]) by lnx500.hrz.tu-darmstadt.de (8.14.2/8.13.8/HRZ/PMX) with ESMTP id n495txhm006248 for ; Sat, 9 May 2009 07:55:59 +0200 (envelope-from stefan_ml@behnel.de) Received: from delle.100WORLD.GLOBAL (dslb-084-056-045-016.pools.arcor-ip.net [84.56.45.16]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by paris.dvs.informatik.tu-darmstadt.de (Postfix) with ESMTP id 3EDAB1702 for ; Sat, 9 May 2009 09:32:55 +0200 (CEST) Message-ID: <4A0531A6.1080608@behnel.de> Date: Sat, 09 May 2009 09:32:54 +0200 From: Stefan Behnel User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: xml@gnome.org Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-PMX-TU: seen v0.62 by 5.5.3.366731, Antispam-Engine: 2.7.0.366912, Antispam-Data: 2009.5.9.72018 X-PMX-SPAMCHECK: outgoing mail Subject: [xml] parse-time validation against a user provided DTD X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 07:33:14 -0000 Hi, looking through the API docs, I can't really figure out a way to stick an external DTD into the parser, so that it validates against that rather than trying to load a DTD for the DOCTYPE (or also to do DTD validation if the document does not define a DOCTYPE at all). I can see that xmllint can validate against an externally provided DTD, but only after parsing, so that doesn't help. Has anyone done this before? Is there maybe even a preferred/obvious/RFTM way of doing that? I'm interested in a way to do this a) by providing a readily parsed xmlDtd, and maybe even b) by providing a public ID (in case there is a shortcut other than looking up the DTD manually). Thanks, Stefan From rolandsteiner@google.com Tue May 12 04:49:46 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5CDEC75002F for ; Tue, 12 May 2009 04:49:46 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.444 X-Spam-Level: X-Spam-Status: No, score=-2.444 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_BX=0.077, TW_IB=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 11646 hrs), (distance 14, link: sometimes DSL (2)), [216.239.45.13] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kTM1m+tRfwGJ for ; Tue, 12 May 2009 04:49:38 +0000 (GMT) Received: from smtp-out.google.com (smtp-out.google.com [216.239.45.13]) by menubar.gnome.org (Postfix) with ESMTP id C3D18750006 for ; Tue, 12 May 2009 04:49:29 +0000 (GMT) Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id n4C4nR5R024896 for ; Mon, 11 May 2009 21:49:27 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1242103767; bh=d2gfvvnyv1WJQwnN4V8cetb27hY=; h=DomainKey-Signature:MIME-Version:Date:Message-ID:Subject:From:To: Content-Type:X-System-Of-Record; b=gxlgio4xcSbXckSbRXYqbmscDtCHiuO ILRTk50vnPEY8neDT4N3EdcUmNEon4pSFMpoTqNWoVQd41uy3wD0r0Q== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:date:message-id:subject:from:to:content-type:x-system-of-record; b=qORq7qH+C0YyA4oNorOvI8wswpOp8kW8CCGTVroyYF152pGceTPW1LU7SnJqLI1JX 8YsamS01oIQFjaSlgfigg== Received: from gxk28 (gxk28.prod.google.com [10.202.11.28]) by wpaz17.hot.corp.google.com with ESMTP id n4C4nPHh018292 for ; Mon, 11 May 2009 21:49:25 -0700 Received: by gxk28 with SMTP id 28so3406072gxk.16 for ; Mon, 11 May 2009 21:49:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.106.3 with SMTP id e3mr6593085agc.54.1242103765277; Mon, 11 May 2009 21:49:25 -0700 (PDT) Date: Mon, 11 May 2009 21:49:25 -0700 Message-ID: From: Roland Steiner To: xml@gnome.org Content-Type: multipart/alternative; boundary=00163616448db41e8f0469afd142 X-System-Of-Record: true Subject: [xml] Missing comma in HTMLParser.c X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 04:49:46 -0000 --00163616448db41e8f0469afd142 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi libxml folks, I seem to have stumbled upon a missing comma in libxml2 2.7.3, HTMLParser.c, line 609 in the definition array for the element (right after ATTRS): static const char* const table_attrs[] = { ATTRS "summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding", "datapagesize", NULL } ; (I also filed a bug entry http://bugzilla.gnome.org/show_bug.cgi?id=581803) Cheers, Roland --00163616448db41e8f0469afd142 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi libxml folks,

I seem to have stumbled upon a missing comma in libxm= l2 2.7.3, HTMLParser.c, line 609 in the definition array for the <table&= gt; element (right after ATTRS):

    static const =
char* const table_attrs[] =3D { ATTRS "summary", "width"=
;, "border",
"frame", "rules", "cellspacing", "ce= llpadding", "datapagesize", NULL } ;
(I also filed a bug entry http://bugzilla.gn= ome.org/show_bug.cgi?id=3D581803)


Cheers,

Roland
--00163616448db41e8f0469afd142-- From veillard@paphio.veillard.com Tue May 12 05:17:14 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id EEA0F750006 for ; Tue, 12 May 2009 05:17:13 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 8936 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3jsfNPRnQfi2 for ; Tue, 12 May 2009 05:17:05 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 70F6175002F for ; Tue, 12 May 2009 05:16:55 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5Gsux032721; Tue, 12 May 2009 01:16:54 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4C5GrNX011140; Tue, 12 May 2009 01:16:53 -0400 Received: from paphio.veillard.com (vpn-10-8.str.redhat.com [10.32.10.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5GpP5016281; Tue, 12 May 2009 01:16:52 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4C5Go7g018465; Tue, 12 May 2009 07:16:50 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4C5GmCK018464; Tue, 12 May 2009 07:16:48 +0200 Date: Tue, 12 May 2009 07:16:48 +0200 From: Daniel Veillard To: Rachael Churchill Message-ID: <20090512051648.GL1589@redhat.com> References: <49F86CC7.3030800@linguamatics.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49F86CC7.3030800@linguamatics.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] [Fwd: Resolving entity references from a DTD using SAX parser] X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 05:17:14 -0000 On Wed, Apr 29, 2009 at 04:05:43PM +0100, Rachael Churchill wrote: > Hi > > I hope I'm not being rude, but I didn't get any replies to this email > when I sent it to the mailing list before, so I'm just sending it again > in case it got missed. If anyone can help answer my questions that'd be > really good. Why SAX and why not the XML Reader ? I saw your mail, and my 10s attention span was reduced to why do they absolutely need SAX if they are using Entities declaration in the DTD. > Thanks very much, > Rachael > > -------- Original Message -------- > Subject: [xml] Resolving entity references from a DTD using SAX parser > Date: Fri, 17 Apr 2009 13:13:26 +0100 > From: Rachael Churchill > To: xml@gnome.org > > > > Hi > > Please could you help me get libxml2 to resolve entity references such > as &foo; which are defined in a DTD declared in the XML document? > > I am using the SAX parser (I know about the warning on > http://xmlsoft.org/entities.html, but we really have to use SAX for our > purposes), declaring element handlers and character handlers and then > calling XMLParseChunk. I originally assumed the parser would > automatically read in the DTD when it found the declaration, and then it does, it calls you back. you have to build the internal structures associated with the entity in the associated handlers. > resolve the custom-defined entity references as it found them, like it > does with the predefined ones such as & but this seems not to be the > case. Because you didn't built the entities in the internal tables when the internal subset was parsed. Proof: paphio:~/XML -> cat test/ent1 ]> &xml; paphio:~/XML -> ./xmllint --sax test/ent1 SAX.setDocumentLocator() SAX.startDocument() SAX.internalSubset(EXAMPLE, , example.dtd) SAX.entityDecl(xml, 1, (null), (null), Extensible Markup Language) SAX.getEntity(xml) SAX.externalSubset(EXAMPLE, , example.dtd) SAX.startElementNs(EXAMPLE, NULL, NULL, 0, 0, 0) SAX.characters( , 5) SAX.getEntity(xml) SAX.error: Entity 'xml' not defined SAX.reference(xml) SAX.characters( , 1) SAX.endElementNs(EXAMPLE, NULL, NULL) SAX.endDocument() paphio:~/XML -> > I think I have to declare a reference-handling function as > SAXHandler.reference, and then in that function, which gets called when > an entity reference is found, call xmlGetEntityFromTable to look up what > that entity reference resolves to. But how do I populate the table > using the entity references defined in the DTD? The functions like using the entity declaration and others DTD related declaration callbacks. > xmlAddDtdEntity and xmlAddDocEntity seem to require an xmlDocPtr, which > I thought only existed when doing DOM parsing. So do I need to use Create one by hand. > xmlNewEntity instead, which does the same thing without needing an > xmlDocPtr? Also, xmlGetEntityFromTable isn't exposed by the API. It's > called from xmlGetDocEntity, xmlGetDtdEntity and xmlGetParameterEntity, > but they all require an xmlDocPtr too. May I change the API so that > xmlGetEntityFromTable is exposed, or is there another way of doing it? > > Also, how do I get the filename of the DTD? Is there a function for in the SAX.internalSubset callback. But really if you expect to have external subset handling with libxml2 SAX you will have an awful lot of work, or have to reuse all the existing default SAX callbacks from SAX2.c in any case an awful lot of work, hence the warning in red ! > that, or do I need to manually parse the XML document looking for the > declaration? Then when I have the DTD, I need to parse it. Calling > xmlParseDTD with the filename as the SystemID argument seems to work; > then can I use the "elements" field of the xmlDtdPtr it returns as the > table I need to refer to in xmlGetEntityFromTable (and so not need > xmlAdd*Entry)? Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@paphio.veillard.com Tue May 12 05:23:14 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E2772750006 for ; Tue, 12 May 2009 05:23:14 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 8936 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5RRIG+RXJrDh for ; Tue, 12 May 2009 05:23:07 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id EB67D75002F for ; Tue, 12 May 2009 05:22:58 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5MsGs001207; Tue, 12 May 2009 01:22:54 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4C5Mr28012115; Tue, 12 May 2009 01:22:53 -0400 Received: from paphio.veillard.com (vpn-10-8.str.redhat.com [10.32.10.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5MpEv020184; Tue, 12 May 2009 01:22:52 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4C5MokJ018946; Tue, 12 May 2009 07:22:50 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4C5Mnod018945; Tue, 12 May 2009 07:22:49 +0200 Date: Tue, 12 May 2009 07:22:49 +0200 From: Daniel Veillard To: Carsten Aulbert Message-ID: <20090512052249.GM1589@redhat.com> References: <49F9D929.5060807@aei.mpg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49F9D929.5060807@aei.mpg.de> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] Possible problems making libxml2 non-threaded? X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 05:23:15 -0000 On Thu, Apr 30, 2009 at 07:00:25PM +0200, Carsten Aulbert wrote: > Hi all, > > we have a special problem that we would like to link to libxml2 but have > the problem that in our special case[1] we cannot use a pthread-enabled > version. > > My question now simply is: Would there be any known (or suspected) > problems if we rebuilt the libxml2 packages with --without-threads other > than losing some performance? Theads support is about thread safety support not about performances. If you're sure there is nothing on the whole OS using threads and libxml2 then you should be safe. But I have no way to estimate that and would be rather pessimistic by default libxml2 is used in many software and many may expect the default libxml2 behaviour. Your environment seems highly specific, and it's impossible for me to make any assertion about it. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@paphio.veillard.com Tue May 12 05:41:01 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id AF993750006 for ; Tue, 12 May 2009 05:41:01 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 8940 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PSs8OrjS+v1L for ; Tue, 12 May 2009 05:40:53 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 180F975002F for ; Tue, 12 May 2009 05:40:44 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5efaO004657; Tue, 12 May 2009 01:40:41 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4C5eeBK015358; Tue, 12 May 2009 01:40:40 -0400 Received: from paphio.veillard.com (vpn-10-8.str.redhat.com [10.32.10.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5ecUR022521; Tue, 12 May 2009 01:40:39 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4C5ea4p020495; Tue, 12 May 2009 07:40:36 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4C5eZhg020494; Tue, 12 May 2009 07:40:35 +0200 Date: Tue, 12 May 2009 07:40:35 +0200 From: Daniel Veillard To: Bernhard zwischenbrugger Message-ID: <20090512054035.GP1589@redhat.com> References: <49FF3B93.3060700@datenkueche.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49FF3B93.3060700@datenkueche.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] php5 breaks html parser X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 05:41:01 -0000 On Mon, May 04, 2009 at 09:01:39PM +0200, Bernhard zwischenbrugger wrote: > Hi all > > First of all, I tried to report this bug at the PHP Bug reporting system. > see: > http://bugs.php.net/bug.php?id=48148 > http://bugs.php.net/bug.php?id=47666 > > People at PHP don't feel responsible for that. So maybe it's a libxml > problem. I don't see why: paphio:~/XML -> ./xmllint --html --xmlout http://www.w3.org/ > res [some warnings ...] paphio:~/XML -> I don't see any duplicated namespace in the res result But the DOCTYPE is misplaced before the XMLDecl ... Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@paphio.veillard.com Tue May 12 05:45:49 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id BE0A575002F for ; Tue, 12 May 2009 05:45:49 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 8940 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JuOXuLVFjyx2 for ; Tue, 12 May 2009 05:45:41 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 5E9AD750006 for ; Tue, 12 May 2009 05:45:33 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5jWHN005516; Tue, 12 May 2009 01:45:32 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4C5jVpZ016193; Tue, 12 May 2009 01:45:31 -0400 Received: from paphio.veillard.com (vpn-10-8.str.redhat.com [10.32.10.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5jTIh023117; Tue, 12 May 2009 01:45:30 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4C5jTTj020961; Tue, 12 May 2009 07:45:29 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4C5jThg020960; Tue, 12 May 2009 07:45:29 +0200 Date: Tue, 12 May 2009 07:45:29 +0200 From: Daniel Veillard To: Alf Eaton Message-ID: <20090512054529.GQ1589@redhat.com> References: <60c83f5f0905081219r7a0cea11wc22538b69c31a949@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60c83f5f0905081219r7a0cea11wc22538b69c31a949@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] Character encodings are broken on xmlsoft.org X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 05:45:50 -0000 On Fri, May 08, 2009 at 08:19:35PM +0100, Alf Eaton wrote: > The irony in this is deep, but basically the character encodings on > the "Encodings support" page are broken: > http://xmlsoft.org/encoding.html > > The charset specified by the tag in the HTML (ISO-8859-1), > which would be overruled by the charset specified in the XHTML/XML > header (ISO-8859-1) if it wasn't served as text/html, is being > overruled by the charset specified in the HTTP header (UTF-8). > > Perhaps someone added an "AddDefaultCharset UTF-8" setting to Apache's > configuration? Yeah, broken Apache configuration, should be fixed now, but that thing is a real pain ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@paphio.veillard.com Tue May 12 05:46:53 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 40614750006 for ; Tue, 12 May 2009 05:46:53 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.317 X-Spam-Level: X-Spam-Status: No, score=-4.317 tagged_above=-999 required=2 tests=[AWL=1.974, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077, TW_VC=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 8940 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Pil-ArHyV11l for ; Tue, 12 May 2009 05:46:45 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 3041675002F for ; Tue, 12 May 2009 05:46:45 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5kglV005747; Tue, 12 May 2009 01:46:42 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4C5kftC016405; Tue, 12 May 2009 01:46:41 -0400 Received: from paphio.veillard.com (vpn-10-8.str.redhat.com [10.32.10.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5kdL8023186; Tue, 12 May 2009 01:46:40 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4C5kcKC021037; Tue, 12 May 2009 07:46:38 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4C5kbDE021036; Tue, 12 May 2009 07:46:37 +0200 Date: Tue, 12 May 2009 07:46:37 +0200 From: Daniel Veillard To: Stefan Behnel Message-ID: <20090512054637.GR1589@redhat.com> References: <4A050D1B.1080706@behnel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A050D1B.1080706@behnel.de> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] Inserting XML Schema default attributes X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 05:46:53 -0000 On Sat, May 09, 2009 at 06:56:59AM +0200, Stefan Behnel wrote: > Hi, > > I'm trying to inject default attributes into a document from an XML Schema > during parsing. I set up a validation context and set the > XML_SCHEMA_VAL_VC_I_CREATE option on it, which, if I understand the docs > correctly, tells the validator to create defaulted/fixed attributes if they > do not exist already. Then I inject the validation context into the parser > using "xmlSchemaSAXPlug()". > > The schema document I use is > > ''' > > > > > > > > > > > > ''' > > The document I parse is > > ''' > > ''' > > The document validates. However, no default attributes are inserted, > neither with my code nor with xmllint (which doesn't seem to support that > anyway). When I debug into the validator code in xmlschemas.c, I get to > line 25351 (libxml2 2.7.3): > > ''' > /* > * Get the owner element; needed for creation of default attributes. > * This fixes bug #341337, reported by David Grohmann. > */ > if (vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) { > xmlSchemaNodeInfoPtr ielem = vctxt->elemInfos[vctxt->depth]; > ==> if (ielem && ielem->node && ielem->node->doc) > defAttrOwnerElem = ielem->node; > } > ''' > > but "ielem->node" is NULL every time it gets there, so this doesn't fly. > > Is there anything else I have to do to make this work? Sorry, no idea :-\ Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@paphio.veillard.com Tue May 12 05:55:02 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F2F0D750068 for ; Tue, 12 May 2009 05:55:01 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 8942 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id do75o-4HOa9m for ; Tue, 12 May 2009 05:54:53 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id A89AA750006 for ; Tue, 12 May 2009 05:54:44 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5sfMC006866; Tue, 12 May 2009 01:54:41 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4C5sf7m017465; Tue, 12 May 2009 01:54:41 -0400 Received: from paphio.veillard.com (vpn-10-8.str.redhat.com [10.32.10.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4C5segZ027203; Tue, 12 May 2009 01:54:40 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4C5sd59021666; Tue, 12 May 2009 07:54:39 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4C5sd9Q021664; Tue, 12 May 2009 07:54:39 +0200 Date: Tue, 12 May 2009 07:54:39 +0200 From: Daniel Veillard To: Stefan Behnel Message-ID: <20090512055438.GS1589@redhat.com> References: <4A0531A6.1080608@behnel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A0531A6.1080608@behnel.de> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] parse-time validation against a user provided DTD X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 05:55:02 -0000 On Sat, May 09, 2009 at 09:32:54AM +0200, Stefan Behnel wrote: > Hi, > > looking through the API docs, I can't really figure out a way to stick an > external DTD into the parser, so that it validates against that rather than > trying to load a DTD for the DOCTYPE (or also to do DTD validation if the > document does not define a DOCTYPE at all). > > I can see that xmllint can validate against an externally provided DTD, but > only after parsing, so that doesn't help. I don't understand the dependancy here. You don't want the default behaviour of validating as defined in the spec. So don't do it then, and do it as a later stage. > Has anyone done this before? Is there maybe even a preferred/obvious/RFTM > way of doing that? I'm interested in a way to do this a) by providing a > readily parsed xmlDtd, and maybe even b) by providing a public ID (in case > there is a shortcut other than looking up the DTD manually). Why do you think it's better to put this in the parsing phase ? IMHO that's more confusing than anything else. If you validate in a way that's different from what the spec explains, then it really should be separated as an isolated step to avoid confusion about the 2 different validations. For example the mix between the internal subset overriding rules and what you may provide in your own DTD is impossible to decipher, as the normal rules can't apply. Validation is a trust checkpoint. Either you trust the document and that means including the external subset, or you don't trust it. If you don't trust it and hand you own validation rules, why would you allow its internal subset to override and modify your rules ? http://xmlsoft.org/html/libxml-valid.html#xmlValidateDtd sounds to me the correct API if you don't trust the incoming document. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From carsten.aulbert@aei.mpg.de Tue May 12 06:12:12 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5870D750006 for ; Tue, 12 May 2009 06:12:12 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.445 X-Spam-Level: X-Spam-Status: No, score=-2.445 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_BX=0.077, TW_IB=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 5269 hrs), (distance 22, link: ethernet/modem), [85.214.50.128] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1mOIZ5j8DBm7 for ; Tue, 12 May 2009 06:12:06 +0000 (GMT) Received: from smtp.welcomes-you.com (welcomes-you.com [85.214.50.128]) by menubar.gnome.org (Postfix) with ESMTP id 4B4B375006F for ; Tue, 12 May 2009 06:11:57 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.welcomes-you.com (Postfix) with ESMTP id EF44DC70007; Tue, 12 May 2009 08:11:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at welcomes-you.com Received: from smtp.welcomes-you.com ([127.0.0.1]) by localhost (smtp.welcomes-you.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GE2BvheHxPaR; Tue, 12 May 2009 08:11:54 +0200 (CEST) Received: from [10.50.60.123] (epimetheus.atlas.aei.uni-hannover.de [130.75.116.11]) by smtp.welcomes-you.com (Postfix) with ESMTP id 6E4B7C70002; Tue, 12 May 2009 08:11:54 +0200 (CEST) Message-ID: <4A091329.5030606@aei.mpg.de> Date: Tue, 12 May 2009 08:11:53 +0200 From: Carsten Aulbert User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: veillard@redhat.com References: <49F9D929.5060807@aei.mpg.de> <20090512052249.GM1589@redhat.com> In-Reply-To: <20090512052249.GM1589@redhat.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: xml@gnome.org Subject: Re: [xml] Possible problems making libxml2 non-threaded? X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 06:12:12 -0000 Hi Daniel Daniel Veillard schrieb: > Theads support is about thread safety support not about performances. > If you're sure there is nothing on the whole OS using threads and libxml2 > then you should be safe. But I have no way to estimate that and would be > rather pessimistic by default libxml2 is used in many software and many > may expect the default libxml2 behaviour. Your environment seems highly > specific, and it's impossible for me to make any assertion about it. Ah thanks for clarifying this. Reading this I think we will go forward and build a special non-threaded package for our purposes at a "non-system" location where our own programs may link to other programs on the system won't be able to see it. That way only our programs would be the ones harmed if something were going amiss. Thanks for the reply! Cheers Carsten From veillard@paphio.veillard.com Tue May 12 07:19:16 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B6C6775006F for ; Tue, 12 May 2009 07:19:16 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 8956 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E1WGrOZ+g5ZE for ; Tue, 12 May 2009 07:19:08 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 48EB87500B4 for ; Tue, 12 May 2009 07:19:00 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4C7IwIt023856; Tue, 12 May 2009 03:18:58 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4C7IvR6005589; Tue, 12 May 2009 03:18:58 -0400 Received: from paphio.veillard.com (vpn-10-8.str.redhat.com [10.32.10.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4C7IuaD013406; Tue, 12 May 2009 03:18:57 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4C7Itcc005356; Tue, 12 May 2009 09:18:55 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4C7Itoh005355; Tue, 12 May 2009 09:18:55 +0200 Date: Tue, 12 May 2009 09:18:54 +0200 From: Daniel Veillard To: Roland Steiner Message-ID: <20090512071854.GT1589@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] Missing comma in HTMLParser.c X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 07:19:17 -0000 On Mon, May 11, 2009 at 09:49:25PM -0700, Roland Steiner wrote: > Hi libxml folks, > > I seem to have stumbled upon a missing comma in libxml2 2.7.3, HTMLParser.c, > line 609 in the definition array for the
element (right after > ATTRS): > > static const char* const table_attrs[] = { ATTRS "summary", > "width", "border", > "frame", "rules", "cellspacing", "cellpadding", "datapagesize", NULL } ; > > (I also filed a bug entry http://bugzilla.gnome.org/show_bug.cgi?id=581803) Right, good catch ! The hardest was to grasp a bit of git and set myself up for commiting again ! http://git.gnome.org/cgit/libxml2/log/ thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@paphio.veillard.com Tue May 12 07:21:25 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 76D787500E4 for ; Tue, 12 May 2009 07:21:25 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 8956 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BM761frFoT7e for ; Tue, 12 May 2009 07:21:17 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 75AA675006F for ; Tue, 12 May 2009 07:21:09 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4C7L6wK024461; Tue, 12 May 2009 03:21:06 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4C7L5Qf006514; Tue, 12 May 2009 03:21:05 -0400 Received: from paphio.veillard.com (vpn-10-8.str.redhat.com [10.32.10.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4C7L3S3013941; Tue, 12 May 2009 03:21:04 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4C7L3a6005563; Tue, 12 May 2009 09:21:03 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4C7L2G0005562; Tue, 12 May 2009 09:21:02 +0200 Date: Tue, 12 May 2009 09:21:02 +0200 From: Daniel Veillard To: Carsten Aulbert Message-ID: <20090512072102.GU1589@redhat.com> References: <49F9D929.5060807@aei.mpg.de> <20090512052249.GM1589@redhat.com> <4A091329.5030606@aei.mpg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A091329.5030606@aei.mpg.de> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] Possible problems making libxml2 non-threaded? X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 07:21:25 -0000 On Tue, May 12, 2009 at 08:11:53AM +0200, Carsten Aulbert wrote: > Hi Daniel > > Daniel Veillard schrieb: > > Theads support is about thread safety support not about performances. > > If you're sure there is nothing on the whole OS using threads and libxml2 > > then you should be safe. But I have no way to estimate that and would be > > rather pessimistic by default libxml2 is used in many software and many > > may expect the default libxml2 behaviour. Your environment seems highly > > specific, and it's impossible for me to make any assertion about it. > > Ah thanks for clarifying this. Reading this I think we will go forward > and build a special non-threaded package for our purposes at a > "non-system" location where our own programs may link to other programs > on the system won't be able to see it. That way only our programs would > be the ones harmed if something were going amiss. Yup if you can do this then that should be just fine I think, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From rachael.churchill@linguamatics.com Wed May 13 08:38:10 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D601A7500FF for ; Wed, 13 May 2009 08:38:10 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.499 X-Spam-Level: X-Spam-Status: No, score=-2.499 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RDNS_NONE=0.1] X-Amavis-OS-Fingerprint: Linux 2.6? (barebone, rare!), (distance 16, link: ethernet/modem), [193.34.186.85] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CWn5GRTpGsTA for ; Wed, 13 May 2009 08:38:05 +0000 (GMT) Received: from mail.linguamatics.com (unknown [193.34.186.85]) by menubar.gnome.org (Postfix) with ESMTP id 9EDD575012C for ; Wed, 13 May 2009 08:37:56 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by guardian.linguamatics.com (Postfix) with ESMTP id 8EB65410030 for ; Wed, 13 May 2009 09:37:54 +0100 (BST) X-Virus-Scanned: by Endian Firewall Received: from linguamatics.com (unknown [10.252.10.133]) by guardian.linguamatics.com (Postfix) with ESMTP id DF56A41002B for ; Wed, 13 May 2009 09:37:53 +0100 (BST) Received: from [10.252.10.151] (mojo [10.252.10.151]) by linguamatics.com (8.13.8+Sun/8.13.8) with ESMTP id n4D8bru1025721 for ; Wed, 13 May 2009 09:37:53 +0100 (BST) Message-ID: <4A0A8676.9060806@linguamatics.com> Date: Wed, 13 May 2009 09:36:06 +0100 From: Rachael Churchill User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: xml@gnome.org References: <49F86CC7.3030800@linguamatics.com> <20090512051648.GL1589@redhat.com> In-Reply-To: <20090512051648.GL1589@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [xml] [Fwd: Resolving entity references from a DTD using SAX parser] X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2009 08:38:11 -0000 Hi Daniel Thanks very much for your reply about DTDs and SAX. Daniel Veillard wrote: > Why SAX and why not the XML Reader ? I saw your mail, and my 10s > attention span was reduced to why do they absolutely need SAX if they > are using Entities declaration in the DTD. > > Does the XML Reader API do HTML too? I couldn't find anything saying it does or it doesn't. We need to parse both XML and HTML. Thanks, Rachael From tiberius.duluman@iquestint.com Wed May 13 12:59:17 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2CE337500FF for ; Wed, 13 May 2009 12:59:17 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 1.192 X-Spam-Level: * X-Spam-Status: No, score=1.192 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, HTML_MESSAGE=0.001, L_P0F_W=1.7, TW_BX=0.077, TW_IB=0.077, TW_VC=0.077] X-Amavis-OS-Fingerprint: Windows 2000 SP4, XP SP1+, (distance 24, link: ethernet/modem), [194.117.242.2] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6bIBQk256mEo for ; Wed, 13 May 2009 12:59:08 +0000 (GMT) Received: from mail.iquestint.com (Mail.iquestint.com [194.117.242.2]) by menubar.gnome.org (Postfix) with ESMTP id 2B2BF7500E2 for ; Wed, 13 May 2009 12:58:58 +0000 (GMT) Received: from exch2007.esp.local ([10.123.100.10]) by exch2007.esp.local ([10.123.100.10]) with mapi; Wed, 13 May 2009 15:56:56 +0300 From: Tiberius Duluman To: "xml@gnome.org" Date: Wed, 13 May 2009 15:56:55 +0300 Thread-Topic: Bug in xmlSchemaValidateOneElement function Thread-Index: AcnTykr3RmTFUr4TSkOtUrsxjTg3mw== Message-ID: <42F11A020E76D849B8EA616C1D1BDBE232104A4175@exch2007.esp.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US x-tm-as-product-ver: SMEX-8.0.0.1181-5.600.1016-16638.006 x-tm-as-result: No--41.334200-4.000000-31 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No Content-Type: multipart/alternative; boundary="_000_42F11A020E76D849B8EA616C1D1BDBE232104A4175exch2007esplo_" MIME-Version: 1.0 Subject: [xml] Bug in xmlSchemaValidateOneElement function X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2009 12:59:17 -0000 --_000_42F11A020E76D849B8EA616C1D1BDBE232104A4175exch2007esplo_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, I've tried to validate the XML document defined in RFC 4479 section 7.1 ( http://tools.ietf.org/html/rfc4479#section-7.1 ) with the schema defined in section 5.1.2 ( http://tools.ietf.org/html/rfc4479#section-5.1.2 ). This failed with the error: element presence: Schemas validity error : Element '{urn:ietf:params:xml:ns= :pidf}presence': No matching global declaration available for the validation root. I've thought that this happens because there is no 'presence' element defined in the above schema. So, I have tried to scan the document and validate each element with the "urn:ietf:params:xml:ns:pidf:data-model" namespace using the xmlSchemaValidateOneElement function. But when I have called this function with the first "dm:deviceID" element, the function failed with the same error message. I've tried to search the net for more information on xmlSchemaValidateOneEl= ement but I couldn't find too much. So, I had a look in the source code of libxml 2.7.3 and I have noticed this strange thing in xmlschemas.c: In function xmlSchemaValidateOneElement on line 28002 the following attribu= tion is made ctxt->validationRoot =3D elem; Then xmlSchemaVStart function is called. This function calls the xmlSchemaV= DocWalk function. xmlSchemaVDocWalk, on line 27723 overwrites the validationRoot with the roo= t of the document. 27716: valRoot =3D xmlDocGetRootElement(vctxt->doc); [...] 27723: vctxt->validationRoot =3D valRoot; So it seems that xmlSchemaValidateOneElement always validates the root elem= ent of the document ( this means it validates the entire document ) I've tried to see if there is a path to call xmlSchemaVDocWalk without init= ializing the validationRoot. I have found one more path through xmlSchemaValidateDoc= , but also, on line 28031 the validationRoot is initialized. The next thing that I have tried was to remove the reinitialization of vali= dationRoot from xmlSchemaVDocWalk on line 27723. After doing this, I could succesifull= y validate the elements from "urn:ietf:params:xml:ns:pidf:data-model" namespace. Is this a bug, or an intended behaviour? Regards, Tiberius Duluman --_000_42F11A020E76D849B8EA616C1D1BDBE232104A4175exch2007esplo_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

I've tried to validate the XML document defined in RFC 4= 479 section 7.1

( http://tools.ietf.org/html/rfc4479#section-7.1 ) with = the schema defined

in section 5.1.2 ( http://tools.ietf.org/html/rfc4479#section-5.1.2 ).

 

This failed with the error:

element presence: Schemas validity error : Element '{urn:ietf:params:xml:ns:pidf}presence':

No matching global declaration available for the validat= ion root.

 

I've thought that this happens because there is no 'presence' element

defined in the above schema. So, I have tried to scan th= e document and

validate each element with the "urn:ietf:params:xml:ns:pidf:data-model"=

namespace using the xmlSchemaValidateOneElement function= . But when I

have called this function with the first "dm:deviceID" element, the

function failed with the same error message.<= /span>

 

I've tried to search the net for more information on xmlSchemaValidateOneElement

but I couldn't find too much. So, I had a look in the so= urce code of

libxml 2.7.3 and I have noticed this strange thing in xmlschemas.c:

 

In function xmlSchemaValidateOneElement on line 28002 th= e following attribution is made

 

ctxt->validationRoot =3D elem;

 

Then xmlSchemaVStart function is called. This function c= alls the xmlSchemaVDocWalk function.

xmlSchemaVDocWalk, on line 27723 overwrites the validationRoot with the root of the document.

 

27716: valRoot =3D xmlDocGetRootElement(vctxt->doc);<= o:p>

[...]

27723: vctxt->validationRoot =3D valRoot;<= /span>

 

So it seems that xmlSchemaValidateOneElement always validates the root element of the document

( this means it validates the entire document )

 

I've tried to see if there is a path to call xmlSchemaVDocWalk without initializing

the validationRoot. I have found one more path through xmlSchemaValidateDoc, but also,

on line 28031 the validationRoot is initialized.

 

The next thing that I have tried was to remove the reinitialization of validationRoot

from xmlSchemaVDocWalk on line 27723. After doing this, = I could succesifully validate

the elements from "urn:ietf:params:xml:ns:pidf:data-model" namespace.

 

Is this a bug, or an intended behaviour?

 

Regards,

Tiberius Duluman

--_000_42F11A020E76D849B8EA616C1D1BDBE232104A4175exch2007esplo_-- From veillard@paphio.veillard.com Fri May 15 16:00:03 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E8DD8750105 for ; Fri, 15 May 2009 16:00:03 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 9763 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2dC-VTWpQ+ZM for ; Fri, 15 May 2009 15:59:56 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 60B5B75000B for ; Fri, 15 May 2009 15:59:47 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4FFxiQJ027304; Fri, 15 May 2009 11:59:44 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4FFxiqt018106; Fri, 15 May 2009 11:59:44 -0400 Received: from paphio.veillard.com (vpn-10-3.str.redhat.com [10.32.10.3]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4FFxhcP006836; Fri, 15 May 2009 11:59:43 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4FFxfan006662; Fri, 15 May 2009 17:59:41 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4FFxeoU006661; Fri, 15 May 2009 17:59:40 +0200 Date: Fri, 15 May 2009 17:59:40 +0200 From: Daniel Veillard To: Aaron Patterson Message-ID: <20090515155940.GS1589@redhat.com> References: <6959e1680904290014x44952247od0a634a086557b9e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6959e1680904290014x44952247od0a634a086557b9e@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] [PATCH] HTML Parser does not keep track of line numbers X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2009 16:00:04 -0000 On Wed, Apr 29, 2009 at 12:14:26AM -0700, Aaron Patterson wrote: > Hello, > > The HTML parser does not keep track of line numbers. If you parse an > HTML file, search for any non-text node, then get the line number from > the node, it will always return 0. Okay, thanks, I fixed it directly in htmlParseDocument instead fix is in git head, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@paphio.veillard.com Fri May 15 16:07:45 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5722C7500CE for ; Fri, 15 May 2009 16:07:45 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 9763 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ltxN6TueZGdB for ; Fri, 15 May 2009 16:07:37 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 6C80175000B for ; Fri, 15 May 2009 16:07:29 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4FG7RJ0029551; Fri, 15 May 2009 12:07:27 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4FG7Raj020739; Fri, 15 May 2009 12:07:27 -0400 Received: from paphio.veillard.com (vpn-10-3.str.redhat.com [10.32.10.3]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4FG7POg008552; Fri, 15 May 2009 12:07:26 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4FG7OT2007426; Fri, 15 May 2009 18:07:24 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4FG7OAP007425; Fri, 15 May 2009 18:07:24 +0200 Date: Fri, 15 May 2009 18:07:24 +0200 From: Daniel Veillard To: Rachael Churchill Message-ID: <20090515160723.GT1589@redhat.com> References: <49F86CC7.3030800@linguamatics.com> <20090512051648.GL1589@redhat.com> <4A0A8676.9060806@linguamatics.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A0A8676.9060806@linguamatics.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] [Fwd: Resolving entity references from a DTD using SAX parser] X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2009 16:07:45 -0000 On Wed, May 13, 2009 at 09:36:06AM +0100, Rachael Churchill wrote: > Hi Daniel > > Thanks very much for your reply about DTDs and SAX. > > Daniel Veillard wrote: >> Why SAX and why not the XML Reader ? I saw your mail, and my 10s >> attention span was reduced to why do they absolutely need SAX if they >> are using Entities declaration in the DTD. >> >> > Does the XML Reader API do HTML too? I couldn't find anything saying it > does or it doesn't. We need to parse both XML and HTML. Hum, no. Though there is nothing really specific which would not work with HTML. Actually you could parse the HTML normally, and use xmlReaderNewWalker() on the doc to have a reader working on an html file, but that requires to fully parse it. Adding HTML support would probably as simple as just creating the 4 new entry points htmlReaderNew... like their xml counterparts and just calling the HTML initialization instead. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From rachael.churchill@linguamatics.com Mon May 18 09:20:06 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 69943750067 for ; Mon, 18 May 2009 09:20:06 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.652 X-Spam-Level: X-Spam-Status: No, score=0.652 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, MISSING_HEADERS=1.292, RDNS_NONE=0.1] X-Amavis-OS-Fingerprint: Linux 2.6? (barebone, rare!), (distance 16, link: ethernet/modem), [193.34.186.85] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4c-GKhbJIvg0 for ; Mon, 18 May 2009 09:20:01 +0000 (GMT) Received: from mail.linguamatics.com (unknown [193.34.186.85]) by menubar.gnome.org (Postfix) with ESMTP id 24AE4750069 for ; Mon, 18 May 2009 09:19:52 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by guardian.linguamatics.com (Postfix) with ESMTP id 4C11C410032 for ; Mon, 18 May 2009 10:19:50 +0100 (BST) X-Virus-Scanned: by Endian Firewall Received: from linguamatics.com (unknown [10.252.10.133]) by guardian.linguamatics.com (Postfix) with ESMTP id C3192410030 for ; Mon, 18 May 2009 10:19:49 +0100 (BST) Received: from [10.252.10.151] (mojo [10.252.10.151]) by linguamatics.com (8.13.8+Sun/8.13.8) with ESMTP id n4I9Jn7J018054 for ; Mon, 18 May 2009 10:19:49 +0100 (BST) Message-ID: <4A1127C1.4060805@linguamatics.com> Date: Mon, 18 May 2009 10:17:53 +0100 From: Rachael Churchill User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 CC: xml@gnome.org References: <49F86CC7.3030800@linguamatics.com> <20090512051648.GL1589@redhat.com> <4A0A8676.9060806@linguamatics.com> <20090515160723.GT1589@redhat.com> In-Reply-To: <20090515160723.GT1589@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [xml] [Fwd: Resolving entity references from a DTD using SAX parser] X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2009 09:20:06 -0000 Thanks very much for your help. I think I've got it working with the SAX API now for the functionality I need. Rachael From cedric.bosdonnat.ooo@free.fr Tue May 19 09:56:47 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DF7C37503C6 for ; Tue, 19 May 2009 09:56:47 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.769 X-Spam-Level: X-Spam-Status: No, score=0.769 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, L_P0F_UNKN=0.8, TW_BX=0.077, TW_IB=0.077] X-Amavis-OS-Fingerprint: UNKNOWN [S4:43:1:52:M1460,N,N,S,N,W7:.:?:?], (link: ethernet/modem), [212.27.42.91] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e+WyNcvY2-Rr for ; Tue, 19 May 2009 09:56:42 +0000 (GMT) Received: from wmproxy1-g27.free.fr (wmproxy1-g27.free.fr [212.27.42.91]) by menubar.gnome.org (Postfix) with ESMTP id E57A17503C9 for ; Tue, 19 May 2009 09:56:33 +0000 (GMT) Received: from wmproxy1-g27.free.fr (localhost [127.0.0.1]) by wmproxy1-g27.free.fr (Postfix) with ESMTP id 8A4FB6352C for ; Tue, 19 May 2009 11:56:30 +0200 (CEST) Received: from spooler10-g27.priv.proxad.net (spooler10-g27.priv.proxad.net [172.20.243.231]) by wmproxy1-g27.free.fr (Postfix) with ESMTP id 913E8635FD for ; Tue, 19 May 2009 11:56:28 +0200 (CEST) Date: Tue, 19 May 2009 11:56:28 +0200 (CEST) From: cedric.bosdonnat.ooo@free.fr To: xml@gnome.org Message-ID: <1020777603.6378961242726988483.JavaMail.root@spooler10-g27.priv.proxad.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [84.100.35.42] X-Mailer: Zimbra 5.0 (ZimbraWebClient - FF3.0 (Linux)/5.0.15_GA_2815.UBUNTU8_64) X-Authenticated-User: cedric.bosdonnat.ooo@free.fr Subject: [xml] Patch to xmllint X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2009 09:56:48 -0000 Hi all, I have recently hacked xmllint and the libxml2 to add a --diff option outpu= tting the attributes on separate lines. This helps to run diff on XML files= . I posted the patch here: http://cedric.bosdonnat.free.fr/wordpress/wp-con= tent/upload/libxml2-diff.diff. What is the procedure to integrate this change? Should it be integrated at = all? Regards -- C=C3=A9dric Bosdonnat Novell Go-OO hacker OOo Eclipse Integration developer http://cedric.bosdonnat.free.fr From mlu@as-guides.com Tue May 19 10:18:56 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 10F507500F8 for ; Tue, 19 May 2009 10:18:56 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.445 X-Spam-Level: X-Spam-Status: No, score=-2.445 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_BX=0.077, TW_IB=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 6673 hrs), (distance 19, link: ethernet/modem), [80.237.204.15] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hML9r5bzMAuF for ; Tue, 19 May 2009 10:18:50 +0000 (GMT) Received: from lobster.as-guides.com (lobster.as-guides.com [80.237.204.15]) by menubar.gnome.org (Postfix) with ESMTP id 09FB5750108 for ; Tue, 19 May 2009 10:18:41 +0000 (GMT) Received: from seahorse.as-guides.com ([87.193.161.196] helo=[172.16.100.126]) by lobster.as-guides.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1M6MP4-0007s1-Bk for xml@gnome.org; Tue, 19 May 2009 12:18:38 +0200 Message-ID: <4A12877A.6080209@as-guides.com> Date: Tue, 19 May 2009 12:18:34 +0200 From: Michael Ludwig User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: "Xml@Gnome. Org" References: <1020777603.6378961242726988483.JavaMail.root@spooler10-g27.priv.proxad.net> In-Reply-To: <1020777603.6378961242726988483.JavaMail.root@spooler10-g27.priv.proxad.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SA-Do-Not-Run: Yes Subject: Re: [xml] Patch to xmllint X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2009 10:18:56 -0000 cedric.bosdonnat.ooo@free.fr schrieb: > I have recently hacked xmllint and the libxml2 to add a > --diff option outputting the attributes on separate lines. > This helps to run diff on XML files. You've probably discovered XML canonicalization (--c14n for xmllint), but maybe it is of interest to mention in this context. It canonicalizes, among other things, attribute order, and it might be used to reduce diff noise. Michael Ludwig From laurent@marzu.org Tue May 19 11:22:03 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C6D04750076 for ; Tue, 19 May 2009 11:22:03 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.444 X-Spam-Level: X-Spam-Status: No, score=-2.444 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_BX=0.077, TW_IB=0.077] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 5680 hrs), (distance 21, link: ethernet/modem), [91.121.27.228] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EzqbFDydPWlC for ; Tue, 19 May 2009 11:21:57 +0000 (GMT) Received: from 25.mail-out.ovh.net (25.mail-out.ovh.net [91.121.27.228]) by menubar.gnome.org (Postfix) with SMTP id 82ACC75031A for ; Tue, 19 May 2009 11:21:47 +0000 (GMT) Received: (qmail 7291 invoked by uid 503); 19 May 2009 11:21:53 -0000 Received: from b7.ovh.net (HELO mail301.ha.ovh.net) (213.186.33.57) by 25.mail-out.ovh.net with SMTP; 19 May 2009 11:21:53 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 19 May 2009 11:26:05 -0000 Received: from ns0.ovh.net (HELO ssl0.ovh.net) (213.186.33.20) by ns0.ovh.net with SMTP; 19 May 2009 11:26:04 -0000 MIME-Version: 1.0 Date: Tue, 19 May 2009 13:26:04 +0200 From: To: X-Webmail-UserID: laurent@marzu.org X-Originating-IP: 62.160.54.162 Message-ID: X-Sender: laurent@marzu.org User-Agent: RoundCube Webmail/0.1 Content-Type: multipart/alternative; boundary="=_b94dcc48ee4d85d7abef1d3564b7e8cf" X-Ovh-Tracer-Id: 10902088799796912222 Subject: [xml] validation & xpath X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2009 11:22:04 -0000 --=_b94dcc48ee4d85d7abef1d3564b7e8cf Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="UTF-8" Hello, I'm trying to use XPath with libxml2 and I came accross a strange behavior which I do not understand: Here a summary of the parsing of my doc and the XPath evaluation: I took the code sometime ago from the "xmlCreateURLParserCtxt( const char* filename , int options )" xmlParserCtxtPtr ctxt; xmlParserInputPtr inputStream; char *directory = NULL; ctxt->_private = this; ctxt->sax->serror = libxml2_gcdk_error_handler_adapter; ctxt->linenumbers = 1; ctxt->replaceEntities = 1; ctxt->validate = 0; inputStream = NULL; inputStream = xmlLoadExternalEntity(p_filename, NULL, ctxt); inputPush(ctxt, inputStream); if ((ctxt->directory == NULL) & if ((ctxt->directory == NULL) & ctxt->validate = 1; xmlParseDocument( ctxt ); And it seems that in this case, my XPath expressions does not gave any result node, while when I initialize ctxt->validate to 0, It gave me the good results. Is there anyone who could explain me what I'm doing wrong please ? Thanks you all --=_b94dcc48ee4d85d7abef1d3564b7e8cf Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="UTF-8"

Hello,

I'm trying to use XPath with libxml2 and I came accross a strange behavi= or which I do not understand:

Here a summary of the parsing of my doc and the XPath evaluation:

I took the code sometime ago from the "xmlCreateURLParserCtxt( const cha= r* filename , int options )"


    xml= ParserCtxtPtr ctxt;
    xmlParserInputPtr inputStream;<= br />    char *directory =3D NULL;

    ctx= t->_private =3D this;
    ctxt->sax->serror = =3D libxml2_gcdk_error_handler_adapter;
    ctxt->li= nenumbers =3D 1;
    ctxt->replaceEntities =3D 1;

    ctx= t->validate =3D 0;

    inp= utStream =3D NULL;
    inputStream =3D xmlLoadExternalE= ntity(p_filename, NULL, ctxt);

    inp= utPush(ctxt, inputStream);
    if ((ctxt->directory= =3D=3D NULL) && (directory =3D=3D NULL))
   &= nbsp;        directory =3D xmlParserGetD= irectory(p_filename);
    if ((ctxt->directory =3D= =3D NULL) && (directory !=3D NULL))
    &= nbsp;       ctxt->directory =3D directory;=

    ctxt->validate =3D 1;
    xmlP= arseDocument( ctxt );

 

And it seems that in this case, my XPath expressions does not gave any r= esult node, while when I initialize ctxt->validate to 0, It gave me the = good results.

Is there anyone who could explain me what I'm doing wrong please ?

Thanks you all

 

--=_b94dcc48ee4d85d7abef1d3564b7e8cf-- From marc@bloodnok.com Thu May 21 00:58:05 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 01EA675010B for ; Thu, 21 May 2009 00:58:05 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -3.445 X-Spam-Level: X-Spam-Status: No, score=-3.445 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1, TW_BX=0.077, TW_IB=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (NAT!) (up: 860 hrs), (distance 16, link: GPRS, T1, FreeS/WAN), [205.210.42.66] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JWjOX9389ixg for ; Thu, 21 May 2009 00:57:58 +0000 (GMT) Received: from mailout.easydns.com (mailout.easydns.com [205.210.42.66]) by menubar.gnome.org (Postfix) with ESMTP id 5CE4275000A for ; Thu, 21 May 2009 00:57:49 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mailout.easydns.com (Postfix) with ESMTP id 5292948124 for ; Wed, 20 May 2009 20:56:10 -0400 (EDT) Received: from mailout.easydns.com ([127.0.0.1]) by localhost (mailout.easydns.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y37UMefTAoWn for ; Wed, 20 May 2009 20:56:10 -0400 (EDT) Received: from bloodnok.com (S01060015e9ea8ebd.vn.shawcable.net [24.81.124.133]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout.easydns.com (Postfix) with ESMTP id 0CE4B48077 for ; Wed, 20 May 2009 20:56:10 -0400 (EDT) Received: by bloodnok.com (Postfix, from userid 500) id 76DAB12034; Wed, 20 May 2009 17:57:14 -0700 (PDT) From: Marc Munro To: xml@gnome.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ATJw/L0kN/sbFoZjKRAs" Date: Wed, 20 May 2009 17:57:14 -0700 Message-Id: <1242867434.18712.34.camel@bloodnok.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Subject: [xml] relaxng error information X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2009 00:58:05 -0000 --=-ATJw/L0kN/sbFoZjKRAs Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I have a recursive xml document structure which I am trying to validate with relaxng. I am having trouble with the error messages which indicate an error in the outermost grammar start element, rather than the innermost element of that same grammar, which is where the error occurs. Here's what I mean: given a document like this: which has an error in the definition of element x:f; an error is reported in the content of x:b. My rng definition looks something like: I would really like the error to describe a problem in x:f but what I get is:=20 "element b: Relax-NG validity error : Element a has extra content: b" Is this a bug or feature? Are there any work-arounds? I can provide the actual files and an xmllint command if that will help. This is on Debian lenny: libxml version 2.6.32.dfsg-5 __ Marc --=-ATJw/L0kN/sbFoZjKRAs Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkoUpuEACgkQUBr6u+c2wkFb0QCfdVA+SUC+2uXJNmP91ez7ZmyW YHkAnitvHKEwmDtGC127QcpF7yXuAplH =Q4Rb -----END PGP SIGNATURE----- --=-ATJw/L0kN/sbFoZjKRAs-- From dhkuhl@optonline.net Thu May 21 12:34:09 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 53E4F75069F for ; Thu, 21 May 2009 12:34:09 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.383 X-Spam-Level: X-Spam-Status: No, score=-2.383 tagged_above=-999 required=2 tests=[AWL=-0.350, BAYES_05=-1.11, L_P0F_Unix=-1, TW_DH=0.077] X-Amavis-OS-Fingerprint: Solaris 10 (beta), (distance 20, link: ethernet/modem), [167.206.4.196] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lvLBLy5eagBt for ; Thu, 21 May 2009 12:34:03 +0000 (GMT) Received: from mta1.srv.hcvlny.cv.net (mta1.srv.hcvlny.cv.net [167.206.4.196]) by menubar.gnome.org (Postfix) with ESMTP id E847875006A for ; Thu, 21 May 2009 12:33:54 +0000 (GMT) Received: from [192.168.0.3] (ool-43505ef2.dyn.optonline.net [67.80.94.242]) by mta1.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0KJZ00GXXUV31F31@mta1.srv.hcvlny.cv.net> for xml@gnome.org; Thu, 21 May 2009 08:33:04 -0400 (EDT) Date: Thu, 21 May 2009 08:33:03 -0400 From: dhk To: xml@gnome.org Message-id: <4A1549FF.4080802@optonline.net> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT User-Agent: Thunderbird 2.0.0.21 (X11/20090502) Subject: [xml] xml buffer to xmlDocPtr X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2009 12:34:09 -0000 I think I've seen the answer to this before, but I can't find it. How can I make an xmlDocPtr from an xml doc that exists in memory? I'm getting the document out of a Berkley XML database. Thanks, dhk From aaron.patterson@gmail.com Thu May 21 15:45:16 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 99A56750783 for ; Thu, 21 May 2009 15:45:16 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_DH=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (up: 4711 hrs), (distance 13, link: ethernet/modem), [209.85.221.111] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dw1D8ye8+lPJ for ; Thu, 21 May 2009 15:45:06 +0000 (GMT) Received: from mail-qy0-f111.google.com (mail-qy0-f111.google.com [209.85.221.111]) by menubar.gnome.org (Postfix) with ESMTP id 8FA21750762 for ; Thu, 21 May 2009 15:44:58 +0000 (GMT) Received: by qyk9 with SMTP id 9so298272qyk.13 for ; Thu, 21 May 2009 08:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Gv9SGHTg5cyEvGlt0MJrWygM9iBG6Voy8IOOPHXQusY=; b=Cyleoglz72hyH14hMADf+UE9ibleIzcPAYQQeV+9CMrALtkNicXUsohYqk4A5HF+mZ zOTf6ZTAVV2mtZwrL8NAELy8pDIPmlG0LvT4WKlgmPBkUKh199Lrg2ymbNMGVkldJTFj Zl6vzGHZ4SEdZt5kYBCdFzvRG9++yFOTy2a/k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=LwBwbCGIwcVNIRK6e0bF3uTfBjpfdV/4QsOq/hMEpLm9IdS6pd8oSczaPP5/jL0kDP w2PDQLNSKEMuYTfnX5KCmvE/vK+Sb2m7nn1lVkK14fp0UK+6S59aHERaJa8gASPujsf5 ihe6a6LkHai+C+/Jy++ed10WvtD86J429h8EU= MIME-Version: 1.0 Received: by 10.220.92.14 with SMTP id p14mr2909804vcm.92.1242920696343; Thu, 21 May 2009 08:44:56 -0700 (PDT) In-Reply-To: <4A1549FF.4080802@optonline.net> References: <4A1549FF.4080802@optonline.net> Date: Thu, 21 May 2009 08:44:56 -0700 Message-ID: <6959e1680905210844q1cae5510k51d89f698249232f@mail.gmail.com> From: Aaron Patterson To: xml@gnome.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [xml] xml buffer to xmlDocPtr X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2009 15:45:16 -0000 On Thu, May 21, 2009 at 5:33 AM, dhk wrote: > I think I've seen the answer to this before, but I can't find it. > > How can I make an xmlDocPtr from an xml doc that exists in memory? xmlReadMemory() http://xmlsoft.org/html/libxml-parser.html#xmlReadMemory -- Aaron Patterson http://tenderlovemaking.com/ From laurent@marzu.org Fri May 22 12:58:03 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 33A6B75000A for ; Fri, 22 May 2009 12:58:03 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 8512 hrs), (distance 21, link: ethernet/modem), [212.27.42.6] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21m3ciGEAbcA for ; Fri, 22 May 2009 12:57:56 +0000 (GMT) Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by menubar.gnome.org (Postfix) with ESMTP id AFAD275013D for ; Fri, 22 May 2009 12:57:45 +0000 (GMT) Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id A939FE0814E for ; Fri, 22 May 2009 14:57:40 +0200 (CEST) Received: from [192.168.0.10] (chf02-1-82-240-78-188.fbx.proxad.net [82.240.78.188]) by smtp6-g21.free.fr (Postfix) with ESMTP id B657DE08084 for ; Fri, 22 May 2009 14:57:37 +0200 (CEST) Message-ID: <4A16A142.5020609@marzu.org> Date: Fri, 22 May 2009 14:57:38 +0200 From: Laurent Marzullo User-Agent: Thunderbird 2.0.0.21 (X11/20090302) MIME-Version: 1.0 To: xml@gnome.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [xml] xmlNewNs X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2009 12:58:03 -0000 Hello, I've notice that "xmlNewNs" does not delete the string I gave it. So, as my prefix is a newly created one (with xmlStrndup) I would like to know if there's a way to "register" this string as to be deleted at document deletion time or if I should take care of it myself ? thanks you very much all From veillard@paphio.veillard.com Sat May 23 09:17:54 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 50DE675006B for ; Sat, 23 May 2009 09:17:54 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 11616 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yjrzUQV3Ovkd for ; Sat, 23 May 2009 09:17:46 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 4300B750086 for ; Sat, 23 May 2009 09:17:37 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4N9HXMQ004497; Sat, 23 May 2009 05:17:36 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4N9HWt5004797; Sat, 23 May 2009 05:17:33 -0400 Received: from paphio.veillard.com (vpn-10-21.str.redhat.com [10.32.10.21]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4N9HUAJ004075; Sat, 23 May 2009 05:17:32 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4N9HTQB023384; Sat, 23 May 2009 11:17:29 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4N9HS2E023383; Sat, 23 May 2009 11:17:28 +0200 Date: Sat, 23 May 2009 11:17:27 +0200 From: Daniel Veillard To: laurent@marzu.org Message-ID: <20090523091727.GK13661@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] validation & xpath X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2009 09:17:54 -0000 On Tue, May 19, 2009 at 01:26:04PM +0200, laurent@marzu.org wrote: > > > Hello, > > I'm trying to use XPath with libxml2 and I came accross a strange behavior > which I do not understand: > > Here a summary of the parsing of my doc and the XPath evaluation: > > I took the code sometime ago from the "xmlCreateURLParserCtxt( const char* > filename , int options )" > > xmlParserCtxtPtr ctxt; > xmlParserInputPtr inputStream; > char *directory = NULL; > > ctxt->_private = this; > ctxt->sax->serror = libxml2_gcdk_error_handler_adapter; > ctxt->linenumbers = 1; > ctxt->replaceEntities = 1; > > ctxt->validate = 0; > > inputStream = NULL; > inputStream = xmlLoadExternalEntity(p_filename, NULL, ctxt); > > inputPush(ctxt, inputStream); > if ((ctxt->directory == NULL) & > if ((ctxt->directory == NULL) & > > ctxt->validate = 1; > xmlParseDocument( ctxt ); > > And it seems that in this case, my XPath expressions does not gave any > result node, while when I initialize ctxt->validate to 0, It gave me the > good results. > > Is there anyone who could explain me what I'm doing wrong please ? I really don't understand why you don't use xmlReadDoc directly for parsing ! Why XPath works without validation versus with validation might be due to a defaulted default namespace coming from the DTD. But you're doing things in a very complex way and I can't see a good reason for this. Use the existing API instead of copy/pasting stuff ... Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From veillard@paphio.veillard.com Sat May 23 09:19:50 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2AAE0750613 for ; Sat, 23 May 2009 09:19:50 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 11616 hrs), (distance 14, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DMQY0T8UoUT7 for ; Sat, 23 May 2009 09:19:42 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 5560675006B for ; Sat, 23 May 2009 09:19:34 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4N9JXbo004777; Sat, 23 May 2009 05:19:33 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4N9JWxT004883; Sat, 23 May 2009 05:19:32 -0400 Received: from paphio.veillard.com (vpn-10-21.str.redhat.com [10.32.10.21]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4N9JVEE004138; Sat, 23 May 2009 05:19:31 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4N9JUQE023535; Sat, 23 May 2009 11:19:30 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4N9JUSx023534; Sat, 23 May 2009 11:19:30 +0200 Date: Sat, 23 May 2009 11:19:30 +0200 From: Daniel Veillard To: Laurent Marzullo Message-ID: <20090523091930.GL13661@redhat.com> References: <4A16A142.5020609@marzu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A16A142.5020609@marzu.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] xmlNewNs X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2009 09:19:50 -0000 On Fri, May 22, 2009 at 02:57:38PM +0200, Laurent Marzullo wrote: > Hello, > > I've notice that "xmlNewNs" does not delete the string I gave it. So, as > my prefix is a newly created one (with xmlStrndup) I would like to know > if there's a way > to "register" this string as to be deleted at document deletion time or > if I should take care of it myself ? The strings you pass are copied internally. You allocate them, you free them, it's not libxml2 responsability. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From bansp@o2.pl Sun May 24 00:06:03 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 824CC750240 for ; Sun, 24 May 2009 00:06:03 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.185 X-Spam-Level: X-Spam-Status: No, score=-0.185 tagged_above=-999 required=2 tests=[BAYES_40=-0.185] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 1086 hrs), (distance 21, link: ethernet/modem), [193.17.41.74] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VsuiAnOt3T2T for ; Sun, 24 May 2009 00:05:43 +0000 (GMT) Received: from poczta.o2.pl (mx10.go2.pl [193.17.41.74]) by menubar.gnome.org (Postfix) with ESMTP id CCDBF7501E8 for ; Sun, 24 May 2009 00:05:34 +0000 (GMT) Received: from poczta.o2.pl (mx10.go2.pl [127.0.0.1]) by poczta.o2.pl (Postfix) with ESMTP id 25087865F02; Sun, 24 May 2009 02:05:29 +0200 (CEST) Received: from [127.0.0.1] (aavz81.neoplus.adsl.tpnet.pl [83.6.59.81]) by poczta.o2.pl (Postfix) with ESMTP; Sun, 24 May 2009 02:05:27 +0200 (CEST) Message-ID: <4A188F48.5030504@o2.pl> Date: Sun, 24 May 2009 02:05:28 +0200 From: =?ISO-8859-2?Q?Piotr_Ba=F1ski?= User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: xml@gnome.org Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 090523-0, 2009-05-23), Outbound message X-Antivirus-Status: Clean Subject: [xml] XPointer: a patch and a list of new problems X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 00:06:03 -0000 Hi, I'd like to let everyone interested in the XPointer implementation that a patch has been submitted [1] that makes it possible for unrecognized schemes to be skipped silently -- that opens the way for those who want to use schemes registered at W3C [2] to put them in, followed by the core schemes that emulate at least some of the intended new functionality. OTOH, a new list of problems with the existing implementation of XPointer has been identified.[3] Cheers, Piotr [1]: http://bugzilla.gnome.org/show_bug.cgi?id=563562 [2]: http://www.w3.org/2005/04/xpointer-schemes/ [3]: http://bugzilla.gnome.org/show_bug.cgi?id=583442 From marc@bloodnok.com Mon May 25 16:50:15 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 86F577500D5 for ; Mon, 25 May 2009 16:50:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -3.445 X-Spam-Level: X-Spam-Status: No, score=-3.445 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1, TW_LX=0.077, TW_XN=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (NAT!) (up: 972 hrs), (distance 16, link: GPRS, T1, FreeS/WAN), [205.210.42.66] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K09aYSNSDtbC for ; Mon, 25 May 2009 16:50:05 +0000 (GMT) Received: from mailout.easydns.com (mailout.easydns.com [205.210.42.66]) by menubar.gnome.org (Postfix) with ESMTP id 518217500C9 for ; Mon, 25 May 2009 16:49:56 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mailout.easydns.com (Postfix) with ESMTP id A73F948142 for ; Mon, 25 May 2009 12:48:12 -0400 (EDT) Received: from mailout.easydns.com ([127.0.0.1]) by localhost (mailout.easydns.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AJ13lOhXrgHY for ; Mon, 25 May 2009 12:48:12 -0400 (EDT) Received: from bloodnok.com (S01060015e9ea8ebd.vn.shawcable.net [24.81.124.133]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout.easydns.com (Postfix) with ESMTP id 7ECD94812E for ; Mon, 25 May 2009 12:48:12 -0400 (EDT) Received: by bloodnok.com (Postfix, from userid 500) id 3389012C63; Mon, 25 May 2009 09:49:53 -0700 (PDT) From: Marc Munro To: xml@gnome.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Qm6ed341ih7fv5bij4Uj" Date: Mon, 25 May 2009 09:49:52 -0700 Message-Id: <1243270192.29060.26.camel@bloodnok.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Subject: Re: [xml] relaxng error information X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 16:50:15 -0000 --=-Qm6ed341ih7fv5bij4Uj Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2009-05-21 at 12:00 +0000, xml-request@gnome.org wrote: > I have a recursive xml document structure which I am trying to > validate with relaxng... No response to my earlier request, so here is a simpler, runnable, demonstration of the issue. This rng definition allows any valid xml as long as each element contains an x attribute: Here is the xml I wish to validate. Note that element q is missing the x attribute. Here is the output from xmllint: test.xml:4: element b: Relax-NG validity error : Element a has extra conten= t: b test.xml fails to validate Given that the realxng grammar is defined recursively it is quite correct, but not very useful, to say that a, or even b, is invalid. =20 What would be useful is an indication that the definition of q is malformed, or at least that c contains a malformed element. Is there any way I can define the rng file to give me such information while still defining it recursively? Better still, is there any way the relaxng validator can recognise that it is validating recursively and provide the error for each level of recursion? Something like: test.xml:4: element b: Relax-NG validity error : Element a has extra conten= t: b Element b has extra content: b Element b has extra content: c Element c has extra content: q Invalid attribute y for element q test.xml fails to validate __ Marc --=-Qm6ed341ih7fv5bij4Uj Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkoazCgACgkQUBr6u+c2wkF7pQCfXKxu+DKS0637cmgN8raTJxj4 4oYAn12VDrOjlYvDND0ycBZcQ7E4Z8Dc =XYnz -----END PGP SIGNATURE----- --=-Qm6ed341ih7fv5bij4Uj-- From chandni1313@gmail.com Tue May 26 06:59:35 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7AEFE7503A3 for ; Tue, 26 May 2009 06:59:35 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.598 X-Spam-Level: X-Spam-Status: No, score=-2.598 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (up: 5660 hrs), (distance 14, link: ethernet/modem), [209.85.220.226] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7-pR2htnZWyM for ; Tue, 26 May 2009 06:59:30 +0000 (GMT) Received: from mail-fx0-f226.google.com (mail-fx0-f226.google.com [209.85.220.226]) by menubar.gnome.org (Postfix) with ESMTP id 6E4307500AE for ; Tue, 26 May 2009 06:59:20 +0000 (GMT) Received: by fxm26 with SMTP id 26so3346331fxm.15 for ; Mon, 25 May 2009 23:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=iqYsuTln/u0Ll6zMLGE+y86baXECPWbAoa09/0FDwRM=; b=Alc0zcABYFMDtlt5MGJ0WAEEpcWvlujJ27hLji9P3kPtdAzDHgx3LjIF4iA946Uc4M 0XJjxFzgHyiUKPHHmmFqGqaFf7X/WFG2UwsBfXWznPumNjaBiIVAIqKZdSo2ySQEpvYX x3Qnz6z4eK/bwvyHObq8X6F8s1CPpXQ1pGbfk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=iLs4vDR+5oWrG6pFEDqbQgPRsCohF8563MoQX1eKiI4f7CSG+7hnDUJrWPUrHMcAbe 3X1MQglH/GZtslt3f/exSH8WYMHsHkvwgzrT+QMqjm2pf6pCWvrchVOaDvw+yeYFhnOT DBxntCTaUtv1PTwh8K3hKWCgVT49jKO6zTe0o= MIME-Version: 1.0 Received: by 10.223.110.211 with SMTP id o19mr4083815fap.57.1243321158647; Mon, 25 May 2009 23:59:18 -0700 (PDT) Date: Tue, 26 May 2009 12:29:18 +0530 Message-ID: <427fb2820905252359r41ea6f7fudd6198f7e0bc5685@mail.gmail.com> From: chandni13131 To: xml@gnome.org Content-Type: multipart/alternative; boundary=001636c5bb1300c10b046acb446b Subject: [xml] getting rid of '"' X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2009 06:59:35 -0000 --001636c5bb1300c10b046acb446b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I am trying to generate xml data as below. "1243318561" HTTP/1.1 200 OK but it gets converted to "1243318561" HTTP/1.1 200 OK I am using XmlWriter to write xmlnodes. How should i generate the desired xml. Thanks, --001636c5bb1300c10b046acb446b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I am trying to generate xml data as below.

<propstat&g= t;
=A0=A0 <prop>
=A0=A0=A0 <getetag>"1243318561"= ;</getetag>
=A0=A0 </prop>
=A0=A0 <status>HTTP/1.1 = 200 OK</status>
=A0 </propstat>

but it gets converted to

<propstat&= gt;
=A0=A0 <prop>
=A0=A0=A0 <getetag>&quot;1243318561= &quot;</getetag>
=A0=A0 </prop>
=A0=A0 <status>= HTTP/1.1 200 OK</status>
=A0 </propstat>

I am using XmlWriter to write xmlnodes. How sh= ould i generate the desired xml.

Thanks,

--001636c5bb1300c10b046acb446b-- From avleen@gmail.com Wed May 27 02:18:22 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6127D750050 for ; Wed, 27 May 2009 02:18:22 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.368 X-Spam-Level: X-Spam-Status: No, score=-2.368 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_BX=0.077, TW_FX=0.077, TW_IB=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (up: 6017 hrs), (distance 13, link: ethernet/modem), [209.85.221.203] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id peSHoMHK1G1E for ; Wed, 27 May 2009 02:18:10 +0000 (GMT) Received: from mail-qy0-f203.google.com (mail-qy0-f203.google.com [209.85.221.203]) by menubar.gnome.org (Postfix) with ESMTP id 280F6750083 for ; Wed, 27 May 2009 02:18:01 +0000 (GMT) Received: by qyk41 with SMTP id 41so3387373qyk.13 for ; Tue, 26 May 2009 19:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=Eb+DkeiKkizdg7gX1lCqCRSz/BCwuaiJ+Vb6t99OR+M=; b=P5bBWRkEGJ/FvYPVRa4HFbXh4jm8laUj6yuQH97WEDpF0cpD6c2ziS14r2GhgY2SEQ hKwf9Se1z7E9obvi0bTjGgbJe3zHTCl5d29yCRJclLOhSsDgboz18LHclcAHlDsZDkwT pvREPJG+OLANus88C68to7vnfSTIaR/8OnWdE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=H4frn+nIHh7qGMBWXE0h/8/xdgVxEeELk/NDQaO0RCCCNy1Lxi4BLBUTuuGJ2eZDJF 8B/yKHmBOJZFceC+Mxui5GZdu7Jo1xnf1OAktEu115hMT8cZPE4/Ildw0yY3l1zXL9Pq iV1C1B+3wgUlW3I5Dht+vgaZwwp4nsx3oNta8= MIME-Version: 1.0 Received: by 10.220.71.6 with SMTP id f6mr7391695vcj.16.1243390677468; Tue, 26 May 2009 19:17:57 -0700 (PDT) Date: Wed, 27 May 2009 03:17:57 +0100 Message-ID: <33c66c80905261917l31e4f6a2wdd84898748aa43fc@mail.gmail.com> From: Avleen Vig To: xml@gnome.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [xml] Possible bug, libxml segfault X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 02:18:22 -0000 Background: We use libxml and libxslt in one of our applications (specifically, in Python via lxml). Recently we've seen our application dying at strange times for no apparent reason. We managed to get a core file out of one crash, and the results of some of our debugging are here: http://xml.pastebin.com/m70c259d6 (I'd be happy to poke more in a particular direction on there, I'm a bit new to gdb :) To me, it seems the parser is complaining while trying to parse the namespaces in the node in transforms/_base.xslt The node for that opens like this: I dug a little deeper and found a bunch of the "address out of bounds" errors and thought I should ask here as I'm drawing a blank on where to go next. The problem happens intermittently, but usually several times a day. I could probably reproduce it. I also see the 'exclude-result-prefixes' mentioned in the backtrace, could that be involved here? Any suggestions you have would be much appreciated! From rtongbram@gmail.com Thu May 28 22:34:29 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 27B0C750006 for ; Thu, 28 May 2009 22:34:29 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.598 X-Spam-Level: X-Spam-Status: No, score=-2.598 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (up: 6460 hrs), (distance 13, link: ethernet/modem), [209.85.221.203] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3Ghloo5nQF2n for ; Thu, 28 May 2009 22:34:22 +0000 (GMT) Received: from mail-qy0-f203.google.com (mail-qy0-f203.google.com [209.85.221.203]) by menubar.gnome.org (Postfix) with ESMTP id A641075010B for ; Thu, 28 May 2009 22:34:13 +0000 (GMT) Received: by qyk41 with SMTP id 41so5354332qyk.13 for ; Thu, 28 May 2009 15:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=pnPaKX0Nj5ZY4w91Iv/JcqKqef8DRysvKugZ16y+Iew=; b=KOPpyfL/W+9HRH7HSMS4JdjgnXd3/CvMiSkXdpFW4/W+YJjz+Q6GQryb52OX74WNAD 34k2LNh6QeH6VCzsxh6X4tWAzUZnX4dx4PlnI/Wi3iHk7H7MCXZ3DsPupoqwD8dvUVEO GPfLbbYOVZVg9rRlqrVl2WimPy67rHdJcpt+Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=eqI/VFYKJ5ZqAg2xGcm6vvPD0IfD+jhI2uT17xeT+MK0IQ4R6IyB4iQKLKq76YC9l+ K86GGwo0gQq8gmWV/9+8hzEQHNSswag2iu5TJu32IeHz0DMyomJBR5N45ViXwTK2vIVS sySc/XBNcN/DqWvDmP/Lv8Y+NHkR4x069vuoo= MIME-Version: 1.0 Received: by 10.224.46.18 with SMTP id h18mr2130694qaf.182.1243550051688; Thu, 28 May 2009 15:34:11 -0700 (PDT) Date: Thu, 28 May 2009 15:34:11 -0700 Message-ID: <6bbcddd30905281534s61ff5adfu4c362955dde8e26f@mail.gmail.com> From: Robertis Tongbram To: xml@gnome.org Content-Type: multipart/alternative; boundary=0015175d675a1761d6046b008f64 Subject: [xml] Denial-Of-service security vulnerability X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 22:34:29 -0000 --0015175d675a1761d6046b008f64 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all, I see that there are 2 vulnerabilities in 2.7.2 : http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4225 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4226 and 1 in 2.7.0 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3529 Are all these 3 fixed in 2.7.3? If yes, can somebody point me the bug ID and the fix? Thanks, Robertis --0015175d675a1761d6046b008f64 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,

I see that there are 2 vulnerabilities in 2.7.2 :
http://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-2008-4225
http://cve.mitre.org/cgi-bin/cvename.cgi?name=3DCVE-= 2008-4226

and 1 in 2.7.0
http://cve.mitre.org/cgi-bin/cvename= .cgi?name=3DCVE-2008-3529




Are all these 3 fixed in 2= .7.3?

If yes, can somebody point me the bug ID and the fix?


Thanks,
Robertis
--0015175d675a1761d6046b008f64-- From stefan_ml@behnel.de Sat May 30 11:17:24 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6630175012C for ; Sat, 30 May 2009 11:17:24 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.291 X-Spam-Level: X-Spam-Status: No, score=-2.291 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_BX=0.077, TW_FX=0.077, TW_IB=0.077, TW_LX=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (NAT!) (up: 600 hrs), (distance 25, link: GPRS, T1, FreeS/WAN), [130.83.156.225] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Rjz+hfOOg+7t for ; Sat, 30 May 2009 11:17:13 +0000 (GMT) Received: from lnx500.hrz.tu-darmstadt.de (lnx500.hrz.tu-darmstadt.de [130.83.156.225]) by menubar.gnome.org (Postfix) with ESMTP id AD70B7500EF for ; Sat, 30 May 2009 11:17:03 +0000 (GMT) Received: from paris.dvs.informatik.tu-darmstadt.de (paris2.dvs.informatik.tu-darmstadt.de [130.83.166.130]) by lnx500.hrz.tu-darmstadt.de (8.14.2/8.14.2/HRZ/PMX) with ESMTP id n4U2cNnc032224; Sat, 30 May 2009 04:38:23 +0200 (envelope-from stefan_ml@behnel.de) Received: from delle.100WORLD.GLOBAL (dslb-084-056-040-173.pools.arcor-ip.net [84.56.40.173]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by paris.dvs.informatik.tu-darmstadt.de (Postfix) with ESMTP id 1ABF9171A; Sat, 30 May 2009 13:17:00 +0200 (CEST) Message-ID: <4A2115AB.4010401@behnel.de> Date: Sat, 30 May 2009 13:16:59 +0200 From: Stefan Behnel User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Avleen Vig References: <33c66c80905261917l31e4f6a2wdd84898748aa43fc@mail.gmail.com> In-Reply-To: <33c66c80905261917l31e4f6a2wdd84898748aa43fc@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-PMX-TU: seen v0.62 by 5.5.3.366731, Antispam-Engine: 2.7.0.366912, Antispam-Data: 2009.5.30.110722 X-PMX-SPAMCHECK: outgoing mail Cc: xml@gnome.org Subject: Re: [xml] Possible bug, libxml segfault X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2009 11:17:24 -0000 Hi, this looks more like a problem in lxml, so I'll answer on the lxml mailing list. Stefan Avleen Vig wrote: > Background: > We use libxml and libxslt in one of our applications (specifically, in > Python via lxml). > > Recently we've seen our application dying at strange times for no > apparent reason. > We managed to get a core file out of one crash, and the results of > some of our debugging are here: > http://xml.pastebin.com/m70c259d6 > (I'd be happy to poke more in a particular direction on there, I'm a > bit new to gdb :) > > To me, it seems the parser is complaining while trying to parse the > namespaces in the node in transforms/_base.xslt > The node for that opens like this: > xmlns="http://www.w3.org/1999/xhtml" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:tfxslt="http://tfnet.co.uk/ns/tfxslt" > xmlns:fb="http://www.facebook.com/2008/fbml" > extension-element-prefixes="tfxslt str exsl" > exclude-result-prefixes="str exsl tfxslt fb" > xmlns:error="http://www.woome.com/error/"> > > I dug a little deeper and found a bunch of the "address out of bounds" > errors and thought I should ask here as I'm drawing a blank on where > to go next. > > The problem happens intermittently, but usually several times a day. I > could probably reproduce it. > I also see the 'exclude-result-prefixes' mentioned in the backtrace, > could that be involved here? > > Any suggestions you have would be much appreciated! > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > http://mail.gnome.org/mailman/listinfo/xml From veillard@paphio.veillard.com Sat May 30 14:34:51 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F41E37500E2 for ; Sat, 30 May 2009 14:34:50 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.356 X-Spam-Level: X-Spam-Status: No, score=-4.356 tagged_above=-999 required=2 tests=[AWL=2.012, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (NAT!) (up: 1418 hrs), (distance 13, link: GPRS, T1, FreeS/WAN), [66.187.237.31] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RRmu+vI4Ya1w for ; Sat, 30 May 2009 14:34:43 +0000 (GMT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by menubar.gnome.org (Postfix) with ESMTP id 3084D750162 for ; Sat, 30 May 2009 14:34:33 +0000 (GMT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4UEYUwN026472; Sat, 30 May 2009 10:34:30 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4UEYTVc003292; Sat, 30 May 2009 10:34:30 -0400 Received: from paphio.veillard.com (vpn-10-18.str.redhat.com [10.32.10.18]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4UEYSMo029241; Sat, 30 May 2009 10:34:29 -0400 Received: from paphio.veillard.com (localhost [127.0.0.1]) by paphio.veillard.com (8.14.2/8.14.2) with ESMTP id n4UEYRHn015025; Sat, 30 May 2009 16:34:27 +0200 Received: (from veillard@localhost) by paphio.veillard.com (8.14.2/8.14.2/Submit) id n4UEYQRu015024; Sat, 30 May 2009 16:34:26 +0200 Date: Sat, 30 May 2009 16:34:26 +0200 From: Daniel Veillard To: chandni13131 Message-ID: <20090530143426.GP23850@redhat.com> References: <427fb2820905252359r41ea6f7fudd6198f7e0bc5685@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <427fb2820905252359r41ea6f7fudd6198f7e0bc5685@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Cc: xml@gnome.org Subject: Re: [xml] getting rid of '"' X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: veillard@redhat.com List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2009 14:34:51 -0000 On Tue, May 26, 2009 at 12:29:18PM +0530, chandni13131 wrote: > Hi, > > I am trying to generate xml data as below. > > > > "1243318561" > > HTTP/1.1 200 OK > > > but it gets converted to > > > > "1243318561" > > HTTP/1.1 200 OK > > > I am using XmlWriter to write xmlnodes. How should i generate the desired > xml. You don't have to, they are exactly the same for an XML parser, just make sure the consumer is actually expecting XML. If not then it's not XML that you need to generate and xmlWriter may not be adequate Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From stefan_ml@behnel.de Sun May 31 13:02:38 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4BD6D75000B for ; Sun, 31 May 2009 13:02:38 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_VC=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (NAT!) (up: 1415 hrs), (distance 25, link: GPRS, T1, FreeS/WAN), [130.83.156.232] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5PHe3OSHvRQz for ; Sun, 31 May 2009 13:02:29 +0000 (GMT) Received: from lnx503.hrz.tu-darmstadt.de (lnx503.hrz.tu-darmstadt.de [130.83.156.232]) by menubar.gnome.org (Postfix) with ESMTP id 4279375000A for ; Sun, 31 May 2009 13:02:20 +0000 (GMT) Received: from paris.dvs.informatik.tu-darmstadt.de (paris2.dvs.informatik.tu-darmstadt.de [130.83.166.130]) by lnx503.hrz.tu-darmstadt.de (8.14.2/8.14.2/HRZ/PMX) with ESMTP id n4VD2HMV011450 for ; Sun, 31 May 2009 15:02:17 +0200 (envelope-from stefan_ml@behnel.de) Received: from delle.100WORLD.GLOBAL (dslb-084-056-005-105.pools.arcor-ip.net [84.56.5.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by paris.dvs.informatik.tu-darmstadt.de (Postfix) with ESMTP id 27098171A for ; Sun, 31 May 2009 15:02:17 +0200 (CEST) Message-ID: <4A227FD8.9000309@behnel.de> Date: Sun, 31 May 2009 15:02:16 +0200 From: Stefan Behnel User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: xml@gnome.org References: <4A050D1B.1080706@behnel.de> In-Reply-To: <4A050D1B.1080706@behnel.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-PMX-TU: seen v0.62 by 5.5.3.366731, Antispam-Engine: 2.7.0.366912, Antispam-Data: 2009.5.31.124930 X-PMX-SPAMCHECK: outgoing mail Subject: Re: [xml] Inserting XML Schema default attributes X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2009 13:02:38 -0000 Hi, as a quick follow-up: injecting default attributes works when applying the schema *after* the parsing step, it does *not* work when validating inside the parser using the SAX plug. Stefan Stefan Behnel wrote: > I'm trying to inject default attributes into a document from an XML Schema > during parsing. I set up a validation context and set the > XML_SCHEMA_VAL_VC_I_CREATE option on it, which, if I understand the docs > correctly, tells the validator to create defaulted/fixed attributes if they > do not exist already. Then I inject the validation context into the parser > using "xmlSchemaSAXPlug()". > > The schema document I use is > > ''' > > > > > > > > > > > > ''' > > The document I parse is > > ''' > > ''' > > The document validates. However, no default attributes are inserted, > neither with my code nor with xmllint (which doesn't seem to support that > anyway). When I debug into the validator code in xmlschemas.c, I get to > line 25351 (libxml2 2.7.3): > > ''' > /* > * Get the owner element; needed for creation of default attributes. > * This fixes bug #341337, reported by David Grohmann. > */ > if (vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) { > xmlSchemaNodeInfoPtr ielem = vctxt->elemInfos[vctxt->depth]; > ==> if (ielem && ielem->node && ielem->node->doc) > defAttrOwnerElem = ielem->node; > } > ''' > > but "ielem->node" is NULL every time it gets there, so this doesn't fly. > > Is there anything else I have to do to make this work? > > Thanks, > > Stefan > _______________________________________________ > xml mailing list, project page http://xmlsoft.org/ > xml@gnome.org > http://mail.gnome.org/mailman/listinfo/xml From albert.zeyer@rwth-aachen.de Fri May 22 19:11:58 2009 Return-Path: X-Original-To: xml@gnome.org Delivered-To: xml@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5EDAE75007E for ; Fri, 22 May 2009 19:11:58 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -7.445 X-Spam-Level: X-Spam-Status: No, score=-7.445 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, L_P0F_Unix=-1, RCVD_IN_DNSWL_MED=-4, TW_BX=0.077, TW_IB=0.077] X-Amavis-OS-Fingerprint: Solaris 10 (beta), (distance 25, link: ethernet/modem), [134.130.7.72] Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o59Ul0FDlR6P for ; Fri, 22 May 2009 19:11:51 +0000 (GMT) Received: from mta-1.ms.rz.rwth-aachen.de (mta-1.ms.rz.RWTH-Aachen.DE [134.130.7.72]) by menubar.gnome.org (Postfix) with ESMTP id 264B375000A for ; Fri, 22 May 2009 19:11:42 +0000 (GMT) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.5.40]) by mta-1.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0KK2007BW7ZGR8E0@mta-1.ms.rz.RWTH-Aachen.de> for xml@gnome.org; Fri, 22 May 2009 21:11:40 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.41,234,1241388000"; d="scan'208";a="12850953" Received: from relay-auth-1.ms.rz.rwth-aachen.de (HELO relay-auth-1) ([134.130.7.78]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Fri, 22 May 2009 21:11:39 +0200 Received: from macbook-6.lan ([unknown] [134.130.188.183]) by relay-auth-1.ms.rz.rwth-aachen.de (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 9 2008)) with ESMTPA id <0KK200F457ZFOB20@relay-auth-1.ms.rz.rwth-aachen.de> for xml@gnome.org; Fri, 22 May 2009 21:11:39 +0200 (CEST) Message-id: From: Albert Zeyer To: xml@gnome.org X-Mailer: Apple Mail (2.935.3) X-Mailman-Approved-At: Wed, 24 Jun 2009 08:23:17 +0000 Subject: [xml] memory leak in __xmlGenericErrorContext, according to Valgrind X-BeenThere: xml@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: The Gnome XML library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Fri, 22 May 2009 19:11:58 -0000 X-Original-Date: Fri, 22 May 2009 21:11:39 +0200 X-List-Received-Date: Fri, 22 May 2009 19:11:58 -0000 Hi, Valgrind just always gives this report: ==10130== 512 bytes in 1 blocks are definitely lost in loss record 5 of 6 ==10130== at 0x40253BA: malloc (vg_replace_malloc.c:207) ==10130== by 0x4B52357: (within /usr/lib/opengl/nvidia/lib/libGL.so.180.51) ==10130== by 0x41A209B: __xmlGenericErrorContext (globals.c:876) ==10130== by 0x8318FB1: StripHtmlTags(stlpd_std::basic_string, stlpd_std::allocator > const&) (StringUtils.cpp:721) In that StripHtmlTags function in the specific line, I am doing this call: xmlSetStructuredErrorFunc(NULL, &xmlErrorHandlerDummy); Can somebody confirm this or make it a false alarm? I looked a bit through the libxml2 code. There is no malloc in __xmlGenericErrorContext but I guess it was inlined from xmlNewGlobalState. So, if Valgrind is right, it means that xmlFreeGlobalState isn't called in all cases. PS: Please CC me on any answer because I am not registered in the list. Thanks a lot, Albert