RE: [xsl] xsl:import or xsl:include or another alternative?

Subject: RE: [xsl] xsl:import or xsl:include or another alternative?
From: "Martinez, Brian" <brian.martinez@xxxxxxxxxxx>
Date: Tue, 1 Jul 2003 09:45:47 -0600
> From: jim [mailto:xsl@xxxxxxxxxxxxxxxxx]
> Sent: Tuesday, July 01, 2003 8:51 AM
> Subject: RE: [xsl] xsl:import or xsl:include or another alternative?
> 
> 
> thanks brian,
> 
> > Put the template into a separate stylesheet (say, 
> product.xslt), then use
> > xsl:import or xsl:include in your other stylesheets to make 
> it available:
> >
> > <xsl:import href="product.xslt"/>
> > <!-- or whatever the proper path is; this can be relative 
> to the importing
> > stylesheet -->
> 
> So is this a "clean" way of doing the above or is there a 
> more convenient
> logic to easily change the layout but also only show 1 
> product's details per
> page?

No, I think you've got it.  The assumption of course is that you must pass
category_id to your stylesheet when invoking the transformation, so that you
override the default value ('1.01') to display a different product's
details.  The other assumption is that category_id is unique since your
XPath expression will select all product nodes where <category_id> matches
your parameter.

cheers,
b.

| brian martinez                           brian.martinez@xxxxxxxxxxx |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services   http://www.cheaptickets.com/ |

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread