xsl-list
[Top] [All Lists]

Re: [xsl] XSL import

2006-08-28 08:31:43
Excuse my english, I'll try to explain that as better as I can:

I have a group of XSL that use common HTML and XSL elements. I'd like
to make a new and unique XSL as an include which gathers these common
items.

Concise example:

xml:
===

<?xml version="1.0" encoding="UTF-8"?>
<theForm>
 <fields>
    <text name="activeTab">tab one</text>
    <text name="title">The title of the page</text>
  </fields>
</theForm>

Main XSL:
=======
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" encoding="utf-8" indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />

 <xsl:template match="/">
   <html xmlns="http://www.w3.org/1999/xhtml";>
   <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Bla bla bla</title>
   <link href="/css/main.css" rel="stylesheet" type="text/css" />
   </head>
   <body>
     <xsl:apply-templates />
   </body>
   </html>
 </xsl:template>

 <xsl:template match="theForm">
      <xsl:apply-templates />
 </xsl:template>

 <xsl:template match="fields">
    <div id="divGenContainer">

       <!-- HERE IS WHERE I WANT TO INCLUDE THE HEADER XSL/HTML -->

       <div id="divContents">
            <xsl:value-of select="text[(_at_)name='title']" />
       </div>

     </div>
  </xsl:template>

</xsl:stylesheet>


The include file (XSL/HTML) should have some like the following content:
--------------------------------------------------------------------------------------------------------

<xsl:value-of select="text[(_at_)name='activeTab']" />


-------

Thanx in advance.
Bernie.




On 8/28/06, Florent Georges <darkman_spam(_at_)yahoo(_dot_)fr> wrote:
Bernie WROTE:

> How can I insert an XSL into an specific location in another
> (xsl:import) and use sibling tags in both xsl?

  It is maybe my low level of knowledge in English, but I didn't
understand your question.  Could you reformulate?  An simple example
could be more precise than prose.

  Regards,

--drkm


























 p5.vert.ukl.yahoo.com uncompressed/chunked Mon Aug 28 14:13:42 GMT 2006


___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos 
expériences.
http://fr.answers.yahoo.com


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--
http://creativecommons.org

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>