From xalan-j-usersjosephsmith@example.net Tue Mar 01 16:03:05 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 12886 invoked from network); 1 Mar 2005 16:03:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Mar 2005 16:03:05 -0000 Received: (qmail 90096 invoked by uid 500); 1 Mar 2005 16:03:03 -0000 Delivered-To: josephsmith@example.net Received: (qmail 90066 invoked by uid 500); 1 Mar 2005 16:03:03 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 90044 invoked by uid 99); 1 Mar 2005 16:03:02 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from e3.ny.us.ibm.com (HELO e3.ny.us.ibm.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Mar 2005 08:03:01 -0800 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [83.161.120.155]) by e3.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j21G2rem023415 for <josephsmith@example.net>; Tue, 1 Mar 2005 11:02:53 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [83.161.120.155]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j21G2rk0059492 for <josephsmith@example.net>; Tue, 1 Mar 2005 11:02:53 -0500 Received: from d01av01.pok.ibm.com (loopback [83.161.120.155]) by d01av01.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j21G2qh6004144 for <josephsmith@example.net>; Tue, 1 Mar 2005 11:02:53 -0500 Received: from d25ml04.torolab.ibm.com (d25ml04.torolab.ibm.com [83.161.120.155]) by d01av01.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j21G2qcN004107; Tue, 1 Mar 2005 11:02:52 -0500 In-Reply-To: <josephsmith@example.net> Subject: Re: SQL Extension Default Connection Pool - Correct Usag To: Eric Everman <josephsmith@example.net> Cc: josephsmith@example.net X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: <josephsmith@example.net> From: Morris Kwan <josephsmith@example.net> Date: Tue, 1 Mar 2005 11:02:52 -0500 X-MIMETrack: Serialize by Router on D25ML04/25/M/IBM(Release 6.53HF247 | January 6, 2005) at 03/01/2005 11:02:53 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am not an expert in SQL extension. I will try to answer a few questions to the best of my knowledge. [[ If I use the default connection pool in one XSLT page, is that same pool used in all XSLT pages that specify the same connection information? ]] Yes. [[Does the pool only exist for the duration of a single transformation?]] A pool is alive across multiple transformations. >> Must I explicitly close the connection? I guess it is not explicitly closed. You need to call sql:setFeature($connection, 'default-pool-enabled', 'false') to close the connection. Regards, Morris Kwan XSLT Development IBM Toronto Lab Tel: 618-685-1112 Email: josephsmith@example.net Eric Everman <everman@precedad esign.com> To josephsmith@example.net 02/28/2005 12:39 cc PM Subject SQL Extension Default Connection Pool - Correct Usag Hi- I'm wondering what the usage and 'scope' of the default connection pool is. If I use the default connection pool in one XSLT page, is that same pool used in all XSLT pages that specify the same connection information? Does the pool only exist for the duration of a single transformation? Must I explicitly close the connection? Will the pool handle a db restart? This is the XSLT chunk I use in my pages. It works, but am I taking advantage of the pool, especially if this code is used in multiple pages? ================================================================ <xsl:template name="a-template"> <xsl:param name="driver">oracle.jdbc.OracleDriver</xsl:param> <xsl:param name="datasource">jdbc:oracle:thin:name/pwd@server:1521:db</xsl:param> <xsl:param name="queryString">SELECT * FROM MY_TABLE</xsl:param> <xsl:variable name="connection" select="sql:new()"/> <xsl:value-of select="sql:setFeature($connection, 'default-pool-enabled', 'true')"/> <!-- Connection Pool --> <xsl:if test="not(sql:connect($connection, $driver, $datasource))"> <xsl:message>Error Connecting to the Database</xsl:message> <xsl:copy-of select="sql:getError($connection)/ext-error"/> </xsl:if> <xsl:variable name="table" select='sql:query($connection, $queryString)'/> <xsl:apply-templates select="$table/sql/row-set" mode="series-list"/> </xsl:template> ================================================================ I've looked thru the docs and samples but have found not any explicit help on this. Thanks in advance, Eric Everman From xalan-j-usersjosephsmith@example.net Tue Mar 01 16:46:04 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 40002 invoked from network); 1 Mar 2005 16:46:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Mar 2005 16:46:04 -0000 Received: (qmail 10257 invoked by uid 500); 1 Mar 2005 16:46:02 -0000 Delivered-To: josephsmith@example.net Received: (qmail 10243 invoked by uid 500); 1 Mar 2005 16:46:02 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 10230 invoked by uid 99); 1 Mar 2005 16:46:02 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from pyramid-02.kattare.com (HELO pyramid-02.kattare.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Mar 2005 08:46:01 -0800 Received: from [83.161.120.155] (mp3030-150.wr.usgs.gov [83.161.120.155]) (authenticated bits=0) by pyramid-02.kattare.com (8.12.10/8.12.11) with ESMTP id j21GjwO0011172 for <josephsmith@example.net>; Tue, 1 Mar 2005 08:45:58 -0800 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <josephsmith@example.net> References: <josephsmith@example.net> <josephsmith@example.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <josephsmith@example.net> Content-Transfer-Encoding: 7bit From: Eric Everman <josephsmith@example.net> Subject: Re: SQL Extension Default Connection Pool - Correct Usag Date: Tue, 1 Mar 2005 10:45:53 -0600 To: josephsmith@example.net X-Mailer: Apple Mail (2.619.2) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks for the very detailed reply! Your advice to use an external connection is probably a good idea, however, what holds me back is the dependancy this creates on a one-off wrapper class that needs to be distributed with the style sheet. Has there been any discussion of allowing the sql:connect method to search for a JNDI datasource? eg.: <xsl:if test="not(sql:connect($db, 'extpool'))" > <!-- attempts to find JNDI datasource named 'extpool' --> .... </xsl:if> Thanks again, Eric Everman On Feb 28, 2005, at 10:52 PM, John Gentilin wrote: > Eric, > > The default connection pool was developed to provide code symmetry in > the SQL Extension. > > The default connection pool is assigned a name that consist of a > concatenation of the Driver, URL, User name and password. > So if two different stylesheets are running inside the same JVM and > use the same connection parameters they will benefit from > using the same connection pool. > > Although the default connection pools exists, IMHO I think you would > be better served to follow the external connection > pool example and establish the connection pool outside the scope of > running transformations. it gives you much more control > over the how the connection pool operates. It also allows you to > remove the connection information from the Stylesheet, > which could be a security issue not to mention a potential maintenance > headache, to a centralized location. I.e. Have your > main class read the connection information from a config file, > establish and register the pool. Then from each stylesheet reference > the pool by name. > > As for recovery from a DB restart, if a query generates an error the > extension code will release the connection to the pool > indicating that an error occurred. The default connection pool will > remove that connection from the pool and return it, i.e. > close the connection and remove all references to its instance. The > next time a pool is retrieved from the pool, if there are > no currently free connections, a new connection will be retrieved. > > So to answer your question. Yes it will recover, but after a DB reset, > all the current connections in the pool will cause > one query to fail. Once all the connections have been cycled through, > then the queries will start to work. This assumes > that the JDBC driver that you are using will not just recover on its > own in the case where the connection to the DB > was severed. > > Regards > John G > > Eric Everman wrote: > >> Hi- >> >> I'm wondering what the usage and 'scope' of the default connection >> pool is. If I use the default connection pool in one XSLT page, is >> that same pool used in all XSLT pages that specify the same >> connection information? Does the pool only exist for the duration of >> a single transformation? Must I explicitly close the connection? >> Will the pool handle a db restart? >> >> This is the XSLT chunk I use in my pages. It works, but am I taking >> advantage of the pool, especially if this code is used in multiple >> pages? >> >> ================================================================ >> <xsl:template name="a-template"> >> <xsl:param name="driver">oracle.jdbc.OracleDriver</xsl:param> >> <xsl:param >> name="datasource">jdbc:oracle:thin:name/pwd@server:1521:db</xsl: >> param> >> <xsl:param name="queryString">SELECT * FROM MY_TABLE</xsl:param> >> <xsl:variable name="connection" select="sql:new()"/> >> <xsl:value-of select="sql:setFeature($connection, >> 'default-pool-enabled', 'true')"/> <!-- Connection Pool --> >> <xsl:if test="not(sql:connect($connection, $driver, >> $datasource))"> >> <xsl:message>Error Connecting to the Database</xsl:message> >> <xsl:copy-of select="sql:getError($connection)/ext-error"/> >> </xsl:if> >> <xsl:variable name="table" select='sql:query($connection, >> $queryString)'/> >> <xsl:apply-templates select="$table/sql/row-set" >> mode="series-list"/> >> </xsl:template> >> ================================================================ >> >> >> I've looked thru the docs and samples but have found not any explicit >> help on this. >> >> Thanks in advance, >> Eric Everman > > From xalan-j-usersjosephsmith@example.net Tue Mar 01 17:59:49 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 76165 invoked from network); 1 Mar 2005 17:59:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Mar 2005 17:59:49 -0000 Received: (qmail 99937 invoked by uid 500); 1 Mar 2005 17:59:44 -0000 Delivered-To: josephsmith@example.net Received: (qmail 99861 invoked by uid 500); 1 Mar 2005 17:59:43 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 99823 invoked by uid 99); 1 Mar 2005 17:59:43 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from e2.ny.us.ibm.com (HELO e2.ny.us.ibm.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Mar 2005 09:59:42 -0800 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [83.161.120.155]) by e2.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j21Hxa4J006270; Tue, 1 Mar 2005 12:59:36 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [83.161.120.155]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j21HxaT6225432; Tue, 1 Mar 2005 12:59:36 -0500 Received: from d01av01.pok.ibm.com (loopback [83.161.120.155]) by d01av01.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j21HxaML030682; Tue, 1 Mar 2005 12:59:36 -0500 Received: from d25ml02.torolab.ibm.com (d25ml02.torolab.ibm.com [83.161.120.155]) by d01av01.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j21HxZPW030667; Tue, 1 Mar 2005 12:59:35 -0500 Subject: Generic XPath functionality To: josephsmith@example.net, josephsmith@example.net, josephsmith@example.net Cc: josephsmith@example.net X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: <josephsmith@example.net> From: Brian Minchau <josephsmith@example.net> Date: Tue, 1 Mar 2005 12:59:27 -0500 X-MIMETrack: Serialize by Router on D25ML02/25/M/IBM(Release 6.53HF247 | January 6, 2005) at 03/01/2005 12:59:35 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Rick, to answer your question. Apache Xalan will ultimately take ownership of generic XPath functionality. - Brian - - - - - - - - - - - - - - - - - - - - Brian Minchau Apache Xalan PMC e-mail: josephsmith@example.net ===================================================================================== Brian: A general question: Which project will ultimately take ownership of generic XPath functionality? Rick Bullotta CTO Lighthammer Software (http://www.lighthammer.com) From xalan-j-usersjosephsmith@example.net Tue Mar 01 21:40:31 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 38350 invoked from network); 1 Mar 2005 21:40:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Mar 2005 21:40:31 -0000 Received: (qmail 88144 invoked by uid 500); 1 Mar 2005 21:40:30 -0000 Delivered-To: josephsmith@example.net Received: (qmail 88126 invoked by uid 500); 1 Mar 2005 21:40:29 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 88113 invoked by uid 99); 1 Mar 2005 21:40:29 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from pyramid-01.kattare.com (HELO pyramid-01.kattare.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Mar 2005 13:40:27 -0800 Received: from [83.161.120.155] (mp3030-150.wr.usgs.gov [83.161.120.155]) (authenticated bits=0) by pyramid-01.kattare.com (8.12.11/8.12.11) with ESMTP id j21LeOip011099 for <josephsmith@example.net>; Tue, 1 Mar 2005 13:40:25 -0800 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <josephsmith@example.net> References: <josephsmith@example.net> <josephsmith@example.net> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <josephsmith@example.net> Content-Transfer-Encoding: 7bit From: Eric Everman <josephsmith@example.net> Subject: Re: SQL Extension Default Connection Pool - Correct Usag Date: Tue, 1 Mar 2005 15:40:20 -0600 To: josephsmith@example.net X-Mailer: Apple Mail (2.619.2) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks again- I'd better go back and add sql:close to my sheets. Based on the bug you describe, should only the parent XSLT sheet call sql:close()? For example, if a parent sheet includes several child sheets and they all specify the same connection information (I typically do this for querying master-detail information), would calling sql:close() in a child sheet close *all* the similar connections, even if they are still in use? Also, could you comment on allowing XConnection to auto-wrap a JNDI datasource? Would people be receptive to this as a contribution? I've not yet looked at the code, so I'm not sure how complex this would be... Thanks, --ee On Mar 1, 2005, at 2:56 PM, John Gentilin wrote: > Morris Kwan wrote: > >>>> Must I explicitly close the connection? >>>> >> I guess it is not explicitly closed. You need to call >> sql:setFeature($connection, 'default-pool-enabled', 'false') to close >> the >> connection. >> >> >> > Oops, I missed that one. The SQL extension does not close connections > automatically. You MUST > call sql:close() at the end of the Stylesheet. Disabling the default > connection pool will only release > connections that are currently not in use. > > Just a little FYI... > The XConnection class does not represent a single DB connection. It is > really a query factory where > each query is associated to a DB connection. XConnection is a legacy > class name that was kept around. > > The sql:close() function will close all connections (i.e. queries) > that were created with an XConnection. > > The mechanism to close a specific query is currently broken, I need to > write up a detailed JIRA bug > > -JG > From xalan-j-usersjosephsmith@example.net Wed Mar 02 01:22:53 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 27437 invoked from network); 2 Mar 2005 01:22:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Mar 2005 01:22:53 -0000 Received: (qmail 17543 invoked by uid 500); 2 Mar 2005 01:22:49 -0000 Delivered-To: josephsmith@example.net Received: (qmail 17443 invoked by uid 500); 2 Mar 2005 01:22:48 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 17417 invoked by uid 99); 2 Mar 2005 01:22:48 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from e4.ny.us.ibm.com (HELO e4.ny.us.ibm.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Mar 2005 17:22:46 -0800 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [83.161.120.155]) by e4.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j221Mi2i004403; Tue, 1 Mar 2005 20:22:44 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [83.161.120.155]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j221Mik0061980; Tue, 1 Mar 2005 20:22:44 -0500 Received: from d01av04.pok.ibm.com (loopback [83.161.120.155]) by d01av04.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j221MieF020293; Tue, 1 Mar 2005 20:22:44 -0500 Received: from d25ml02.torolab.ibm.com (d25ml02.torolab.ibm.com [83.161.120.155]) by d01av04.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j221MhnK020289; Tue, 1 Mar 2005 20:22:43 -0500 Subject: XalanJ2 committers Resolving/Closing reporter's JIRA issues To: josephsmith@example.net Cc: josephsmith@example.net X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: <josephsmith@example.net> From: Brian Minchau <josephsmith@example.net> Date: Tue, 1 Mar 2005 20:18:20 -0500 X-MIMETrack: Serialize by Router on D25ML02/25/M/IBM(Release 6.53HF247 | January 6, 2005) at 03/01/2005 20:22:43 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This note is about when XalanJ2 committers might resolve and close JIRA issues that are getting old and stale. Read on if you are interested in the details. - Brian - - - - - - - - - - - - - - - - - - - - Brian Minchau Apache Xalan PMC Member e-mail: josephsmith@example.net ================================================================== At todays meeting for active XalanJ2 committers the issue came up on when to move a JIRA issue to "Resolved" status, and when to move an issue in "Resolved" status to "Closed" status. There is a Status field for JIRA issues with these choices: - Open - In Progress - Resolved - Reopened - Closed For JIRA issues moved to "Resolved" status there is an associated JIRA Resolution field with these choices: - Fixed - Won't Fix - Duplicate - Incomplete - Cannot Reproduce (see http://www.atlassian.com/software/jira/docs/latest/issues.html#StatusTypes for more detailed descriptions). There are a number of JIRA issues at http://issues.apache.org/jira/secure/Dashboard.jspa that are open against the XalanJ2 project, but with insufficient information to investigate or fix the issue. For example a testcase may have been requested, but never given. The XalanJ2 committers agreed that if there is no response to requests for more information, that we may resolve the issue after a month of non-response. In this situation the resolution would most likely be "Incomplete" or "Cannot Reproduce". A resolved issue should be closed by the reporter when the reporter agrees that the resolution is correct. Our decision was that a JIRA issue may be closed by a XalanJ2 committer if it was resolved before a new release was published, and after a new release became available a request to the reporter to close the issue down, that is to verify the resolultion, had no response from the reporter. I'm not a lawyer, I think you get the drift of what I am trying to say. There are a number of old JIRA issues and the Xalan Java team would like to clean some of the old dormant issues off the books. I would guess that a number of the reporters don't respond because they have moved on to other things. I'm sorry if some of them are dormant because of a lack of activity from the Xalan Java team, but we are volunteers, and other things can keep us from working full-time on these issues. We welcome new Xalan contributors, who will turn into committers, who will help us fix these bugs! Get in contact through josephsmith@example.net - Brian Minchau From xalan-j-usersjosephsmith@example.net Fri Mar 04 21:57:23 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 93012 invoked from network); 4 Mar 2005 21:57:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 4 Mar 2005 21:57:23 -0000 Received: (qmail 58582 invoked by uid 500); 4 Mar 2005 21:57:22 -0000 Delivered-To: josephsmith@example.net Received: (qmail 58448 invoked by uid 500); 4 Mar 2005 21:57:21 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 58431 invoked by uid 99); 4 Mar 2005 21:57:21 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from h-67-103-46-196.snfccasy.covad.net (HELO webdns.eyecatching.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 04 Mar 2005 13:57:20 -0800 Received: from [83.161.120.155] (h-67-103-46-195.snfccasy.covad.net [83.161.120.155]) by webdns.eyecatching.com (8.12.11/8.12.8) with ESMTP id j24NCs7e025094; Fri, 4 Mar 2005 15:13:00 -0800 Message-ID: <josephsmith@example.net> Date: Fri, 04 Mar 2005 13:56:35 -0800 From: John Gentilin <josephsmith@example.net> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Everman <josephsmith@example.net> CC: josephsmith@example.net Subject: Re: SQL Extension Default Connection Pool - Correct Usag References: <josephsmith@example.net> <josephsmith@example.net> <josephsmith@example.net> In-Reply-To: <josephsmith@example.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N sql:close only closes connections that were created from query/pquery that were created against a specific XConnection. So say you have 1 stylesheet that creates an XConnection as stores it in a global variable and all the included stylesheets access that variable, then yes you only need one sql:close() at the end of the main stylesheet. Now if you have one stylesheet that imports/includes other stylesheets and each of those stylesheets create their own XConnection, even though the connection information is the same, each stylesheet will be responsible for calling sql:close(). Also you need to be careful that you call sql:close before any <xsl:message terminate="yes" /> statements. Xalan does not have a mechanism where it informs Documents when they are being discarded, if so we could put in some code to auto close any open connections. -JG Eric Everman wrote: > Thanks again- I'd better go back and add sql:close to my sheets. > Based on the bug you describe, should only the parent XSLT sheet call > sql:close()? For example, if a parent sheet includes several child > sheets and they all specify the same connection information (I > typically do this for querying master-detail information), would > calling sql:close() in a child sheet close *all* the similar > connections, even if they are still in use? > > Also, could you comment on allowing XConnection to auto-wrap a JNDI > datasource? Would people be receptive to this as a contribution? > I've not yet looked at the code, so I'm not sure how complex this > would be... > > Thanks, > --ee > > > On Mar 1, 2005, at 2:56 PM, John Gentilin wrote: > >> Morris Kwan wrote: >> >>>>> Must I explicitly close the connection? >>>>> >>> I guess it is not explicitly closed. You need to call >>> sql:setFeature($connection, 'default-pool-enabled', 'false') to >>> close the >>> connection. >>> >>> >>> >> Oops, I missed that one. The SQL extension does not close connections >> automatically. You MUST >> call sql:close() at the end of the Stylesheet. Disabling the default >> connection pool will only release >> connections that are currently not in use. >> >> Just a little FYI... >> The XConnection class does not represent a single DB connection. It >> is really a query factory where >> each query is associated to a DB connection. XConnection is a legacy >> class name that was kept around. >> >> The sql:close() function will close all connections (i.e. queries) >> that were created with an XConnection. >> >> The mechanism to close a specific query is currently broken, I need >> to write up a detailed JIRA bug >> >> -JG >> -- -------------------------------------- John Gentilin Eye Catching Solutions Inc. 18314 Carlwyn Drive Castro Valley CA 94546 Contact Info josephsmith@example.net Ca Office 618-685-1112 NJ Office 618-685-1112 From xalan-j-usersjosephsmith@example.net Sat Mar 05 07:14:06 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 65974 invoked from network); 5 Mar 2005 07:14:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 5 Mar 2005 07:14:05 -0000 Received: (qmail 18034 invoked by uid 500); 5 Mar 2005 07:14:04 -0000 Delivered-To: josephsmith@example.net Received: (qmail 18007 invoked by uid 500); 5 Mar 2005 07:14:04 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 17991 invoked by uid 99); 5 Mar 2005 07:14:03 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of josephsmith@example.net designates 83.161.120.155 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 04 Mar 2005 23:14:02 -0800 Received: by wproxy.gmail.com with SMTP id 68so1945688wri for <josephsmith@example.net>; Fri, 04 Mar 2005 23:14:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=L0QK+BQvMhL3ZVJlSAARjH+hbrTJe6cAhXLY6rDBT1pspDbMDq512Wb9uGeisNXXclstzqbN6Lm4wh7pRcYfJO/myEY8HQjEP76RH9TRfsl3FOjo3PtYyz88q9YJ3psoNtuCOgnnuhfnHeQgzOhgn6dhWRwOvzNoUSvahvR+suU= Received: by 83.161.120.155 with SMTP id 64mr185031wrg; Fri, 04 Mar 2005 23:14:00 -0800 (PST) Received: by 83.161.120.155 with HTTP; Fri, 4 Mar 2005 23:14:00 -0800 (PST) Message-ID: <josephsmith@example.net> Date: Sat, 5 Mar 2005 12:44:00 +0530 From: IndianAtTech <josephsmith@example.net> Reply-To: IndianAtTech <josephsmith@example.net> To: vivek agarwal <josephsmith@example.net> Subject: DomSource Vs SaxSource Vs StreamSource Cc: josephsmith@example.net In-Reply-To: <josephsmith@example.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <josephsmith@example.net> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi All, I would like to know the difference between SaxSource,DomSource and StreamSource. And also at what Scenarios developer should use above instances. What are the advantages/disadvantages of one Source Object over other two source objects. Thanks Inidan From xalan-j-usersjosephsmith@example.net Sat Mar 05 08:06:08 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 76247 invoked from network); 5 Mar 2005 08:06:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 5 Mar 2005 08:06:08 -0000 Received: (qmail 47953 invoked by uid 500); 5 Mar 2005 08:06:00 -0000 Delivered-To: josephsmith@example.net Received: (qmail 47912 invoked by uid 500); 5 Mar 2005 08:06:00 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 47887 invoked by uid 99); 5 Mar 2005 08:05:59 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of josephsmith@example.net designates 83.161.120.155 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 05 Mar 2005 00:05:59 -0800 Received: by wproxy.gmail.com with SMTP id 68so1952922wri for <josephsmith@example.net>; Sat, 05 Mar 2005 00:05:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=Z0ra8U/IuEiPVNSYT8EPcuB0kBYSsR8+YAi/cMElNKJUBFmecIv/P3jgFfgIEuNwgRkDw94kunB0NQRgfO/mcylKhjkIIhMA4QUNCnnL4vQsXiPBT5A60z3nlS+vqCasTc0QDUvPx9R5HsWe0BYWHEmaefJJ5UfW1IKROT44v9Y= Received: by 83.161.120.155 with SMTP id r10mr97930wra; Sat, 05 Mar 2005 00:05:54 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sat, 5 Mar 2005 00:05:54 -0800 (PST) Message-ID: <josephsmith@example.net> Date: Sat, 5 Mar 2005 13:35:54 +0530 From: IndianAtTech <josephsmith@example.net> Reply-To: IndianAtTech <josephsmith@example.net> To: vivek agarwal <josephsmith@example.net> Subject: DomSource Vs SaxSource Vs StreamSource Cc: josephsmith@example.net In-Reply-To: <josephsmith@example.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <josephsmith@example.net> <josephsmith@example.net> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi All, I would like to know the difference between SaxSource,DomSource and StreamSource. And also at what Scenarios developer should use above instances. What are the advantages/disadvantages of one Source Object over other two source objects. Thanks Inidan From xalan-j-usersjosephsmith@example.net Sun Mar 06 14:26:50 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 43136 invoked from network); 6 Mar 2005 14:26:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Mar 2005 14:26:50 -0000 Received: (qmail 98087 invoked by uid 500); 6 Mar 2005 14:26:48 -0000 Delivered-To: josephsmith@example.net Received: (qmail 98061 invoked by uid 500); 6 Mar 2005 14:26:48 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 98048 invoked by uid 99); 6 Mar 2005 14:26:48 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of josephsmith@example.net designates 83.161.120.155 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 06 Mar 2005 06:26:47 -0800 Received: by wproxy.gmail.com with SMTP id 68so2289702wri for <josephsmith@example.net>; Sun, 06 Mar 2005 06:26:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=KrQ2DnTtaVm1am05UFaH1cmB7NZKqBm8EOZFWsDgihGYd3YMkYeiyKtURgfezku0YFMcfu7ooOyvuJTWioXdrzXITtXfzEVnkbzhuKEPHqTS1Sdhk8yWT5iJ/UUzc346Vn5cMC42E95RTBwMMQfZpPHn1ajCevBrnp3raBBYxFE= Received: by 83.161.120.155 with SMTP id 67mr104816wrv; Sun, 06 Mar 2005 06:26:43 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Mar 2005 06:26:43 -0800 (PST) Message-ID: <josephsmith@example.net> Date: Sun, 6 Mar 2005 19:56:43 +0530 From: IndianAtTech <josephsmith@example.net> Reply-To: IndianAtTech <josephsmith@example.net> To: josephsmith@example.net Subject: DomSource Vs SaxSource Vs StreamSource In-Reply-To: <josephsmith@example.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <josephsmith@example.net> <josephsmith@example.net> <josephsmith@example.net> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi All, I would like to know the difference between SaxSource,DomSource and StreamSource. And also at what Scenarios developer should use above instances. What are the advantages/disadvantages of one Source Object over other two source objects. Thanks Inidan From xalan-j-usersjosephsmith@example.net Sun Mar 06 21:06:55 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 71406 invoked from network); 6 Mar 2005 21:06:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Mar 2005 21:06:55 -0000 Received: (qmail 67457 invoked by uid 500); 6 Mar 2005 21:06:54 -0000 Delivered-To: josephsmith@example.net Received: (qmail 67441 invoked by uid 500); 6 Mar 2005 21:06:53 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 67427 invoked by uid 99); 6 Mar 2005 21:06:53 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from grunt16.ihug.co.nz (HELO grunt16.ihug.co.nz) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 06 Mar 2005 13:06:52 -0800 Received: from 618-685-1112.adsl.ihug.co.nz ([83.161.120.155]) [83.161.120.155] by grunt16.ihug.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1D82xa-0007o1-00; Mon, 07 Mar 2005 10:06:47 +1300 Mime-Version: 1.0 Message-Id: <a06200705be5120b8f325@[83.161.120.155]> In-Reply-To: <josephsmith@example.net> References: <josephsmith@example.net> <josephsmith@example.net> <josephsmith@example.net> <josephsmith@example.net> Date: Mon, 7 Mar 2005 10:06:35 +1300 To: IndianAtTech <josephsmith@example.net> From: Advent Information Systems <josephsmith@example.net> Subject: Re: DomSource Vs SaxSource Vs StreamSource Cc: josephsmith@example.net Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N At 19:56 +0530 6/03/05, IndianAtTech wrote: >Hi All, > >I would like to know the difference between SaxSource,DomSource and >StreamSource. > >And also at what Scenarios developer should use above instances. What >are the advantages/disadvantages of one Source Object over other two >source objects. > >Thanks >Inidan This looks a lot like a homework problem. If it isn't, tell us about the particular application for which you want this question answered, and maybe we can be of some help. -- AA III SSS | Advent Information Systems Ltd. A A I S | AAAA I SS | Richard Grossman, Systems Architect A A I S | A A III SSS | e-mail: <josephsmith@example.net> From xalan-j-usersjosephsmith@example.net Mon Mar 07 04:50:02 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 95465 invoked from network); 7 Mar 2005 04:50:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 7 Mar 2005 04:50:01 -0000 Received: (qmail 49855 invoked by uid 500); 7 Mar 2005 04:49:59 -0000 Delivered-To: josephsmith@example.net Received: (qmail 49804 invoked by uid 500); 7 Mar 2005 04:49:58 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 49778 invoked by uid 99); 7 Mar 2005 04:49:58 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of josephsmith@example.net designates 83.161.120.155 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 06 Mar 2005 20:49:56 -0800 Received: by wproxy.gmail.com with SMTP id 68so2519065wri for <josephsmith@example.net>; Sun, 06 Mar 2005 20:49:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=BkcVvo+0Mkmpf/oMTrAUKVq/oIdlpjMnl6CRUPYlFusytSut4HHV8rDTqTRO3sKwtvBPt1U2FJFjQ+Q+INLn5VwCtMf2z/UC0QZncvV1FUzDgBQkDzV3qXWZfSIEWXa0yMA/PoKQZgiBst9hTxa60MQmmlS/5N2ix4xHz8BjsEw= Received: by 83.161.120.155 with SMTP id k56mr10313wrk; Sun, 06 Mar 2005 20:49:54 -0800 (PST) Received: by 83.161.120.155 with HTTP; Sun, 6 Mar 2005 20:49:54 -0800 (PST) Message-ID: <josephsmith@example.net> Date: Mon, 7 Mar 2005 10:19:54 +0530 From: IndianAtTech <josephsmith@example.net> Reply-To: IndianAtTech <josephsmith@example.net> To: Advent Information Systems <josephsmith@example.net> Subject: Re: DomSource Vs SaxSource Vs StreamSource Cc: josephsmith@example.net, josephsmith@example.net, josephsmith@example.net In-Reply-To: <josephsmith@example.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <josephsmith@example.net> <josephsmith@example.net> <josephsmith@example.net> <josephsmith@example.net> <josephsmith@example.net> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Richard, This is not homework my friend. I am just learning the concepts and I didn't understand why apache team has provided three source objects in order to transform the XML to other form. As per initail understanding I understand that transformer transforms the XML, based on events araised for SaxSource as SAX works on event driven mechanism. And I am thinking that, this object is used whenever I transform the huge XMLs. Am I right on this?? And DomSource is based on Document Object model. But I do not understand why we need to maintain the objects in memory while transforming the XML. Is there any specific reason?? Coming to StreamSource it is stream mechanism. And What I am thinking is it is faster than SAX. Am I right on all the above thoughts. If not plz clarify me?? And also as per initial query, plz let me know when and where we can go for those Source Objects and also also plz let me know their Individual advantages/disadvantages so that I can get clear picture in mind on this Transforming mechanisms. Hope I get the positive Response Thanks Indian On Mon, 7 Mar 2005 10:06:35 +1300, Advent Information Systems <josephsmith@example.net> wrote: > At 19:56 +0530 6/03/05, IndianAtTech wrote: > >Hi All, > > > >I would like to know the difference between SaxSource,DomSource and > >StreamSource. > > > >And also at what Scenarios developer should use above instances. What > >are the advantages/disadvantages of one Source Object over other two > >source objects. > > > >Thanks > >Inidan > > This looks a lot like a homework problem. If it isn't, tell us about > the particular application for which you want this question answered, > and maybe we can be of some help. > > -- > AA III SSS | Advent Information Systems Ltd. > A A I S | > AAAA I SS | Richard Grossman, Systems Architect > A A I S | > A A III SSS | e-mail: <josephsmith@example.net> > From xalan-j-usersjosephsmith@example.net Mon Mar 07 14:15:41 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 90410 invoked from network); 7 Mar 2005 14:15:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 7 Mar 2005 14:15:41 -0000 Received: (qmail 96903 invoked by uid 500); 7 Mar 2005 14:15:30 -0000 Delivered-To: josephsmith@example.net Received: (qmail 96825 invoked by uid 500); 7 Mar 2005 14:15:29 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 96794 invoked by uid 99); 7 Mar 2005 14:15:29 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of josephsmith@example.net designates 83.161.120.155 as permitted sender) Received: from e4.ny.us.ibm.com (HELO e4.ny.us.ibm.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 07 Mar 2005 06:15:29 -0800 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [83.161.120.155]) by e4.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j27EFROR015693; Mon, 7 Mar 2005 09:15:27 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [83.161.120.155]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j27EFRWY066446; Mon, 7 Mar 2005 09:15:27 -0500 Received: from d01av04.pok.ibm.com (loopback [83.161.120.155]) by d01av04.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j27EFQqx023708; Mon, 7 Mar 2005 09:15:27 -0500 Received: from d01ml605.pok.ibm.com (d01ml605.pok.ibm.com [83.161.120.155]) by d01av04.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j27EFQeH023704; Mon, 7 Mar 2005 09:15:26 -0500 Subject: Re: DomSource Vs SaxSource Vs StreamSource To: josephsmith@example.net, josephsmith@example.net, josephsmith@example.net X-Mailer: Lotus Notes Release 6.0 September 26, 2002 Message-ID: <josephsmith@example.net> From: Joseph Kesselman <josephsmith@example.net> Date: Mon, 7 Mar 2005 09:11:20 -0500 X-MIMETrack: Serialize by Router on D01ML605/01/M/IBM(Build V70_M4_01112005 Beta 3|January 11, 2005) at 03/07/2005 09:15:26 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > am thinking that, this object is used whenever I transform the huge > XMLs. Am I right on this?? Xalan's internal model API is DTM. DOMSource is used to indicate that the DTM API should be wrapped around a user-provided DOM. SAXSource is used to indicate that a DTM should be built from a user-provided stream of SAX events. StreamSource is used to indicate that a parser should be instantiated to parse the user-provided text stream into a DTM; this is generally done by using the SAXSource path internally. > But I do not > understand why we need to maintain the objects in memory while > transforming the XML. Is there any specific reason?? XSLT includes operations which can refer back to earlier parts of the document. That requires random access to all the document's contents, which is generally impelemnted by building an in-memory model -- in our case, a DTM. Theoretically it should be possible to pre-analyse the stylesheet to recognize those stylesheets which can operate without a persistant model, or to retain only those portions of the model which will actually be re-examined. Please search the archives of this mailing list for the keywords "streaming" and "pruning" to find past discussion of possible approaches to achieving that optimization. It's a difficult problem, and Xalan does not implement it at this time. > Coming to StreamSource it is stream mechanism. And What I am thinking > is it is faster than SAX. As noted above, a text stream just gets parsed into a SAX stream and treated the same thereafter. From xalan-j-usersjosephsmith@example.net Mon Mar 07 14:26:29 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 1831 invoked from network); 7 Mar 2005 14:26:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 7 Mar 2005 14:26:28 -0000 Received: (qmail 15687 invoked by uid 500); 7 Mar 2005 14:26:25 -0000 Delivered-To: josephsmith@example.net Received: (qmail 15408 invoked by uid 500); 7 Mar 2005 14:26:24 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 15376 invoked by uid 99); 7 Mar 2005 14:26:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of josephsmith@example.net designates 83.161.120.155 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 07 Mar 2005 06:26:23 -0800 Received: by wproxy.gmail.com with SMTP id 68so2701824wri for <josephsmith@example.net>; Mon, 07 Mar 2005 06:26:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=j0J7SJjksi90DkjlnVbxXyct3BzvIRh2fvPjxZA/SivzQMpBDXgVAUm/Bkj01xwfSmedxn/uQexYhKTwocuKoTps+Er6QI8YmInHJcvRccXBQ2dyiUS2P6wGkKA/s0fqAPcc2nNgAsChxLhdG9WLItwhiGVUZTfVfaKIGPyJTec= Received: by 83.161.120.155 with SMTP id t19mr56142wra; Mon, 07 Mar 2005 06:26:21 -0800 (PST) Received: by 83.161.120.155 with HTTP; Mon, 7 Mar 2005 06:26:21 -0800 (PST) Message-ID: <josephsmith@example.net> Date: Mon, 7 Mar 2005 19:56:21 +0530 From: IndianAtTech <josephsmith@example.net> Reply-To: IndianAtTech <josephsmith@example.net> To: josephsmith@example.net Subject: Re: DomSource Vs SaxSource Vs StreamSource Cc: josephsmith@example.net, josephsmith@example.net In-Reply-To: <josephsmith@example.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <josephsmith@example.net> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Thanks for reply. I would like to know what is DTM stands for?? Thanks Indian On Mon, 7 Mar 2005 09:11:20 -0500, Joseph Kesselman <josephsmith@example.net> wrote: > > am thinking that, this object is used whenever I transform the huge > > XMLs. Am I right on this?? > > Xalan's internal model API is DTM. > > DOMSource is used to indicate that the DTM API should be wrapped around a > user-provided DOM. > > SAXSource is used to indicate that a DTM should be built from a > user-provided stream of SAX events. > > StreamSource is used to indicate that a parser should be instantiated to > parse the user-provided text stream into a DTM; this is generally done by > using the SAXSource path internally. > > > > But I do not > > understand why we need to maintain the objects in memory while > > transforming the XML. Is there any specific reason?? > > XSLT includes operations which can refer back to earlier parts of the > document. That requires random access to all the document's contents, which > is generally impelemnted by building an in-memory model -- in our case, a > DTM. > > Theoretically it should be possible to pre-analyse the stylesheet to > recognize those stylesheets which can operate without a persistant model, > or to retain only those portions of the model which will actually be > re-examined. Please search the archives of this mailing list for the > keywords "streaming" and "pruning" to find past discussion of possible > approaches to achieving that optimization. It's a difficult problem, and > Xalan does not implement it at this time. > > > > Coming to StreamSource it is stream mechanism. And What I am thinking > > is it is faster than SAX. > > As noted above, a text stream just gets parsed into a SAX stream and > treated the same thereafter. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: josephsmith@example.net > For additional commands, e-mail: josephsmith@example.net > > From xalan-j-usersjosephsmith@example.net Mon Mar 07 14:43:55 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 10882 invoked from network); 7 Mar 2005 14:43:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 7 Mar 2005 14:43:55 -0000 Received: (qmail 40029 invoked by uid 500); 7 Mar 2005 14:43:54 -0000 Delivered-To: josephsmith@example.net Received: (qmail 40011 invoked by uid 500); 7 Mar 2005 14:43:54 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 39998 invoked by uid 99); 7 Mar 2005 14:43:53 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_30_40,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from e2.ny.us.ibm.com (HELO e2.ny.us.ibm.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 07 Mar 2005 06:43:52 -0800 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [83.161.120.155]) by e2.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j27EhoTw029630 for <josephsmith@example.net>; Mon, 7 Mar 2005 09:43:50 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [83.161.120.155]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j27EhoWY063058 for <josephsmith@example.net>; Mon, 7 Mar 2005 09:43:50 -0500 Received: from d01av01.pok.ibm.com (loopback [83.161.120.155]) by d01av01.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j27EhnnC006096 for <josephsmith@example.net>; Mon, 7 Mar 2005 09:43:49 -0500 Received: from d25ml04.torolab.ibm.com (d25ml04.torolab.ibm.com [83.161.120.155]) by d01av01.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j27EhnHi006082 for <josephsmith@example.net>; Mon, 7 Mar 2005 09:43:49 -0500 In-Reply-To: <josephsmith@example.net> To: IndianAtTech <josephsmith@example.net> Cc: josephsmith@example.net MIME-Version: 1.0 Subject: Re: DomSource Vs SaxSource Vs StreamSource X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: <josephsmith@example.net> From: Christine Li <josephsmith@example.net> Date: Mon, 7 Mar 2005 09:43:52 -0500 X-MIMETrack: Serialize by Router on D25ML04/25/M/IBM(Release 6.53HF247 | January 6, 2005) at 03/07/2005 09:43:50, Serialize complete at 03/07/2005 09:43:50 Content-Type: multipart/alternative; boundary="=_alternative 0050E99485256FBD_=" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multipart message in MIME format. --=_alternative 0050E99485256FBD_= Content-Type: text/plain; charset="US-ASCII" > I would like to know what is DTM stands for?? > DTM stands for the Document Table Model. For more detail, please refer to http://xml.apache.org/xalan-j/dtm.html By the way, josephsmith@example.net is for developers of the xalan to discuss issues, code changes/additions, etc. Please try to send your questions to the right mailing list. Thanks, --=_alternative 0050E99485256FBD_= Content-Type: text/html; charset="US-ASCII" <br><font size=2><tt>&nbsp;<br> &gt; I would like to know what is DTM stands for??<br> &gt; </tt></font> <br> <br><font size=2><tt>DTM stands for the Document Table Model. For more detail, please refer to http://xml.apache.org/xalan-j/dtm.html</tt></font> <br><font size=2><tt>By the way, josephsmith@example.net is for developers of the xalan to discuss issues, code changes/additions, etc. Please try to send your questions to the right mailing list. Thanks,</tt></font> <table width=100%> <tr valign=top> <td width=100% bgcolor=white></table> <br> --=_alternative 0050E99485256FBD_=-- From xalan-j-usersjosephsmith@example.net Mon Mar 07 14:45:58 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 11693 invoked from network); 7 Mar 2005 14:45:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 7 Mar 2005 14:45:58 -0000 Received: (qmail 41337 invoked by uid 500); 7 Mar 2005 14:45:46 -0000 Delivered-To: josephsmith@example.net Received: (qmail 41304 invoked by uid 500); 7 Mar 2005 14:45:46 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 41276 invoked by uid 99); 7 Mar 2005 14:45:46 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of josephsmith@example.net designates 83.161.120.155 as permitted sender) Received: from e6.ny.us.ibm.com (HELO e6.ny.us.ibm.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 07 Mar 2005 06:45:45 -0800 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [83.161.120.155]) by e6.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j27Ejham030452; Mon, 7 Mar 2005 09:45:43 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [83.161.120.155]) by d01relay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j27EjhWY071596; Mon, 7 Mar 2005 09:45:43 -0500 Received: from d01av02.pok.ibm.com (loopback [83.161.120.155]) by d01av02.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j27EjgeK005734; Mon, 7 Mar 2005 09:45:42 -0500 Received: from d01ml605.pok.ibm.com (d01ml605.pok.ibm.com [83.161.120.155]) by d01av02.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j27EjgW6005731; Mon, 7 Mar 2005 09:45:42 -0500 In-Reply-To: <josephsmith@example.net> Subject: Re: DomSource Vs SaxSource Vs StreamSource Cc: josephsmith@example.net, josephsmith@example.net, josephsmith@example.net X-Mailer: Lotus Notes Release 6.0 September 26, 2002 Message-ID: <josephsmith@example.net> From: Joseph Kesselman <josephsmith@example.net> Date: Mon, 7 Mar 2005 09:44:54 -0500 X-MIMETrack: Serialize by Router on D01ML605/01/M/IBM(Build V70_M4_01112005 Beta 3|January 11, 2005) at 03/07/2005 09:45:42 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N >I would like to know what is DTM stands for?? http://xml.apache.org/xalan-j/dtm.html ______________________________________ Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more. "The world changed profoundly and unpredictably the day Tim Berners Lee got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk From xalan-j-usersjosephsmith@example.net Fri Mar 11 18:44:35 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 53357 invoked from network); 11 Mar 2005 18:44:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 11 Mar 2005 18:44:35 -0000 Received: (qmail 57882 invoked by uid 500); 11 Mar 2005 18:44:31 -0000 Delivered-To: josephsmith@example.net Received: (qmail 57725 invoked by uid 500); 11 Mar 2005 18:44:30 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 57646 invoked by uid 99); 11 Mar 2005 18:44:30 -0000 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=SPF_HELO_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from rozz.csail.mit.edu (HELO rozz.csail.mit.edu) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 11 Mar 2005 10:44:28 -0800 Received: from panther.csail.mit.edu ([83.161.120.155]) by rozz.csail.mit.edu with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.50) id 1D9p7a-00019f-KH; Fri, 11 Mar 2005 13:44:26 -0500 Message-ID: <josephsmith@example.net> Date: Fri, 11 Mar 2005 13:43:56 -0500 From: Vineet Sinha <josephsmith@example.net> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: josephsmith@example.net Subject: Survey on Understanding Code Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, We are running a set of small surveys, in an attempt to understand developers problems when attempting to understand code. Results from this survey will be used in refining (open-source) tools that we are building. If you have looked at the code of any of the (Java) projects below, we would appreciate you taking a few minutes to fill out as many of the respective surveys: Ant, Struts, Geronimo, Cocoon, Xerces, Xalan, Tomcat, Derby, Lucene, and Batik. The survey can be found at: http://people.csail.mit.edu/people/vineet/pc_apache.html Please contact me if you have any questions, concerns, or comments! Thanks!! Regards, Vineet Sinha josephsmith@example.net PS: If this is not an appropriate place for posting this message, I will appreciate a pointer to the appropriate locations - Thanks! From xalan-j-usersjosephsmith@example.net Fri Mar 11 22:47:31 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 68374 invoked from network); 11 Mar 2005 22:47:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 11 Mar 2005 22:47:31 -0000 Received: (qmail 87263 invoked by uid 500); 11 Mar 2005 22:47:22 -0000 Delivered-To: josephsmith@example.net Received: (qmail 87173 invoked by uid 500); 11 Mar 2005 22:47:22 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 87138 invoked by uid 99); 11 Mar 2005 22:47:21 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of josephsmith@example.net designates 83.161.120.155 as permitted sender) Received: from ihemail1.lucent.com (HELO ihemail1.lucent.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 11 Mar 2005 14:47:20 -0800 Received: from nj7460exch001h.wins.lucent.com (h135-17-42-36.lucent.com [83.161.120.155]) by ihemail1.lucent.com (8.12.11/8.12.11) with ESMTP id j2BMlGK1006145 for <josephsmith@example.net>; Fri, 11 Mar 2005 16:47:16 -0600 (CST) Received: by nj7460exch001h.ho.lucent.com with Internet Mail Service (5.5.2657.72) id <DJD2SCBX>; Fri, 11 Mar 2005 17:47:15 -0500 Message-ID: <josephsmith@example.net> From: "Lagomasino, Adolfo (Adolfo)" <josephsmith@example.net> To: josephsmith@example.net Subject: Sorting the nodes of a node set and still get a node set Date: Fri, 11 Mar 2005 17:47:14 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am having some trouble creating a variable that would contain a node-set with a desired order. Consider the following document <TABLE> <DATA_ITEM IS_KEY="false"/> <DATA_ITEM IS_KEY="true"/> <DATA_ITEM IS_KEY="false"/> <DATA_ITEM IS_KEY="false"/> <DATA_ITEM IS_KEY="true"/> </TABLE> I would like to create a node-set (not a node fragment) where the IS_KEY='true' nodes are listed first and then the rest. I tried using a variable with a copy-of but it creates a node fragment which limits the operations I can use (I need to use [] later in the code. This is the code, <xsl:variable name="field-set"> <xsl:for-each select="DATA_ITEM"> <xsl:sort select="@IS_KEY='true'"/> <xsl:sort select="@IS_KEY='false'"/> <xsl:copy-of select="."/> </xsl:for-each> </xsl:variable> The resulting order is what I want, but the it is a node-fragment, so I can not use []. I tried the following: <xsl:variable name="key_fields_set" select="DATA_ITEM[@IS_KEY='true']"/> <xsl:variable name="data_fields_set" select="DATA_ITEM[[@IS_KEY='false']"/> <xsl:variable name="field-set" select="$key_fields_set | $data_fields_set"/> and to my surprise, the union restores the original order ?? Any suggestions would be appreciated. Thanks, Adolfo From xalan-j-usersjosephsmith@example.net Fri Mar 11 23:15:21 2005 Return-Path: <xalan-j-usersjosephsmith@example.net> Delivered-To: josephsmith@example.net Received: (qmail 76456 invoked from network); 11 Mar 2005 23:15:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 11 Mar 2005 23:15:20 -0000 Received: (qmail 12865 invoked by uid 500); 11 Mar 2005 23:15:19 -0000 Delivered-To: josephsmith@example.net Received: (qmail 12852 invoked by uid 500); 11 Mar 2005 23:15:19 -0000 Mailing-List: contact josephsmith@example.net; run by ezmlm Precedence: bulk list-help: <mailto:josephsmith@example.net> list-unsubscribe: <mailto:josephsmith@example.net> List-Post: <mailto:josephsmith@example.net> Delivered-To: mailing list josephsmith@example.net Received: (qmail 12826 invoked by uid 99); 11 Mar 2005 23:15:19 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_40_50,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from e1.ny.us.ibm.com (HELO e1.ny.us.ibm.com) (83.161.120.155) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 11 Mar 2005 15:15:17 -0800 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [83.161.120.155]) by e1.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j2BNFFoA019851 for <josephsmith@example.net>; Fri, 11 Mar 2005 18:15:15 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [83.161.120.155]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j2BNFFgf177312 for <josephsmith@example.net>; Fri, 11 Mar 2005 18:15:15 -0500 Received: from d01av04.pok.ibm.com (loopback [83.161.120.155]) by d01av04.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j2BNFFGB015286 for <josephsmith@example.net>; Fri, 11 Mar 2005 18:15:15 -0500 Received: from d25ml04.torolab.ibm.com (d25ml04.torolab.ibm.com [83.161.120.155]) by d01av04.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j2BNFFDW015277; Fri, 11 Mar 2005 18:15:15 -0500 In-Reply-To: <josephsmith@example.net> To: "Lagomasino, Adolfo (Adolfo)" <josephsmith@example.net> Cc: josephsmith@example.net MIME-Version: 1.0 Subject: Re: Sorting the nodes of a node set and still get a node set X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: <josephsmith@example.net> From: Christine Li <josephsmith@example.net> Date: Fri, 11 Mar 2005 18:15:15 -0500 X-MIMETrack: Serialize by Router on D25ML04/25/M/IBM(Release 6.53HF247 | January 6, 2005) at 03/11/2005 18:15:15, Serialize complete at 03/11/2005 18:15:15 Content-Type: multipart/alternative; boundary="=_alternative 007FBB6285256FC1_=" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multipart message in MIME format. --=_alternative 007FBB6285256FC1_= Content-Type: text/plain; charset="US-ASCII" Hi, Adolfo You can use nodeset extension function to cast a Result Tree Fragment to a node set. For more detail, please refer to http://xml.apache.org/xalan-j/extensionslib.html#nodeset hope it helps, Christine Li XSLT Development IBM Toronto Lab Tel: 618-685-1112 Email: josephsmith@example.net "Lagomasino, Adolfo (Adolfo)" <josephsmith@example.net> 03/11/2005 05:47 PM To josephsmith@example.net cc Subject Sorting the nodes of a node set and still get a node set I am having some trouble creating a variable that would contain a node-set with a desired order. Consider the following document <TABLE> <DATA_ITEM IS_KEY="false"/> <DATA_ITEM IS_KEY="true"/> <DATA_ITEM IS_KEY="false"/> <DATA_ITEM IS_KEY="false"/> <DATA_ITEM IS_KEY="true"/> </TABLE> I would like to create a node-set (not a node fragment) where the IS_KEY='true' nodes are listed first and then the rest. I tried using a variable with a copy-of but it creates a node fragment which limits the operations I can use (I need to use [] later in the code. This is the code, <xsl:variable name="field-set"> <xsl:for-each select="DATA_ITEM"> <xsl:sort select="@IS_KEY='true'"/> <xsl:sort select="@IS_KEY='false'"/> <xsl:copy-of select="."/> </xsl:for-each> </xsl:variable> The resulting order is what I want, but the it is a node-fragment, so I can not use []. I tried the following: <xsl:variable name="key_fields_set" select="DATA_ITEM[@IS_KEY='true']"/> <xsl:variable name="data_fields_set" select="DATA_ITEM[[@IS_KEY='false']"/> <xsl:variable name="field-set" select="$key_fields_set | $data_fields_set"/> and to my surprise, the union restores the original order ?? Any suggestions would be appreciated. Thanks, Adolfo --=_alternative 007FBB6285256FC1_= Content-Type: text/html; charset="US-ASCII" <br><font size=2 face="sans-serif">Hi, Adolfo</font> <br> <br><font size=2 face="sans-serif">You can use nodeset extension function to cast a Result Tree Fragment to a node set. For
{'source': 'Apache Software Foundation Public Mail Archives'}