Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

XSLT imports - how to do in SP?

  Asked By: Sarojini    Date: Nov 06    Category: MOSS    Views: 1017

I've been learning & writing XSLT to put together with a DFWP, and testing
partly in SP and partly in XML NotePad 2007 - works pretty well so far.

My XSLT is getting long enough that I want to cut it up and use "imports" or
"includes". The following example works fine with XML Notepad on my PC, it knows
where to look for the file:
<xsl:import href="copy.xsl" />

How do I do the equivalent in SP (MOSS)? I don't have server access, so where
on my site does this file go? In a DocLib? And what does the href look like
then?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Tonia Franco     Answered On: Nov 06

DVWP is a little pit picky when it comes to includes, so follow the instructions
found here:

blogs.msdn.com/.../filtering-and-format\
ting-with-date-values.aspx

--
Edit the page that contains your Data View in Code view and find the
xsl:stylesheet start-tag.
Insert a new xsl:import tag immediately after the xsl:stylesheet start-tag. For
example, if the page that contains your Data View is
http://mysite/reports/due_dates.aspx, and the date templates are stored in
http://mysite/shared_templates/date_templates.xsl, then you would modify your
Data View as follows:
<xsl:stylesheet ...
<xsl:import href="../shared_templates/date_templates.xsl"/>
<xsl:output method="html" indent="no"/>

 
Didn't find what you were looking for? Find more on XSLT imports - how to do in SP? Or get search suggestion and latest updates.




Tagged: