Subject: Re: Complex expression problem... From: "Steve Muench" <smuench@xxxxxxxxxxxxx> Date: Fri, 24 Mar 2000 14:26:34 -0800 |
<xsl:for-each select="/customers/customer[starts-with(name,'a') and starts-with(city,'b') and starts-with(zip,'9')]"> : : </xsl:for-each> Although, if you'll be doing this over thousands of customers *AND* you are already pulling the customer information from a database, you might want to push this query through and let your database filter the rows *before* rendering the resulting matches as XML to make things go a lot faster...Just a thought, and might not apply to your situation, but seemed like it was worth suggesting... ______________________________________________________________ Steve Muench, Lead XML Evangelist & Consulting Product Manager Business Components for Java Dev't Team, Oracle Corporation ----- Original Message ----- From: "Jonathan Asbell" <jonathana@xxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent: Friday, March 24, 2000 2:12 PM Subject: Complex expression problem... | How do I say | | __________________________________ | for each customer where.... | the value of "name" begins with "a" | and | the value of "city" begins with "p" | and | the value of "zip" begins with "9" | output their field values | (that is for each one that matches the criteria, give me their records) | __________________________________ | | | the xml is below..... | | | <customers> | <customer> | <customer_id>ALFKI</customer_id> | <company_name>Alfreds Futterkiste</company_name> | <contact_name>Maria Anders</contact_name> | <contact_title>Sales Representative</contact_title> | <address>Obere Str. 57</address> | <city>Berlin</city> | <region></region> | <postal_code>12209</postal_code> | <country>Germany</country> | <phone>030-0074321</phone> | <fax>030-0076545</fax> | </customer> | <customer> | <customer_id>AROUT</customer_id> | <company_name>Around the Horn</company_name> | <contact_name>Thomas Hardy</contact_name> | <contact_title>Sales Representative</contact_title> | <address>120 Hanover Sq.</address> | <city>London</city> | <region></region> | <postal_code>WA1 1DP</postal_code> | <country>UK</country> | <phone>(171) 555-7788</phone> | <fax>(171) 555-6750</fax> | </customer> | | etc....... | | </customers> | | | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Complex expression problem..., Jonathan Asbell | Thread | RE: Complex expression problem..., Jonathan Asbell |
Complex expression problem..., Jonathan Asbell | Date | RE: Complex expression problem..., Jonathan Asbell |
Month |