[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How to import multiple stylesheets into one xsl fi

Subject: RE: How to import multiple stylesheets into one xsl file?
From: Zhen Jiang <zjwsun@xxxxxxxxx>
Date: Thu, 19 Aug 2004 17:48:41 -0700 (PDT)
xsl multiple stylesheets
It worked perfectly! This helped a lot!

I'm still wondering about one thing though. I was
using <xsl:import> in the template after the
<xsl:output>tag on the Apache server installed on my
Windows XP computer and it worked very well. For
example,

<xsl:stylesheet>
<xsl:output>
<xsl:template match="/">
<html>
...
<body>
<table>
<xsl:import href="header.xsl" />
<tr>
<xsl:import href="menubarh.xsl" />
<td>
...
<xsl:import href="menubarv.xsl" />
...
</td>
</tr>
</table>
<xsl:import href="footer.xsl" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Now that I moved my project onto a Unix server then it
gave me error like "<xsl:import> cannot be used at
this point". So I changed the code and had the problem
that I asked before, which you have given me the
answer. How come the same file worked differently on
different OS?

Thanks a lot,

Zhen





--- Michael Kay <mhk@xxxxxxxxx> wrote:

> If you use <xsl:apply-imports> twice from the same
> template rule, it will
> use the same algorithm each time for locating the
> next template rule to
> apply, and will select the same rule both times.
> 
> It would be better here to use named templates, and
> replace apply-imports
> with xsl:call-template.
> 
> Michael Kay 
> 
> > -----Original Message-----
> > From: Zhen Jiang [mailto:zjwsun@xxxxxxxxx] 
> > Sent: 19 August 2004 14:35
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: RE:  How to import multiple
> stylesheets into 
> > one xsl file?
> > 
> > My xslt files need to import header, footer, and 2
> > menu bars because I have so many xslt files and
> each
> > one of them has the same structure. Let me give an
> > example of the xslt file.
> > ...
> > <xsl:stylesheet>
> > <xsl:import href="footer.xsl">
> > <xsl:import href="menubarv.xsl">
> > <xsl:import href="menubarh.xsl">
> > <xsl:import href="header.xsl">
> > <xsl:output>
> > <xsl:template match="/">
> > <xsl:apply-imports/>(should be the header)
> > ...
> > <xsl:apply-imports/>(should be horizontal menubar
> )
> > ...
> > <xsl:apply-imports/>(should be vertical menubar )
> > ...
> > ...
> > <xsl:apply-imports/>>(should be the footer)
> > </xsl:template>
> > </xsl:stylesheet>
> > 
> > I thought the imported files would appear in the
> > opposite order that they are imported but only the
> > header printed 4 times.
> > 
> > I couldn't find answer anywhere.
> > 
> > Thanks a lot,
> > 
> > Zhen
> > 
> > 
> > 
> > 
> > 
> > 
> > --- Michael Kay <mhk@xxxxxxxxx> wrote:
> > 
> > > > I'm trying to import 4 stylesheets into one
> xsl
> > > file
> > > > but what I get is the content of one file
> printed
> > > 4
> > > > times. How do I import them all?
> > > 
> > > I don't think I saw an answer to this question.
> You
> > > are doing something
> > > wrong, but you haven't shown us your code, so
> no-one
> > > can tell you what you
> > > are doing wrong.
> > > 
> > > Michael Kay
> > > 
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.