xml Constant

elhajjar

Usenet Archive
Joined
Oct 17, 2003
Messages
1
Reaction score
0
Hi,

I have a block of code (title of table with some images) repeating many time in my XSL file. I do not want to repeat this block of code many time, I like to use like constant to define the block of code to it.

And in my XSL file, put this constant to have the block of code.

How can I do this in XSL?

Thanks,
 

Patrick TJ McPhee

Usenet Archive
Joined
Apr 2, 2000
Messages
269
Reaction score
0
% I have a block of code (title of table with some images) repeating % many time in my XSL file. I do not want to repeat this block of code % many time, I like to use like constant to define the block of code to % it.

How about using a variable?
<xsl:variable name="block">
<whatever>you like</whatever>
</xsl:variable>

% And in my XSL file, put this constant to have the block of code.

<xsl:copy-of select="$block"/>

Note that the variable value must be well-formed.
 

Johannes Koch

Usenet Archive
Joined
Nov 14, 2000
Messages
801
Reaction score
0
elhajjar said:
Hi,

I have a block of code (title of table with some images) repeating many time in my XSL file. I do not want to repeat this block of code many time, I like to use like constant to define the block of code to it.

And in my XSL file, put this constant to have the block of code.

How can I do this in XSL?

<xsl:template name="myBlock">
<!-- the code -->
</xsl:template>

<xsl:call-template name="myBlock"/>
 

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

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top