Subject: Re: [xsl] Problem with <xsl:import> and <xsl:call-template>! From: "cutlass" <cutlass@xxxxxxxxxxx> Date: Tue, 3 Jul 2001 07:46:07 +0100 |
> Hi > I had earlier posted this problem and thought the > problem was solved although i think there IS a serious > problem. > > I have stylesheet B importing stylesheet A ie A > defines the PageStructure and hence all our > stylesheets import stylesheet A. > Stylesheet A matches the topmost node of the xml and > generates the <HTML> and body tags.It then does an > "apply-templates" obviously. > Now the xml grows in size and the stylesheets get > reused the problem is that they get applied just by > importing for eg say i have a stylesheet that > resuses/imports 2 stylesheets and needs to call the > templates from those stylesheets at different > locations/postions while formatting html. > However they just get applied just by importing and an > explicit call-template seems useless.The content just > gets outputted. using <xsl:template match="somelement"> in conjunction with <xsl:apply-templates/> will auto match default templates. using <xsl:template name="templatename"> in conjunction with <xsl:call-template name="templatename"/> will only fire off that template when u want it > So now we got around the problem by forcefully putting > "modes" and puposefully matching tags with no > content.However i wanted to know if this is the way > everybody does or is there something that i am > missing. using modes are useful, but i am unsure if u are using this, because u dont understand the technique of calling a template vs auto matching a template. i would like to help, if u send example xml/xsl then we can have a go. cheers, jim fuller XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Problem with <xsl:import> and, Vijay Rao | Thread | RE: [xsl] Problem with <xsl:import>, Tim Watts |
Re: [xsl] need an "&" in my text!!!, cutlass | Date | RE: [xsl] need an "&" in my text!!!, Tim Watts |
Month |