call template function called from another xml file?

Discussion in 'XML' started by bjam, Apr 7, 2005.

  1. bjam

    bjam Guest

    Hi, if I want to include a set of call template methods into my xsl
    file can I do that? Meaning I want to have the template method below
    of data_output in another file that I can use in several other xsl
    files when needed. This would be similar to an inclue mindset in C++
    or a import in java. Any help is greatly appreciated. Below I would
    like the "data_output" template call to be imported so to speak or come
    from another xsl file, can this be done using the document method?

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

    <!-- data output -->
    <xsl:template name="data_output">
    <xsl:attribute name="href">
    <th align='left' bgcolor="lightblue">
    <font color="navy" face='arial' size='2'>
    <xsl:value-of select="text()"/>
    bjam, Apr 7, 2005
    1. Advertisements

  2. bjam

    bjam Guest

    I think I just answered my own question with <xsl:import> thanks
    bjam, Apr 7, 2005
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page