XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
P SSubject: xslt include
Author: P S
Date: 23 Jan 2006 03:49 PM
hi
I am trying to call a template from an include xsl file which is in the dir one level above the original xslt dir. But it keeps giving error that "There is no named template defined with the name"

But if i copy the include stylesheet into the same dir where the calling stylesheet is it works fine.

I have folder called c:\proj\xslt and c:\proj\COMMON.

Parent xslt is under xslt folder. and inlcude xslt is in common folder.

<xsl:include href="../COMMON/UTIL_TEMPLATES.xsl"/>

Any suggetion will help. thanks

Postnext
Tony LavinioSubject: xslt include
Author: Tony Lavinio
Date: 23 Jan 2006 04:17 PM
Your common and xslt directories are peers most likely, since otherwise
you'd probably get an error that the common stylesheet couldn't be
loaded, as opposed to not being able to be found. So, without seeing what
you have, here are a few things to try.

1) Try using a different XSLT processor (through the Scenarios tabs).
See if the error is still present.

2) Put the common XSLT in the same directory (not forever, just for
testing). See if the include works then.

3) Does the common XSLT work in other cases? Could it be missing the
XSLT namespace declaration or xsl:stylesheet element at the top?

Let us know what you discover for each test, and we'll see where that
brings us.

Postnext
P SSubject: xslt include
Author: P S
Date: 24 Jan 2006 11:04 AM
The dir structure is
c:\proj\xslt\MARGIN.xsl;
c:\proj\COMMON\UTIL_TEMPLATES.xsl


Margin.xsl has

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:include href="../COMMON/UTIL_TEMPLATES.xsl"/>



1) Try using a different XSLT processor (through the Scenarios tabs).
See if the error is still present.
Ans: Still didn't work.

2) Put the common XSLT in the same directory (not forever, just for
testing). See if the include works then.
Ans: It did work.


3) Does the common XSLT work in other cases? Could it be missing the
XSLT namespace declaration or xsl:stylesheet element at the top?
Ans: its not missing namespace declaration or xsl:stylesheet element.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"></xsl:template>
<xsl:template name="paging"> ...



Posttop
P SSubject: xslt include
Author: P S
Date: 24 Jan 2006 11:20 AM
hi
found my bug. Thanks for your help. I had two copies of the xslt, one was missing one letter at the end which didn't have paging template and i was refering to that one. Thanks

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.