From stdanley at yahoo.com Wed Jun 14 10:10:31 2006 From: stdanley at yahoo.com (Tom Stanley) Date: Wed, 14 Jun 2006 07:10:31 -0700 (PDT) Subject: [xslt] needed:set xslt variable in program Message-ID: <20060614141031.72330.qmail@web30402.mail.mud.yahoo.com> hello, guys we plan to use libxml and libxslt in our projects. what we need are like snippet belows: We want to use something like xslt template to produce some xml tree as process's input. We can change this xml snippet to a xslt template and use applystylesheet to produce expected output xml tree. However, we need to set a variable (named var ) in program before apply the translation. Does libxslt have any method to do this ,for example like xmlXPathRegisterVariable in libxml? or any other thoughts? thx __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From k.buchcik at 4commerce.de Wed Jun 14 14:06:35 2006 From: k.buchcik at 4commerce.de (Buchcik, Kasimier) Date: Wed, 14 Jun 2006 20:06:35 +0200 Subject: [xslt] needed:set xslt variable in program Message-ID: Hi, > -----Original Message----- > From: xslt-bounces at gnome.org [mailto:xslt-bounces at gnome.org] > On Behalf Of Tom Stanley > > hello, guys > we plan to use libxml and libxslt in our projects. > what we need are like snippet belows: > > > > > select=""Data""/> > > > > > > select="string($var/Report/Data[1])"/> > > > > > We want to use something like xslt template to > produce some xml tree as process's input. > We can change this xml snippet to a xslt template and > use applystylesheet to produce expected output xml > tree. > However, we need to set a variable (named var ) in > program before apply the translation. > Does libxslt have any method to do this ,for example > like xmlXPathRegisterVariable in libxml? > > or any other thoughts? The common solution for this would be to use the document() function: If you need a more sophisticated mechanism, then you could implement an extension element/function. Have a look at how e.g. the EXSLT function node-set() is implemented in Libxslt/Libexslt: The XPath engine calls exsltNodeSetFunction() (in "libexslt/common.c"), then xsltFunctionNodeSet() (in "libxslt/extra.c") is called, which changes a result tree fragment into a node set. In such an extension function, you could just hand-over a copy of an internal node tree managed by your application. Regards, Kasimier From Steve.Ball at explain.com.au Wed Jun 14 19:08:29 2006 From: Steve.Ball at explain.com.au (Steve Ball) Date: Thu, 15 Jun 2006 09:08:29 +1000 Subject: [xslt] needed:set xslt variable in program In-Reply-To: <20060614141031.72330.qmail@web30402.mail.mud.yahoo.com> References: <20060614141031.72330.qmail@web30402.mail.mud.yahoo.com> Message-ID: Hi Tom, Why not simply pass in the value as a stylesheet parameter? libxslt certainly has functions/data structures to pass parameters; RTFM. HTHs, Steve Ball On 15/06/2006, at 12:10 AM, Tom Stanley wrote: > hello, guys > we plan to use libxml and libxslt in our projects. > what we need are like snippet belows: > > > > > select=""Data""/> > > > > > > select="string($var/Report/Data[1])"/> > > > > > We want to use something like xslt template to > produce some xml tree as process's input. > We can change this xml snippet to a xslt template and > use applystylesheet to produce expected output xml > tree. > However, we need to set a variable (named var ) in > program before apply the translation. > Does libxslt have any method to do this ,for example > like xmlXPathRegisterVariable in libxml? > > or any other thoughts? > > thx > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt at gnome.org > http://mail.gnome.org/mailman/listinfo/xslt > From stdanley at yahoo.com Wed Jun 14 21:56:08 2006 From: stdanley at yahoo.com (Tom Stanley) Date: Wed, 14 Jun 2006 18:56:08 -0700 (PDT) Subject: [xslt] needed:set xslt variable in program In-Reply-To: Message-ID: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> can we set an xmlNodePtr in memory as a parameter? --- Steve Ball wrote: > Hi Tom, > > Why not simply pass in the value as a stylesheet > parameter? libxslt > certainly has functions/data structures to pass > parameters; RTFM. > > HTHs, > Steve Ball > > On 15/06/2006, at 12:10 AM, Tom Stanley wrote: > > > hello, guys > > we plan to use libxml and libxslt in our > projects. > > what we need are like snippet belows: > > > > > > > > > > > select=""Data""/> > > > > > > select="0"/> > > > > > > > select="string($var/Report/Data[1])"/> > > > > > > > > > > We want to use something like xslt template to > > produce some xml tree as process's input. > > We can change this xml snippet to a xslt template > and > > use applystylesheet to produce expected output xml > > tree. > > However, we need to set a variable (named var ) in > > program before apply the translation. > > Does libxslt have any method to do this ,for > example > > like xmlXPathRegisterVariable in libxml? > > > > or any other thoughts? > > > > thx > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > _______________________________________________ > > xslt mailing list, project page > http://xmlsoft.org/XSLT/ > > xslt at gnome.org > > http://mail.gnome.org/mailman/listinfo/xslt > > > > _______________________________________________ > xslt mailing list, project page > http://xmlsoft.org/XSLT/ > xslt at gnome.org > http://mail.gnome.org/mailman/listinfo/xslt > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From stdanley at yahoo.com Wed Jun 14 22:09:10 2006 From: stdanley at yahoo.com (Tom Stanley) Date: Wed, 14 Jun 2006 19:09:10 -0700 (PDT) Subject: [xslt] needed:set xslt variable in program In-Reply-To: Message-ID: <20060615020910.80928.qmail@web30409.mail.mud.yahoo.com> hi,Kasimier --- "Buchcik, Kasimier" wrote: > The common solution for this would be to use the > document() function: > > > > select="document('my-report.xml')/Report/Data[1]"/> > > > this thoughts is good,the only limit is we don't like to load file from disk,but from an existed xmlNodePtr from memory > If you need a more sophisticated mechanism, then you > could implement > an extension element/function. Have a look at how > e.g. the > EXSLT function node-set() is implemented in > Libxslt/Libexslt: > The XPath engine calls exsltNodeSetFunction() (in > "libexslt/common.c"), > then xsltFunctionNodeSet() (in "libxslt/extra.c") is > called, which > changes a result tree fragment into a node set. > > In such an extension function, you could just > hand-over a copy of an > internal node tree managed by your application. > > select="mf:my-func('my-var-name')/Report/Data[1]"/> > we would do some test using this method. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From veillard at redhat.com Thu Jun 15 04:00:25 2006 From: veillard at redhat.com (Daniel Veillard) Date: Thu, 15 Jun 2006 04:00:25 -0400 Subject: [xslt] needed:set xslt variable in program In-Reply-To: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> References: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> Message-ID: <20060615080025.GI6722@redhat.com> On Wed, Jun 14, 2006 at 06:56:08PM -0700, Tom Stanley wrote: > can we set an xmlNodePtr in memory as a parameter? Not that I know of. What you ask, is not in the standard, and as Kasimier pointed out the simplest is to define your own extension function like exslt:node-set and call it. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From Steve.Ball at explain.com.au Thu Jun 15 16:54:36 2006 From: Steve.Ball at explain.com.au (Steve Ball) Date: Fri, 16 Jun 2006 06:54:36 +1000 Subject: [xslt] needed:set xslt variable in program In-Reply-To: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> References: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> Message-ID: <41C4B6BE-6C2A-426A-91BC-A8B5E5A48CB1@explain.com.au> Tom, Upon re-reading your original posting it would seem that a parameter is not what you want, and that the document() function or an extension would be the way to go. Since you have already built these documents in-memory as xmlDocPtr's, then I'd say an extension function is needed to access them. Parameters allow you to pass in an atomic value (a string, a number or a nodeset). libxslt has the neat feature that you can pass an XPath and resolve it to a nodeset, but that would consist of nodes from the source document, not an externally-derived "snippet". Cheers, Steve On 15/06/2006, at 11:56 AM, Tom Stanley wrote: > can we set an xmlNodePtr in memory as a parameter? > > --- Steve Ball wrote: > >> Hi Tom, >> >> Why not simply pass in the value as a stylesheet >> parameter? libxslt >> certainly has functions/data structures to pass >> parameters; RTFM. >> >> HTHs, >> Steve Ball >> >> On 15/06/2006, at 12:10 AM, Tom Stanley wrote: >> >>> hello, guys >>> we plan to use libxml and libxslt in our >> projects. >>> what we need are like snippet belows: >>> >>> >>> >>> >>> >> select=""Data""/> >>> >>> >>> > select="0"/> >>> >>> >>> >> select="string($var/Report/Data[1])"/> >>> >>> >>> >>> >>> We want to use something like xslt template to >>> produce some xml tree as process's input. >>> We can change this xml snippet to a xslt template >> and >>> use applystylesheet to produce expected output xml >>> tree. >>> However, we need to set a variable (named var ) in >>> program before apply the translation. >>> Does libxslt have any method to do this ,for >> example >>> like xmlXPathRegisterVariable in libxml? >>> >>> or any other thoughts? >>> >>> thx >>> >>> >>> __________________________________________________ >>> Do You Yahoo!? >>> Tired of spam? Yahoo! Mail has the best spam >> protection around >>> http://mail.yahoo.com >>> _______________________________________________ >>> xslt mailing list, project page >> http://xmlsoft.org/XSLT/ >>> xslt at gnome.org >>> http://mail.gnome.org/mailman/listinfo/xslt >>> >> >> _______________________________________________ >> xslt mailing list, project page >> http://xmlsoft.org/XSLT/ >> xslt at gnome.org >> http://mail.gnome.org/mailman/listinfo/xslt >> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > From RFC 2396: "Relative URI references are distinguished from absolute URI in that they do not begin with a scheme name. Instead, the scheme is inherited from the base URI," So your thing should be uri="./art500/art500.dtd". Another marginally related question for the experts: If a relative URI is specified in the catalog, what should it be relative to? To the location of the catalog, or to the current directory of the current process? When I run xmllint --valid on something, it uses the directory where it started from as a base URI for every relative URI it encounters in the catalog. Is that okay? Ciao, Igor From veillard@redhat.com Thu Jun 1 04:26:12 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C66743B0119 for ; Thu, 1 Jun 2006 04:26:11 -0400 (EDT) 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 16712-04 for ; Thu, 1 Jun 2006 04:26:10 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id D1F883B0111 for ; Thu, 1 Jun 2006 04:26:08 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k518Q7kI002884; Thu, 1 Jun 2006 04:26:07 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k518Q7Vv007070; Thu, 1 Jun 2006 04:26:07 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k518Q744017207; Thu, 1 Jun 2006 04:26:07 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k518Q7qs017205; Thu, 1 Jun 2006 04:26:07 -0400 Date: Thu, 1 Jun 2006 04:26:07 -0400 From: Daniel Veillard To: The Gnome XSLT library mailing-list Subject: Re: [xslt] RE: [xml] does xsltproc caches subexpressions Message-ID: <20060601082607.GA16734@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Cc: X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 08:26:12 -0000 On Tue, May 30, 2006 at 10:36:15PM +0200, Buchcik, Kasimier wrote: > But you still need to customize xsltproc.c in order to activate the > XPath > object cache. It is disabled by default, so we need to make people > aware that it's there and can be activated if things run slowly. > Add a call to xmlXPathContextSetObjectCache() in xsltproc.c after > the creation of the transformation context: The proper way to do this is probably: - make a new libxml2 release - change xsltproc to activate the cache (or should we do that by default in libxslt) - release a new version of libxslt depending on the new API doing it by default in libxslt would avoid aving to change any client code. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From k.buchcik@4commerce.de Thu Jun 1 05:55:13 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 826223B0132 for ; Thu, 1 Jun 2006 05:55:13 -0400 (EDT) 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 24958-10 for ; Thu, 1 Jun 2006 05:55:12 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id 75C3E3B00EC for ; Thu, 1 Jun 2006 05:55:12 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FljtO-0004oi-IQ; Thu, 01 Jun 2006 11:55:02 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FljtO-0004oc-2N; Thu, 01 Jun 2006 11:55:02 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 1 Jun 2006 11:55:10 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [xslt] RE: [xml] does xsltproc caches subexpressions thread-index: AcaFVRIga/85Sd4tRje26G5zYiiSBAAC6J0g From: "Buchcik, Kasimier" To: , "The Gnome XSLT library mailing-list" Subject: RE: [xslt] RE: [xml] does xsltproc caches subexpressions X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.348 tagged_above=-999 required=2 tests=[AWL=-0.038, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: -2.348 X-Spam-Level: Cc: X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 09:55:13 -0000 Hi,=20 > -----Original Message----- > From: xslt-bounces@gnome.org [mailto:xslt-bounces@gnome.org]=20 > On Behalf Of Daniel Veillard > On Tue, May 30, 2006 at 10:36:15PM +0200, Buchcik, Kasimier wrote: > > But you still need to customize xsltproc.c in order to activate the > > XPath > > object cache. It is disabled by default, so we need to make people > > aware that it's there and can be activated if things run slowly. > > Add a call to xmlXPathContextSetObjectCache() in xsltproc.c after > > the creation of the transformation context: >=20 > The proper way to do this is probably: > - make a new libxml2 release > - change xsltproc to activate the cache > (or should we do that by default in libxslt) > - release a new version of libxslt depending on the new API >=20 > doing it by default in libxslt would avoid aving to change=20 > any client code. Great. I wasn't sure this can be easily added to Libxslt, since then it would depend on the latest Libxml2 code. But if that's OK, then I would recommend activating it by default in Libxslt, rather than only in xsltproc.c. The transformations gain so much with the cache, that I think the people don't mind an additional overhead of about 40 KB for it (if ever filled to maximum). And they still can disable the cache before the transformation if really needed. Regards, Kasimier From oliverst@online.de Thu Jun 1 05:42:10 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4E1E23B0137 for ; Thu, 1 Jun 2006 05:42:10 -0400 (EDT) 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 23494-01 for ; Thu, 1 Jun 2006 05:42:06 -0400 (EDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by menubar.gnome.org (Postfix) with ESMTP id 577603B0D49 for ; Thu, 1 Jun 2006 05:15:49 -0400 (EDT) Received: from [172.23.4.151] (helo=pustefix151.kundenserver.de) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis), id 0MKxQS-1FljHP44rI-0006po; Thu, 01 Jun 2006 11:15:48 +0200 Message-Id: <26869193.128141149153347898.JavaMail.servlet@kundenserver> From: oliverst@online.de To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Priority: 3 X-Binford: 6100 (more power) X-Mailer: Webmail X-Originating-From: 5074873 X-Routing: DE X-Message-Id: <5074873$1149153347897172.23.4.15113082069@pustefix151.kundenserver.de-286350973> X-Received: from pustefix151.kundenserver.de by 206.253.224.132 with HTTP id 5074873 for [xslt@gnome.org]; Thu, 1 Jun 2006 11:15:47 CEST Date: Thu, 01 Jun 2006 11:15:47 +0200 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.587 tagged_above=-999 required=2 tests=[AWL=-0.026, BAYES_00=-2.599, NO_REAL_NAME=0.961, TW_IB=0.077] X-Spam-Score: -1.587 X-Spam-Level: X-Mailman-Approved-At: Thu, 01 Jun 2006 08:16:55 -0400 Subject: [xslt] valgrind warning in libxslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 09:42:10 -0000 Loading the file at http://www.breaken.de/temp/trk_trkdata.xsl with libxslt-1.1.4 (using the official RPM) is causing this valgrind warning: ==5721== Thread 50: ==5721== Conditional jump or move depends on uninitialised value(s) ==5721== at 0x440288E: xmlXPathCompPathExpr (xpath.c:7930) ==5721== by 0x44034EC: xmlXPathCompUnaryExpr (xpath.c:8308) ==5721== by 0x440373E: xmlXPathCompMultiplicativeExpr (xpath.c:8373) ==5721== by 0x440392E: xmlXPathCompAdditiveExpr (xpath.c:8414) ==5721== by 0x4403AAE: xmlXPathCompRelationalExpr (xpath.c:8452) ==5721== by 0x4403C2E: xmlXPathCompEqualityExpr (xpath.c:8494) ==5721== by 0x4403DBE: xmlXPathCompAndExpr (xpath.c:8525) ==5721== by 0x4403F2E: xmlXPathCompileExpr (xpath.c:8551) ==5721== by 0x4402CF8: xmlXPathCompPathExpr (xpath.c:8005) ==5721== by 0x44034EC: xmlXPathCompUnaryExpr (xpath.c:8308) ==5721== by 0x440373E: xmlXPathCompMultiplicativeExpr (xpath.c:8373) ==5721== by 0x440392E: xmlXPathCompAdditiveExpr (xpath.c:8414) ==5721== by 0x4403AAE: xmlXPathCompRelationalExpr (xpath.c:8452) ==5721== by 0x4403C2E: xmlXPathCompEqualityExpr (xpath.c:8494) ==5721== by 0x4403DBE: xmlXPathCompAndExpr (xpath.c:8525) ==5721== by 0x4403F2E: xmlXPathCompileExpr (xpath.c:8551) ==5721== by 0x44078B4: xmlXPathCtxtCompile (xpath.c:11403) ==5721== by 0x45AB279: xsltXPathCompile (xsltutils.c:1864) ==5721== by 0x45BD58F: xsltWhenComp (preproc.c:976) ==5721== by 0x45BDC49: xsltStylePreCompute (preproc.c:1207) ==5721== by 0x45A6949: xsltPrecomputeStylesheet (xslt.c:1203) ==5721== by 0x45A7BB0: xsltParseStylesheetProcess (xslt.c:1955) ==5721== by 0x45A7DE2: xsltParseStylesheetImportedDoc (xslt.c:2051) ==5721== by 0x45A7EA9: xsltParseStylesheetDoc (xslt.c:2080) ==5721== by 0x45A7F5A: xsltParseStylesheetFile (xslt.c:2135) Unfortunately I couldn't test it with the actual version, because I had some problems linking with them on my system, but I think it should be easy to test for you. From ensonic@hora-obscura.de Thu Jun 1 14:43:05 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 651D43B011F for ; Thu, 1 Jun 2006 14:43:05 -0400 (EDT) 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 27899-08 for ; Thu, 1 Jun 2006 14:43:03 -0400 (EDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by menubar.gnome.org (Postfix) with ESMTP id 5C5EF3B0CA3 for ; Thu, 1 Jun 2006 14:43:03 -0400 (EDT) Received: from [82.165.27.189] (helo=hora-obscura.de) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1Fls8J06kd-0000dr; Thu, 01 Jun 2006 20:42:59 +0200 Received: from localhost (localhost [127.0.0.1]) by smtp.hora-obscura.de (Postfix) with ESMTP id 4E88D878028; Thu, 1 Jun 2006 20:42:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by smtp.hora-obscura.de (Postfix) with ESMTP id 7B9AE878022; Thu, 1 Jun 2006 20:42:53 +0200 (CEST) Subject: RE: [xslt] RE: [xml] does xsltproc caches subexpressions From: Stefan Kost To: "Buchcik, Kasimier" In-Reply-To: References: Content-Type: text/plain Date: Thu, 01 Jun 2006 21:42:51 +0300 Message-Id: <1149187371.24491.5.camel@fluffy.local> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new using ClamAV at hora-obscura.de X-Provags-ID: kundenserver.de abuse@kundenserver.de login:8eea7ddcf9c0cceb26830fe517b7ade3 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.539 tagged_above=-999 required=2 tests=[AWL=0.060, BAYES_00=-2.599] X-Spam-Score: -2.539 X-Spam-Level: Cc: xslt@gnome.org X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 18:43:05 -0000 Hi Kasimier, I've been too keen to see it and just tried it. Please note that in xsltproc the change need to be to call xmlXPathContextSetCache() and not xmlXPathContextSetObjectCache(). It seems infact faster and most noticable is the lower memory usage. And finally the generated documents look good. So for now I'd love to see this activated by default. Stefan Am Dienstag, den 30.05.2006, 22:36 +0200 schrieb Buchcik, Kasimier: > Hi, > > > -----Original Message----- > > From: Stefan Kost [mailto:ensonic@hora-obscura.de] > > [...] > > > Am Montag, den 22.05.2006, 12:54 +0200 schrieb Buchcik, Kasimier: > > > Hi, > > [...] > > > > The next bottleneck in the row is the template "indexterm" (mode = > > > "reference") > > > in "autoidx.xsl": > > Next results: > > > 1) The expression "//index[&scope;][1]" was the bottleneck of the > "indexterm"-template. > > We made the following enhancements to the XPath module: > 2) Added an XPath object cache. This will avoid massive creation/freeing > of XPath objects. For the generation of the gst-docs 44 million > objects > were created; after the cache was in use this dropped to 22 million > objects. If all slots of the cache are filled to maximum it will > consume > about 40 KB additional memory. > > 3) Enhanced xmlXPathNodeCollectAndTest(), which is the central function > for evaluation of steps. > > a) We eliminated massive recreation of xmlNodeSet structs; this was a > big bottleneck when traversing the descendant-or-self axis, since for > every traversed node a new xmlNodeSet was created; just count all > nodes > of any type in the XInclude-processed input document of gst-docs and > you'll have the number of the structs created for every evaluation of > this axis. > > b) The following comes from the ChangeLog, since I don't want to > invent another explanation: > Optimized xmlXPathNodeCollectAndTest() and > xmlXPathNodeCollectAndTestNth() to evaluate a compound > traversal of 2 axes when we have a "//foo" expression. > This is done with a rewrite of the XPath AST in > xmlXPathRewriteDOSExpression(); I added an additional field > to xmlXPathStepOp for this (but the field's name should be > changed). The mechanism: the embracing descendant-or-self > axis traversal (also optimized to return only nodes which > can hold elements), will produce context nodes for the > inner traversal of the child axis. This way we avoid a full > node-collecting traversal of the descendant-or-self axis. > Some tests indicate that this can reduce execution time of > "//foo" to 50%. Together with the XPath object cache this > all significantly speeds up libxslt. > > So the previous most-time-consuming templates were: > > number match name mode Calls Tot 100us Avg > > 0 indexterm reference 2464 13039183 > 5291 > 1 gentext.template 16047 2219472 > 138 > 2 user.head.content 53 2216486 > 41820 > 3 chunk 191008 1984551 > 10 > 4 * recursive-chunk-filename > 92686 799234 > 8 > > > Current result: > > number match name mode Calls Tot 100us Avg > > 0 indexterm reference 2464 3425896 > 1390 > 1 chunk 191008 1609874 > 8 > 2 gentext.template 16047 1261323 > 78 > 3 dbhtml-dir 140277 710035 > 5 > 4 * recursive-chunk-filename > 92686 703808 > 7 > 5 user.head.content 53 600561 > 11331 > > > Stefan, If would be great if you could try the current CVS HEAD of > Libxml2/Libxslt for the gst-docs generation. It would be interesting > if this fixes the issue even for Ed Catmur and his sparse-memory > machine. > But you still need to customize xsltproc.c in order to activate the > XPath > object cache. It is disabled by default, so we need to make people > aware that it's there and can be activated if things run slowly. > Add a call to xmlXPathContextSetObjectCache() in xsltproc.c after > the creation of the transformation context: > > ctxt = xsltNewTransformContext(cur, doc); > if (ctxt == NULL) > return; > if (ctxt->xpathCtxt) > xmlXPathContextSetObjectCache(ctxt->xpathCtxt, 1, -1, 0); > > > Regards, > > Kasimier From k.buchcik@4commerce.de Thu Jun 1 14:48:56 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4CF1E3B0D82 for ; Thu, 1 Jun 2006 14:48:56 -0400 (EDT) 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 28774-06 for ; Thu, 1 Jun 2006 14:48:52 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id 716213B011F for ; Thu, 1 Jun 2006 14:48:52 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FlsDo-0005Qe-Nx; Thu, 01 Jun 2006 20:48:40 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FlsDo-0005QY-7Y; Thu, 01 Jun 2006 20:48:40 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 1 Jun 2006 20:48:48 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [xslt] RE: [xml] does xsltproc caches subexpressions thread-index: AcaFqzac2haO9B1KR6WN2pPeP6/OpQAAH41Q From: "Buchcik, Kasimier" To: "Stefan Kost" Subject: RE: [xslt] RE: [xml] does xsltproc caches subexpressions X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.425 tagged_above=-999 required=2 tests=[AWL=0.039, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] X-Spam-Score: -2.425 X-Spam-Level: Cc: xslt@gnome.org X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 18:48:56 -0000 Hi,=20 > -----Original Message----- > From: Stefan Kost [mailto:ensonic@hora-obscura.de]=20 > Hi Kasimier, >=20 > I've been too keen to see it and just tried it. Please note that in > xsltproc the change need to be to call=20 > xmlXPathContextSetCache() and not > xmlXPathContextSetObjectCache(). It seems infact faster and most > noticable is the lower memory usage. And finally the=20 > generated documents > look good. So for now I'd love to see this activated by default. Yes, I changed this to xmlXPathContextSetCache() today, since might cache other things than XPath objects in the future - so a more generic name. It is already activated by default in the CVS HEAD :-) Regards, Kasimier From jirka@kosek.cz Thu Jun 1 17:34:05 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C354B3B032C for ; Thu, 1 Jun 2006 17:34:05 -0400 (EDT) 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 08158-06 for ; Thu, 1 Jun 2006 17:34:04 -0400 (EDT) Received: from vse.vse.cz (vse.vse.cz [146.102.16.2]) by menubar.gnome.org (Postfix) with ESMTP id 9833C3B0254 for ; Thu, 1 Jun 2006 17:34:03 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by vse.vse.cz (Postfix) with ESMTP id 0DDF213419 for ; Thu, 1 Jun 2006 23:34:02 +0200 (CEST) Received: from vse.vse.cz ([127.0.0.1]) by localhost (vse.vse.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26883-07 for ; Thu, 1 Jun 2006 23:34:01 +0200 (CEST) Received: from baribal.vse.cz (baribal.vse.cz [146.102.42.7]) by vse.vse.cz (Postfix) with ESMTP id 4F7B813414 for ; Thu, 1 Jun 2006 23:34:01 +0200 (CEST) Received: from [10.0.0.1] ([84.244.121.146]) by baribal.vse.cz (Lotus Domino Release 6.5.4FP3) with ESMTP id 2006060123341384-5254 ; Thu, 1 Jun 2006 23:34:13 +0200 Message-ID: <447F5D4A.9010205@kosek.cz> Date: Thu, 01 Jun 2006 23:34:02 +0200 From: Jirka Kosek User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: The Gnome XSLT library mailing-list Subject: Re: [xslt] RE: [xml] does xsltproc caches subexpressions References: <1149187371.24491.5.camel@fluffy.local> In-Reply-To: <1149187371.24491.5.camel@fluffy.local> X-MIMETrack: Itemize by SMTP Server on baribal/VSE(Release 6.5.4FP3|January 09, 2006) at 01.06.2006 23:34:14, Serialize by Router on baribal/VSE(Release 6.5.4FP3|January 09, 2006) at 01.06.2006 23:34:14, Serialize complete at 01.06.2006 23:34:14 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms040901070400070104040900" X-Virus-Scanned: amavisd-new at vse.cz X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jun 2006 21:34:05 -0000 This is a cryptographically signed message in MIME format. --------------ms040901070400070104040900 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable Stefan Kost wrote: > I've been too keen to see it and just tried it. Please note that in > xsltproc the change need to be to call xmlXPathContextSetCache() and no= t > xmlXPathContextSetObjectCache(). It seems infact faster and most > noticable is the lower memory usage. And finally the generated document= s > look good. So for now I'd love to see this activated by default. Does this mean that your problems with DocBook indexing speed in=20 xsltproc are solved now? Jirka --=20 ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz ------------------------------------------------------------------ Profesion=E1ln=ED =B9kolen=ED a poradenstv=ED v oblasti technologi=ED = XML. Pod=EDvejte se na n=E1=B9 nov=EC spu=B9t=ECn=FD web http://DocBook.= cz Podrobn=FD p=F8ehled =B9kolen=ED http://xmlguru.cz/skoleni/ ------------------------------------------------------------------ Nejbli=BE=B9=ED term=EDny =B9kolen=ED: ** DocBook 15.-17.5.2006 ** XSL-FO 12.-13.6.2006 ** ** XSLT 23.-26.10.2006 ** XML sch=E9mata 13.-15.11.2006 ** ------------------------------------------------------------------ http://xmlguru.cz Blog mostly about XML for English readers ------------------------------------------------------------------ --------------ms040901070400070104040900 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII9zCC AtYwggI/oAMCAQICEHfMLko82rIUzCAcnWMM5lcwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UE BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMT I1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDMwMjE4MDYzMFoX DTA3MDMwMjE4MDYzMFowQDEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEdMBsG CSqGSIb3DQEJARYOamlya2FAa29zZWsuY3owggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK AoIBAQDBgTdS8EL979d+SSfXyJs/cNYCILKCfzHfNDc2G6annKbehIrpq2jD1PJHP7XPsaE1 RqfzaVTq+yqx8sXaViv3+2O+ZwmJ0RTwlCgHoybR575+oSxQotDZ2UINXgdcrLYR2/p5k1n6 5Gguru+av/Jms5yCX3e2n/6KFGRgexGIz8vvy+FpQC+w9cS8HkrzCg9FjY/ZpCdVXJ5PNxmQ C9uQ5qHj0Nw0iVoE+Aokxi3Rx2CbltNzTNrElEC/eox7mmnOL8Y/Pv7R2XMl4Qu9u2G9GJdO nQxkgPgFF+YOqXLUaW8FCdI/zhZfpjbcgbVS+jjhokN+MpJSrZGaaddTz6i7AgMBAAGjKzAp MBkGA1UdEQQSMBCBDmppcmthQGtvc2VrLmN6MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEE BQADgYEAC9gonHsmZdK3S7XEpaXMBCHUDLEaK0lI+jPCiaCe6n6RcK8OQ3gsEMS6k52daaDw LkO4UncHbMuDQ3KKNIJjXVUelkxXh8Vom7F8uADsZLFcVb23K9ka19/rQcnODHqPpA1W1QAG dS4aVARY0XrJBewtVh84U7H+ZFjRQywBLV8wggLWMIICP6ADAgECAhB3zC5KPNqyFMwgHJ1j DOZXMA0GCSqGSIb3DQEBBAUAMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29u c3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwg SXNzdWluZyBDQTAeFw0wNjAzMDIxODA2MzBaFw0wNzAzMDIxODA2MzBaMEAxHzAdBgNVBAMT FlRoYXd0ZSBGcmVlbWFpbCBNZW1iZXIxHTAbBgkqhkiG9w0BCQEWDmppcmthQGtvc2VrLmN6 MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwYE3UvBC/e/Xfkkn18ibP3DWAiCy gn8x3zQ3Nhump5ym3oSK6atow9TyRz+1z7GhNUan82lU6vsqsfLF2lYr9/tjvmcJidEU8JQo B6Mm0ee+fqEsUKLQ2dlCDV4HXKy2Edv6eZNZ+uRoLq7vmr/yZrOcgl93tp/+ihRkYHsRiM/L 78vhaUAvsPXEvB5K8woPRY2P2aQnVVyeTzcZkAvbkOah49DcNIlaBPgKJMYt0cdgm5bTc0za xJRAv3qMe5ppzi/GPz7+0dlzJeELvbthvRiXTp0MZID4BRfmDqly1GlvBQnSP84WX6Y23IG1 Uvo44aJDfjKSUq2RmmnXU8+ouwIDAQABoyswKTAZBgNVHREEEjAQgQ5qaXJrYUBrb3Nlay5j ejAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBAAvYKJx7JmXSt0u1xKWlzAQh1Ayx GitJSPozwomgnup+kXCvDkN4LBDEupOdnWmg8C5DuFJ3B2zLg0NyijSCY11VHpZMV4fFaJux fLgA7GSxXFW9tyvZGtff60HJzgx6j6QNVtUABnUuGlQEWNF6yQXsLVYfOFOx/mRY0UMsAS1f MIIDPzCCAqigAwIBAgIBDTANBgkqhkiG9w0BAQUFADCB0TELMAkGA1UEBhMCWkExFTATBgNV BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMRowGAYDVQQKExFUaGF3dGUg Q29uc3VsdGluZzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEk MCIGA1UEAxMbVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIENBMSswKQYJKoZIhvcNAQkBFhxw ZXJzb25hbC1mcmVlbWFpbEB0aGF3dGUuY29tMB4XDTAzMDcxNzAwMDAwMFoXDTEzMDcxNjIz NTk1OVowYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkp IEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMIGf MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEpjxVc1X7TrnKmVoeaMB1BHCd3+n/ox7svc31 W/Iadr1/DDph8r9RzgHU5VAKMNcCY1osiRVwjt3J8CuFWqo/cVbLrzwLB+fxH5E2JCoTzyvV 84J3PQO+K/67GD4Hv0CAAmTXp6a7n2XRxSpUhQ9IBH+nttE8YQRAHmQZcmC3+wIDAQABo4GU MIGRMBIGA1UdEwEB/wQIMAYBAf8CAQAwQwYDVR0fBDwwOjA4oDagNIYyaHR0cDovL2NybC50 aGF3dGUuY29tL1RoYXd0ZVBlcnNvbmFsRnJlZW1haWxDQS5jcmwwCwYDVR0PBAQDAgEGMCkG A1UdEQQiMCCkHjAcMRowGAYDVQQDExFQcml2YXRlTGFiZWwyLTEzODANBgkqhkiG9w0BAQUF AAOBgQBIjNFQg+oLLswNo2asZw9/r6y+whehQ5aUnX9MIbj4Nh+qLZ82L8D0HFAgk3A8/a3h YWLD2ToZfoSxmRsAxRoLgnSeJVCUYsfbJ3FXJY3dqZw5jowgT2Vfldr394fWxghOrvbqNOUQ Gls1TXfjViF4gtwhGTXeJLHTHUb/XV9lTzGCA2QwggNgAgEBMHYwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0 ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAhB3zC5KPNqyFMwgHJ1jDOZXMAkGBSsO AwIaBQCgggHDMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA2 MDYwMTIxMzQwMlowIwYJKoZIhvcNAQkEMRYEFFMVDFHhMP0pSFaOXk/0hGP4pxITMFIGCSqG SIb3DQEJDzFFMEMwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMA0GCCqGSIb3DQMCAgFA MAcGBSsOAwIHMA0GCCqGSIb3DQMCAgEoMIGFBgkrBgEEAYI3EAQxeDB2MGIxCzAJBgNVBAYT AlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNU aGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQQIQd8wuSjzashTMIBydYwzmVzCB hwYLKoZIhvcNAQkQAgsxeKB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29u c3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwg SXNzdWluZyBDQQIQd8wuSjzashTMIBydYwzmVzANBgkqhkiG9w0BAQEFAASCAQC1DqAnOOhf aRW803hgtLShNpjTPG1Afv6gJFvQsbEFdmvlTpGsuzEY/fVAtlttzgV5c65NHS4yMkYSzlQE hDZmvT2ULLnZ5vNuwkPzJ4g2hYPP648bKRFWa0qoENliPWPkl53m2kuEGBb6/sxg6NBZKj0g 34zX+93Fx0hFFN6RrqWjn58vnX06tE24mm2RJSmhv3sV1CPyMmI4rlWmDmoQRqFYNSJpn+44 KSc2eh3vWT30cUxn9zuPTWzwodJwjqXQW3uP40a4MP4Y61HxIqik/92YfKPOg5KHs5gzcxOf Epdnu1hjpqIqeFjCKmGhxiW0WMGZDrusRFdnd1k7q1InAAAAAAAA --------------ms040901070400070104040900-- From veillard@redhat.com Thu Jun 8 04:36:46 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9AD833B0EAC for ; Thu, 8 Jun 2006 04:36:46 -0400 (EDT) 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 19647-03 for ; Thu, 8 Jun 2006 04:36:45 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id 3A2373B0E22 for ; Thu, 8 Jun 2006 04:36:45 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k588aiuL005177 for ; Thu, 8 Jun 2006 04:36:44 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k588aipI016971 for ; Thu, 8 Jun 2006 04:36:44 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k588aiMd030599 for ; Thu, 8 Jun 2006 04:36:44 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k588aiTU030597 for xslt@gnome.org; Thu, 8 Jun 2006 04:36:44 -0400 Date: Thu, 8 Jun 2006 04:36:44 -0400 From: Daniel Veillard To: xslt@gnome.org Message-ID: <20060608083644.GE31509@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Subject: [xslt] Release of libxslt-1.1.17 X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 08:36:46 -0000 The release was actually done 2 days ago you can find it at: ftp://xmlsoft.org/xml/ http://xmlsoft.org/XSLT/ This release includes just a few bugs and compilation fixes, but the main interest is the XPath optimizations and refactoring done by Kasimier (note this requires the latest libxml2 release): * portability fixes: - python detection * bug fixes: - some regression tests - attribute/namespaces output (Kasimier Buchcik) - problem in mixed xsl:value-of and xsl:text uses (Kasimier) * improvements: - internal refactoring (Kasimier Buchcik) - use of the XPath object cache in libxml2-2.6.25 (Kasimier) Thanks Kasimier for all his works and those who reported bugs or performances problems, Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From k.buchcik@4commerce.de Thu Jun 8 05:31:01 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 085973B0ECF for ; Thu, 8 Jun 2006 05:31:01 -0400 (EDT) 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 23051-09 for ; Thu, 8 Jun 2006 05:30:59 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id 53FC83B0ECC for ; Thu, 8 Jun 2006 05:30:55 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FoGqj-0005Qd-SM; Thu, 08 Jun 2006 11:30:45 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FoGqj-0005QX-Bl; Thu, 08 Jun 2006 11:30:45 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 8 Jun 2006 11:30:53 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [xslt] Release of libxslt-1.1.17 thread-index: AcaK1rYtnOahrgnbQomzDruP3ZwVjwAByFww From: "Buchcik, Kasimier" To: , "The Gnome XSLT library mailing-list" Subject: RE: [xslt] Release of libxslt-1.1.17 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.349 tagged_above=-999 required=2 tests=[AWL=-0.039, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: -2.349 X-Spam-Level: Cc: X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 09:31:01 -0000 Hi,=20 > -----Original Message----- > From: xslt-bounces@gnome.org [mailto:xslt-bounces@gnome.org]=20 > On Behalf Of Daniel Veillard > Sent: Thursday, June 08, 2006 10:37 AM > To: xslt@gnome.org > Subject: [xslt] Release of libxslt-1.1.17 >=20 > The release was actually done 2 days ago you can find it at: > ftp://xmlsoft.org/xml/ > http://xmlsoft.org/XSLT/ >=20 > This release includes just a few bugs and compilation fixes,=20 > but the main > interest is the XPath optimizations and refactoring done by=20 > Kasimier (note > this requires the latest libxml2 release): >=20 > * portability fixes: > - python detection > * bug fixes: > - some regression tests > - attribute/namespaces output (Kasimier Buchcik) > - problem in mixed xsl:value-of and xsl:text uses (Kasimier) > * improvements: > - internal refactoring (Kasimier Buchcik) > - use of the XPath object cache in libxml2-2.6.25 (Kasimier) >=20 > Thanks Kasimier for all his works and those who reported=20 > bugs or performances > problems, >=20 > Daniel Also note that most of the refactored code is IFDEFed out; we'll enable this when it's safe enough and well tested. You can help here by defining XSLT_REFACTORED in xsltInternals.h and trying to use it. Regards, Kasimier From rde2@utk.edu Thu Jun 8 14:36:24 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 721DE3B0F4E for ; Thu, 8 Jun 2006 14:36:24 -0400 (EDT) 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 28868-02 for ; Thu, 8 Jun 2006 14:36:20 -0400 (EDT) Received: from utkfsvs1.utk.tennessee.edu (utkfscb1.utk.tennessee.edu [160.36.76.192]) by menubar.gnome.org (Postfix) with ESMTP id 7EED83B0FE3 for ; Thu, 8 Jun 2006 14:36:20 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 8 Jun 2006 14:36:19 -0400 Message-ID: <6A5CE13D731DE249BC61CB8C5C474B0A0571D2BE@UTKFSVS1.utk.tennessee.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Position: Experienced XSLT programmer needed Thread-Index: AcaLKm72i+FDgkFWTOW2xeNI2EzEyw== From: "Deridder, Jody L" To: X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.001 tagged_above=-999 required=2 tests=[BAYES_50=0.001] X-Spam-Score: 0.001 X-Spam-Level: Subject: [xslt] Position: Experienced XSLT programmer needed X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 18:36:24 -0000 UNIVERSITY OF TENNESSEE LIBRARIES EXEMPT VACANCY IT Administrator II =20 =20 Position: IT Administrator II Appointment Rank: Exempt Salary: $40,000 minimum Available: July 1, 2006 =20 =20 The University of Tennessee Library seeks an innovative individual to join the Digital Library Center to develop open-source library information systems in support of digital collections and services. This is an exciting opportunity to join a rapidly developing program of the University of Tennessee Libraries . The position will report to the Coordinator of the Digital Library Center , working closely with other DLC staff, the Metadata Librarian, Library Technology Services staff, and the Special Collections Library staff. The IT Administrator II will interact with a wide variety of individuals in the library and university, working in a Linux environment, providing software analysis, metadata transformation, and support for digital library applications. A primary need for this position will be experience with XSLT. =20 The Digital Library Center is in a transition towards development of local systems based on open source software such as XTF (http://www.cdlib.org/inside/projects/xtf/). This position would interact with counterparts at peer institutions developing similar systems. Current systems are based on DLXS (http://www.dlxs.org). Required Qualifications: Bachelor's degree in Computer Science or related field. Professional experience in systems analysis and design plus several years of programming experience, including Java EE, XSLT, XML, SQL; demonstrated familiarity with Unix and networking; experience with web servers and web technologies; ability to interact professionally with faculty, librarians and technical staff as well as good customer service and communication skills. Preferred Qualifications: Graduate degree in computer science or closely related field. Experience with digital libraries; working knowledge of scripting languages such as PERL, PHP, and Javascript; web development experience; familiarity with metadata standards such as METS/MODS and experience with metadata transformation. Environment: Located along the Tennessee River and near the Great Smoky Mountains National Park , the metropolitan area offers a beautiful natural environment in a mild climate with 4 distinct seasons. The cost of living is among the nation's most affordable. Knoxville, and nearby Oak Ridge, support an opera company, symphony, jazz, and an art museum, and serve as the medical center for east Tennessee. The University of Tennessee is the state's flagship institution of higher education, offering comprehensive programs of undergraduate, graduate, and professional education; research; and public service throughout the state. Enrollment in the statewide system is approximately 42,000. Our students come from every county in Tennessee , every state in the nation, and many foreign countries. The university holds the Carnegie Doctoral/Research-Extensive classification. It is the oldest and largest public institution of higher education in Tennessee, founded in Knoxville in 1794, two years before Tennessee became a state. The University of Tennessee Libraries, with an annual budget of more than $13 million, includes the John C. Hodges Main Library; the James D. Hoskins Library, which includes the Map and Special Collection Libraries; the Webster Pendergrass Agriculture and Veterinary Medicine Library; and the George F. DeVine Music Library. The Social Work Library is located in Nashville . Over three hundred persons are employed, including 58 librarians, 10 exempt, 123 non-exempt, and 150 students. UT Libraries is a member of the Association of Research Libraries, SOLINET, and the Center for Research Libraries. The UT Libraries offers a Web-based information system and access to a variety of electronic information sources. Additional information about this position and the UT community is available at http://www.lib.utk.edu/lss/lpp/itadminDLC.html. =20 Benefits: Annual leave is accrued at the rate of two days per month and sick leave at the rate of one day per month. Exempt Staff have their choice of a state retirement plan or ORP. Non-refundable contributions to either retirement plan are paid for the employee by the University. Group health and life insurance plans are available. Tuition remission is available for all university employees; partial undergraduate tuition remission is available to dependent children and spouses of UT employees. Review of applications will begin May 29, 2006 and will continue until the position is filled. Send cover letter addressing the above qualifications, a current resume, and the names, addresses, e-mail addresses, and telephone numbers of three recent references to: Gail Conner, Manager, Library Personnel & Procurement, 1015 Volunteer Blvd. , Knoxville , TN 37996-1000 . Application materials may be sent via email attachment to gconner@utk.edu. The institution welcomes and honors people of all races, creeds, cultures and sexual orientations, and values intellectual curiosity, pursuit of knowledge, and academic freedom and integrity. The University of Tennessee does not discriminate on the basis of race, sex, color, religion, national origin, age, disability or veteran status in provision of educational programs and services or employment opportunities and benefits. This policy extends to both employment by and admission to the University. The University does not discriminate on the basis of race, sex, or disability in the education programs and activities pursuant to the requirements of Title VI of the Civil Rights Act of 1964, Title IX of the Education Amendments of 1972, Section 504 of the Rehabilitation Act of 1973, and the Americans with Disabilities Act (ADA) of 1990. Inquiries and charges of violation concerning Title VI, Title IX, Section 504, ADA or the Age Discrimination in Employment Act (ADEA) or any of the other above referenced policies should be directed to the Office of Equity and Diversity (OED), 1840 Melrose Avenue , Knoxville , TN 37996-3560 , telephone (865) 974-2498 (V/TTY available) or 974-2440. Requests for accommodation of a disability should be directed to the ADA Coordinator at the Office of Human Resources Management, 600 Henley Street , Knoxville , TN 37996-4125. From stdanley@yahoo.com Wed Jun 14 10:11:21 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 86C283B0505 for ; Wed, 14 Jun 2006 10:11:21 -0400 (EDT) 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 30655-09 for ; Wed, 14 Jun 2006 10:11:17 -0400 (EDT) Received: from web30402.mail.mud.yahoo.com (web30402.mail.mud.yahoo.com [68.142.200.105]) by menubar.gnome.org (Postfix) with SMTP id 316D03B0203 for ; Wed, 14 Jun 2006 10:11:17 -0400 (EDT) Received: (qmail 72332 invoked by uid 60001); 14 Jun 2006 14:10:31 -0000 Message-ID: <20060614141031.72330.qmail@web30402.mail.mud.yahoo.com> Received: from [221.200.205.80] by web30402.mail.mud.yahoo.com via HTTP; Wed, 14 Jun 2006 07:10:31 PDT Date: Wed, 14 Jun 2006 07:10:31 -0700 (PDT) From: Tom Stanley To: xslt@gnome.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=1.061 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: 1.061 X-Spam-Level: * Subject: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2006 14:11:21 -0000 hello, guys we plan to use libxml and libxslt in our projects. what we need are like snippet belows: We want to use something like xslt template to produce some xml tree as process's input. We can change this xml snippet to a xslt template and use applystylesheet to produce expected output xml tree. However, we need to set a variable (named var ) in program before apply the translation. Does libxslt have any method to do this ,for example like xmlXPathRegisterVariable in libxml? or any other thoughts? thx __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From k.buchcik@4commerce.de Wed Jun 14 14:07:08 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 66E473B0079 for ; Wed, 14 Jun 2006 14:07:08 -0400 (EDT) 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 31281-03 for ; Wed, 14 Jun 2006 14:07:06 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id E00723B000C for ; Wed, 14 Jun 2006 14:07:05 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FqZl6-0004Yy-Tx; Wed, 14 Jun 2006 20:06:28 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FqZl6-0004Ys-Bp; Wed, 14 Jun 2006 20:06:28 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 14 Jun 2006 20:06:35 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [xslt] needed:set xslt variable in program thread-index: AcaPvI/5Y2M7zrStSkCuubaG7hqH0gAHmrwg From: "Buchcik, Kasimier" To: "The Gnome XSLT library mailing-list" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.348 tagged_above=-999 required=2 tests=[AWL=-0.038, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: -2.348 X-Spam-Level: Cc: Tom Stanley Subject: Re: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2006 18:07:08 -0000 Hi,=20 > -----Original Message----- > From: xslt-bounces@gnome.org [mailto:xslt-bounces@gnome.org]=20 > On Behalf Of Tom Stanley >=20 > hello, guys > we plan to use libxml and libxslt in our projects. > what we need are like snippet belows: > > > > > select=3D""Data""/> > > > > > > select=3D"string($var/Report/Data[1])"/> > > > > > We want to use something like xslt template to > produce some xml tree as process's input. > We can change this xml snippet to a xslt template and > use applystylesheet to produce expected output xml > tree. > However, we need to set a variable (named var ) in > program before apply the translation.=20 > Does libxslt have any method to do this ,for example > like xmlXPathRegisterVariable in libxml? >=20 > or any other thoughts? The common solution for this would be to use the document() function: =20 If you need a more sophisticated mechanism, then you could implement an extension element/function. Have a look at how e.g. the EXSLT function node-set() is implemented in Libxslt/Libexslt: The XPath engine calls exsltNodeSetFunction() (in "libexslt/common.c"), then xsltFunctionNodeSet() (in "libxslt/extra.c") is called, which changes a result tree fragment into a node set. In such an extension function, you could just hand-over a copy of an internal node tree managed by your application. Regards, Kasimier From Steve.Ball@explain.com.au Wed Jun 14 19:09:02 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 58EAC3B02D1 for ; Wed, 14 Jun 2006 19:09:02 -0400 (EDT) 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 13834-06 for ; Wed, 14 Jun 2006 19:09:00 -0400 (EDT) Received: from explain.com.au (mail.explain.com.au [203.22.237.222]) by menubar.gnome.org (Postfix) with ESMTP id 5D0B13B02FD for ; Wed, 14 Jun 2006 19:08:59 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by explain.com.au (Postfix) with ESMTP id 67A652826DF for ; Thu, 15 Jun 2006 09:08:14 +1000 (EST) Received: from explain.com.au ([127.0.0.1]) by localhost (waycool.explain.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28295-07 for ; Thu, 15 Jun 2006 09:08:14 +1000 (EST) Received: from [192.168.0.102] (unknown [192.168.0.102]) by explain.com.au (Postfix) with ESMTP id F29802826D4 for ; Thu, 15 Jun 2006 09:08:13 +1000 (EST) Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: <20060614141031.72330.qmail@web30402.mail.mud.yahoo.com> References: <20060614141031.72330.qmail@web30402.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Steve Ball Date: Thu, 15 Jun 2006 09:08:29 +1000 To: The Gnome XSLT library mailing-list X-Mailer: Apple Mail (2.750) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.084 tagged_above=-999 required=2 tests=[AWL=0.361, BAYES_00=-2.599, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: -2.084 X-Spam-Level: Subject: Re: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2006 23:09:02 -0000 Hi Tom, Why not simply pass in the value as a stylesheet parameter? libxslt certainly has functions/data structures to pass parameters; RTFM. HTHs, Steve Ball On 15/06/2006, at 12:10 AM, Tom Stanley wrote: > hello, guys > we plan to use libxml and libxslt in our projects. > what we need are like snippet belows: > > > > > select=""Data""/> > > > > > > select="string($var/Report/Data[1])"/> > > > > > We want to use something like xslt template to > produce some xml tree as process's input. > We can change this xml snippet to a xslt template and > use applystylesheet to produce expected output xml > tree. > However, we need to set a variable (named var ) in > program before apply the translation. > Does libxslt have any method to do this ,for example > like xmlXPathRegisterVariable in libxml? > > or any other thoughts? > > thx > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt > From stdanley@yahoo.com Wed Jun 14 21:56:14 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1BD423B0101 for ; Wed, 14 Jun 2006 21:56:14 -0400 (EDT) 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 04367-10 for ; Wed, 14 Jun 2006 21:56:13 -0400 (EDT) Received: from web30408.mail.mud.yahoo.com (web30408.mail.mud.yahoo.com [68.142.200.111]) by menubar.gnome.org (Postfix) with SMTP id EA52A3B00A0 for ; Wed, 14 Jun 2006 21:56:12 -0400 (EDT) Received: (qmail 22202 invoked by uid 60001); 15 Jun 2006 01:56:08 -0000 Message-ID: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> Received: from [221.200.205.41] by web30408.mail.mud.yahoo.com via HTTP; Wed, 14 Jun 2006 18:56:08 PDT Date: Wed, 14 Jun 2006 18:56:08 -0700 (PDT) From: Tom Stanley To: The Gnome XSLT library mailing-list In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.371 tagged_above=-999 required=2 tests=[AWL=-0.573, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: -1.371 X-Spam-Level: Subject: Re: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2006 01:56:14 -0000 can we set an xmlNodePtr in memory as a parameter? --- Steve Ball wrote: > Hi Tom, > > Why not simply pass in the value as a stylesheet > parameter? libxslt > certainly has functions/data structures to pass > parameters; RTFM. > > HTHs, > Steve Ball > > On 15/06/2006, at 12:10 AM, Tom Stanley wrote: > > > hello, guys > > we plan to use libxml and libxslt in our > projects. > > what we need are like snippet belows: > > > > > > > > > > > select=""Data""/> > > > > > > select="0"/> > > > > > > > select="string($var/Report/Data[1])"/> > > > > > > > > > > We want to use something like xslt template to > > produce some xml tree as process's input. > > We can change this xml snippet to a xslt template > and > > use applystylesheet to produce expected output xml > > tree. > > However, we need to set a variable (named var ) in > > program before apply the translation. > > Does libxslt have any method to do this ,for > example > > like xmlXPathRegisterVariable in libxml? > > > > or any other thoughts? > > > > thx > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > _______________________________________________ > > xslt mailing list, project page > http://xmlsoft.org/XSLT/ > > xslt@gnome.org > > http://mail.gnome.org/mailman/listinfo/xslt > > > > _______________________________________________ > xslt mailing list, project page > http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From stdanley@yahoo.com Wed Jun 14 22:09:48 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 33E083B0253 for ; Wed, 14 Jun 2006 22:09:48 -0400 (EDT) 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 05250-07 for ; Wed, 14 Jun 2006 22:09:46 -0400 (EDT) Received: from web30409.mail.mud.yahoo.com (web30409.mail.mud.yahoo.com [68.142.200.112]) by menubar.gnome.org (Postfix) with SMTP id 2C9513B00F3 for ; Wed, 14 Jun 2006 22:09:46 -0400 (EDT) Received: (qmail 80930 invoked by uid 60001); 15 Jun 2006 02:09:10 -0000 Message-ID: <20060615020910.80928.qmail@web30409.mail.mud.yahoo.com> Received: from [221.200.205.41] by web30409.mail.mud.yahoo.com via HTTP; Wed, 14 Jun 2006 19:09:10 PDT Date: Wed, 14 Jun 2006 19:09:10 -0700 (PDT) From: Tom Stanley To: The Gnome XSLT library mailing-list In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.514 tagged_above=-999 required=2 tests=[AWL=-0.562, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447] X-Spam-Score: -1.514 X-Spam-Level: Subject: Re: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2006 02:09:48 -0000 hi,Kasimier --- "Buchcik, Kasimier" wrote: > The common solution for this would be to use the > document() function: > > > > select="document('my-report.xml')/Report/Data[1]"/> > > > this thoughts is good,the only limit is we don't like to load file from disk,but from an existed xmlNodePtr from memory > If you need a more sophisticated mechanism, then you > could implement > an extension element/function. Have a look at how > e.g. the > EXSLT function node-set() is implemented in > Libxslt/Libexslt: > The XPath engine calls exsltNodeSetFunction() (in > "libexslt/common.c"), > then xsltFunctionNodeSet() (in "libxslt/extra.c") is > called, which > changes a result tree fragment into a node set. > > In such an extension function, you could just > hand-over a copy of an > internal node tree managed by your application. > > select="mf:my-func('my-var-name')/Report/Data[1]"/> > we would do some test using this method. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From veillard@redhat.com Thu Jun 15 04:00:31 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 407DE3B01A0 for ; Thu, 15 Jun 2006 04:00:31 -0400 (EDT) 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 20955-06 for ; Thu, 15 Jun 2006 04:00:29 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id D91343B02AE for ; Thu, 15 Jun 2006 04:00:28 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5F80SQj025987 for ; Thu, 15 Jun 2006 04:00:28 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5F80PxZ013127 for ; Thu, 15 Jun 2006 04:00:28 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5F80PEY007824 for ; Thu, 15 Jun 2006 04:00:25 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k5F80P3N007822 for xslt@gnome.org; Thu, 15 Jun 2006 04:00:25 -0400 Date: Thu, 15 Jun 2006 04:00:25 -0400 From: Daniel Veillard To: The Gnome XSLT library mailing-list Message-ID: <20060615080025.GI6722@redhat.com> References: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Subject: Re: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2006 08:00:31 -0000 On Wed, Jun 14, 2006 at 06:56:08PM -0700, Tom Stanley wrote: > can we set an xmlNodePtr in memory as a parameter? Not that I know of. What you ask, is not in the standard, and as Kasimier pointed out the simplest is to define your own extension function like exslt:node-set and call it. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From Steve.Ball@explain.com.au Thu Jun 15 16:55:49 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2B0D23B02CE for ; Thu, 15 Jun 2006 16:55:49 -0400 (EDT) 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 00608-01 for ; Thu, 15 Jun 2006 16:55:45 -0400 (EDT) Received: from explain.com.au (mail.explain.com.au [203.22.237.222]) by menubar.gnome.org (Postfix) with ESMTP id 1AB283B01FF for ; Thu, 15 Jun 2006 16:55:44 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by explain.com.au (Postfix) with ESMTP id EA51528340B; Fri, 16 Jun 2006 06:54:19 +1000 (EST) Received: from explain.com.au ([127.0.0.1]) by localhost (waycool.explain.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06304-01; Fri, 16 Jun 2006 06:54:19 +1000 (EST) Received: from [192.168.0.102] (unknown [192.168.0.102]) by explain.com.au (Postfix) with ESMTP id 563C32833FD; Fri, 16 Jun 2006 06:54:19 +1000 (EST) In-Reply-To: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> References: <20060615015608.22200.qmail@web30408.mail.mud.yahoo.com> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <41C4B6BE-6C2A-426A-91BC-A8B5E5A48CB1@explain.com.au> Content-Transfer-Encoding: 7bit From: Steve Ball Date: Fri, 16 Jun 2006 06:54:36 +1000 To: Tom Stanley X-Mailer: Apple Mail (2.750) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.189 tagged_above=-999 required=2 tests=[AWL=0.256, BAYES_00=-2.599, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: -2.189 X-Spam-Level: Cc: The Gnome XSLT library mailing-list Subject: Re: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2006 20:55:49 -0000 Tom, Upon re-reading your original posting it would seem that a parameter is not what you want, and that the document() function or an extension would be the way to go. Since you have already built these documents in-memory as xmlDocPtr's, then I'd say an extension function is needed to access them. Parameters allow you to pass in an atomic value (a string, a number or a nodeset). libxslt has the neat feature that you can pass an XPath and resolve it to a nodeset, but that would consist of nodes from the source document, not an externally-derived "snippet". Cheers, Steve On 15/06/2006, at 11:56 AM, Tom Stanley wrote: > can we set an xmlNodePtr in memory as a parameter? > > --- Steve Ball wrote: > >> Hi Tom, >> >> Why not simply pass in the value as a stylesheet >> parameter? libxslt >> certainly has functions/data structures to pass >> parameters; RTFM. >> >> HTHs, >> Steve Ball >> >> On 15/06/2006, at 12:10 AM, Tom Stanley wrote: >> >>> hello, guys >>> we plan to use libxml and libxslt in our >> projects. >>> what we need are like snippet belows: >>> >>> >>> >>> >>> >> select=""Data""/> >>> >>> >>> > select="0"/> >>> >>> >>> >> select="string($var/Report/Data[1])"/> >>> >>> >>> >>> >>> We want to use something like xslt template to >>> produce some xml tree as process's input. >>> We can change this xml snippet to a xslt template >> and >>> use applystylesheet to produce expected output xml >>> tree. >>> However, we need to set a variable (named var ) in >>> program before apply the translation. >>> Does libxslt have any method to do this ,for >> example >>> like xmlXPathRegisterVariable in libxml? >>> >>> or any other thoughts? >>> >>> thx >>> >>> >>> __________________________________________________ >>> Do You Yahoo!? >>> Tired of spam? Yahoo! Mail has the best spam >> protection around >>> http://mail.yahoo.com >>> _______________________________________________ >>> xslt mailing list, project page >> http://xmlsoft.org/XSLT/ >>> xslt@gnome.org >>> http://mail.gnome.org/mailman/listinfo/xslt >>> >> >> _______________________________________________ >> xslt mailing list, project page >> http://xmlsoft.org/XSLT/ >> xslt@gnome.org >> http://mail.gnome.org/mailman/listinfo/xslt >> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > From k.buchcik@4commerce.de Wed Jun 21 07:44:02 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5C2FB3B0992 for ; Wed, 21 Jun 2006 07:44:02 -0400 (EDT) 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 00906-06 for ; Wed, 21 Jun 2006 07:44:01 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id 0C4563B0BF9 for ; Wed, 21 Jun 2006 07:44:00 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft17g-0004ic-17; Wed, 21 Jun 2006 13:43:52 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft17f-0004iW-JP; Wed, 21 Jun 2006 13:43:51 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Jun 2006 13:43:58 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: PHP 5 XSLT with Libxslt thread-index: AcaVJ/hgWWieiZOaQUaa2gx2gkHypg== From: "Buchcik, Kasimier" To: X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.457 tagged_above=-999 required=2 tests=[AWL=-0.929, BAYES_20=-0.74, FORGED_RCVD_HELO=0.135, TW_IB=0.077] X-Spam-Score: -1.457 X-Spam-Level: Subject: [xslt] PHP 5 XSLT with Libxslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 11:44:02 -0000 Hi, I noticed on the xsl-list@lists.mulberrytech.com mailing list that some people are struggling in PHP 5 to get node trees (i.e. not only strings) as parameters into the transformation. Rob, did the previous processor support this? Is this now a problem for PHP 5? Do some of the other XSLT processors support this? Regards, Kasimier From k.buchcik@4commerce.de Wed Jun 21 12:21:17 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5F0773B0FF9 for ; Wed, 21 Jun 2006 12:21:17 -0400 (EDT) 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 20481-06 for ; Wed, 21 Jun 2006 12:21:15 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id 5770B3B0ECA for ; Wed, 21 Jun 2006 12:21:15 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft5Ry-00059g-Bv; Wed, 21 Jun 2006 18:21:06 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft5Rx-00059a-JX; Wed, 21 Jun 2006 18:21:06 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Jun 2006 18:21:12 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [xslt] needed:set xslt variable in program thread-index: AcaQILRhVRTxgUwqTPCCFbNOtopP8gFLML7g From: "Buchcik, Kasimier" To: "Tom Stanley" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.386 tagged_above=-999 required=2 tests=[AWL=0.001, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_IB=0.077] X-Spam-Score: -2.386 X-Spam-Level: Cc: xslt@gnome.org Subject: Re: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 16:21:17 -0000 Hi, There's another way to do what you want. On the XSL mailing list (xsl-list@lists.mulberrytech.com) someone asked about how to do this with PHP 5. I'm quoting Martynas Jusevicius: " In PHP4's processing function there was an option of passing such arguments and later accessing them through Sablotron-specific scheme "document('arg:/...)". " This can be done in Libxslt/Libxml2 by customizing Libxml2's IO layer, or by customizing the document loader of Libxslt via xsltSetLoaderFunc(). Regards, Kasimier > -----Original Message----- > From: Tom Stanley [mailto:stdanley@yahoo.com]=20 > Sent: Thursday, June 15, 2006 4:09 AM > To: The Gnome XSLT library mailing-list > Cc: Buchcik, Kasimier > Subject: Re: [xslt] needed:set xslt variable in program >=20 >=20 > hi,Kasimier >=20 > --- "Buchcik, Kasimier" > wrote: >=20 >=20 > > The common solution for this would be to use the > > document() function: > >=20 > > =20 > > > > > select=3D"document('my-report.xml')/Report/Data[1]"/> > > > > > >=20 > this thoughts is good,the only limit is we don't like > to load file from disk,but from an existed xmlNodePtr > from memory > > If you need a more sophisticated mechanism, then you > > could implement > > an extension element/function. Have a look at how > > e.g. the > > EXSLT function node-set() is implemented in > > Libxslt/Libexslt: > > The XPath engine calls exsltNodeSetFunction() (in > > "libexslt/common.c"), > > then xsltFunctionNodeSet() (in "libxslt/extra.c") is > > called, which > > changes a result tree fragment into a node set. > >=20 > > In such an extension function, you could just > > hand-over a copy of an > > internal node tree managed by your application. > > > > > select=3D"mf:my-func('my-var-name')/Report/Data[1]"/> > > > we would do some test using this method. >=20 > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around=20 > http://mail.yahoo.com=20 >=20 >=20 From k.buchcik@4commerce.de Wed Jun 21 12:59:10 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B39633B011D for ; Wed, 21 Jun 2006 12:59:10 -0400 (EDT) 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 22829-10 for ; Wed, 21 Jun 2006 12:59:09 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id 2CBE63B020D for ; Wed, 21 Jun 2006 12:59:09 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft62e-0005Eg-Fo for xslt@gnome.org; Wed, 21 Jun 2006 18:59:00 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft62e-0005Ea-0q for xslt@gnome.org; Wed, 21 Jun 2006 18:59:00 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Jun 2006 18:59:08 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Node trees as arguments with PHP5/XSL thread-index: AcaVU/dmZu8HHDHNRISiyH7lkerTGw== From: "Buchcik, Kasimier" To: X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.424 tagged_above=-999 required=2 tests=[AWL=0.040, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] X-Spam-Score: -2.424 X-Spam-Level: Subject: [xslt] Node trees as arguments with PHP5/XSL X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 16:59:10 -0000 Hi, For everyone who needs to pass node trees as parameters to the XSLT processor in PHP 5: http://alexandre.alapetite.net/doc-alex/xslt-php4-php5/xslt-php4-to-php5 .php.txt This document is about how to make PHP 4 code run with PHP 5. The underlying XSLT processor changed from Sablotron to Libxslt/Libxml2 in PHP 5; there are some incompatibilities, which raised questions concerning the way to pass node trees into the transformation. Regards, Kasimier From k.buchcik@4commerce.de Wed Jun 21 13:22:42 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5FA523B0161 for ; Wed, 21 Jun 2006 13:22:42 -0400 (EDT) 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 24620-01 for ; Wed, 21 Jun 2006 13:22:38 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id 3FDD63B007A for ; Wed, 21 Jun 2006 13:22:33 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft6PI-0005HI-JG for xslt@gnome.org; Wed, 21 Jun 2006 19:22:24 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft6PH-0005HD-VA for xslt@gnome.org; Wed, 21 Jun 2006 19:22:24 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Jun 2006 19:22:31 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [xslt] Node trees as arguments with PHP5/XSL thread-index: AcaVU/dmZu8HHDHNRISiyH7lkerTGwAAtbcQ From: "Buchcik, Kasimier" To: "The Gnome XSLT library mailing-list" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.425 tagged_above=-999 required=2 tests=[AWL=0.039, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] X-Spam-Score: -2.425 X-Spam-Level: Subject: Re: [xslt] Node trees as arguments with PHP5/XSL X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 17:22:42 -0000 Hi, Ignore the previous post: apparently this solution only covers passing of stream-based XML documents and _not_ node trees. Cheers, Kasimier > -----Original Message----- > From: xslt-bounces@gnome.org [mailto:xslt-bounces@gnome.org]=20 > Hi, >=20 > For everyone who needs to pass node trees as parameters to > the XSLT processor in PHP 5: >=20 > http://alexandre.alapetite.net/doc-alex/xslt-php4-php5/xslt-ph p4-to-php5 > .php.txt >=20 > This document is about how to make PHP 4 code run with PHP 5. >=20 > The underlying XSLT processor changed from Sablotron to > Libxslt/Libxml2 in PHP 5; there are some incompatibilities, > which raised questions concerning the way to pass node trees > into the transformation. >=20 > Regards, >=20 > Kasimier From rrichards@ctindustries.net Wed Jun 21 13:49:07 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0EBC43B06AB for ; Wed, 21 Jun 2006 13:49:07 -0400 (EDT) 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 26238-03 for ; Wed, 21 Jun 2006 13:49:05 -0400 (EDT) Received: from ctindustries.net (unknown [216.117.147.250]) by menubar.gnome.org (Postfix) with ESMTP id 88FEF3B05D7 for ; Wed, 21 Jun 2006 13:49:05 -0400 (EDT) Received: from [127.0.0.1] (dsta-aa203.pivot.net [66.186.171.203]) (authenticated bits=0) by ctindustries.net (8.12.8/8.12.8) with ESMTP id k5LHlXPI018341; Wed, 21 Jun 2006 13:47:36 -0400 Message-ID: <449986E0.9030307@ctindustries.net> Date: Wed, 21 Jun 2006 13:50:24 -0400 From: Rob Richards User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: "Buchcik, Kasimier" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0625-4, 06/21/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV 0.88.2/1558/Wed Jun 21 05:31:22 2006 on ctindustries.net X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.498 tagged_above=-999 required=2 tests=[AWL=0.024, BAYES_00=-2.599, TW_IB=0.077] X-Spam-Score: -2.498 X-Spam-Level: Cc: xslt@gnome.org Subject: Re: [xslt] PHP 5 XSLT with Libxslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 17:49:07 -0000 Hi Kasimier, Buchcik, Kasimier wrote: > Hi, > > I noticed on the xsl-list@lists.mulberrytech.com mailing list > that some people are struggling in PHP 5 to get node trees > (i.e. not only strings) as parameters into the transformation. > > Rob, did the previous processor support this? Is this now a > problem for PHP 5? > > Do some of the other XSLT processors support this? > From looking at the sablotron binding from PHP 4, I dont see that it supported this. If I am incorrect, then if someone would kindly point out how this was done previously I would appreciate it. There are a few ways to get node trees into a transformation though (and the methods appear similar to how it is done using the older extension). - All libxml/libxslt I/O is now handled by PHP streams (which means users can register there own stream wrappers and call them anywhere a URI is valid). So a custom wrapper could return a tree built using DOM if it really wanted to. - Call PHP functions directly from the templates. There are examples in the PHP manual for the registerPHPFunctions() method that explictly demonstrate PHP returning nodes to an in progress transformation. I do believe some of the other processors like Saxon and Microsoft do support passing a nodeset in as a parameter. I hope this answers your/their question. Rob From k.buchcik@4commerce.de Wed Jun 21 14:00:31 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 849743B025B for ; Wed, 21 Jun 2006 14:00:31 -0400 (EDT) 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 26766-09 for ; Wed, 21 Jun 2006 14:00:30 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id CBE4F3B00AD for ; Wed, 21 Jun 2006 14:00:29 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft700-0005KE-Hp; Wed, 21 Jun 2006 20:00:20 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft6zz-0005K8-Oo; Wed, 21 Jun 2006 20:00:20 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Jun 2006 20:00:26 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: PHP 5 XSLT with Libxslt thread-index: AcaVWv3EaDTUt00+RSyacsJMp1yVfwAACsOA From: "Buchcik, Kasimier" To: "Rob Richards" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.386 tagged_above=-999 required=2 tests=[AWL=0.001, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_IB=0.077] X-Spam-Score: -2.386 X-Spam-Level: Cc: xslt@gnome.org Subject: Re: [xslt] PHP 5 XSLT with Libxslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 18:00:31 -0000 Hi Rob, > -----Original Message----- > From: Rob Richards [mailto:rrichards@ctindustries.net]=20 > Hi Kasimier, >=20 > Buchcik, Kasimier wrote: > > Hi, > > > > I noticed on the xsl-list@lists.mulberrytech.com mailing list > > that some people are struggling in PHP 5 to get node trees > > (i.e. not only strings) as parameters into the transformation. > > > > Rob, did the previous processor support this? Is this now a > > problem for PHP 5? > > > > Do some of the other XSLT processors support this? > > =20 > From looking at the sablotron binding from PHP 4, I dont see that it=20 > supported this. If I am incorrect, then if someone would kindly point=20 > out how this was done previously I would appreciate it. >=20 > There are a few ways to get node trees into a transformation=20 > though (and the methods appear similar to how it is done using the older=20 > extension). >=20 > - All libxml/libxslt I/O is now handled by PHP streams (which means=20 > users can register there own stream wrappers and call them anywhere a=20 > URI is valid). So a custom wrapper could return a tree built=20 > using DOM if it really wanted to. >=20 > - Call PHP functions directly from the templates. There are=20 > examples in=20 > the PHP manual for the registerPHPFunctions() method that explictly=20 > demonstrate PHP returning nodes to an in progress transformation. >=20 > I do believe some of the other processors like Saxon and Microsoft do=20 > support passing a nodeset in as a parameter. >=20 > I hope this answers your/their question. >=20 > Rob Thanks. Yes, this clarifies the issue for me; especially the information that a custom wrapper is able to hand over a node tree directly. Regards, Kasimier From rrichards@ctindustries.net Wed Jun 21 14:24:53 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5E18F3B0084 for ; Wed, 21 Jun 2006 14:24:53 -0400 (EDT) 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 28524-07 for ; Wed, 21 Jun 2006 14:24:51 -0400 (EDT) Received: from ctindustries.net (unknown [216.117.147.250]) by menubar.gnome.org (Postfix) with ESMTP id 452CF3B0086 for ; Wed, 21 Jun 2006 14:24:51 -0400 (EDT) Received: from [127.0.0.1] (dsta-aa203.pivot.net [66.186.171.203]) (authenticated bits=0) by ctindustries.net (8.12.8/8.12.8) with ESMTP id k5LINbPI018570; Wed, 21 Jun 2006 14:23:38 -0400 Message-ID: <44998F53.1070903@ctindustries.net> Date: Wed, 21 Jun 2006 14:26:27 -0400 From: Rob Richards User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: "Buchcik, Kasimier" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0625-5, 06/21/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV 0.88.2/1558/Wed Jun 21 05:31:22 2006 on ctindustries.net X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.498 tagged_above=-999 required=2 tests=[AWL=0.024, BAYES_00=-2.599, TW_IB=0.077] X-Spam-Score: -2.498 X-Spam-Level: Cc: xslt@gnome.org Subject: Re: [xslt] PHP 5 XSLT with Libxslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 18:24:53 -0000 Hi Kasimier, Buchcik, Kasimier wrote: > Thanks. Yes, this clarifies the issue for me; especially the > information that a custom wrapper is able to hand over a node tree > directly. > > Just to clarify that... custom wrappers would hand over the serialized version (though since it is a custom wrapper, any type of logic can be used within it to create the tree) which is then converted into a tree (i.e. the document() function). Calling external PHP functions though can be used to pass trees/nodes directly. Rob From k.buchcik@4commerce.de Wed Jun 21 14:36:46 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 589123B00F6 for ; Wed, 21 Jun 2006 14:36:46 -0400 (EDT) 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 29252-02 for ; Wed, 21 Jun 2006 14:36:45 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id C50A23B00AD for ; Wed, 21 Jun 2006 14:36:44 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft7Z5-0005N8-TC; Wed, 21 Jun 2006 20:36:35 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Ft7Z4-0005N2-Vf; Wed, 21 Jun 2006 20:36:35 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Jun 2006 20:36:41 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: PHP 5 XSLT with Libxslt thread-index: AcaVX/x94/XDZpFGSYy6RBaybDpRbQAACU/Q From: "Buchcik, Kasimier" To: "Rob Richards" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.386 tagged_above=-999 required=2 tests=[AWL=0.001, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_IB=0.077] X-Spam-Score: -2.386 X-Spam-Level: Cc: xslt@gnome.org Subject: Re: [xslt] PHP 5 XSLT with Libxslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 18:36:46 -0000 Hi,=20 > -----Original Message----- > From: Rob Richards [mailto:rrichards@ctindustries.net]=20 > Sent: Wednesday, June 21, 2006 8:26 PM > To: Buchcik, Kasimier > Cc: xslt@gnome.org > Subject: Re: PHP 5 XSLT with Libxslt >=20 > Hi Kasimier, >=20 > Buchcik, Kasimier wrote: > > Thanks. Yes, this clarifies the issue for me; especially the > > information that a custom wrapper is able to hand over a node tree > > directly. > > > > =20 > Just to clarify that... custom wrappers would hand over the=20 > serialized=20 > version (though since it is a custom wrapper, any type of=20 > logic can be=20 > used within it to create the tree) which is then converted=20 > into a tree=20 > (i.e. the document() function). > Calling external PHP functions though can be used to pass trees/nodes=20 > directly. >=20 > Rob OK :-) This issue feels like a perpetual pop-push from the problem stack. So, hopefully finally, I learned that in PHP 5 the way to pass directly node trees to the transformation process is to use extension functions. Regards, Kasimier From stdanley@yahoo.com Thu Jun 22 08:09:28 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 949F63B06DC for ; Thu, 22 Jun 2006 08:09:28 -0400 (EDT) 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 23065-09 for ; Thu, 22 Jun 2006 08:09:27 -0400 (EDT) Received: from web30404.mail.mud.yahoo.com (web30404.mail.mud.yahoo.com [68.142.200.107]) by menubar.gnome.org (Postfix) with SMTP id C2D3D3B0695 for ; Thu, 22 Jun 2006 08:09:26 -0400 (EDT) Received: (qmail 45980 invoked by uid 60001); 22 Jun 2006 12:09:24 -0000 Message-ID: <20060622120924.45978.qmail@web30404.mail.mud.yahoo.com> Received: from [221.200.119.221] by web30404.mail.mud.yahoo.com via HTTP; Thu, 22 Jun 2006 05:09:24 PDT Date: Thu, 22 Jun 2006 05:09:24 -0700 (PDT) From: Tom Stanley To: The Gnome XSLT library mailing-list In-Reply-To: <41C4B6BE-6C2A-426A-91BC-A8B5E5A48CB1@explain.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.485 tagged_above=-999 required=2 tests=[AWL=-0.687, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: -1.485 X-Spam-Level: Subject: Re: [xslt] needed:set xslt variable in program X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 12:09:28 -0000 Steve You are right, I'm reading the libxslt 's extension function. But I found no way's to set session depended data(xmlDocPtr for example) any clues? --- Steve Ball wrote: > Tom, > > Upon re-reading your original posting it would seem > that a parameter > is not what you want, and that the document() > function or an > extension would be the way to go. Since you have > already built these > documents in-memory as xmlDocPtr's, then I'd say an > extension > function is needed to access them. > > Parameters allow you to pass in an atomic value (a > string, a number > or a nodeset). libxslt has the neat feature that > you can pass an > XPath and resolve it to a nodeset, but that would > consist of nodes > from the source document, not an externally-derived > "snippet". > > Cheers, > Steve > > On 15/06/2006, at 11:56 AM, Tom Stanley wrote: > > > can we set an xmlNodePtr in memory as a parameter? > > > > --- Steve Ball wrote: > > > >> Hi Tom, > >> > >> Why not simply pass in the value as a stylesheet > >> parameter? libxslt > >> certainly has functions/data structures to pass > >> parameters; RTFM. > >> > >> HTHs, > >> Steve Ball > >> > >> On 15/06/2006, at 12:10 AM, Tom Stanley wrote: > >> > >>> hello, guys > >>> we plan to use libxml and libxslt in our > >> projects. > >>> what we need are like snippet belows: > >>> > >>> > >>> > >>> > >>> >>> select=""Data""/> > >>> > >>> > >>> >> select="0"/> > >>> > >>> > >>> >>> select="string($var/Report/Data[1])"/> > >>> > >>> > >>> > >>> > >>> We want to use something like xslt template to > >>> produce some xml tree as process's input. > >>> We can change this xml snippet to a xslt > template > >> and > >>> use applystylesheet to produce expected output > xml > >>> tree. > >>> However, we need to set a variable (named var ) > in > >>> program before apply the translation. > >>> Does libxslt have any method to do this ,for > >> example > >>> like xmlXPathRegisterVariable in libxml? > >>> > >>> or any other thoughts? > >>> > >>> thx > >>> > >>> > >>> > __________________________________________________ > >>> Do You Yahoo!? > >>> Tired of spam? Yahoo! Mail has the best spam > >> protection around > >>> http://mail.yahoo.com > >>> _______________________________________________ > >>> xslt mailing list, project page > >> http://xmlsoft.org/XSLT/ > >>> xslt@gnome.org > >>> http://mail.gnome.org/mailman/listinfo/xslt > >>> > >> > >> _______________________________________________ > >> xslt mailing list, project page > >> http://xmlsoft.org/XSLT/ > >> xslt@gnome.org > >> http://mail.gnome.org/mailman/listinfo/xslt > >> > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > _______________________________________________ > xslt mailing list, project page > http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From k.buchcik@4commerce.de Thu Jun 22 08:42:30 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id CBF163B0606 for ; Thu, 22 Jun 2006 08:42:30 -0400 (EDT) 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 25953-09 for ; Thu, 22 Jun 2006 08:42:29 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id B452E3B0086 for ; Thu, 22 Jun 2006 08:42:28 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FtOVm-0006QK-Ba for xslt@gnome.org; Thu, 22 Jun 2006 14:42:18 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FtOVk-0006QE-MK for xslt@gnome.org; Thu, 22 Jun 2006 14:42:18 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 22 Jun 2006 14:42:25 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: XHTML serialization - implicit creation of CDATA sections for specific elements thread-index: AcaV+UkyIi/oldWTQ4a4NMR5h9Jy9w== From: "Buchcik, Kasimier" To: X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.425 tagged_above=-999 required=2 tests=[AWL=0.039, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] X-Spam-Score: -2.425 X-Spam-Level: Subject: [xslt] XHTML serialization - implicit creation of CDATA sections for specific elements X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 12:42:31 -0000 Hi, This issue concerns the serialization of the content of "script" and "style" elements to XHTML. Currently the content of those elements is implicitely put in a CDATA section during the serialization. I'll advocate for the disabling of this implicit serialization mechanism. Related reports: http://bugzilla.gnome.org/show_bug.cgi?id=3D302529 http://bugzilla.gnome.org/show_bug.cgi?id=3D345147 I see the following reasons to disable this mechanism: 1) The addition is not performed by the Saxon, Xalan, Sablotron and .NET XSLT processors (maybe others as well). 2) It constitutes a problem for some people, since comes unexpectedly. 3) The XHTML spec does not give a hint that CDATA sections should be generated automatically by the serialization mechanism; it only makes XHTML authors aware that one can use CDATA sections to make the text more readable in the XML document. (http://www.w3.org/TR/xhtml1/#h-4.8) Normally a wrapping with a CDATA section should be only a textual issue, since, if disable-output-escaping is used, this can result in ugly masses of in-between CDATA sections . This is demonstrated in the XSLT 2.0 spec. Taken from http://www.w3.org/TR/xslt20/#d5e29391: ----- Example: Interaction of Output Escaping and CDATA For example, if is specified, then the following instructions: <xsl:text disable-output-escaping=3D"yes">This is not <hr/> good coding practice</xsl:text> should generate the output: <![CDATA[This is not ]]><hr/><![CDATA[ good coding practice]]> ----- Due to a bug in the serialization of non-output-escaped text in conjunction with CDATA sections, the current state can lead to incorrect results. The following example demonstrates that the generated content of the "style" element differs; the current behaviour generates the text "
", while the correct result would be the element "hr". =20 =20 Current relevant result ----------------------- The serializer misses to analyse the XML-specific semantic of the text to be output, and puts the
inside the CDATA section: ... ... Expected relevant results ------------------------- If we keep the generation of CDATA sections, then we should get: ... ... If we remove the generation of CDATA sections: ... ... So actually there are 2 issues here: 1) Removing the unexpected generation of CDATA sections 2) Fixing the serialization bug Regards, Kasimier From vishi_v2000@yahoo.co.in Thu Jun 22 10:10:11 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D7FF23B07DF for ; Thu, 22 Jun 2006 10:10:11 -0400 (EDT) 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 00967-07 for ; Thu, 22 Jun 2006 10:10:10 -0400 (EDT) Received: from web8323.mail.in.yahoo.com (web8323.mail.in.yahoo.com [202.43.219.121]) by menubar.gnome.org (Postfix) with SMTP id 259CE3B04F0 for ; Thu, 22 Jun 2006 10:10:09 -0400 (EDT) Received: (qmail 93013 invoked by uid 60001); 22 Jun 2006 14:10:06 -0000 Message-ID: <20060622141006.93011.qmail@web8323.mail.in.yahoo.com> Received: from [203.145.184.66] by web8323.mail.in.yahoo.com via HTTP; Thu, 22 Jun 2006 07:10:06 PDT Date: Thu, 22 Jun 2006 07:10:06 -0700 (PDT) From: vishal verma To: xslt@gnome.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-395812656-1150985406=:92235" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=1.903 tagged_above=-999 required=2 tests=[BAYES_50=0.001, FROM_HAS_ULINE_NUMS=0.291, HTML_MESSAGE=0.001, RCVD_IN_SORBS_WEB=1.456, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: 1.903 X-Spam-Level: * Subject: [xslt] xslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 14:10:12 -0000 --0-395812656-1150985406=:92235 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit hi, i am new to xml and xslt. i am trying to install an application on Redhat ES 3, which needs some perl modules related to xml and xslt. i have successfully installed XML::LibXml 1.58 with libxml2-2.6.2. now when i try to install libxslt-1.0.32 which is a prerequisite for XML::LibXslt, i fail at 'make test'. all 7 tests fail. can somebody help me install libxslt and XML::LibXslt on redhat ES 3. regards vishal Information Specialist Edutech India Pvt Ltd #8 Khader Nawaz Khan Road Chennai, India Tel: +91 44 28330999 Fax: +91 44 28331777 GSM: 00 91 98409 97846 www.edutechindia.com "Enhancing knowledge and skills for success, lifelong." --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. --0-395812656-1150985406=:92235 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit hi,
i am new to xml and xslt.  i am trying to install an application on Redhat ES 3, which needs some perl modules related to xml and xslt.  i have successfully installed XML::LibXml 1.58 with libxml2-2.6.2.  now when i try to install libxslt-1.0.32 which is a prerequisite for XML::LibXslt, i fail at 'make test'.  all 7 tests fail.   can somebody help me install  libxslt and XML::LibXslt on redhat ES 3.

