Subject: RE: [xsl] 5 column grid sorted by Country From: cknell@xxxxxxxxxx Date: Wed, 11 Jul 2007 15:30:09 -0400 |
> I can create a 5 column grid quite easily if the XML contains producers of > just one country but handling more than one has me beaten, for now at least. You are vague on exactly what trouble you are having. Why is it relevant that the list might contain vintners from more than one country? What is your output target format? -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: W Charlton <XSLList@xxxxxxxxxx> Sent: Tue, 10 Jul 2007 20:49:41 +0100 To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: [xsl] 5 column grid sorted by Country I?ve been wrestling with this all day and thought I would throw this out to the xsl community. I?m using XSL 1.0 although an XSL 2.0 solution would possibly be OK if MS C# DotNet supports it? We are using DotNetNuke if anyone is familiar with it and I?m not sure if it supports XSL v 2.0 but we access to the source code and if needed it could possibly be hacked if XSL 2.0 is the only way forward. I have a list of wine producers from various different countries and need to output them in a 5 column (although customers being what they are this could be 4 column so this would need to be a parameter) grid grouped by country. The XML looks like: <DocumentElement> <QueryResults> <ManufacturerID>1</ManufacturerID> <ManufacturerName>Abelard Champagne</ManufacturerName> <CountryCode>DE</CountryCode> </QueryResults> <QueryResults> <ManufacturerID>2</ManufacturerID> <ManufacturerName>Caymus Vineyards</ManufacturerName> <LogoURL>/Manufacturers/CAYM.jpg</LogoURL> <CountryCode>US</CountryCode> <Location>California</Location> </QueryResults> <QueryResults> <ManufacturerID>3</ManufacturerID> <ManufacturerName>DeLille Cellars</ManufacturerName> <LogoURL>/Manufacturers/delil.jpg</LogoURL> <CountryCode>IT</CountryCode> </QueryResults> <QueryResults> <ManufacturerID>4</ManufacturerID> <ManufacturerName>Pillot Paul</ManufacturerName> <LogoURL>/Manufacturers/DMPP.jpg</LogoURL> <CountryCode>FR</CountryCode> <Location>Burgundy </Location> </QueryResults> <QueryResults> <ManufacturerID>5</ManufacturerID> <ManufacturerName>D. R. Stephens</ManufacturerName> <LogoURL>/Manufacturers/drs.jpg</LogoURL> <CountryCode>US</CountryCode> <Location>California</Location> </QueryResults> ? And more </DocumentElement> There are roughly 70 producers in total and about 6 countries. These are both variable as the data is dynamic. I can create a 5 column grid quite easily if the XML contains producers of just one country but handling more than one has me beaten, for now at least. My thoughts were to create a key for each country and then a template for each key which used mod 5 to handle the grid. I can construct the sequel query that produces the list to ?order by? CountryCode and then ManufacturerName if it helps and if needed I could hard-code the call for each of the CountryCodes and they could be in separate tables if that makes it easier. Anyone? William Charlton The yMonda team yMonda Limited Burgess Fields Chippel Lane Marnhull, Sturminster Newton Dorset. DT10 1NN UK t: +44 (0) 845 373 2461 GMT f: +44 (0) 845 373 2460 w: www.ymonda.net This email is confidential. It may also be privileged or otherwise protected by other legal rules. If you are not the intended recipient please notify the sender immediately, and delete the message from all locations in your computer; you should not copy the email or use it for any purpose, or disclose its contents to any other person: to do so may be unlawful. Email is subject to possible data corruption you should not rely on advice contained in an email without obtaining written confirmation of it.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] 5 column grid sorted by Coun, W Charlton | Thread | RE: [xsl] 5 column grid sorted by , W Charlton |
Re: [xsl] Tricky transformation tas, David Carlisle | Date | Re: [xsl] Tricky transformation tas, André Locher |
Month |