Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xml Constant

Reply
Thread Tools

xml Constant

 
 
elhajjar
Guest
Posts: n/a
 
      10-17-2003
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,
 
Reply With Quote
 
 
 
 
Patrick TJ McPhee
Guest
Posts: n/a
 
      10-19-2003
In article <(E-Mail Removed) >,
elhajjar <(E-Mail Removed)> wrote:

% 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.
--

Patrick TJ McPhee
East York Canada
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Johannes Koch
Guest
Posts: n/a
 
      10-20-2003
elhajjar wrote:
> 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"/>
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"error C2057: expected constant expression", "error C2466: cannot allocate an array of constant size 0". Why doesn't my simple program work??? hn.ft.pris@gmail.com C++ 13 01-22-2007 02:03 PM
pointers to constant characters and constant pointers to characters sam_cit@yahoo.co.in C Programming 4 12-14-2006 11:10 PM
len(var) is [CONSTANT] equal to len(var) == [CONSTANT]? Tor Erik Soenvisen Python 14 11-23-2006 09:57 PM
"Non-constant" constant can't be used as template argument Martin Magnusson C++ 2 10-08-2004 08:41 AM
Understanding How To Use #ifdef Constant #define Constant Sequence In Multible Files Christopher M. Lusardi C++ 1 09-02-2004 07:43 AM



Advertisments