regards
vishal


Information Specialist
Edutech India Pvt Ltd
#8 Khader Nawaz Khan Road
Chennai, India
Tel: +91 44 28330999
Fax: +91 44 28331777
GSM: 00 91 98409 97846
www.edutechindia.com

"Enhancing knowledge and skills for success, lifelong."


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. --0-395812656-1150985406=:92235-- From veillard@redhat.com Thu Jun 22 10:31:36 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C7CCD3B0331 for ; Thu, 22 Jun 2006 10:31:36 -0400 (EDT) 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 02239-04 for ; Thu, 22 Jun 2006 10:31:35 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id 8612E3B0449 for ; Thu, 22 Jun 2006 10:31:35 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5MEVYch014501 for ; Thu, 22 Jun 2006 10:31:35 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5MEVYSP022221 for ; Thu, 22 Jun 2006 10:31:34 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5MEVY7F031036 for ; Thu, 22 Jun 2006 10:31:34 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k5MEVYRH031034 for xslt@gnome.org; Thu, 22 Jun 2006 10:31:34 -0400 Date: Thu, 22 Jun 2006 10:31:34 -0400 From: Daniel Veillard To: The Gnome XSLT library mailing-list Message-ID: <20060622143134.GX1330@redhat.com> References: <20060622141006.93011.qmail@web8323.mail.in.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060622141006.93011.qmail@web8323.mail.in.yahoo.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Subject: Re: [xslt] xslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 14:31:37 -0000 On Thu, Jun 22, 2006 at 07:10:06AM -0700, vishal verma wrote: > hi, > i am new to xml and xslt. i am trying to install an application on Redhat ES 3, which needs some perl modules related to xml and xslt. i have successfully installed XML::LibXml 1.58 with libxml2-2.6.2. now when i try to install libxslt-1.0.32 which is a prerequisite for XML::LibXslt, i fail at 'make test'. all 7 tests fail. can somebody help me install libxslt and XML::LibXslt on redhat ES 3. up2date libxml2 libxml2-devel libxslt libxslt-devel Installing by hand on an RPM based system is a good way to break a number of things, highly discouraged for newbies, Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From nathanbullock@gmail.com Thu Jun 22 12:06:17 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 05F843B06D1 for ; Thu, 22 Jun 2006 12:06:17 -0400 (EDT) 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 08251-01 for ; Thu, 22 Jun 2006 12:06:16 -0400 (EDT) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by menubar.gnome.org (Postfix) with ESMTP id B9EAF3B0680 for ; Thu, 22 Jun 2006 12:06:15 -0400 (EDT) Received: by ug-out-1314.google.com with SMTP id o2so550911uge for ; Thu, 22 Jun 2006 09:06:14 -0700 (PDT) Received: by 10.66.220.17 with SMTP id s17mr1204356ugg; Thu, 22 Jun 2006 09:06:14 -0700 (PDT) Received: by 10.66.220.2 with HTTP; Thu, 22 Jun 2006 09:06:14 -0700 (PDT) Message-ID: <916b88c10606220906n5c333eedwbe859d8e7b3a8cc2@mail.gmail.com> Date: Thu, 22 Jun 2006 10:06:14 -0600 From: "nathan bullock" To: xslt@gnome.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.927 tagged_above=-999 required=2 tests=[AWL=-0.115, BAYES_00=-2.599, RCVD_IN_BL_SPAMCOP_NET=1.558, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_XH=0.077] X-Spam-Score: -0.927 X-Spam-Level: Subject: [xslt] Can anyone help with this? X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 16:06:17 -0000 I have this xsl document "test.xsl" <xsl:value-of select="title"/> And this xml document "test.xml" Test Title

