xsl:Include e xsl:call-template

L

lele1979

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
 
P

p.lepin

lele1979 said:
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="processing">
. . .
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?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,998
Messages
2,570,242
Members
46,834
Latest member
vina0631

Latest Threads

Top