473,804 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xsl:Include e xsl:call-template

Hi XSL Community,

I would do a file in PDF with FO and XSL/XML tecnology.

In a precisely moment of a creation of this PDF file I must call a
precisely template from a precisely XSL file, that I have already
included.

The name of this template is the same that from a file XML.

Into each file XSL there are one template.

Example:

File XML:
-------------------------
[...]
<object1>ADV6 </object1>
[...]
-------------------------

File XSL (his name is "ADV6.XSL") is structured:

-------------------------
<xsl:stylesheet >
<xsl:template name="ADV6">
[...]
</xsl:template>
</xsl:stylesheet>
-------------------------

File XSL that call another file XSL

-------------------------
[...]
<xsl:include href="Adv6.xsl" ></xsl:include>
[...]
<xsl:call-template name="ADV6"/>
[...]
-------------------------

How do you do to put "Adv6.xsl" and "ADV6" dinamicly?

How do you do?

Thank you for your interesting.

Emanuele

Nov 6 '06 #1
1 1684

lele1979 wrote:
In a precisely moment of a creation of this PDF file I
must call a precisely template from a precisely XSL file,
that I have already included.
File XML:
[...]
<object1>ADV6 </object1>
[...]
File XSL (his name is "ADV6.XSL") is structured:
<xsl:stylesheet >
<xsl:template name="ADV6">
[...]
</xsl:template>
</xsl:stylesheet>
Make that:

<xsl:template match="*[.='ADV6']" mode="processin g">
. . .
</xsl:template>
File XSL that call another file XSL
[...]
<xsl:include href="Adv6.xsl" ></xsl:include>
[...]
<xsl:call-template name="ADV6"/>
[...]
<xsl:apply-templates match="." mode="processin g"/>
How do you do to put "Adv6.xsl" and "ADV6" dinamicly?
XSLT Q&A Things XSLT can't do Conditional Include

http://www.dpawson.co.uk/xsl/sect2/nono.html#d1752e136

XSLT Q&A Things XSLT can't do Call templates
dynamically

http://www.dpawson.co.uk/xsl/sect2/nono.html#d1752e238

If for some inexplicable reason you insist on using named
templates and single-template includes, you'll have to add
another phase to your processing. Basically, you'll need to
compose an extra transformation, that will dynamically
generate an XSLT for processing the original document.

Beware. Down that path lies madness.
How do you do?
Thanks, I'm fine.

--
Pavel Lepin

Nov 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1971
by: Burt Lewis | last post by:
Hi, I have 2 xsl style sheets calling separate rss feeds and I use ASP to display. Problem is that the 1st xsl takes on the style of the 2nd xsl even though they are different formats. I think I need to clear from memory but not sure how. This is the code and sample outputs. They work great on their own but when I call them both they display the same formats. Thanks for any help.
1
1612
by: schaf | last post by:
Hello NG ! I have a big problem. I would like to go through a xml file in a xsl:for-each statement. for-each entry (ID) in the XML file i would like to call an xsl:function, which returns a number. This number i have to summarize during the whole for-each statement. At the end i should have the sum of the added numbers. Like:
0
1403
by: schaf | last post by:
Hi ! I'm writing a new xsl:function, which uses two other functions. But by the call of the first function, it would be abort just after the call. Not even the xsl:param would be set. I don't have any idea, why this works like this. Could you please help me ? Here my xsl-code: <xsl:function name="rsh:bestanden">
2
3229
by: Keith Chadwick | last post by:
I have been running some tests with regards to xsl:include and xsl:import with the same results on both and I am wondering if someone can explain this behavior to me! First off the xslt file is being loaded as in dim myXSLT as new XslTransform() myXSLT.load("scripts/clnt.home.body.xslt") The load craps out when I change the xsl:include, tried all of the following
7
3169
by: Novice | last post by:
Hi all, from every example I've ever seen on using XSL files, the user is able to put HTML into the XSL file Well, I'm making use of the XPathDocument and XSLTransform classes to transform some XML content into HTML. I would like to include "img" tags and potentially "br" tags in the XSL file, but I get errors like this The 'img' start tag on line '22' doesn't match the end tag of 'td' in file...
3
4831
by: Gordon Moore | last post by:
Hi, I'm new to using xml/xslt and although I can create an xml document using the dataset.WriteXml statement, and I have created an xslt to transform the xml into the output I want, I have to manually add the xsl reference statement to the xml file. i.e. <?xml version="1.0" standalone="yes"?> <?xml:stylesheet type="text/xsl" href="Questions.xsl"?> --> I have to
0
1196
by: Alan Searle | last post by:
I hope someone can help me with this simple question ... I have a set of XML files which the users can open and view with the formatting set by a single XSL file. This works great. In the XSL file I have some processing using javascript. This also works fine and, for example, the users can run some simple sorting using the following call to javascript (also contained in the XSL): <td class="top" onclick="sort('job_id');">Job</td>
2
3130
by: al3x4nder | last post by:
I`m need hanling XSLT errors in my script, before I`m use Sablotron, that has nice interface for it: ------------8<------------------ function ProduceXHTML($xml, $xsl){ $xh = xslt_create(); xslt_set_encoding ($xh, CODE_PAGE); $arguments = array('/_xml' => $xml, '/_xsl' => $xsl); $result = @xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);
7
4423
by: Chuck Anderson | last post by:
I can tell I'm not alone in my confusion, as I've been using Google to find a solution to this problem and all I can find is the same question, but no solution. I am running Php 5.25 (Windows binary from php.net) as an Apache 2.0.55 module on Windows XP. I have enabled the xsl extension - php_xsl.dll - in php.ini and indeed, when I look at phpinfo I see all the needed libraries (i.e., DOM/XML, libXML, XSL, libxslt) are enabled.
1
1591
by: stepthom | last post by:
I am attempting to break my templates down from 1 main xsl file into smaller files. Then I want to call them from a main xsl file. I started to look. I have found xsl:include and xsl:import. Also, not sure to use apply-templates or call-templates. Trying to find good examples on both w/ the main file and source file, but have it a road block. Does anyone have ideas on this or good xsl sites that I can refer too. ~thanks!
0
9708
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7623
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.