Test Paragraph

And when I apply the transformation I get Test Title

Test Paragraph

But if you notice this leaves ugly little xmlns="" in the document. How do I get rid of these? I can't seem to figure it out. Basically I want to be able to recursively copy a chunk of elements into my xhtml document and be able to use the proper namespace while inserting them. Nathan Bullock ps. This is the python file I am using to do the conversion: import libxml2 import libxslt def transform(str_xml, str_xsl, out): styledoc = libxml2.parseFile(str_xsl) style = libxslt.parseStylesheetDoc(styledoc) doc = libxml2.parseFile(str_xml) result = style.applyStylesheet(doc, None) style.saveResultToFilename(out, result, 0) style.freeStylesheet() doc.freeDoc() result.freeDoc() transform("test.xml", "test.xsl", "out1.html") From k.buchcik@4commerce.de Thu Jun 22 12:38:29 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1A5643B04C9 for ; Thu, 22 Jun 2006 12:38:29 -0400 (EDT) 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 10109-05 for ; Thu, 22 Jun 2006 12:38:28 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id AA7873B0401 for ; Thu, 22 Jun 2006 12:38:27 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FtSC7-0006jn-Lf; Thu, 22 Jun 2006 18:38:15 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FtSC5-0006jh-T4; Thu, 22 Jun 2006 18:38:15 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 22 Jun 2006 18:38:23 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [xslt] Can anyone help with this? thread-index: AcaWFdEB1RwxnZtvQ7SxKpJVLkQf5QAA/4GA From: "Buchcik, Kasimier" To: "The Gnome XSLT library mailing-list" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.31 tagged_above=-999 required=2 tests=[AWL=-0.077, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_BX=0.077, TW_IB=0.077, TW_XH=0.077] X-Spam-Score: -2.31 X-Spam-Level: Subject: Re: [xslt] Can anyone help with this? X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 16:38:29 -0000 Hi, You may want to try the following: <xsl:value-of select=3D"xhtml:title"/> Test Title

Test Paragraph

Since your input element "p" was in no namespace, its copy will also stay in no namespace in the result tree. The xmlns=3D"" was added to disable the default namespace for "p". Regards, Kasimier > -----Original Message----- > From: xslt-bounces@gnome.org [mailto:xslt-bounces@gnome.org]=20 > On Behalf Of nathan bullock > Sent: Thursday, June 22, 2006 6:06 PM > To: xslt@gnome.org > Subject: [xslt] Can anyone help with this? >=20 > I have this xsl document "test.xsl" >=20 > > xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform" > xmlns=3D"http://www.w3.org/1999/xhtml"> > doctype-public=3D"-//W3C//DTD XHTML 1.0 Strict//EN" > =20 > doctype-system=3D"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> >=20 > > > <xsl:value-of select=3D"title"/> > >=20 > > >=20 > >=20 > > > >=20 > And this xml document "test.xml" >=20 > > > Test Title > >

Test Paragraph

> > >=20 > And when I apply the transformation I get >=20 > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > > > charset=3DUTF-8" /> > Test Title > > >

Test Paragraph

> > >=20 > But if you notice this leaves ugly little xmlns=3D"" in the document. > How do I get rid of these? I can't seem to figure it out. Basically I > want to be able to recursively copy a chunk of elements into my xhtml > document and be able to use the proper namespace while inserting them. >=20 > Nathan Bullock >=20 > ps. This is the python file I am using to do the conversion: >=20 > import libxml2 > import libxslt >=20 > def transform(str_xml, str_xsl, out): > styledoc =3D libxml2.parseFile(str_xsl) > style =3D libxslt.parseStylesheetDoc(styledoc) > doc =3D libxml2.parseFile(str_xml) > result =3D style.applyStylesheet(doc, None) > style.saveResultToFilename(out, result, 0) > style.freeStylesheet() > doc.freeDoc() > result.freeDoc() >=20 > transform("test.xml", "test.xsl", "out1.html") > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt >=20 >=20 From nathanbullock@gmail.com Thu Jun 22 12:56:42 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 05FEC3B0748 for ; Thu, 22 Jun 2006 12:56:42 -0400 (EDT) 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 11170-04 for ; Thu, 22 Jun 2006 12:56:38 -0400 (EDT) Received: from hu-out-0102.google.com (hu-out-0102.google.com [72.14.214.199]) by menubar.gnome.org (Postfix) with ESMTP id 8AB3E3B0689 for ; Thu, 22 Jun 2006 12:56:37 -0400 (EDT) Received: by hu-out-0102.google.com with SMTP id 35so186396hue for ; Thu, 22 Jun 2006 09:56:37 -0700 (PDT) Received: by 10.66.221.19 with SMTP id t19mr1247916ugg; Thu, 22 Jun 2006 09:56:37 -0700 (PDT) Received: by 10.66.220.2 with HTTP; Thu, 22 Jun 2006 09:56:37 -0700 (PDT) Message-ID: <916b88c10606220956u5739d9f9p5bba2fa404b59016@mail.gmail.com> Date: Thu, 22 Jun 2006 10:56:37 -0600 From: "nathan bullock" To: "The Gnome XSLT library mailing-list" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.965 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RCVD_IN_BL_SPAMCOP_NET=1.558, SPF_PASS=-0.001, TW_XH=0.077] X-Spam-Score: -0.965 X-Spam-Level: Subject: Re: [xslt] Can anyone help with this? X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 16:56:42 -0000 Thanks for the quick reply, that seems almost correct, except that it still leaves this at the start of the resulting xml: Which appears to be invalid for a strict xhtml document (according to the w3c xhtml validator). I tried to get rid of that using the namespace-alias command but that didn't seem to work. Nathan Bullock From k.buchcik@4commerce.de Thu Jun 22 13:05:35 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B7A093B059D for ; Thu, 22 Jun 2006 13:05:35 -0400 (EDT) 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 11733-08 for ; Thu, 22 Jun 2006 13:05:34 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id 0309C3B00C0 for ; Thu, 22 Jun 2006 13:05:33 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FtScN-0006lQ-3t; Thu, 22 Jun 2006 19:05:23 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1FtScM-0006lK-Jj; Thu, 22 Jun 2006 19:05:23 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 22 Jun 2006 19:05:31 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [xslt] Can anyone help with this? thread-index: AcaWHNtvMKm8723fQrm+mQJdU6CXWAAAHCPg From: "Buchcik, Kasimier" To: "The Gnome XSLT library mailing-list" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.387 tagged_above=-999 required=2 tests=[AWL=0.000, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_XH=0.077] X-Spam-Score: -2.387 X-Spam-Level: Subject: Re: [xslt] Can anyone help with this? X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 17:05:35 -0000 Hi, Add the attribute exclude-result-prefixes=3D"#default" to the "stylesheet" element. It will eliminate unused namespace nodes of Literal Result Elements with a namespace URI of "http://www.w3.org/1999/xhtml". Regards, Kasimier > -----Original Message----- > From: xslt-bounces@gnome.org [mailto:xslt-bounces@gnome.org]=20 > On Behalf Of nathan bullock > Sent: Thursday, June 22, 2006 6:57 PM > To: The Gnome XSLT library mailing-list > Subject: Re: [xslt] Can anyone help with this? >=20 > Thanks for the quick reply, that seems almost correct, except that it > still leaves this at the start of the resulting xml: >=20 > xmlns:xhtml=3D"http://www.w3.org/1999/xhtml"> >=20 > Which appears to be invalid for a strict xhtml document (according to > the w3c xhtml validator). >=20 > I tried to get rid of that using the namespace-alias command but that > didn't seem to work. >=20 > Nathan Bullock > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt >=20 >=20 From nathanbullock@gmail.com Thu Jun 22 13:15:17 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 979C23B06F0 for ; Thu, 22 Jun 2006 13:15:17 -0400 (EDT) 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 12513-05 for ; Thu, 22 Jun 2006 13:15:17 -0400 (EDT) Received: from hu-out-0102.google.com (hu-out-0102.google.com [72.14.214.202]) by menubar.gnome.org (Postfix) with ESMTP id 7D6773B0693 for ; Thu, 22 Jun 2006 13:15:16 -0400 (EDT) Received: by hu-out-0102.google.com with SMTP id 35so189636hue for ; Thu, 22 Jun 2006 10:15:15 -0700 (PDT) Received: by 10.67.28.9 with SMTP id f9mr1258209ugj; Thu, 22 Jun 2006 10:15:13 -0700 (PDT) Received: by 10.66.220.2 with HTTP; Thu, 22 Jun 2006 10:15:12 -0700 (PDT) Message-ID: <916b88c10606221015w3e1c8b04wfdf77408e1355c24@mail.gmail.com> Date: Thu, 22 Jun 2006 11:15:12 -0600 From: "nathan bullock" To: "The Gnome XSLT library mailing-list" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.003 tagged_above=-999 required=2 tests=[AWL=0.039, BAYES_00=-2.599, RCVD_IN_BL_SPAMCOP_NET=1.558, SPF_PASS=-0.001] X-Spam-Score: -1.003 X-Spam-Level: Subject: Re: [xslt] Can anyone help with this? X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 17:15:17 -0000 Perfect. Thank You. Nathan Bullock From jlc6@po.cwru.edu Thu Jun 22 15:39:35 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9B8B13B07B5 for ; Thu, 22 Jun 2006 15:39:35 -0400 (EDT) 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 21636-04 for ; Thu, 22 Jun 2006 15:39:34 -0400 (EDT) Received: from smtp101.sbc.mail.mud.yahoo.com (smtp101.sbc.mail.mud.yahoo.com [68.142.198.200]) by menubar.gnome.org (Postfix) with SMTP id 147503B0238 for ; Thu, 22 Jun 2006 15:39:33 -0400 (EDT) Received: (qmail 89181 invoked from network); 22 Jun 2006 17:02:01 -0000 Received: from unknown (HELO localhost) (john3184@sbcglobal.net@70.134.81.185 with plain) by smtp101.sbc.mail.mud.yahoo.com with SMTP; 22 Jun 2006 17:02:01 -0000 Date: Thu, 22 Jun 2006 10:01:58 -0700 From: "John L. Clark" To: The Gnome XSLT library mailing-list Message-ID: <20060622170158.GD29369@rejoice> References: <916b88c10606220906n5c333eedwbe859d8e7b3a8cc2@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ibQy1PD9BIJOeb75" Content-Disposition: inline In-Reply-To: <916b88c10606220906n5c333eedwbe859d8e7b3a8cc2@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-Subliminal-URL: http://www.pgpi.org/doc/whypgp/en/ X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: Subject: Re: [xslt] Can anyone help with this? X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: "John L. Clark" , The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 19:39:35 -0000 --ibQy1PD9BIJOeb75 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Nathan, Your question pertains only to XSLT, and not to libxml/libxslt. On Thu, Jun 22, 2006 at 10:06:14AM -0600, nathan bullock wrote: > xmlns="http://www.w3.org/1999/xhtml"> This namespace declaration puts all elements with no prefix in your *result tree* into the XHTML namespace (which is fine for XHTML output). > > This rule copies all the child elements of the `body' element from the source tree verbatim; these elements are in the empty namespace, so your output properly declares the empty namespace as the default namespace for these elements. If you want to take all the child elements of the `body' element and place them in the XHTML namespace (that is, create new elements with the same local name and the XHTML namespace), then you will need a slightly more sophisticated approach that does this explicitly. For example: You'll then need to instead of your original copy statement in order to allow these templates to be applied. Take care, John L. Clark --ibQy1PD9BIJOeb75 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU/Linux) iD8DBQFEms0GjkcskvOyl78RArT9AJ9RmEHi4njtTCrf0hCyVo5EyWgzhgCguX2c pqFNMSNJN+FMfds82NMth4g= =kUgI -----END PGP SIGNATURE----- --ibQy1PD9BIJOeb75-- From vincent+gnome@vinc17.org Fri Jun 23 07:59:41 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0B1903B013B for ; Fri, 23 Jun 2006 07:59:41 -0400 (EDT) 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 08173-06 for ; Fri, 23 Jun 2006 07:59:36 -0400 (EDT) Received: from prunille.vinc17.org (vinc17.net8.nerim.net [62.212.121.106]) by menubar.gnome.org (Postfix) with ESMTP id 3B89B3B08D7 for ; Fri, 23 Jun 2006 07:59:35 -0400 (EDT) Received: by prunille.vinc17.org (Postfix, from userid 501) id 4DC6B9C764D; Fri, 23 Jun 2006 13:59:33 +0200 (CEST) Date: Fri, 23 Jun 2006 13:59:33 +0200 From: Vincent Lefevre To: xslt@gnome.org Message-ID: <20060623115933.GJ7996@prunille.vinc17.org> Mail-Followup-To: xslt@gnome.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.11-vl-r12378-2006-06-19 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.379 tagged_above=-999 required=2 tests=[AWL=0.008, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_XH=0.077] X-Spam-Score: -2.379 X-Spam-Level: Subject: Re: [xslt] XHTML serialization - implicit creation of CDATA sections for specific elements X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2006 11:59:41 -0000 On 2006-06-22 14:42:25 +0200, Buchcik, Kasimier wrote: > I see the following reasons to disable this mechanism: > > 1) The addition is not performed by the Saxon, Xalan, Sablotron and .NET > XSLT processors (maybe others as well). > > 2) It constitutes a problem for some people, since comes unexpectedly. > > 3) The XHTML spec does not give a hint that CDATA sections > should be generated automatically by the serialization > mechanism; it only makes XHTML authors aware that one can use CDATA > sections to make the text more readable in the XML document. > (http://www.w3.org/TR/xhtml1/#h-4.8) Or it was written for authors who want to switch from HTML4 to XHTML (possibly converting old HTML4 files into XHTML ones): instead of replacing some characters by entities, they can use a CDATA section. Also, more importantly... [...] > Due to a bug in the serialization of non-output-escaped text in > conjunction with CDATA sections, the current state can > lead to incorrect results. > The following example demonstrates that the generated content > of the "style" element differs; the current behaviour generates > the text "
", while the correct result would be the element > "hr". [...] And with an example I've written: $ xsltproc xhtml-serial.xsl xhtml-serial.xsl | xsltproc getstyle.xsl - /**/ $ sabcmd xhtml-serial.xsl xhtml-serial.xsl | xsltproc getstyle.xsl - /**/ body { } /**/ $ xalan -xsl xhtml-serial.xsl -in xhtml-serial.xsl | xsltproc getstyle.xsl - /**/ body { } /**/ where xhtml-serial.xsl is the testcase given in my bug report[*] and getstyle.xsl just does with text output. [*] http://bugzilla.gnome.org/show_bug.cgi?id=345147 > So actually there are 2 issues here: > 1) Removing the unexpected generation of CDATA sections > 2) Fixing the serialization bug Yes. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / SPACES project at LORIA From christian.stocker@bitflux.ch Wed Jun 21 10:28:29 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9E6A63B0FDB for ; Wed, 21 Jun 2006 10:28:29 -0400 (EDT) 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 12421-09 for ; Wed, 21 Jun 2006 10:28:26 -0400 (EDT) Received: from devel.bitflux.ch (host-210.bitflux.ch [212.55.202.210]) by menubar.gnome.org (Postfix) with ESMTP id 450553B106A for ; Wed, 21 Jun 2006 10:28:26 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by devel.bitflux.ch (Postfix) with ESMTP id 774E6E7353 for ; Wed, 21 Jun 2006 16:28:24 +0200 (CEST) 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 10069-01-3 for ; Wed, 21 Jun 2006 16:28:22 +0200 (CEST) Received: from [192.168.3.8] (80-219-13-33.dclient.hispeed.ch [80.219.13.33]) by devel.bitflux.ch (Postfix) with ESMTP id 31A7FE7351 for ; Wed, 21 Jun 2006 16:28:22 +0200 (CEST) Message-ID: <4499578C.1080608@bitflux.ch> Date: Wed, 21 Jun 2006 16:28:28 +0200 From: Christian Stocker Organization: Bitflux GmbH User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060516) MIME-Version: 1.0 To: The Gnome XSLT library mailing-list References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at bitflux.ch X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.387 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_IB=0.077] X-Spam-Score: -2.387 X-Spam-Level: X-Mailman-Approved-At: Fri, 23 Jun 2006 09:26:46 -0400 Subject: Re: [xslt] PHP 5 XSLT with Libxslt X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 14:28:29 -0000 On 21.6.2006 13:43 Uhr, Buchcik, Kasimier wrote: > Hi, > > I noticed on the xsl-list@lists.mulberrytech.com mailing list > that some people are struggling in PHP 5 to get node trees > (i.e. not only strings) as parameters into the transformation. It's not supported AFAICS. We use xsltApplyStylesheetUser() for the transformation, does that support providing nodesets instead of strings? Didn't look very thoroughly, but didn't see something obvious from the API docs. > Rob, did the previous processor support this? Is this now a > problem for PHP 5? Don't think it was supported in PHP4's libxslt implementation (it's almost the same code for that part). Maybe it was with Sablotron, but I highly doubt that due to the way Sablotron was implement. christian > > > Do some of the other XSLT processors support this? > > Regards, > > Kasimier > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | christian.stocker@bitflux.ch | GPG 0x5CE1DECB From lifewarped@yahoo.com Fri Jun 23 22:22:47 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id CE7F63B0182 for ; Fri, 23 Jun 2006 22:22:47 -0400 (EDT) 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 17807-09 for ; Fri, 23 Jun 2006 22:22:46 -0400 (EDT) Received: from smtp102.plus.mail.re2.yahoo.com (smtp102.plus.mail.re2.yahoo.com [206.190.53.27]) by menubar.gnome.org (Postfix) with SMTP id 4247B3B0181 for ; Fri, 23 Jun 2006 22:22:46 -0400 (EDT) Received: (qmail 45470 invoked from network); 24 Jun 2006 02:22:45 -0000 Received: from unknown (HELO ?192.168.1.85?) (lifewarped@64.252.203.251 with plain) by smtp102.plus.mail.re2.yahoo.com with SMTP; 24 Jun 2006 02:22:44 -0000 Mime-Version: 1.0 (Apple Message framework v750) Message-Id: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1-1009870638 To: xslt@gnome.org From: "Glenn R. Martin" Date: Fri, 23 Jun 2006 22:22:42 -0400 X-Mailer: Apple Mail (2.750) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.555 tagged_above=-999 required=2 tests=[AWL=-0.604, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, HTML_MESSAGE=0.001] X-Spam-Score: -1.555 X-Spam-Level: Subject: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 02:22:48 -0000 --Apple-Mail-1-1009870638 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Ive been working with an XSLT sheet on a Mac for some time. I have it so it includes other stylesheets in a subdirectory of the parent directory of the first sheet. Im wondering if there were changes between the versions of LibXSLT and how it includes fiules or detects the current directory. Here is what i have found. Darwin 10.4/MacOS X Tiger XML 20616 XSLT 10111 EXSLT 809 -- Works Ubuntu "Hoary Hedgehog" 5.04 XML 20617 XSLT 10112 EXSLT 810 -- Works Ubuntu "Dapper Drake" 6.06 XML 20624 XSLT 10115 EXSLT 812 -- Fails Ubuntu "Dapper Drake" 6.06 (Hand Compiled) XML 20626 XSLT 10117 EXSLT 813 -- Fails It always says something to the effect that it cant find the specified file. Is there anyway i can fix this? Can someone explain the changes? if its version dependent is there some sort of global variable or something that tells the parser version? some way of programatically switching out paths. --- Glenn R. Martin lifewarped@yahoo.com http://www.xargos.com http://www.myspace.com/grmartin C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup --Apple-Mail-1-1009870638 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Ive been working with an XSLT = sheet on a Mac for some time. I have it so it includes other stylesheets = in a subdirectory of the parent directory of the first sheet.

Im wondering if there were = changes between the versions of LibXSLT and how it includes fiules or = detects the current directory. Here is what i have found.

Darwin 10.4/MacOS X Tiger=A0 = XML 20616 XSLT 10111 EXSLT 809 -- = Works
Ubuntu "Hoary = Hedgehog" 5.04=A0 XML 20617 XSLT 10112 EXSLT 810 -- = Works
Ubuntu "Dapper = Drake" 6.06 = XML 20624 XSLT 10115 EXSLT 812 -- = Fails
Ubuntu "Dapper = Drake" 6.06 (Hand Compiled) XML 20626 XSLT 10117 EXSLT 813 -- = Fails

It always says = something to the effect that it cant find the specified file. Is there = anyway i can fix this? Can someone explain the changes? if its version = dependent is there some sort of global variable or something that tells = the parser version? some way of programatically switching out = paths.

---
Glenn R. = Martin
C makes it easy to shoot yourself in = the foot; C++ makes it harder, but when you do, it blows away your whole = leg. -- Bjarne Stroustrup

=

= --Apple-Mail-1-1009870638-- From veillard@redhat.com Sat Jun 24 09:18:24 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 97FE03B02EB for ; Sat, 24 Jun 2006 09:18:23 -0400 (EDT) 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 15680-10 for ; Sat, 24 Jun 2006 09:18:22 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id A3E963B0228 for ; Sat, 24 Jun 2006 09:18:22 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5ODIMw1019042 for ; Sat, 24 Jun 2006 09:18:22 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5ODIMFs018691 for ; Sat, 24 Jun 2006 09:18:22 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5ODILZs021991 for ; Sat, 24 Jun 2006 09:18:21 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k5ODILnb021989 for xslt@gnome.org; Sat, 24 Jun 2006 09:18:21 -0400 Date: Sat, 24 Jun 2006 09:18:21 -0400 From: Daniel Veillard To: The Gnome XSLT library mailing-list Message-ID: <20060624131821.GO1330@redhat.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 13:18:24 -0000 On Fri, Jun 23, 2006 at 10:22:42PM -0400, Glenn R. Martin wrote: > Ive been working with an XSLT sheet on a Mac for some time. I have it > so it includes other stylesheets in a subdirectory of the parent > directory of the first sheet. There is so many possible configuration even with the given indications that it's impossible to even start analyzing what you're reporting. Provide a example showing the problem with xsltproc. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From lifewarped@yahoo.com Sat Jun 24 09:26:11 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id AC5FE3B049A for ; Sat, 24 Jun 2006 09:26:11 -0400 (EDT) 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 16327-01 for ; Sat, 24 Jun 2006 09:26:10 -0400 (EDT) Received: from smtp105.plus.mail.re2.yahoo.com (smtp105.plus.mail.re2.yahoo.com [206.190.53.30]) by menubar.gnome.org (Postfix) with SMTP id 267033B02EB for ; Sat, 24 Jun 2006 09:26:10 -0400 (EDT) Received: (qmail 8757 invoked from network); 24 Jun 2006 13:26:09 -0000 Received: from unknown (HELO ?192.168.1.85?) (lifewarped@64.252.203.251 with plain) by smtp105.plus.mail.re2.yahoo.com with SMTP; 24 Jun 2006 13:26:08 -0000 Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: <20060624131821.GO1330@redhat.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1-1049674679 Message-Id: <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> From: "Glenn R. Martin" Date: Sat, 24 Jun 2006 09:26:06 -0400 To: veillard@redhat.com, The Gnome XSLT library mailing-list X-Mailer: Apple Mail (2.750) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.577 tagged_above=-999 required=2 tests=[AWL=-0.626, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, HTML_MESSAGE=0.001] X-Spam-Score: -1.577 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 13:26:11 -0000 --Apple-Mail-1-1049674679 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Failure (Ubuntu Dapper): grmartin@lain:~/Development/MV/Documents/Framework Manual$ xsltproc - o manual.html ../DocBook\ Kit/Customized\ Temp lates/html.xsl file.xml warning: failed to load external entity "../docbook-xsl-current/html/ docbook.xsl" compilation error: file ../DocBook Kit/Customized Templates/html.xsl line 5 element import xsl:import : unable to load ../docbook-xsl-current/html/docbook.xsl Working (MacOS X/Darwin 10.4): gilliam:~/Desktop/MoltenVisuals/Documents/Framework Manual glennmartin $ xsltproc -o manual.html ../DocBook\ Kit/Customized\ Templates/ html.xsl file.xml Stripping NS from DocBook 5/NG document. Processing stripped document. Here is line lines 1-7 of the complaining XSL file: --- Glenn R. Martin lifewarped@yahoo.com http://www.xargos.com http://www.myspace.com/grmartin C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup --Apple-Mail-1-1049674679 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Failure (Ubuntu = Dapper):=A0
grmartin@lain:~/Development/MV/Documents/Framework Manual$=A0 = xsltproc -o manual.html ../DocBook\ Kit/Customized\ Temp lates/html.xsl = file.xml
warning: failed to load external entity = "../docbook-xsl-current/html/docbook.xsl"
compilation error: = file ../DocBook Kit/Customized Templates/html.xsl line 5 element = import
xsl:import : unable to load = ../docbook-xsl-current/html/docbook.xsl

=
Working (MacOS = X/Darwin 10.4):
gilliam:~/Desktop/MoltenVisuals/Documents/Framework Manual = glennmartin$ xsltproc -o manual.html ../DocBook\ Kit/Customized\ = Templates/html.xsl file.xml
Stripping NS from = DocBook 5/NG document.
Processing = stripped document.

Here is line lines 1-7 of = the complaining XSL file:
<?xml version=3D'1.0'?> =
<xsl:stylesheet=A0
=A0 =A0 = xmlns:xsl=3D"http://www.w3.org/1999/XSL/T= ransform" version=3D"1.0">

<xsl:import = href=3D"../docbook-xsl-current/html/docbook.xsl"/> =

<xsl:preserve-space elements=3D"programlisting screen = synopsis" />

---
Glenn R. = Martin
C makes it easy to shoot yourself in = the foot; C++ makes it harder, but when you do, it blows away your whole = leg. -- Bjarne Stroustrup


= --Apple-Mail-1-1049674679-- From tim.vanholder@anubex.com Sat Jun 24 12:10:13 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D00143B0986 for ; Sat, 24 Jun 2006 12:10:13 -0400 (EDT) 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 24281-10 for ; Sat, 24 Jun 2006 12:10:07 -0400 (EDT) Received: from hoboe2bl1.telenet-ops.be (hoboe2bl1.telenet-ops.be [195.130.137.73]) by menubar.gnome.org (Postfix) with ESMTP id 51A1F3B097D for ; Sat, 24 Jun 2006 12:09:57 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by hoboe2bl1.telenet-ops.be (Postfix) with SMTP id E4E8E124089; Sat, 24 Jun 2006 18:09:50 +0200 (CEST) Received: from [127.0.0.1] (d54C03CBE.access.telenet.be [84.192.60.190]) by hoboe2bl1.telenet-ops.be (Postfix) with ESMTP id 8C07F12428D; Sat, 24 Jun 2006 18:09:50 +0200 (CEST) Message-ID: <449D63C9.1030402@anubex.com> Date: Sat, 24 Jun 2006 18:09:45 +0200 From: Tim Van Holder Organization: Anubex NV User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: The Gnome XSLT library mailing-list References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> In-Reply-To: <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0625-7, 23/06/2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_IB=0.077] X-Spam-Score: -2.522 X-Spam-Level: Cc: veillard@redhat.com Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 16:10:14 -0000 Glenn R. Martin wrote: > Failure (Ubuntu Dapper): > grmartin@lain:~/Development/MV/Documents/Framework Manual$ xsltproc -o > manual.html ../DocBook\ Kit/Customized\ Temp lates/html.xsl file.xml > warning: failed to load external entity > "../docbook-xsl-current/html/docbook.xsl" > compilation error: file ../DocBook Kit/Customized Templates/html.xsl > line 5 element import > xsl:import : unable to load ../docbook-xsl-current/html/docbook.xsl > > Working (MacOS X/Darwin 10.4): > gilliam:~/Desktop/MoltenVisuals/Documents/Framework Manual glennmartin$ > xsltproc -o manual.html ../DocBook\ Kit/Customized\ Templates/html.xsl > file.xml > Stripping NS from DocBook 5/NG document. > Processing stripped document. > > Here is line lines 1-7 of the complaining XSL file: > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> > > > > Well, my _guess_ would be that the semantics of "../" in includes was changed to be relative to the file doing the including, not the current directory of the process (or vice versa). Such a change would have to be in the ChangeLog of libxslt or of its Ubuntu package (depending on whether it's plain libxslt behaviour or ubuntu-local changes). From lifewarped@yahoo.com Sat Jun 24 12:58:50 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id CD4883B03E4 for ; Sat, 24 Jun 2006 12:58:50 -0400 (EDT) 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 26581-02 for ; Sat, 24 Jun 2006 12:58:49 -0400 (EDT) Received: from smtp109.plus.mail.re2.yahoo.com (smtp109.plus.mail.re2.yahoo.com [206.190.53.34]) by menubar.gnome.org (Postfix) with SMTP id 0AEF73B01BE for ; Sat, 24 Jun 2006 12:58:48 -0400 (EDT) Received: (qmail 97197 invoked from network); 24 Jun 2006 16:58:19 -0000 Received: from unknown (HELO ?192.168.1.85?) (lifewarped@64.252.203.251 with plain) by smtp109.plus.mail.re2.yahoo.com with SMTP; 24 Jun 2006 16:58:18 -0000 In-Reply-To: <449D63C9.1030402@anubex.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> <449D63C9.1030402@anubex.com> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: multipart/alternative; boundary=Apple-Mail-1-1062405112 Message-Id: From: "Glenn R. Martin" Date: Sat, 24 Jun 2006 12:58:16 -0400 To: The Gnome XSLT library mailing-list X-Mailer: Apple Mail (2.750) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.552 tagged_above=-999 required=2 tests=[AWL=-0.678, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, HTML_MESSAGE=0.001, TW_IB=0.077] X-Spam-Score: -1.552 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 16:58:51 -0000 --Apple-Mail-1-1062405112 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed OK thats good to know... is there anyway of determining which version of libxslt were using so i can control this as it will be running on new AND old copies... like a variable of some sort i can run a conditional against? --- Glenn R. Martin lifewarped@yahoo.com http://www.xargos.com http://www.myspace.com/grmartin C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup On Jun 24, 2006, at 12:09 PM, Tim Van Holder wrote: > Glenn R. Martin wrote: >> Failure (Ubuntu Dapper): >> grmartin@lain:~/Development/MV/Documents/Framework Manual$ >> xsltproc -o >> manual.html ../DocBook\ Kit/Customized\ Temp lates/html.xsl file.xml >> warning: failed to load external entity >> "../docbook-xsl-current/html/docbook.xsl" >> compilation error: file ../DocBook Kit/Customized Templates/html.xsl >> line 5 element import >> xsl:import : unable to load ../docbook-xsl-current/html/docbook.xsl >> >> Working (MacOS X/Darwin 10.4): >> gilliam:~/Desktop/MoltenVisuals/Documents/Framework Manual >> glennmartin$ >> xsltproc -o manual.html ../DocBook\ Kit/Customized\ Templates/ >> html.xsl >> file.xml >> Stripping NS from DocBook 5/NG document. >> Processing stripped document. >> >> Here is line lines 1-7 of the complaining XSL file: >> >> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> >> >> >> >> > > Well, my _guess_ would be that the semantics of "../" in includes was > changed to be relative to the file doing the including, not the > current > directory of the process (or vice versa). Such a change would have to > be in the ChangeLog of libxslt or of its Ubuntu package (depending on > whether it's plain libxslt behaviour or ubuntu-local changes). > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt --Apple-Mail-1-1062405112 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 OK thats good to know... is = there anyway of determining which version of libxslt were using so i can = control this as it will be running on new AND old copies... like a = variable of some sort i can run a conditional against?

---
Glenn R. = Martin
C makes it easy to shoot yourself in = the foot; C++ makes it harder, but when you do, it blows away your whole = leg. -- Bjarne Stroustrup

=

On Jun 24, 2006, at 12:09 PM, Tim Van Holder = wrote:

Glenn R. Martin wrote:
=
Failure (Ubuntu = Dapper):=A0
grmartin@lain:~/Development/MV/Documents/Framework = Manual$=A0 xsltproc = -o
manual.html ../DocBook\ Kit/Customized\ Temp = lates/html.xsl file.xml
warning: = failed to load external entity
line 5 element = import
xsl:import : unable to load = ../docbook-xsl-current/html/docbook.xsl

Working = (MacOS X/Darwin 10.4):
xsltproc -o manual.html = ../DocBook\ Kit/Customized\ Templates/html.xsl
file.xml
Stripping NS = from DocBook 5/NG document.
Processing = stripped document.
Here is line lines 1-7 of the = complaining XSL file:
<?xml = version=3D'1.0'?>
<xsl:stylesheet=A0
=A0 =A0 xmlns:xsl=3D"http://www.w3.org/1999/XSL/T= ransform" version=3D"1.0">

<xsl:import = href=3D"../docbook-xsl-current/html/docbook.xsl"/>

Well, my _guess_ would be that = the semantics of "../" in includes was
changed = to be relative to the file doing the including, not the = current
directory of the process (or = vice versa).=A0 Such a = change would have to
be in the ChangeLog of = libxslt or of its Ubuntu package (depending on
whether it's plain libxslt behaviour or ubuntu-local = changes).
xslt mailing list, project page http://xmlsoft.org/XSLT/

= --Apple-Mail-1-1062405112-- From nathanbullock@gmail.com Sat Jun 24 16:48:13 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 38BA63B013E for ; Sat, 24 Jun 2006 16:48:13 -0400 (EDT) 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 02223-08 for ; Sat, 24 Jun 2006 16:48:12 -0400 (EDT) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by menubar.gnome.org (Postfix) with ESMTP id 257F63B0186 for ; Sat, 24 Jun 2006 16:48:12 -0400 (EDT) Received: by ug-out-1314.google.com with SMTP id o2so331522uge for ; Sat, 24 Jun 2006 13:45:55 -0700 (PDT) Received: by 10.66.220.17 with SMTP id s17mr3539975ugg; Sat, 24 Jun 2006 13:45:55 -0700 (PDT) Received: by 10.66.220.2 with HTTP; Sat, 24 Jun 2006 13:45:55 -0700 (PDT) Message-ID: <916b88c10606241345y27b8eef5nf43f205f68339c79@mail.gmail.com> Date: Sat, 24 Jun 2006 14:45:55 -0600 From: "nathan bullock" To: "The Gnome XSLT library mailing-list" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.543 tagged_above=-999 required=2 tests=[AWL=0.703, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077] X-Spam-Score: -1.543 X-Spam-Level: Subject: [xslt] Error handling and Python X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 20:48:13 -0000 In my python code I parse an xml document using: import libxml2 body = libxml2.parseDoc(text) Now at one point I don't want any errors logged to stderr so I do: libxml2.registerErrorHandler(None, "") body = libxml2.parseDoc(text) Now what I can't figure out is once I have done that how do I turn error logging back on? Something like: libxml2.resetErrorHandler() or: libxml2.registerErrorHandler(libxml2.defaultErrorHandler) Nathan From veillard@redhat.com Sat Jun 24 18:39:45 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 038E73B00DB for ; Sat, 24 Jun 2006 18:39:45 -0400 (EDT) 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 05553-03 for ; Sat, 24 Jun 2006 18:39:44 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id EDA0C3B00F0 for ; Sat, 24 Jun 2006 18:39:43 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5OMd2U6018541; Sat, 24 Jun 2006 18:39:02 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5OMd20n023738; Sat, 24 Jun 2006 18:39:02 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5OMd1Hr022849; Sat, 24 Jun 2006 18:39:01 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k5OMd1c9022847; Sat, 24 Jun 2006 18:39:01 -0400 Date: Sat, 24 Jun 2006 18:39:01 -0400 From: Daniel Veillard To: Tim Van Holder Message-ID: <20060624223901.GQ1330@redhat.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> <449D63C9.1030402@anubex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <449D63C9.1030402@anubex.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Cc: The Gnome XSLT library mailing-list Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 22:39:45 -0000 On Sat, Jun 24, 2006 at 06:09:45PM +0200, Tim Van Holder wrote: > Glenn R. Martin wrote: > > Failure (Ubuntu Dapper): > > grmartin@lain:~/Development/MV/Documents/Framework Manual$ xsltproc -o > > manual.html ../DocBook\ Kit/Customized\ Temp lates/html.xsl file.xml > > warning: failed to load external entity > > "../docbook-xsl-current/html/docbook.xsl" > > compilation error: file ../DocBook Kit/Customized Templates/html.xsl > > line 5 element import > > xsl:import : unable to load ../docbook-xsl-current/html/docbook.xsl > > > > Working (MacOS X/Darwin 10.4): > > gilliam:~/Desktop/MoltenVisuals/Documents/Framework Manual glennmartin$ > > xsltproc -o manual.html ../DocBook\ Kit/Customized\ Templates/html.xsl > > file.xml > > Stripping NS from DocBook 5/NG document. > > Processing stripped document. > > > > Here is line lines 1-7 of the complaining XSL file: > > > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> > > > > > > > > > > Well, my _guess_ would be that the semantics of "../" in includes was > changed to be relative to the file doing the including, not the current > directory of the process (or vice versa). Such a change would have to The semantic of xsl:include is defined in the XSLT spec, it's an URI reference pointing to RFC 2396. That mean you compute against a base URI. The base URI would come from the document relative file name you're passing on the command line and somehow maybe the conversion from that file path to an URI has changed between versions. Of course having spaces or / in filenames makes the conversion more hazardeous Seeing exactly what is happening would require a *complete* example not your shalel output, because sorry I can't use a debugger on your shell output. Now you can use a debugger on xsltproc to see what is happening there is you don't want to provide a reproduceable example as requested twice now. We take patches too usually... > be in the ChangeLog of libxslt or of its Ubuntu package (depending on > whether it's plain libxslt behaviour or ubuntu-local changes). Most likely a change done in libxml2 when the base is computed for the document. You won't find anything in libxslt, or in the package changelog at best in libxml2 internal ChangeLog. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From veillard@redhat.com Sat Jun 24 18:42:11 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5F0F53B0268 for ; Sat, 24 Jun 2006 18:42:11 -0400 (EDT) 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 05597-06 for ; Sat, 24 Jun 2006 18:42:10 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id 703883B0094 for ; Sat, 24 Jun 2006 18:42:10 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5OMefBA018868 for ; Sat, 24 Jun 2006 18:40:41 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5OMefS8024017 for ; Sat, 24 Jun 2006 18:40:41 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5OMefMq022932 for ; Sat, 24 Jun 2006 18:40:41 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k5OMefbR022930 for xslt@gnome.org; Sat, 24 Jun 2006 18:40:41 -0400 Date: Sat, 24 Jun 2006 18:40:41 -0400 From: Daniel Veillard To: The Gnome XSLT library mailing-list Message-ID: <20060624224041.GR1330@redhat.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> <449D63C9.1030402@anubex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2006 22:42:11 -0000 On Sat, Jun 24, 2006 at 12:58:16PM -0400, Glenn R. Martin wrote: > OK thats good to know... is there anyway of determining which version > of libxslt were using so i can control this as it will be running on > new AND old copies... like a variable of some sort i can run a > conditional against? at what level ? xsltproc --version for shell. Those informations are also available at the C level too of course. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From lifewarped@yahoo.com Sat Jun 24 20:10:58 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6D81B3B024B for ; Sat, 24 Jun 2006 20:10:58 -0400 (EDT) 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 08461-05 for ; Sat, 24 Jun 2006 20:10:56 -0400 (EDT) Received: from smtp108.plus.mail.re2.yahoo.com (smtp108.plus.mail.re2.yahoo.com [206.190.53.33]) by menubar.gnome.org (Postfix) with SMTP id A95E23B033B for ; Sat, 24 Jun 2006 20:10:55 -0400 (EDT) Received: (qmail 88968 invoked from network); 25 Jun 2006 00:10:48 -0000 Received: from unknown (HELO ?192.168.1.85?) (lifewarped@64.252.194.106 with plain) by smtp108.plus.mail.re2.yahoo.com with SMTP; 25 Jun 2006 00:10:47 -0000 Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: <20060624224041.GR1330@redhat.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> <449D63C9.1030402@anubex.com> <20060624224041.GR1330@redhat.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1--1059129803 Message-Id: <12CDC182-0DB5-48D5-9D1B-D6D57504A293@yahoo.com> From: "Glenn R. Martin" Date: Sat, 24 Jun 2006 20:10:45 -0400 To: veillard@redhat.com, The Gnome XSLT library mailing-list X-Mailer: Apple Mail (2.750) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.479 tagged_above=-999 required=2 tests=[AWL=-0.759, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, HTML_MESSAGE=0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -1.479 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 00:10:58 -0000 --Apple-Mail-1--1059129803 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed I was wondering--if version information, possibly an oddly named globalized variable--at the XSLT level--so i can use an xsl:if or xsl:choose... but im assuming not... thats fine too... i read your email after this one as well... ill play with pathing and figure it out... --- Glenn R. Martin lifewarped@yahoo.com http://www.xargos.com http://www.myspace.com/grmartin C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup On Jun 24, 2006, at 6:40 PM, Daniel Veillard wrote: > On Sat, Jun 24, 2006 at 12:58:16PM -0400, Glenn R. Martin wrote: >> OK thats good to know... is there anyway of determining which version >> of libxslt were using so i can control this as it will be running on >> new AND old copies... like a variable of some sort i can run a >> conditional against? > > at what level ? xsltproc --version for shell. Those informations are > also available at the C level too of course. > > Daniel > > -- > Daniel Veillard | Red Hat http://redhat.com/ > veillard@redhat.com | libxml GNOME XML XSLT toolkit http:// > xmlsoft.org/ > http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt --Apple-Mail-1--1059129803 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 I was wondering--if version = information, possibly an oddly named globalized variable--at the XSLT = level--so i can use an xsl:if or xsl:choose... but im assuming not... = thats fine too... i read your email after this one as well... ill play = with pathing and figure it out...

---
Glenn R. = Martin
C makes it easy to shoot yourself in = the foot; C++ makes it harder, but when you do, it blows away your whole = leg. -- Bjarne Stroustrup

=

On Jun 24, 2006, at 6:40 PM, Daniel Veillard = wrote:

On Sat, Jun 24, 2006 at = 12:58:16PM -0400, Glenn R. Martin wrote:
OK thats good to know... is = there anyway of determining which version =A0
of = libxslt were using so i can control this as it will be running on =A0
new AND = old copies... like a variable of some sort i can run a =A0

=A0 at what level ? xsltproc = --version for shell. Those informations are
also = available at the C level too of course.


--=A0
Daniel = Veillard=A0 =A0 =A0 | Red = Hat http://redhat.com/
veillard@redhat.com=A0 | libxml GNOME XML XSLT = toolkit=A0 = http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM = search engine http://rpmfind.net/
xslt mailing list, project page http://xmlsoft.org/XSLT/

= --Apple-Mail-1--1059129803-- From lifewarped@yahoo.com Sat Jun 24 21:02:54 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C82B73B05D0 for ; Sat, 24 Jun 2006 21:02:54 -0400 (EDT) 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 10867-03 for ; Sat, 24 Jun 2006 21:02:53 -0400 (EDT) Received: from smtp105.plus.mail.re2.yahoo.com (smtp105.plus.mail.re2.yahoo.com [206.190.53.30]) by menubar.gnome.org (Postfix) with SMTP id 5070B3B0108 for ; Sat, 24 Jun 2006 21:02:53 -0400 (EDT) Received: (qmail 62320 invoked from network); 25 Jun 2006 01:02:35 -0000 Received: from unknown (HELO ?192.168.1.85?) (lifewarped@64.252.194.106 with plain) by smtp105.plus.mail.re2.yahoo.com with SMTP; 25 Jun 2006 01:02:34 -0000 Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: <12CDC182-0DB5-48D5-9D1B-D6D57504A293@yahoo.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> <449D63C9.1030402@anubex.com> <20060624224041.GR1330@redhat.com> <12CDC182-0DB5-48D5-9D1B-D6D57504A293@yahoo.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1--1056022860 Message-Id: <2B3DA4E4-F6F2-4899-8D2E-B716AACFFC45@yahoo.com> From: "Glenn R. Martin" Date: Sat, 24 Jun 2006 21:02:32 -0400 To: The Gnome XSLT library mailing-list X-Mailer: Apple Mail (2.750) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.472 tagged_above=-999 required=2 tests=[AWL=-0.752, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, HTML_MESSAGE=0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -1.472 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 01:02:55 -0000 --Apple-Mail-1--1056022860 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Regardless i managed a fix using some bash scripting and path changing among the versions... thank you all for your help. --- Glenn R. Martin lifewarped@yahoo.com http://www.xargos.com http://www.myspace.com/grmartin C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup On Jun 24, 2006, at 8:10 PM, Glenn R. Martin wrote: > I was wondering--if version information, possibly an oddly named > globalized variable--at the XSLT level--so i can use an xsl:if or > xsl:choose... but im assuming not... thats fine too... i read your > email after this one as well... ill play with pathing and figure it > out... > > --- > Glenn R. Martin > lifewarped@yahoo.com > http://www.xargos.com > http://www.myspace.com/grmartin > > C makes it easy to shoot yourself in the foot; C++ makes it harder, > but when you do, it blows away your whole leg. -- Bjarne Stroustrup > > > On Jun 24, 2006, at 6:40 PM, Daniel Veillard wrote: > >> On Sat, Jun 24, 2006 at 12:58:16PM -0400, Glenn R. Martin wrote: >>> OK thats good to know... is there anyway of determining which >>> version >>> of libxslt were using so i can control this as it will be running on >>> new AND old copies... like a variable of some sort i can run a >>> conditional against? >> >> at what level ? xsltproc --version for shell. Those informations >> are >> also available at the C level too of course. >> >> Daniel >> >> -- >> Daniel Veillard | Red Hat http://redhat.com/ >> veillard@redhat.com | libxml GNOME XML XSLT toolkit http:// >> xmlsoft.org/ >> http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ >> _______________________________________________ >> xslt mailing list, project page http://xmlsoft.org/XSLT/ >> xslt@gnome.org >> http://mail.gnome.org/mailman/listinfo/xslt > > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt@gnome.org > http://mail.gnome.org/mailman/listinfo/xslt --Apple-Mail-1--1056022860 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Regardless=A0i managed a fix = using some bash scripting and path changing among the versions... thank = you all for your help.

---
Glenn R. = Martin
C makes it easy to shoot yourself in = the foot; C++ makes it harder, but when you do, it blows away your whole = leg. -- Bjarne Stroustrup

=

On Jun 24, 2006, at 8:10 PM, Glenn R. Martin = wrote:

I was wondering--if version information, possibly an oddly = named globalized variable--at the XSLT level--so i can use an xsl:if or = xsl:choose... but im assuming not... thats fine too... i read your email = after this one as well... ill play with pathing and figure it = out...

---
Glenn R. = Martin
C makes it easy to shoot yourself in = the foot; C++ makes it harder, but when you do, it blows away your whole = leg. -- Bjarne Stroustrup

=

On Jun 24, 2006, at 6:40 PM, Daniel Veillard = wrote:

On Sat, Jun 24, 2006 at = 12:58:16PM -0400, Glenn R. Martin wrote:
OK thats good to know... is = there anyway of determining which version =A0
of = libxslt were using so i can control this as it will be running on =A0
new AND = old copies... like a variable of some sort i can run a =A0

=A0 at what level ? xsltproc = --version for shell. Those informations are
also = available at the C level too of course.


--=A0
Daniel = Veillard=A0 =A0 =A0 | Red = Hat http://redhat.com/
veillard@redhat.com=A0 | libxml GNOME XML XSLT = toolkit=A0 http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM = search engine http://rpmfind.net/
xslt mailing list, project page http://xmlsoft.org/XSLT/

xslt mailing list, project page http://xmlsoft.org/XSLT/

= --Apple-Mail-1--1056022860-- From veillard@redhat.com Sun Jun 25 04:11:06 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E49543B02EA for ; Sun, 25 Jun 2006 04:11:05 -0400 (EDT) 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 23288-08 for ; Sun, 25 Jun 2006 04:11:04 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id A473E3B02BD for ; Sun, 25 Jun 2006 04:11:04 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5P7b1CF009471 for ; Sun, 25 Jun 2006 03:37:01 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5P7b1N2013769 for ; Sun, 25 Jun 2006 03:37:01 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5P7b0rJ013783 for ; Sun, 25 Jun 2006 03:37:00 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k5P7b07U013781 for xslt@gnome.org; Sun, 25 Jun 2006 03:37:00 -0400 Date: Sun, 25 Jun 2006 03:37:00 -0400 From: Daniel Veillard To: The Gnome XSLT library mailing-list Message-ID: <20060625073700.GT1330@redhat.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> <449D63C9.1030402@anubex.com> <20060624224041.GR1330@redhat.com> <12CDC182-0DB5-48D5-9D1B-D6D57504A293@yahoo.com> <2B3DA4E4-F6F2-4899-8D2E-B716AACFFC45@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2B3DA4E4-F6F2-4899-8D2E-B716AACFFC45@yahoo.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 08:11:06 -0000 On Sat, Jun 24, 2006 at 09:02:32PM -0400, Glenn R. Martin wrote: > Regardless i managed a fix using some bash scripting and path > changing among the versions... thank you all for your help. Was that related to the space in the filename ? Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From lifewarped@yahoo.com Sun Jun 25 08:28:12 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 37E453B008C for ; Sun, 25 Jun 2006 08:28:12 -0400 (EDT) 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 13197-10 for ; Sun, 25 Jun 2006 08:28:09 -0400 (EDT) Received: from smtp107.plus.mail.re2.yahoo.com (smtp107.plus.mail.re2.yahoo.com [206.190.53.32]) by menubar.gnome.org (Postfix) with SMTP id 08B893B0079 for ; Sun, 25 Jun 2006 08:27:34 -0400 (EDT) Received: (qmail 34291 invoked from network); 25 Jun 2006 12:26:42 -0000 Received: from unknown (HELO ?192.168.1.85?) (lifewarped@64.252.194.162 with plain) by smtp107.plus.mail.re2.yahoo.com with SMTP; 25 Jun 2006 12:26:41 -0000 Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: <20060625073700.GT1330@redhat.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> <449D63C9.1030402@anubex.com> <20060624224041.GR1330@redhat.com> <12CDC182-0DB5-48D5-9D1B-D6D57504A293@yahoo.com> <2B3DA4E4-F6F2-4899-8D2E-B716AACFFC45@yahoo.com> <20060625073700.GT1330@redhat.com> Content-Type: multipart/alternative; boundary=Apple-Mail-1--1014975719 Message-Id: <96C93E64-077C-47F9-9CEE-855B52CD4854@yahoo.com> From: "Glenn R. Martin" Date: Sun, 25 Jun 2006 08:26:39 -0400 To: veillard@redhat.com, The Gnome XSLT library mailing-list X-Mailer: Apple Mail (2.750) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.583 tagged_above=-999 required=2 tests=[AWL=-0.632, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_WHOIS=1.447, HTML_MESSAGE=0.001] X-Spam-Score: -1.583 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 12:28:12 -0000 --Apple-Mail-1--1014975719 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Not at all i was able to overcome the space with URL Encoding (% 20)... It was exactly as suggested... Pre (libxml) 20620 i used the path from the calling file. Post 20620 it used the PWD path... i created 2 include files and used a bash script to switch depending on version... --- Glenn R. Martin lifewarped@yahoo.com http://www.xargos.com http://www.myspace.com/grmartin C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup --Apple-Mail-1--1014975719 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=US-ASCII Not at all i was able to = overcome the space with URL Encoding (%20)... It was exactly as = suggested... Pre (libxml) 20620 i used the path from the calling file. = Post 20620 it used the PWD path... i created 2 include files and used a = bash script to switch depending on version...

---
Glenn R. = Martin
C makes it easy to shoot yourself in = the foot; C++ makes it harder, but when you do, it blows away your whole = leg. -- Bjarne Stroustrup


= --Apple-Mail-1--1014975719-- From veillard@redhat.com Sun Jun 25 17:47:15 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 947B93B01C9 for ; Sun, 25 Jun 2006 17:47:15 -0400 (EDT) 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 03849-07 for ; Sun, 25 Jun 2006 17:47:14 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by menubar.gnome.org (Postfix) with ESMTP id BAB803B00E9 for ; Sun, 25 Jun 2006 17:47:14 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5PLlE9Z012377 for ; Sun, 25 Jun 2006 17:47:14 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5PLlERg022882 for ; Sun, 25 Jun 2006 17:47:14 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k5PLlEgh016230 for ; Sun, 25 Jun 2006 17:47:14 -0400 Received: (from veillard@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k5PLlDR1016228 for xslt@gnome.org; Sun, 25 Jun 2006 17:47:13 -0400 Date: Sun, 25 Jun 2006 17:47:13 -0400 From: Daniel Veillard To: The Gnome XSLT library mailing-list Message-ID: <20060625214713.GW1330@redhat.com> References: <550A4A03-DDE6-421E-9DA0-A6B98D9394A2@yahoo.com> <20060624131821.GO1330@redhat.com> <83F2E6C4-2425-431B-BE6A-67DA0628B57D@yahoo.com> <449D63C9.1030402@anubex.com> <20060624224041.GR1330@redhat.com> <12CDC182-0DB5-48D5-9D1B-D6D57504A293@yahoo.com> <2B3DA4E4-F6F2-4899-8D2E-B716AACFFC45@yahoo.com> <20060625073700.GT1330@redhat.com> <96C93E64-077C-47F9-9CEE-855B52CD4854@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96C93E64-077C-47F9-9CEE-855B52CD4854@yahoo.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.367 tagged_above=-999 required=2 tests=[AWL=0.003, BAYES_00=-2.599, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TW_BX=0.077, TW_IB=0.077, TW_PM=0.077] X-Spam-Score: -2.367 X-Spam-Level: Subject: Re: [xslt] Version Differences X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: veillard@redhat.com, The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jun 2006 21:47:15 -0000 On Sun, Jun 25, 2006 at 08:26:39AM -0400, Glenn R. Martin wrote: > Not at all i was able to overcome the space with URL Encoding (% > 20)... It was exactly as suggested... Pre (libxml) 20620 i used the > path from the calling file. Post 20620 it used the PWD path... i > created 2 include files and used a bash script to switch depending on > version... Hum, then that change is annoying. Seems to mean we lost the base initialization :-\ Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ From k.buchcik@4commerce.de Wed Jun 28 12:41:34 2006 Return-Path: X-Original-To: xslt@gnome.org Delivered-To: xslt@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id ECEAA3B0061 for ; Wed, 28 Jun 2006 12:41:33 -0400 (EDT) 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 21407-02 for ; Wed, 28 Jun 2006 12:41:32 -0400 (EDT) Received: from mail.firmenpost.de (europa.4commerce.de [213.239.204.146]) by menubar.gnome.org (Postfix) with ESMTP id DDE563B0357 for ; Wed, 28 Jun 2006 12:41:31 -0400 (EDT) Received: from localhost ([127.0.0.1]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Fvd5m-0007Mg-Nh for xslt@gnome.org; Wed, 28 Jun 2006 18:40:42 +0200 Received: from pegasus.omega.4commerce.de ([10.1.2.11]) by mail.firmenpost.de with esmtp (Exim 4.50) id 1Fvd5l-0007Ma-LT for xslt@gnome.org; Wed, 28 Jun 2006 18:40:42 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 28 Jun 2006 18:40:48 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: The nature of xsltApplyOneTemplate() needs to be modified thread-index: Acaa0ZCRzOEE1oYIRGq2UHwAb9mjxw== From: "Buchcik, Kasimier" To: X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at firmenpost.de X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: k.buchcik@4commerce.de X-SA-Exim-Scanned: No (on mail.firmenpost.de); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.388 tagged_above=-999 required=2 tests=[AWL=-0.001, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_IB=0.077] X-Spam-Score: -2.388 X-Spam-Level: Subject: [xslt] The nature of xsltApplyOneTemplate() needs to be modified X-BeenThere: xslt@gnome.org X-Mailman-Version: 2.1.8 Precedence: list Reply-To: The Gnome XSLT library mailing-list List-Id: The Gnome XSLT library mailing-list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2006 16:41:34 -0000 Hi, I noticed a problem with the semantics of xsltApplyOneTemplate() and it's actual usage in Libxslt/Libexslt. This function is currently used to handle 3 alternative scenarios, but fails to do so, since it it is designed for only 1 scenario. I'll try to explain the issue and will present a potential solution. xsltApplyOneTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr list, xsltTemplatePtr templ, xsltStackElemPtr params); 1) The usage in exsltFuncFunctionFunction() (libexslt/function.c): Here the number of xsl:param instructions, which are set by the invoking function call are processed with xsltParseStylesheetCallerParam() and handed over to xsltApplyOneTemplate() via @params; remaining xsl:param(s) in @list are expected to be processed by xsltApplyOneTemplate(). Example: the following function is called with "my:func('zoo')". =20 is processed by = exsltFuncFunctionFunction(), and the remaining is expected to be = processed by xsltApplyOneTemplate(). @templ is not given, since there's no xsl:template. Side note: Using xsltParseStylesheetCallerParam(), which is intended for xsl:with-param, to process xsl:param is actually a hack, since there's no appropriate function to process xsl:param(s) in Libxslt for this scenario. =20 2) The usage in Libxslt: a) It is called to process a template (or sequence constructor in XSLT 2.0). This means *no* xsl:param instructions are expected in @list, and @params and @templ are both NULL. b) It is called to process an xsl:template. This means xsl:param(s) *are* expected in @list, and caller-params (xsl:with-param) are handed over via @params; @templ is the compiled xsl:template struct. The clashes are easier to spot in the following table: @params @list @templ 1) reflects xsl:param(s) can contain more xsl:param(s) always NULL 2a) refl. xsl:with-param(s) can contain xsl:param(s) refl. xsl:template 2b) always NULL must not contain xsl:param(s) always NULL Proposed solution: =20 1) Change xsltApplyOneTemplate(): - *reject* xsl:param(s) in @list (raise an error if one is found) - @params are any xsl:param(s) already processed by the caller - @templ is *not* used (ATTRIBUTE_UNUSED) - do *not* initiate a new variable scope (it did so previously when @templ was given) So, if @params is NULL, xsltApplyOneTemplate() will actually become a function for processing of a normal template (in constrast to xsl:template); e.g. for the content of an xsl:for-each instruction. If @params is given, then those are pushed on the variable stack; This, for example, reflects the content model of an exslt:function, which is (xsl:param*, template) - *without* the possibility to override xsl:param(s) with xsl:with-param. Note that due to this change 4 calling functions (see below) need to be adjusted in Libxslt; all other calls are already OK for the modified nature of xsltApplyOneTemplate(). =20 2) Add xsltApplyXSLTTemplate() for processing of xsl:template. This function will expect: - @templ - optional @withParams, reflecting xsl:with-param instructions; those will override xsl:param(s) in @list - xsl:param(s) in @list still to be processed This function will then be used if a xsl:template needs to be processed - namely in: - xsltApplyImports() - xsltCallTemplate() - xsltDefaultProcessOneNode() - xsltProcessOneNode() 3) Change exsltFuncFunctionFunction() in Libexslt to process *all* xsl:param(s) and to hand over *all* processed xsl:param(s) to xsltApplyOneTemplate(). This is a fix, since the current way of calling xsltApplyOneTemplate() was simply incorrect. =20 I think this is the most trouble-free solution for users, as the changes will only have impact on scenarios where an xsl:template needs to be processed; normally xsl:template should only be processed internally by Libxslt - not in user-code. Immediate comments are appreciated. I already refactored the code in the proposed way on my side and would like to commit as soon as possible if accepted. Regards, Kasimier